VNC server on Ubuntu 20.04 Focal Fossa Linux -

VNC is a system that allows you to remotely control another computer. It allows you to relay your mouse and keyboard inputs as if you were physically sitting in front of the system, when in fact you could be on the other side of the world.

This is a companion discussion topic for the original entry at

Why install a full XFCE manager? Does VNC need all this stuff?

1 Like

No it does not. VNC is functional without any window manager, but will not handle windows for you, so in the end there will be a nice spotted screen with an “X” as mouse cursor, but nothing to click. You can set simple (like xterm) or full-featured (like Gnome) window manager, but you have to set something…

Excellent article, but…
I had many troubles installing XFCE4 and XFCE4-goodies… At last I discovered that name has to be in lower case letters… please consider to correct the article because many people, like me, are used to copy&paste into the terminal.
Thanks a lot

Wow. Thank you for pointing this out. A Linux “help” site that includes errors in the code? NO THANKS! I’m trying to solve problems, not waste my time.

1 Like

NB. Even knowing about the capitalization errors (which is a spelling error in Linux, inexcusable in “help” site) these instructions just plain do not work at all. “sudo service vncserver@1 start” returns the error “Job for vncserver@1.service failed because the control process exited with error code. See “systemctl status vncserver@1.service” and “journalctl -xe” for details.” Which, of course, being a linux site, is mentioned nowhere in the article, and googling for answers doesn’t help at all, and this entire page was nothing but a 100% complete waste of my time.

Thank you for a good info. But doesn’t anybody know how to start VNC server on 20.04 with default shell? There is no DISPLAY env var so nowhere to connect VNC server :frowning:

Hi Oleg_Krutov,

Welcome to our forums.

Did you try to export the DISPLAY variable before starting the VNC server? Something like:

$ export DISPLAY=localhost:10.0

it doesn’t work since no such thing like :0 in Xorg cmdline. I think that it is because of Wayland. Witth XFCE of course DISPLAY and maybe XAUTHORITY will help but not with Ubuntu desktop.

Thank you for this article. The general VNC setup is good. The section on tunneling through SSH is helpful as well. Appreciate the notes on ss command explaining which port a VNC shows up on [had issues with this in the past]. Good to have this in the forefront of an article.

I was NOT able to get this working properly with xfce. I currently run xubuntu [which comes with xfce]. It would load, but window decorations were not available under VNC. After digging- looks like the xfce developers are aware… in the mean time, I used LXDE which appears to be another light weight window manager.

‘XFCE4’ and ‘XFCE4-goodies’ should move to lowercase as previously mentioned… but for most Linux users, this should be easy to catch and resolve.

Most people arriving here want their normal GUI (systemctl isolate graphical). It should be possible. They should also be able to connect to a running session even if the server (workstation) is not headless - ala RDP. It also does not follow that the client will be running on Ubuntu (or Linux) either, maybe split the article and remove the client configuration. Maybe even split single and multi-logon usage. A 10yo with a $5 Pi can get this working (of course that is a lightweight WM). There are multiple use-cases from “Terminal Server” to “viewing local VM in fullscreen”. This leans toward server installation (cloud?).