How to Install Xfce and VNC on Ubuntu 20.04

VNC allows you to connect to a remote server. We will install Xfce desktop on an Ubuntu server and configure VNC to access the desktop remotely.

Install xfce with command

During the installation, you will be asked to select

Install vnc server

For security reasons, running a desktop as the user root is not recommended. We will create a user for desktop usage.

Give the user sudo privileges

switch to the user

Start vncserver with command

It will ask you to set a password.

Now you should be able to connect to the server using vnc client. But Xfce won’t start properly. To fix it, we need to configure ~/.vnc/xstartup

Stop vncserver

Create file

With the following content

make it executable

Now start vncserver, you will be able to see Xfce Desktop.

Auto start VNC server

You need to do the following as user root.

Create a systemd service file

Add following content

Reload systemd

Set vncserver to start on boot

Reboot the server

After rebooting, verify vcnserver running

You can connect to VNC server using any of the vnc client software

Using RDP instead of VNC

If you want to use RDP (Windows Remote Desktop) to connect instead of VNC, install xrdp


Set value of new_cursors to false.

Chanmge to desktop user

Create file

Add following content

Enable and restart XRDP

See vnc

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published.