oio11: (Default)
[personal profile] oio11
Автозапуск программ в OpenBox

При запуске иксы смотрят файл ~/.xinitrc . Если его у вас нету - создайте. В него можно прописывать команды для тех программ, которые нужно запускать автоматически. Вот пример:
:  #########################################################################################################

 
$ cat ~/.xinitrc
psi &
qutim &
conky &
xxkb &
feh --bg-scale /files/Pictures/Абстракции/organic.jpg &
tint2 &
openbox
 ########################################################################################################

Обратите внимание - команда openbox идет последней и после всех команд, идущих перед ней, стоит символ &. Если в этом примере "tint2 &" изменить на "tint2", то openbox не запустится, пока не завершится процесс tint2.
$ cat ~/.xinitrc


http://zenux.ru/articles/27/

Date: 2012-11-27 07:32 am (UTC)
From: [identity profile] uzverss.livejournal.com
не обязательно в .xinitrc писать
~/.config/openbox/autostart.sh

вот пример кранчевского автостарта: (если LXDE установлен, то перед lxsession & лучше поставить #)

## Openbox autostart.sh
## ====================
## When you login to your CrunchBang Openbox session, this autostart script
## will be executed to set-up your environment and launch any applications
## you want to run at startup.
##
## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
##
## If you do something cool with your autostart script and you think others
## could benefit from your hack, please consider sharing it at:
## http://crunchbanglinux.org/forums/
##
## Have fun! :)

## Start session manager
lxsession &

## Enable power management
xfce4-power-manager &

## Start Thunar Daemon
thunar --daemon &

## Set desktop wallpaper
nitrogen --restore &

## Launch panel
tint2 &

## Enable Eyecandy - off by default, uncomment one of the commands below.
## Note: cairo-compmgr prefers a sleep delay, else it tends to produce
## odd shadows/quirks around tint2 & Conky.
#(sleep 10s && cb-compmgr --cairo-compmgr) &
#cb-compmgr --xcompmgr &

## Launch network manager applet
(sleep 4s && nm-applet) &

## Detect and configure touchpad. See 'man synclient' for more info.
if egrep -iq 'touchpad' /proc/bus/input/devices; then
synclient VertEdgeScroll=1 &
synclient TapButton1=1 &
fi

## Start xscreensaver
xscreensaver -no-splash &

## Start Conky after a slight delay
(sleep 3s && conky -q) &

## Start volumeicon after a slight delay
(sleep 3s && volumeicon) &

## Nautilus gconf settings, minimises the impact of running Nautilus under
## a pure Openbox session. Safe to delete if you are never going to use Nautilus,
## or, uncomment if you plan on installing and using Nautilus.
#gconftool-2 -s -t bool /apps/nautilus/preferences/show_desktop false &
#gconftool-2 -s -t bool /desktop/gnome/background/draw_background false &
#gconftool-2 -s -t bool /apps/nautilus/preferences/show_advanced_permissions true &

## The following command will set-up a keyboard map selection tool when
## running in a live session.
cb-setxkbmap-live &

## cb-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10s && cb-welcome --firstrun) &

## cb-fortune - have Statler say a little adage
(sleep 120s && cb-fortune) &

Date: 2012-11-27 07:36 am (UTC)
From: [identity profile] oio11.livejournal.com
Обязательно попробую!
Потому как все равно не получилось у меня пока , чтобы автоматом загружалась панель с апплетами

Date: 2012-11-27 01:08 pm (UTC)
From: [identity profile] uzverss.livejournal.com
tint2 установлен? (и какие апплеты нужны?)

Date: 2012-11-27 04:18 pm (UTC)
From: [identity profile] oio11.livejournal.com
и tint2 установлен, и nm-applet, и parcellite...
каждый раз запускаю с помощью Alt+F3

Date: 2012-11-27 01:37 pm (UTC)
From: [identity profile] uzverss.livejournal.com
http://wiki.debian.org/ru/Openbox#A.2BBBAEMgRCBD4ENwQwBDMEQARDBDcEOgQw_.2BBD8EQAQ.2BBDMEQAQwBDwEPA_.2BBD8EQAQ4_.2BBDcEMAQ.2FBEMEQQQ6BDU_Openbox
From: [identity profile] oio11.livejournal.com
## Openbox autostart.sh
## ====================
## When you login to your CrunchBang Openbox session, this autostart script
## will be executed to set-up your environment and launch any applications
## you want to run at startup.
##
## More information about this can be found at:
## http://openbox.org/wiki/Help:Autostart
##
## If you do something cool with your autostart script and you think others
## could benefit from your hack, please consider sharing it at:
## http://crunchbanglinux.org/forums/
##
## Have fun! :)

## Start session manager
lxsession &

## Enable power management
xfce4-power-manager &

## Start Thunar Daemon
thunar --daemon &

## Set desktop wallpaper
nitrogen --restore &

## Launch panel
tint2 &

## Enable Eyecandy - off by default, uncomment one of the commands below.
## Note: cairo-compmgr prefers a sleep delay, else it tends to produce
## odd shadows/quirks around tint2 & Conky.
#(sleep 10s && cb-compmgr --cairo-compmgr) &
#cb-compmgr --xcompmgr &

## Launch network manager applet
(sleep 4s && nm-applet) &

## Detect and configure touchpad. See 'man synclient' for more info.
if egrep -iq 'touchpad' /proc/bus/input/devices; then
synclient VertEdgeScroll=1 &
synclient TapButton1=1 &
fi

## Start xscreensaver
xscreensaver -no-splash &

## Start Conky after a slight delay
(sleep 3s && conky -q) &

## Start volumeicon after a slight delay
(sleep 3s && volumeicon) &

## Start Clipboard manager
(sleep 3s && parcellite) &

## Bad Nautilus, minimises the impact of running Nautilus under
## an Openbox session by applying some gconf settings. Safe to delete.
cb-bad-nautilus &

## The following command runs hacks and fixes for #! LiveCD sessions.
## Safe to delete after installation.
cb-cowpowers &

## cb-welcome - post-installation script, will not run in a live session and
## only runs once. Safe to remove.
(sleep 10s && cb-welcome --firstrun) &

## cb-fortune - have Statler say a little adage
#(sleep 120s && cb-fortune) &

##Start nm-applet
nm-applet &

Date: 2012-11-27 04:25 pm (UTC)
From: [identity profile] oio11.livejournal.com
только он без расширения .sh
или это не нужно?

Date: 2012-11-28 07:14 am (UTC)
From: [identity profile] uzverss.livejournal.com
нужно
ибо так в книжках пишут )

Date: 2012-11-28 01:18 pm (UTC)
From: [identity profile] oio11.livejournal.com
я где-то читала, что в linux как-то автоматически определяется это самое расширение, но раз надо значит надо:)
я снова отредактировала sources.list под номером 3 - это тот, что сейчас у меня

Date: 2012-11-28 04:14 pm (UTC)
From: [identity profile] uzverss.livejournal.com
зачем wheezy и maverick? зачем дублирующие др.др. репозитории (main contrib non-free)? достаточно вместо десятка разных одного deb http://mirror.yandex.ru/debian/ - всё равно ближе нет (и канал быстрый), тем более если много репозиториев то apt-get update дольше выполняется, оставить репы софта, всякое типа deb http://mirror.yandex.ru/debian-multimedia/ squeeze main non-free и deb http://packages.medibuntu.org/ lucid free non-free (если эксперименты с музыкой и пропиетарщина нужна), оставить репы с темами оформления, а остальное - в топку )

Уже!

Date: 2012-11-28 09:48 pm (UTC)
From: [identity profile] oio11.livejournal.com
## CRUNCHBANG
## Compatible with Debian Squeeze, but use at your own risk.
# deb http://packages.crunchbang.org/statler statler main
# deb-src http://packages.crunchbang.org/statler statler main

## CRUNCHBANG MULTIMEDIA
## Debian Multimedia Mirror
# deb http://packages.crunchbang.org/statler-mm squeeze main non-free
# deb-src http://packages.crunchbang.org/statler-mm squeeze main non-free

## CRUNCHBANG MOZILLA
## Debian Mozilla Mirror
# deb http://packages.crunchbang.org/statler-mozilla/dists squeeze-backports iceweasel-release
# deb-src http://packages.crunchbang.org/statler-mozilla squeeze-backports iceweasel-release
# deb http://packages.crunchbang.org/statler-mozilla dists squeeze-backports iceweasel-beta
# deb http://packages.crunchbang.org/statler-mozilla dists squeeze-backports iceweasel-aurora
# deb http://packages.crunchbang.org/statler-mozilla squeeze-backports iceweasel-release



## DEBIAN
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free
# deb http://ftp.us.debian.org/debian squeeze main contrib non-free
deb http://ftp.us.debian.org/debian stable main contrib non-free
deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb-src http://ftp.us.debian.org/debian stable main contrib non-free
# deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
deb http://ftp.ru.debian.org/debian stable main contrib non-free
# deb-src http://ftp.ru.debian.org/debian stable main contrib non-free
# deb http://ftp.uk.debian.org/debian stable main contrib non-free
# deb-src http://ftp.uk.debian.org/debian stable main contrib non-free
# deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free
# deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free


## DEBIAN SECURITY
deb http://security.debian.org/ squeeze/updates contrib non-free main
deb-src http://security.debian.org/ squeeze/updates contrib non-free main
deb http://security.debian.org/ squeeze/updates main contrib non-free
# deb-src http://security.debian.org/ squeeze/updates main contrib non-free
# deb http://security.debian.org/ squeeze/updates main contrib non-free
# deb-src http://security.debian.org/ squeeze/updates main contrib non-free

## DEBIAN BACKPORTS
# deb-src http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
# deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu maverick main
# deb http://www.geekconnection.org/remastersys/repository squeeze/
# deb http://packages.crunchbanglinux.org/statler statler main ##CRUNCHBANG OLD
deb http://notesalexp.org/debian/squeeze/ squeeze main
# deb http://backports.debian.org/debian-backports squeeze-backports main
# deb http://www.debian-multimedia.org squeeze main non-free
# deb http://ppa.launchpad.net/jonoomph/openshot-edge/ubuntu maverick main
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
# deb http://security.debian.org/ wheezy/updates main contrib non-free
# deb http://ftp.us.debian.org/debian/ wheezy-proposed-updates main contrib non-free
# deb-src http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy-proposed-updates main contrib non-free
# deb http://www.debian-multimedia.org testing main non-free
deb http://www.deb-multimedia.org squeeze main non-free
deb http://www.deb-multimedia.org squeeze-backports main
deb ftp://ftp.deb-multimedia.org squeeze main non-free
deb ftp://ftp.deb-multimedia.org squeeze-backports main
deb http://ftp.debian.org/debian/ squeeze-proposed-updates contrib non-free main
deb-src http://ftp.debian.org/debian/ squeeze-proposed-updates contrib non-free main
# deb http://packages.crunchbang.org/waldorf dists waldorf main
# deb http://backports.debian.org/debian-backports pool main i iceweasel
# deb http://www.intellinuxwireless.org/repos iwlwifi.git
deb http://pkgs.fedoraproject.org/repo pkgs iwl1000-firmware

Date: 2012-11-28 02:12 pm (UTC)
From: [identity profile] oio11.livejournal.com
ура! автозапуск заработал
спасибо за помощь:)

Date: 2012-11-28 08:04 pm (UTC)
From: [identity profile] uzverss.livejournal.com
сделай cat /usr/bin/openbox-session и поймёшь почему именно так надо писать )

получилось это....:)

Date: 2012-11-28 09:49 pm (UTC)
From: [identity profile] oio11.livejournal.com
cat /usr/bin/openbox-session
#!/bin/sh

if test -n "$1"; then
echo "Syntax: openbox-session"
echo
echo "See the openbox-session(1) manpage for help."
exit
fi

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_DESKTOP_NAMES \
-remove _NET_CURRENT_DESKTOP 2> /dev/null

AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh"
GLOBALAUTOSTART="/etc/xdg/openbox/autostart.sh"

if test -r $AUTOSTART; then
. $AUTOSTART
else
if test -r $GLOBALAUTOSTART; then
. $GLOBALAUTOSTART
fi
fi

exec /usr/bin/openbox "$@"

Re: получилось это....:)

Date: 2012-11-29 09:16 am (UTC)
From: [identity profile] uzverss.livejournal.com
теперь понятно почему именно надо писать autostart.sh ?

October 2025

S M T W T F S
   1234
567891011
12131415161718
19202122 232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 4th, 2026 12:12 pm
Powered by Dreamwidth Studios