Remote Desktop on Xubuntu

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.

Related posts:

  1. Portable Remote Desktop Client for Windows
  2. Remote Desktop on Ubuntu
  3. Remote Desktop with SSH Tunneling
  4. Network Browsing with Xubuntu
  5. MySQL for Ubuntu Quickstart Guide
This entry was posted in Remote Desktop, Xubuntu and tagged , . Bookmark the permalink.

4 Responses to Remote Desktop on Xubuntu

  1. Das Brain says:

    Hey Vincent,
    Thanks this is a great tutorial on remote controlling Xubuntu. I’m writing this from Tight VNC Viewer, remote controlling FireFox on my Xubuntu….ha ha..sweet :)
    Got everything working by following your instructions.

    Keep up the great tutorials.

    Thanks again and regards,

    Das Brain

  2. piyushj says:

    more simple steps
    —-
    i don’t know if it will help any1–i got it working in 8.04.2 ubuntu with latest updates.

    install vnc4server
    make .vnc/xstartup file as

    unset SESSION_MANAGER
    exec sh /etc/X11/xinit/xinitrc

    note the additional ‘sh’ above

    run this
    sudo mkdir /usr/X11R6/lib/X11
    sudo mkdir /usr/X11R6/lib/X11/lib
    sudo ln -s /usr/share/fonts/X11 /usr/X11R6/lib/X11/fonts

    u are done !!
    set vncpasswd first and u r done !!

  3. dennis says:

    thanks for this how-to
    i couldn’t figure before how to login with x11vnc, while the greeter/login screen is still on. couldn’t make it work.
    but after reading this, everything ran smoothly!
    thanks! keep up the good work.

  4. Pingback: Marc’s Mind » Remote Desktop on Xubuntu 9.10