Headless Linux Server with X Fluxbox and Lightdm

Hi, here is a very short list telling about how you can have very easily a server withoug a monitor connected and manage it with just few resources… a short post but without waste!

Install headless lightdm with fluxbox and vnc

apt-get install lightdm
apt-get install fluxbox
apt-get install x11vnc
apt-get install xvfb
apt-get remove xserver-xorg-video*

Now, you setup the SSH Server and connect creating a tunnel.
Once connected, in the Headless Server you type:

x11vnc -localhost -create -env FD_PROG=/usr/bin/fluxbox \
        -env X11VNC_CREATE_GEOM=${1:-1024x768x16} \
        -gone 'killall Xvfb' \
        -bg -nopw

And once the vnc server starts, you connect from your client through a tunnel.

vncviewer localhost:5900

These steps have worked in Debian 8.0 Jessie.