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.
Link Summary
Related posts:
February 5th, 2009 at 9:48 pm
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
May 15th, 2009 at 9:33 am
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 !!
October 7th, 2009 at 8:05 am
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.
November 25th, 2009 at 3:29 pm
[...] vincentkong.com » Blog Archive » Remote Desktop on Xubuntu. [...]