Headless X setup with Debian(Lenny)

I recently did X on a headless Debian blade. This post is about the setup that worked for me. I used Xvfb to setup the virtual X frame-buffer. The usual choice for accessing virtual display is vnc, so i decided to go with x11vnc. Used blackbox as window manager for the setup(because it is believed to be pretty light weight).
However, this setup has a problem. x11vnc doesn’t handle key modifiers(Shift/Ctrl/Alt) too well, it aborts when key combinations involving Shift key are used in vnc session with the setup. Since there was not much help available around x11vnc and the bug, i decided to give tightvnc a shot which worked really well.
Here is how the setup be repeated:

$ sudo aptitude install xvfb tightvncserver blackbox
$ Xvfb :1 -screen 1 1300x700x16 & # starts X (display=:1) (set width, height and depth for screen 1)
$ DISPLAY=:1 blackbox & # start the window manager
$ DISPLAY=:1 vncserver -depth 16 -geometry 1300x700 -alwaysshared # to startup vnc server (it prints port that vnc listens to).


About this entry