Code: Select all
#!/bin/bash
#
# .xsession/.xinitrc
#
# choose a window manager
#
defaultwm=kde
#set the window manager to $1 if it was supplied
windowmgr=${1:-$defaultwm}
#start the respective window managers
case ${windowmgr} in
kde|kwm|kdestart)
WINDOWMANAGER=startkde
;;
fluxbox)
WINDOWMANAGER=fluxbox
;;
fluxbox_main)
WINDOWMANAGER=fluxbox_main
;;
startxfce4)
WINDOWMANAGER=startxfce4
;;
*) WINDOWMANAGER=windowmgr # default for unknown wm's
esac
exec $WINDOWMANAGER
Code: Select all
startx windowmanagerwhere windowmanager is your window manager/desktop environment as specified in script..
I found this useful because I use another x-display to watch videos on my TV via Nvidia TV-out and I wanted to start another instance of Fluxbox without having all my normal startup items specified in .xinitrc appearing on second display. so in my case what I did was create a script called fluxbox_main that has this:
Code: Select all
xscreensaver &
gkrellm2 -w &
bbrun &
amsn &
fluxbox
so then at command prompt i would just type
Code: Select all
startx fluxbox_mainOnce in this session I have a menu item:
Code: Select all
startx fluxbox -- :1 -layout TV vt8Hope this makes sense.
Triad

