Running VNC on Ubuntu Desktop Without a Connected Monitor
Introduction
Running a Virtual Network Computing (VNC) server on an Ubuntu Desktop machine without a connected monitor can be challenging. By default, many modern systems disable the graphical user interface (GUI) when no monitor is detected. This results in a blank screen or an unresponsive VNC session when attempting to connect remotely.
To solve this issue, a dummy video driver can be used to emulate a connected monitor. This allows the graphical environment to start as if a physical display were attached. This guide walks you through the process of installing and configuring Ubuntu to support VNC connections without requiring a physical monitor.
Why Use a Dummy Video Driver?
Several scenarios may require running Ubuntu with a GUI remotely without a physical monitor:
Installing the Dummy Video Package
To enable a virtual display, you need to install the xserver-xorg-video-dummy package, which provides a fake video driver:
sudo apt-get update
sudo apt-get install xserver-xorg-video-dummy
Configuring Xorg to Use the Dummy Driver
Next, you must create or modify the Xorg configuration file to specify the dummy driver and define a preferred resolution.
Create or Edit the Xorg Configuration File
sudo vi /usr/share/X11/xorg.conf.d/xorg.conf
Recommended by LinkedIn
sudo mv /usr/share/X11/xorg.conf.d/xorg.conf /usr/share/X11/xorg.conf.d/xorg.conf.bak
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
This configuration specifies:
Reboot and Test
Once the configuration file is set up, reboot the system to apply the changes:
sudo reboot
After rebooting, attempt to connect to the machine using a VNC client. If configured correctly, the system should boot with a GUI accessible via VNC, even without a physical monitor connected.
Additional Considerations
Conclusion
Setting up an Ubuntu Desktop machine to run VNC without a connected monitor requires configuring a dummy video driver. By following the steps outlined above, you can enable remote graphical access with your preferred resolution, ensuring a seamless experience even when no physical display is attached. This setup is particularly useful for headless workstations, remote development, and GUI-based server applications.