Linux – set headless ubuntu linux display resolution

displaylinuxresolutionUbuntuvnc

We bought a small box as our server and we installed ubuntu linux.

We don't plug any display to it, instead, we remote desktop/vnc to the server (using TightVNC).

However, the display by default is around 1024×768 and our local display is usually much larger.

How could we change the resolution on the server without a display? Preferably, it is setup during the boot time. It is also OK to change at VNC time.

( when we plug a display, it works perfectly )

Best Answer

Perhaps try creating an /etc/X11/xorg.conf file with something like:

Section "Device"
Identifier "VNC Device"
Driver "vesa"
EndSection

Section "Screen"
Identifier "VNC Screen"
Device "VNC Device"
Monitor "VNC Monitor"
SubSection "Display"
Modes "1280x1024"
EndSubSection
EndSection

Section "Monitor"
Identifier "VNC Monitor"
HorizSync 30-70
VertRefresh 50-75
EndSection

... where 1280x1024 would be replaced by the resolution you want.

I did not test it myself; this is from http://ubuntuforums.org/showthread.php?p=8636175 (first post).