VNC setup in Digitalocean
2018-03-01

VNC setup in Digitalocean

Install xfce desktop environment

1
$ sudo apt-get install xfce4 xfce4-goodies

Install TightVNC for VNC server

1
$ sudo apt-get install tightvncserver

Initialize VNC server

  • run VNC server once
  • enter and verify password
  • ignore view-only password
    1
    2
    3
    4
    $ vncserver
    Password:
    Verify:
    View-only password:

To configure VNC, first kill the running VNC server

1
2
$ vncserver -kill :1
Killing Xtightvnc process ID 13456

Backup xstartup configuration file

1
$ mv ~/.vnc/xstartup ~/.vnc/xstartup.orig

Edit xstartup file

1
$ vim ~/.vnc/xstartup

And add following content

1
2
3
4
*~/.vnc/xstartup*
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

  • Look at ~/.Xresources file for VNC’s GUI framework information
  • Start XFCE whenever VNC server is started

Provide executable permission for ~/.vnc/xstartup file

1
$ sudo chmod +x ~/.vnc/xstartup

Start VNC server

1
$ vncserver -geometry 1280x800