Unlike remote desktop in Ubuntu, Xubuntu doesn’t come with a default VNC server. To allow for remote desktop I installed x11vnc which allows remote access to an existing X server session. The advantage is that it allows you to view the phyical display remotely and also log-in to a new session using a remote VNC client.
Installing a VNC Server
Install the x11vnc package
$ sudo apt-get install x11vnc
Install the xinetd package
$ sudo apt-get install xinetd
Add the x11vnc service to xinetd
$ sudo nano /etc/xinetd.d/x11vnc
Add the following content in the file:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}
Restart the xinetd
$ sudo /etc/init.d/xinetd stop
$ sudo /etc/init.d/xinetd start
Creating a Password for the VNC Server
Install the vnc-common package
$ sudo apt-get install vnc-common
Create a password file
$ sudo vncpasswd /root/.vncpasswd
Add the -rfbauth /root/.vncpasswd option to server_args in the /etc/xinetd.d/x11vnc file. For example:
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg -rfbauth /root/.vncpasswd
Restart the xinetd
$ sudo /etc/init.d/xinetd stop
$ sudo /etc/init.d/xinetd start
Connecting with a VNC Client
To connect to your remote desktop any VNC viewer can be installed. For example RealVNC or TightVNC (requires VNC password to be implemented) provides a free edition client.