1

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 1024x768). 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.

phjr
  • 113
  • 4

4 Answers4

2

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.

yadimka
  • 154
  • 2
1

If you set up the Modes (in SubSection Display of Section Screen), the X server will only use those (or quit if none of those can be used).

So, just list all the resolutions that would be acceptable. I'd put something like this:

Section "Screen"
...
    SubSection "Display"
        Depth           24
        Modes           "1440x900" "1280x1024" "1024x768" "800x600"
    EndSubSection
EndSection

You can find a list of common screen sizes here:

http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.svg

Milan Babuškov
  • 1,020
  • 2
  • 15
  • 20
0

I'm not sure this is possible. You could try creating a xorg.conf with only a screen section, listing all the resolutions you want.

David Pashley
  • 23,497
  • 2
  • 46
  • 73
0

The best I can think of (if you don't want to have X generate a config file, then add your screen sections too it) is run xrandr after X starts. If the resolution is over 1024x768, change it.

Steven
  • 3,029
  • 20
  • 18