Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

4 Answers 4

up vote 2 down vote accepted

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.

share|improve this answer

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

share|improve this answer
    
That also works, but the Screen section needs Identifier line. –  phjr Jun 10 '09 at 14:50
    
@phjr: please note the ... which mean "fill in the rest" –  Milan Babuškov Jun 12 '09 at 9:44

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.