Fixing Screen Resolution for a Ubuntu “Headless” VNC Server

In setting up a Ubuntu 9.1 computer for a client, I discovered a frustrating problem with the latest version of this popular Linux distribution.

This client, like many individuals and businesses, wanted to run this machine “headless.” That is, with no mouse, keyboard, or monitor. It’s a popular approach if the machine mainly “does its own thing,” like acting as a dedicated video server, web server, and countless other applications that require infrequent human intervention.

The idea is that the “headless” machine is remote-controlled over the network, in a window on the client (controlling) machine, which can act as the headless computer’s keyboard, mouse, and monitor.

The good news is that it’s really fast, easy, and free to set-up… That is, if you want to see it in really low resolution (800 x 600) on the client machine.

Seems the folks at Ubuntu assumed you couldn’t possibly see high resolution output without a monitor (they didn’t give a lot of thought to headless applications).

It was a real hassle trying to find a fix, and when I did, figured I should document it here, knowing others will hit the same brick wall.

Here’s the problem… Ubuntu likes to pull available resolutions from the monitor, and when one’s not connected, it gets confused.

There used to be a work-around in previous versions of the operating system that are widely documented, but that trick stopped working when Ubuntu changed the way display resolutions are managed in their latest releases, so when you upgrade, things break.

I’ll spare you all the (brutal) details I uncovered, but at the end of the day, the display resolution for a headless machine is stored in a file that no longer exists!!?

Fortunately, while the file no longer exists, it’s still referenced at boot-up, so by creating it manually, you’ve “fixed” the problem!

The simplest way to correct this flaw (assuming you’re using VNC to control your headless computer) is to follow the steps in this life-saving post from user “can2002″ in the Ubuntu forums.

The only thing he left-out was the final step… This won’t work until you restart your headless UbuntuĀ  VNC machine.

  • Share/Bookmark

This entry was posted on Monday, January 11th, 2010 at 5:29 pm and is filed under Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

 

One Response to “Fixing Screen Resolution for a Ubuntu “Headless” VNC Server”

  1. Ubuntu 9.10 Karmic Koala – VNC resolution limited without monitor | redconfetti Says:

    [...] I thought this most recent article was giving me the holy [...]

Leave a Reply