X11 VNC Server
Install x11vnc and xserver dummy (in case you wanna use Desktop without monitor)
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
VideoRam 40000
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 22-83
VertRefresh 50-70
Modeline "1920x1200_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync
EndSection
Section "Screen"
Identifier "DefaultScreen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1200"
EndSubSection
EndSection
Systemd
[Unit]
Description=System service for x11vnc connection
After=display-manager.service network.target syslog.target
[Service]
Type=simple
Restart=always
User=ubuntu
ExecStart=sudo /usr/bin/x11vnc -env FD_XDM=1 -auth guess -shared -forever -autoport 5900
ExecStop=sudo /usr/bin/killall x11vnc
[Install]
WantedBy=multi-user.target