Linux – How to limit screen resolution in xorg 1.5

linuxscreen-resolutionxorg

I have a NFS server and a bunch of diskless clients booting from that server using TFTP. They have a read-only root partition mount from the server, and read-write /home mount from the server. Everything what needs to be writable is on tmpfs.

I hacked Gentoo init scripts (/bin/rc) to make it possible.

I'm running Xorg on each of those stations, and it successfully autoconfigures itself, but often with cosmic resolution (like 1600xsomethingbig where it used to be 1024×768). It looks really weird. Different stations have different graphic cards and monitors etc.

How do I set an upper limit of screen resolution used by Xorg? I would like it to still autoconfigure itself within this limit.

Best Answer

You can try to update/add the screen section to your xorg.conf file:

Section "Screen"
Identifier  "Default Screen"
Device      "Generic Video Card"
Monitor     "Generic Monitor"
DefaultDepth    24
SubSection "Display"
    Depth       16
    Modes       "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
    Depth       24
    Modes       "1024x768" "800x600" "640x480"
EndSubSection
EndSection

You'll want to make sure that your "Default Screen" is listed in the Server Layout section:

Section "ServerLayout"
Identifier  "Default Layout"
Screen      "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice     "stylus" "SendCoreEvents"
InputDevice     "cursor" "SendCoreEvents"
InputDevice     "eraser" "SendCoreEvents"
EndSection

You'll also want to make sure that the "Device" and "Monitor" id's match your configuration.