Ubuntu 9.10 | Remote Desktop Without A Monitor

Ubuntu 9.10 | Remote Desktop Without A Monitor

Parallels Picture

Ubuntu 9.10 makes a great OS for a home server, but if you’re not comfortable using terminal commands to setup and administer your box you may quickly run into a problem with the Desktop Edition of Ubuntu…

Just recently I’ve repurposed an ASUS EeeBox into a nice little file server running Ubuntu 9.10. The EeeBox is ideal, as it’s tiny, hardly uses any power or generate heat, and hides nicely under my sofa. The problem is that once setup I wanted to access this box remotely using a mixture of SSH and Remote Desktop, but Ubuntu (and possibly other flavours of Debian?) does not complete the login process if it doesn’t detect a monitor connected to the graphics card. All server-based services happily start, but the OS doesn’t seem to load the UI or any applications that are designed to launch once the user logs in.

The solution took some hunting down, but it’s simple to implement. Just pop open the terminal (either on the server, or SSH into it from another machine), and follow these instructions:

  1. Type the following command:
    sudo nano /etc/X11/xorg.conf
  2. This may create a new file, which is fine. Now simply copy and paste the following text (If text already exists in the file, just delete it and replace it with this):
    Section "Device"
    Identifier "VNC Device"
    Driver "vesa"
    EndSection
    
    Section "Screen"
    Identifier "VNC Screen"
    Device "VNC Device"
    Monitor "VNC Monitor"
    SubSection "Display"
    Modes "1024x768"
    EndSubSection
    EndSection
    
    Section "Monitor"
    Identifier "VNC Monitor"
    HorizSync 30-70
    VertRefresh 50-75
    EndSection
  3. Now press CTRL+O then CTRL+X to save and exit the Nano text editor.
  4. Now simply reboot your Ubuntu server – disconnecting any monitors you had connected. You’ll now find that Ubuntu boots and logs in, allowing you remote access to your desktop.

Note that the line Modes “1024×768” can be changed to any resolution you desire. I personally prefer 1400×900*, but that’s up to you.

*UPDATE: Please be aware that the resolution you choose needs to be a standard VESA 4:3 or 5:4 resolution. If you’re unsure, just use the default above, and then once you’re logged in look at your available resolutions in the Display settings.

*UPDATE 2: This fix doesn’t appear to be working in Ubuntu 10.04 beta 2. There is a slightly more complicated fix which I’m looking into, which basically involves installing vnc4server – but I’ll post a new article when 10.04 is released.

A simple solution – I’m amazed that this functionality isn’t already built into the Desktop edition!