13

I recently upgraded my Ubuntu Desktop from 18.04 to 20.04 and have been accessing it via SSH. But, some of the scripts that I want to run require an actual desktop with a terminal. I've used VNC Viewer on my Raspberry Pi for this, but it doesn't work with Ubuntu unless you disable Wayland.

So, I have two options. First is to actually log into the computer and go through the process of removing Wayland (which kind of defeats the purpose of upgrading, I would think) and going back to XOrg. Or, I can find a VNC server that works with Wayland. Considering that it's been out for a few years now, I would hope that someone made their server compatible. Am I wrong in this?

So, what I'm looking for is a VNC server that will work with Ubuntu 20.04 straight out of the box (without disabling Wayland).

I should note, that I installed gnome-remote-desktop, but I'm not sure where to enable screen sharing through SSH. So, I'll have to log into the desktop to get it working if that's my option.

Thanks, and have a great day. :) Patrick.

4
  • 2
    It's not a matter of hey-just-add-Wayland-compatibility. Wayland is designed very, very differently than X. Example: Wayland doesn't run as root, and forbids applications from seeing anything outside their own window. This is an ongoing problem for Screen Recording and Screen Sharing that the Wayland developers are still working on.
    – user535733
    Commented May 14, 2020 at 14:54
  • You could try NoMachine. If this works. I could make an answer. link
    – lemrm
    Commented Apr 13, 2022 at 17:02
  • Look into "wayvnc" which can basically attach a VNC server to a running Wayland session, and there is an option to run it "headless" as well. It's available in the regular Ubuntu repos. (Not putting this down as an "answer" because I haven't actually tried it, myself...) Commented Jun 8, 2023 at 20:26
  • Seems like Pipewire-based software is the norm here now.
    – mcendu
    Commented Feb 16 at 3:22

1 Answer 1

1

You can run VNC from almost anywhere, that includes Ubuntu 20.04, and even a home router with OpenWRT, or docker, with tigervnc-standalone-server or xtightvncserver.

It's not going to share your existing desktop, like x11vnc or tigervnc-scraping-server does, but it will create a new VNC Server that you can connect to using the normal VNC clients - both from the machine itself and from other machines.

To get it going, all you need to do is to install the relevant package with apt, then set a password with vncpasswd - check the configuration in /etc/*vnc* and then start or restart the server manually.

To create a systemd process that starts it automatically, see the relevant answer here: https://unix.stackexchange.com/questions/529375/configuring-tigervnc-systemd-process-on-ubuntu-18-04

Updating is not purely cosmetic, you get the benefit of security updates and bug fixes for longer when you upgrade.

I might add, that you can the connect to this same VNC server from Wayland. If you use tigervnc it will automatically resize to fit your desktop, and of course you then also have the benefit of running it in fullscreen mode. The only thing you use is hardware acceleration, but that might change with improvements to the code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .