I had SSH access to a VPS, but wanted to set up a VNC server since
I’m not that comfortable with doing everything in terminal yet. So I
wrote this HowTo if anyone wants to know how.
First I had to install a GUI, so i connected to the server through
ssh, logged in as root and installed the ubuntu-desktop package.
apt-get install ubuntu-desktop
This might take some time.. Go make some coffee, tea or what ever you like while it’s downloading and installing.
Now you have to install the gnome display manager.
apt-get install gdm
Reconfigure...
I had SSH access to a VPS, but wanted to set up a VNC server since
I’m not that comfortable with doing everything in terminal yet. So I
wrote this HowTo if anyone wants to know how.
First I had to install a GUI, so i connected to the server through ssh, logged in as root and installed the ubuntu-desktop package.
This might take some time.. Go make some coffee, tea or what ever you like while it’s downloading and installing.
Now you have to install the gnome display manager.
We can now download VNC Viewer and connect to the server by using “serveraddress:5901″ (590 + the display number)

To kill the vncserver, use vncserver -kill :1
First I had to install a GUI, so i connected to the server through ssh, logged in as root and installed the ubuntu-desktop package.
apt-get install ubuntu-desktop
This might take some time.. Go make some coffee, tea or what ever you like while it’s downloading and installing.
Now you have to install the gnome display manager.
Reconfigure X serverapt-get install gdm
Start GDMdpkg-reconfigure xserver-xorg
Now we’ve a GUI, and we’re ready to install VNC Server./etc/init.d/gdm start
Now, open ~/.vnc/xstarup in a text editor. If you use nano;apt-get install tightvncserver
Then use this config.nano ~/.vnc/xstartup
After starting vncserver, I tried to connect, but I got only a grey screen. I read the log file and foun the following line.unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc xsetroot -solid grey vncconfig -iconic & xterm -geometry 1024x768 -ls -title "$VNCDESKTOP Desktop" & exec gnome-session
So I had to chmod xstartup.sh: ~/.vnc/xstartup: Permission denied
And xinitrc.chmod +x ~/.vnc/xstartup
Reboot the server.chmod +x /etc/X11/xinit/xinitrc
Now we can start the VNC Server.reboot
:# is the display number, usually you want to use 1. Use vncserver –help for more options.vncserver :1
We can now download VNC Viewer and connect to the server by using “serveraddress:5901″ (590 + the display number)
To kill the vncserver, use vncserver -kill :1