mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: Dec. 03 2004,01:58 |
|
Here's a hint for using multiple window managers with startx... Personally I don't care for having ~/.xinitrc limited to one wm at a time, so I wrote something which will allow me to send arguments to xinit, and if no arguments are passed it defaults to fluxbox:
Code Sample | ARG="$@"
# specify the default wm argument here: DEFAULTWM="fluxbox"
if [ ! $ARG ]; then ARG=$DEFAULTWM fi
case $ARG in evil) fbsetbg -f ~/image/paper/firepenguin.jpg root-tail --noinitial --font snap -f --color red4 --whole --cont ........ --cont-color black -g 512x384+4+0 \ ${HOME}/.fluxbox/log,red4,'general' \ /var/log/warn,DarkOrange4,'warn' \ /var/log/XFree86.0.log,tomato4,'XFree86' \ /var/log/smpppd/ifcfg-ppp0.log,orange4,'pppd' & WM='/opt/evilwm/evilwm -term aterm' ;; ion) Esetroot -f ~/.fluxbox/backgrounds/doom3.jpg WM=ion ;; bb) WM=blackbox ;; ob) WM=openbox ;; twm) xterm & xclock -digital -bg black -fg gray -update 1 -geometry -0+0 & xsetroot -solid MidnightBlue WM=twm ;; kde) WM=kde ;; wmi) WM=/opt/wmi/bin/wmi ;; xwnc) WM='Xwnc -ac -geometry 1024x768 :1' ;; *) xsetroot -solid Black WM="$ARG" ;; esac
# Start the window manager exec $WM &> ~/.fluxbox/log |
This is put at the end of .xinitrc in place of the fluxbox line. You could simplify it to just this:
Code Sample | ARG="$@" DEFAULTWM="fluxbox"
if [ ! $ARG ]; then ARG=$DEFAULTWM fi WM="$ARG" exec $WM |
The difference is that the first one allows for abbreviated WM names and additional commands...the second one just launches whatever you use as an argument. For example, you could do "startx firefox" to start an X session with just firefox and no window manager.
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|