In your terminal type the following command to launch VNC server to create an initial configuration file:
Open the configuration file in vim:
Press the ‘i’ key on your keyboard to get into the insert mode which will allow you to enter text into the file. Edit the file to look like so :
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
After you’re done, enter ‘Ctrl + :’ and type ‘wq’ to save and quit the file.
Great! We’re almost done with the configuration. Now, let’s restart the VNC server by killing it first and then starting it up.
To kill the vnc server and start it again, type the following command:
vncserver -kill :1
Congratulations, you’re done with the configuration for Ubuntu Desktop.