sudo apt-get install xserver-xorg-video-dummy
Create / Edit xorg.conf file Rename file if already exists for backup
sudo vi /usr/share/X11/xorg.conf.d/xorg.conf
Add the following content to the file Set the resolution to what you like (whatever resolution the screen is that is used to connect remotely is probably is a good idea)
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080"
EndSubSection
EndSection
Save the file Reboot and Test
I made that switch from
/etc/X11/xorg.conf.d/dummy.conf
to/usr/share/X11/xorg.conf.d/xorg.conf
and it seems to be working well with finding the file, however whenever I reboot and check status usingsudo systemctl status vnc-display
, the xrandr if statement within the vnc script always returns an error:Apr 16 07:37:55 ODS-001 vnc-display.sh[1322]: Can't open display
and then moves to else whether or not I have a connected display. However, when I manually run the "if" line after reboot, it returns true. How can I get xrandr to run within the script file?