How to set up different window managers with VNC

I recently needed to replace twm as the window manager I used under VNC. I wanted something light so I looked at: blackbox, fluxbox, and flwm. These window managers have been around for some time and are probably available as binary packages for most distributions.

I went with blackbox after installing them all. To change what window manager starts when vnc starts you need to edit the xstartup file in your ~/.vnc directory. To start with it will look something like:

#!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

To start blackbox instead of twm you change it to:

#!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
blackbox &

You can remove some of the extra stuff started by the script if you want so that it looks like:

#!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
blackbox &

Now enjoy your new window manager.

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *