Remote Lubuntu (VNC and SSH server)

Lubuntu not installed ssh and vnc server, so you can install it yourself

1. Install required packages:
sudo apt install openssh-server vino
sudo reboot

2. At this point you should be able to connect via ssh, but vnc not working yet, unfortunately vino no longer ship with vino-preferences, there is no easy way to configure it (bug list https://bugs.launchpad.net/ubuntu/+source/vino/+bug/1775999):
# list settings
gsettings list-keys org.gnome.Vino
# disable prompt
gsettings set org.gnome.Vino prompt-enabled false
# set auth method
gsettings set org.gnome.Vino authentication-methods "['vnc']"
# set password
gsettings set org.gnome.Vino vnc-password $(echo -n "password"|base64)
# disable encryption
gsettings set org.gnome.Vino require-encryption false

3. Start the vnc server:
DISPLAY=:0 /usr/lib/vino/vino-server

4. Setting autostart:
~/.config/autostart/vino-server.desktop
[Desktop Entry]
Type=Application
Name=Vino VNC server
Exec=/usr/lib/vino/vino-server
NoDisplay=true

mkdir ~/.config/autostart
nano ~/.config/autostart/systemctl.desktop

[Desktop Entry]
Type=Application
Exec=systemctl --user start vino-server
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Vino Server
Comment=Auto-start the VNC service on login in

4b. Xubuntu autostart

sudo cp /usr/share/applications/vino-server.desktop /etc/xdg/autostart/vino-server.desktop

Source:
– https://askubuntu.com/questions/4474/enable-remote-vnc-from-the-commandline
– https://wiki.archlinux.org/index.php/Vino
– https://askubuntu.com/questions/1062727/how-to-get-vino-vnc-server-to-start-on-startup-in-ubuntu-18-04-1