How to Install VNC Server on Ubuntu VPS

Installing VNC server will give access to remote desktop sharing system that will allow you to connect your home PC to a GUI (graphical interface) hosted on your VPS, for easy remote management. This guide will walk you through the steps required to setup and install VNC server hosted on a Debian VPS.

install vnc server

Before beginning, ensure you are logged in to your VPS as the root user, and run the following:

Also Read: [TUT] How To Install Remote Desktop on your Free linux vps

Steps To Install VNC Server on Ubuntu VPS:

Step 1: Copy The Code and enter In the Command Window

# apt-get update
 # apt-get upgrade

Step 2: Install GNOME.

#apt-get install gnome-desktop-environment

Step 3: Install required fonts.

# apt-get install xfonts-100dpi
# apt-get install xfonts-100dpi-transcoded 
# apt-get install xfonts-75dpi
# apt-get install xfonts-75dpi-transcoded
# apt-get install xfonts-base

Step 4: Install Tight VNC Server.

# apt-get install tightvncserver

Step 5: Start Tight VNC Server for the first time, it will copy config files and prompt you for a password.

# tightvncserver :1

Step 6: Stop the VNC server, so we can continue to configure it.

# tightvncserver -kill :1

Step 7: Edit the xstartup file.

# vi ~/.vnc/xstartup

Press “A” to enter edit mode. Replace the contents of the file with the following (or edit to match):

#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &

Press ESC, type :wq, then press enter to save and close the file.

Step 8: Start the VNC server with your desired resolution.

# tightvncserver -geometry 1024×768 :1

You can now access your server’s remote GNOME desktop with a desktop VNC client. Enter your server’s main IP address, Port 1 (or 5901, alternately), and the password you set earlier to connect to the desktop.

Also Read: Free VPS Trial No Credit Card Required For Up To 30 days

Leave a Reply