Date: 4/12/2020
Tags: linux | It's been bugging me for ages that there doesn't seem to be a valid recipe to use the Gnome desktop on Ubuntu under VNC. There are lots of "recipes" out there, mostly for older version of Ubuntu, but often they force a change of window manager or just plain don't work.
Anyway, after some time of hobbling along with a half working VNC server, I stumbled upon a working setup and though it was high time I documented it.
My .vnc/xstartup for Gnome:
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-update-activation-environment --all
dbus-launch --exit-with-session gnome-session --session=ubuntu &
gnome-shell &
|