Ubuntu No Monitor Defaults To 800×600

Overview

I recently moved my Long standing Linux box running Ubuntu 8.04 as a headless server which needs X running because of Mythtv. Once it was in place I remoted into the box running Remote Desktop on Linux and VNC client on the PC. When I got it the screen was squished to 800×600 resolution.

Auto Detect Monitor

Ubuntu tried to be too helpful in this scenario. It limited the resolution to 800×600 max with a smaller resolution. There was no option to increase it. I did not want to plug in a monitor so it could detect the correct screen resolution every time it started up. I knew this would lie in the Xorg configuration.

After some Google searches I found the solution which requires adding some entries into xorg.conf.

First create a backup:
$ sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

To restore the config use the following command:
$ cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

Edit the file /etc/X11/xorg.conf and find the section Section "Screen". My default config looked like this:

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
Defaultdepth 24
EndSection

Add a sub section to the end with the resolution you want e.g:

Section “Screen”
Identifier “Default Screen”
Monitor “Configured Monitor”
Device “Configured Video Device”
Defaultdepth 24
SubSection “Display”
Modes “1024×768” “1024×1280”
Virtual 1024 768
Virtual 12804 1024
EndSubSection
EndSection

I’m not sure how it handles which resolution is default on start up but once it’s in you can remove change it via Gnome or only add one screen resolution to force it to boot into that resolution.

Edit: It takes the last virtual resolution defined in the sub section and does not allow users to pick and choose if more than one are defined.

screen resolution in remote desktop Ubuntu Forum Post

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Linux and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *.

All comments must go through an approval and anti-spam process before appearing on the website. Please be patience and do not re-submit your comment if it does not appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.