I’ve been utilizing Ubuntu on a headless server (with Ubuntu desktop) and a vnc with Gnome since 16.04 LTS. My setup is similar to everybody else who publishes a How To.
I plug in a monitor/keyboard/mouse and upgraded to 20.04 at this time and was going by my setup steps and all appeared good. All the pieces working as anticipated.
Utilizing Gnome xorg
1) I create VNC server session
2) allow vncserver service
3) login (vncviewer) from the server
4) login with my distant Home windows PC (Actual VNC Viewer).
Nonetheless, after I logout of the Ubuntu server, the PC’s Actual VNC session is killed after about 7 seconds. Logging again in through Putty or instantly within the server (vncviewer -list) reveals the method as stale.
I’m pondering that vncserver, and perhaps different desktop providers, are being suspended or killed upon logout. I don’t consider this could occur when the vncserver service is working.
My short-term workaround it to stay logged in and “lock” the display.
Anybody know of a technique to “proceed working within the background after I logout” answer?
[ -x /etc/vnc/xstartup ] && exec /and many others/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid blue
vncconfig -iconic &
dbus-launch –exit-with-session gnome-session &
( additionally tried this with out “–exit-with-session” )