Vino-server not starting after reboot

I need to connect to a remote server with Ubuntu 18.04LTS and vino-server. After reboot, the only way I found so far to connect via VNC is by first logging in at the console. So I cannot reboot remotely and then VNC.

There are a few others having the same or related issues (see list below), but those are possibly outdated questions, since the Desktop Manager changed from lightdm to gdm. None of the answers solved the issue.

Is there currently a way to achieve this?

vino-server doesn't start automatically
"Go to Menu > Preferences > Default App... > Autostart and add the command you need (/usr/lib/vino/vino-server)." Does not work.

Desktop Sharing enabled, vino-server not listening
"I can enable vino-server by running /usr/lib/vino/vino-server and then successfully connect. I need to do this locally. Command does not work over remote SSH session."

Start vino vnc server from ssh client

Vino VNC Server unable to start on startup

How to get vino to run after autologin on a headless server - Ubuntu Server 18.04.2 LTS

This and this are related to vncserver, and I found no way to apply that to this case.


As a user (if you don't need all your users to have such access), you can create a .desktop file:

alexis@ubuntu:~$ cat ~/.config/autostart/systemctl.desktop
[Desktop Entry]
Type=Application
Exec=systemctl --user start vino-server
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=vino Server
Name=vino Server
Comment[en_US]=Auto-start the VNC service on boot and login back in
Comment=Auto-start the VNC service on boot

That will automatically start vino (as shown in the Exec) whenever you log in your account. You can mark your account as "auto-login" so it works 100% automatically.

I do not know that it would work with lightdm and any user who logs in. I haven't tried that.