I am setting up a Pi 3B+ with Ubuntu Mate 18.04 with the goal of remote access using x0vncserver (from the vnc4server package) to allow connecting to a Mate desktop on the Pi rather than a virtual desktop. I have done the latter but it is not meeting my needs for this project. So far I have:
installed vnc4server
created the user account "peer" set to logon without requiring a password
set the account to autologin - in /etc/lightdm/lightdm.conf.d/ create "60-lightdm-gtk-greeter.conf" containing the following lines:
[SeatDefaults]
autologin-user=peer
created a vncserver password to access peer's desktop
added a startup program under peer's preferences:
x0vncserver --PasswordFile=/home/peer/.vnc/passwd
When I boot the Pi (while connected to a monitor) I observer that peer is logged on and the desktop is displayed. I can connect to that desktop from my CentOS workstation using the vinagre viewer. The resolution of the monitor is 1280x1024. So far, so good.
If I boot the Pi with the monitor powered off it also works as described above. So far, so good.
For the final step I disconnected the monitor as the intent is to run the Pi headless. In this case I find that the remote desktop has a resolution of 656x412. When I attempt to shut down the Pi from the remote desktop, the process is accepted. However, the desktop remained displayed for several minutes (normally it disconnects immediately). I closed the vinagre viewer. I could not connect via ssh nor could I reconnect to the remote desktop - I got a black screen in vinagre. I have no idea what the state of the Pi was. The green disk access light on the Pi was on solid. After about 10 minutes I powered down the Pi, connected the monitor, powered on the monitor and the Pi and am up and running as originally described.
Therefor the question is... How do I configure the Pi to run headless? As I originally stated I have run a Pi headless and then run a virtual desktop on it (by invoking vncserver via an ssh connection.) Any suggestions?
TIA,
Ken