RSS

Using Multiple Window Managers Simultaneously

0 Comments | This entry was posted on Apr 19 2011

I discovered something completely new over the weekend; running multiple window managers simultaneously in your Linux environment. This came about because of a conflict I encountered between Fluxbox and an application I was trying to run, Bitcoin. It seems that two are somewhat incompatible.

After finding that Bitcoin ran fine in WindowMaker, it was pointed out to me that I could run WindowMaker inside my Fluxbox session by running a second X server. This saves me from having to logout of one window manager to use another, just for the sake of one application. I installed X window server Xephyr which then allowed me to run a second window manager which then allowed WindowMaker within.

Thanks to qole and his forum thread I was able to put the whole thing together with a basic script with a few minor modifications to suit my environment. My modified script follows:

#!/bin/sh
##################################
#Change these two variables to the WM of your choice.
export WMNAME="windowmakerWM"
export WMEXEC="wmaker"
##################################
export DISPLAY=:0
export TSLIB_TSDEVICE=/dev/input/event3
export TSLIB_CALIBFILE=/etc/pointercal
export GTK_MODULES=libgtkstylus.so
export PARWIN=`wmctrl -l | grep -i $WMNAME | awk '{print $1}'`
wmctrl -i -r $PARWIN -b toggle,fullscreen
xinit /bin/su chippy -c 'export DISPLAY=:1; $WMEXEC' -- /usr/bin/Xephyr :1 -br -screen 1000x700x16 -dpi 96 -parent $PARWIN +kb -ac
export DISPLAY=:0

Running this script loads the X server and then runs a WindowMaker session within it. It’s quite like running a virtual machine, however you are not running another instance of an operating system, just another window within your current operating system with all your installed applications and environment as you would expect.

Sometimes I am reminded the power available to Linux and all things open source. This was another example.

Xephyr

WindowMaker running with Fluxbox