You are not logged in.
How can I run programs after the Window Manager starts? Just adding an & to the end of $DEFAULT_SESSION will make it so you can't log out properly. Also X will exit if you add an & to all of the commands because it has nothing to run. Does anyone have tricks around this?
matthew@laptop> cat ~/.xinitrc
DEFAULT_SESSION=openbox
EXEC=exec
case $1 in
'') $EXEC $DEFAULT_SESSION;;
*) $EXEC $1;;
esac
#xscreensaver -no-splash &
#xsetroot -solid black
#xsetroot -cursor_name left_ptr
#xbindkeys &
#xwinwrap -ni -argb -fs -s -st -sp -a -nf -- mplayer ~/Videos/background -loop 0 -wid WID &
#xcompmgr &
#avant-window-navigator
Libertarian Arch Linux User
Offline
Why do you need to run these after the WM? Run anything you want (started in the background if needed), then start the WM afterwards.
Offline
I use:
xmonad &
pid=$!
SSH_ASKPASS='/usr/lib/openssh/x11-ssh-askpass' ssh-add < /dev/null
status-bars.py &
wait $pid
I start my wm before I run x11-ssh-askpass as if I don't, the x11-ssh-askpass window spans my dual monitors and looks untidy. By loading the wm first it appears on screen 1 only. I found this technique on the fluxbox webpage.
Offline
you can use a sleep command:
(sleep 2 && COMMAND) &
Last edited by Rasi (2009-11-21 10:04:34)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Openbox has ~/.config/openbox/autostart.sh script for stuff that has to start after the WM. This is covered in the wiki's Openbox page.
Offline
Openbox has ~/.config/openbox/autostart.sh script for stuff that has to start after the WM. This is covered in the wiki's Openbox page.
I could use that, the only problem is that I like to switch WMs every once and a while. So I'd like it done through the xinitrc.
mikesd's solution seems to have worked, thanks.
Libertarian Arch Linux User
Offline