[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to set 800x600 X?



On Fri, May 31, 2002 at 01:17:29PM +1000, James Cameron wrote:
| How do you set the X server to 800x600 from a program or script?

You edit the config file.  The config file is NOT re-written
automagically.  (only brain-dead software that is too stupid for it's
own good would do a fool thing like that)

| I'm setting up for an outback lan party, and since I'm using some old
| equipment I'd like every one of the 12 Debian boxes to run an X server
| at 800x600.

How about using this shell script (at your own risk, untested) :

--------
#!/bin/sh

# change this if you have your config file named differently
CONFIG=/etc/X11/XF86Config 

T=`mktempfile`
rm -f $T
mv $CONFIG $T
sed -e 's/^\([^M]*\)odes.*/\1Modes "800x600"/' < %T > $CONFIG
rm -f $T
---------

Once you've "fixed" the config file, you're done.  (Re)start X.  Go
home and take a vacation :-).
 
-D

-- 

Better a little with righteousness
than much gain with injustice.
        Proverbs 16:8
 
GnuPG key : http://dman.ddts.net/~dman/public_key.gpg

Attachment: pgpo0ynfbtyg1.pgp
Description: PGP signature


Reply to: