I've been running the built-in Vino VNC in Ubuntu 20.04 on a headless server for a while now and it works fine. The box does not have a monitor plugged in (and never has). Now, when I VNC into it I just get a black screen. If I close the VNC client and try to reconnect, I can't reconnect - it just times out/hangs.
I think this started when I unplugged the keyboard and mouse to use somewhere else and rebooted the server, but I'm not sure. Can anyone suggest what might be going on? I just want to be able to remote control using the console like I used to - not having to create new VNC sessions or anything.
I've tried killing the vino-server process and restarting it, but it doesn't help. I've also tried uncommenting the first two lines in the stock xstartup file but that doesn't seem to do anything either.
david@dalton:~$ more .vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &