leafleafDocy banner shape 01Docy banner shape 02Flower illustration
Other

Installing a VNC server in Debian/Ubuntu

VNC, or Virtual Network Computing, lets you connect to the GUI (Graphical User Interface) of a remote Linux/Unix server. Once you have installed X windows and a display manager, you can set up VNC to connect to it from a remote computer.

Step 1: There are a few options for the VNC server; TightVNC is one of them. To install it, run this as root:

apt-get install tightvncserver

Step 2: Once that’s installed, you will run

vncserver

And enter a password that will be used to connect (between 6 and 8 characters, will be truncated to 8). This is different than your Linux user password. You will be prompted for a ‘view-only password, this is optional and depends on your use case.

After that, the VNC server will tell you that it has created a new desktop and give you the number.

In this case, :1 has been created, which correlates to port 5901. :3 would be port 5903, etc.

Step 3: Similar to the servers, there are many clients for VNC. TightVNC makes a Windows client so let’s use that to connect to the TightVNC server we just installed. https://www.tightvnc.com/ but other VNC clients should be compatible.

Install and open the client, then enter the IP address or hwsrv-UltaHost.com hostname, followed by a colon and desktop.

Step 4: Enter the IP of the server, followed by a colon and the VNC server number.

Step 5: Click connect, then enter your password when prompted.

You’re connected to a desktop running as root!

If the default 1024’768 is not appropriate, you can stop it and restart it with different settings:

vncserver -kill :1

vncserver -geometry 1920x1080
Share this Doc

Installing a VNC server in Debian/Ubuntu

Or copy link

Table Of Contents