Setting Resolution from command line
I just installed Mandrake 9.2, and this is my first experience with Linux. I got the OS installed, but I selected the wrong screen resolution during setup. I can't run X because the selected resolution is to large for the video memory. Is there a way I can change the resolution I want X to run in from the command line?
You need to edit (as root)
At least, that's where it is in Debian. Do a:
find / -name XFree86-4.config
if it's not there.
About the middle of the file, there should be a "screens" section with a bunch of display modes. Take out the one that's borked.
see man XF86-4.config for exact details.
Check your monitor's manual or docs for the res and horiz and vert refresh rates it supports.
You will have to be root to edit the file, but you can view it as a regular user in your terminal using, oh, let's say, the 'cat' command. yeah.
use this command to look at your file first to see what you might need to change.
Once you are ready, change to the root user
su - root
then move to the dir
then save the current file in case you @#$% up bad.
cp XF86Config-4 XF86Config-4.old
use an editor to make and save the changes. then try to start X
Here is mine, note I am using the nvidia driver I downloaded and installed and i have a flat panel monitor that supports 1280x1024 res., and I have chopped out most of the sections you don't need to do something with to change the res. Don't delete any sections, just look for what to change. Where you see a line that starts with a # , that line is not in use as it is 'commented out' by the "#" symbol.
ModelName "Flat Panel 1280x1024"
# Sony Vaio C1(X,XS,VE,VN)?
# 1024x480 @ 85.6 Hz, 48 kHz hsync
ModeLine "1024x480" 65.00 1024 1032 1176 1344 480 488 494 563 -hsync -vsync
# TV fullscreen mode or DVD fullscreen output.
# 768x576 @ 79 Hz, 50 kHz hsync
ModeLine "768x576" 50.00 768 832 846 1000 576 590 595 630
# 768x576 @ 100 Hz, 61.6 kHz hsync
ModeLine "768x576" 63.07 768 800 960 1024 576 578 590 616
BoardName "NVIDIA GeForce4 (generic)"
you can startx -- -bpp 8
BACK UP CONFIG FILES BEFORE CHANGING THEM!
You'd think I'd learn to remind people of that... ;)
It turned out the part i needed to change was the subsections near the end of XF86Config-4
Well, Im addicted to Linux now. Time to spend many hours reading when I should be doing homework.
|All times are GMT -5. The time now is 08:40 PM.|