Headless server: no monitor, no graphics?

Solution 1:

I have found a solution which works for the issue I described above. This answer comes from a reply by user Stefan Lemmens (https://askubuntu.com/users/421108/stefan-lemmens) at question: How to use Ubuntu 18.04 on VNC without display attached? His answer involves three steps:

(1) create a 20-intel.conf file, which creates a virtual display.

(2) create a shell script, setting the virtual display and connecting it.

(3) add the shell script to the Startup Applications, thus having it executed upon each reboot of the machine.

I made one change compared to his overview: I wanted a different resolution for the virtual display, so I used different xrandr parameter values. I found a description on how to find the correct parameter values here: https://ubuntuforums.org/showthread.php?p=8595940

Update April 2021: after upgrading to Ubuntu 20.04 LTS I had more graphic issues with this headless server. I asked a question about these issues: Intel Graphics issue after upgrade to Ubuntu 20.04.1 In the end I solved it by buying an HDMI plug. This makes the NUC think that a monitor is attached at boot time. Then I didn't need the software tricks to get things working. I removed the software steps as described above.