LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-09-2004, 12:45 PM   #1
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Rep: Reputation: 15
FREAKISHLY URGENT: How can I change the screen res. through command lines?


Being the fool that I am, I set my resolution to 1600x1200.

It's all messed up now...is there anyway I can change it back to 1280x1024 through command lines?
 
Old 06-09-2004, 12:49 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Edit your XF86Config (or XF86Config-4) file and remove the offending resolution. I use nano or pico, you may have your own preferred editor.

The command (in my case) would be nano /path/to/XF86Config-4.
 
Old 06-09-2004, 12:52 PM   #3
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks but...where's the XFree86 usually located?

And what's the syntax I use to edit the file (just so I don't corrupt anything)?
 
Old 06-09-2004, 01:02 PM   #4
Pete M
Member
 
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657

Rep: Reputation: 32
nealkochhar

If you have other options available in your XFree86 file simply hold down the CTRL+ALT keys then press + or - on the numeric keypad

Pete
 
Old 06-09-2004, 01:10 PM   #5
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Tried that and managed to edit the config file but still doesn't work..

Guess i'll just have to re-install
 
Old 06-09-2004, 01:18 PM   #6
blueCow
Member
 
Registered: Feb 2004
Location: Florida
Distribution: FreeBSD, CentOS, Debian, Mint
Posts: 111

Rep: Reputation: 17
NO!! You dont have to reinstall.. just edit your XF86Config file

run xf86config from the command line and change it to a lower res.

if you are stuck in x just Alt F2 to a new command line and then run it
 
Old 06-09-2004, 01:20 PM   #7
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
I tried that!

I edited /etc/X11/XF86Config and changed every damn 1600x1200 to 1280x1024!
 
Old 06-09-2004, 01:24 PM   #8
Frank_Drebin
Member
 
Registered: Feb 2004
Location: Atlanta, GA USA
Posts: 232

Rep: Reputation: 30
Hi

Your config file will vary depending on distribution. You may have both of these in your distro but only one actually does anything. If you cahnged XF86Config and it didn't help, see if you have XF86Config-4 and change it as well.

If you are running Mandrake its /etc/X11/XF86Config-4
If you are running Slackware its /etc/X11/XF86Config
try both and see where your's is

OK, that out of the way...

I use VI to edit files like this so I will walk you through it using VI

as root, do the following

vi /etc/X11/XF86Config

now look for the section dealing with screens

should look something like this:
Code:
Section "Screen"
    Identifier  "Screen 1"
    Device      "VESA Framebuffer"
    Monitor     "My Monitor"

#   DefaultDepth 8
#   DefaultDepth 16
   DefaultDepth 24
#   DefaultDepth 32

    Subsection "Display"
        Depth       8
        Modes "1280x1024/100Hz" "800x600" "640x480"
                Virtual 0 0
    EndSubsection
    Subsection "Display"
        Depth       16
        Modes "1280x1024/100Hz" "800x600" "640x480"
                Virtual 0 0
    EndSubsection
    Subsection "Display"
        Depth       24
        Modes "1280x1024/100Hz" "800x600" "640x480"
                Virtual 0 0
    EndSubsection
    Subsection "Display"
        Depth       32
        Modes "1280x1024/100Hz" "800x600" "640x480"
                Virtual 0 0
    EndSubsection


If you notice, you will see that my default depth is 24 so if we go to the line that shows Depth 24 we see all of the modes listed.

Your screen will default to the highest value so delete the "1600x1400" and make your desired resolution the highest one represented.

save it and start x.

another possibility is to change the following line if you see it in the monitor section of your XF86Config file:

Code:
ModeLine "1280x1024/100Hz" 181.75 1280 1312 1440 1696 1024 1031 1046 1072  -HSync -VSync
if you see the line above in your monitor section it is probably set to 1600x1400 instead. try changing that line or delete it and follow the first set of instructions above.


If you are unfamiliar with how to use vi here are some basic commands

type i or hit the insert key once to insert text
type r or hit hit the insert key twice to write over text
type esc (actually hit the key, don't type it) to stop inserting text

after hitting esc type :wq! to save changes and exit or :q! to exit without saving

Last edited by Frank_Drebin; 06-09-2004 at 01:25 PM.
 
Old 06-09-2004, 01:27 PM   #9
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
wow. Just wow.

But now I found the MODELINE and changed it to 800x600--didn't work. THen 1024--768--didn't work.
 
Old 06-09-2004, 01:28 PM   #10
Frank_Drebin
Member
 
Registered: Feb 2004
Location: Atlanta, GA USA
Posts: 232

Rep: Reputation: 30
what distro?

is it XF86Config or XF86Config-4 or do you have xorg.conf?
 
Old 06-09-2004, 01:38 PM   #11
Frank_Drebin
Member
 
Registered: Feb 2004
Location: Atlanta, GA USA
Posts: 232

Rep: Reputation: 30
If you want, you can IM me on yahoo instant messenger. try jbabbler as the username.
 
Old 06-09-2004, 02:08 PM   #12
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks for the offer but I've almost fnished the re-install.

But I might take you up on that as I'll need your help in compiling Kernel 2.6.6 on it (if that's cool with you?)

Thanks again
 
Old 06-09-2004, 02:12 PM   #13
Frank_Drebin
Member
 
Registered: Feb 2004
Location: Atlanta, GA USA
Posts: 232

Rep: Reputation: 30
Allright now, you have to get out of that mindset.

You can't go around reinstalling everytime some little thing goes wrong. You will never learn anything. This aint Windows, anything you screw up can be fixed.

But yes, you can IM me anytime and ask.
 
Old 06-09-2004, 02:30 PM   #14
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Just wondering--what Linux distro are you using?

Personally, I use Knoppix (Debian). The ONLY file I have ever edited to get resolutions working properly is /etc/X11/XF86Config-4. The other file /etc/X11/XF86Config exists, but is completely ignored by XFree v4.x if XF86Config-4 also exists.

In other words, completely ignore XF86Config. You only need to edit XF86Config-4. Do not waste your time with XF86Config.

You perhaps CAN get 1600x1200 to work--just at a lower refresh rate than the default. Do this by commenting out all of the 1600x1200 entries which have a refresh rate greater than 60. Personally, I think 1280x1024 is an abomination. I use 1280x960 instead, because it conforms to the standard 4:3 ratio of all other standard resolutions (resulting in square pixels).
 
Old 06-09-2004, 03:29 PM   #15
nealkochhar
Member
 
Registered: May 2004
Posts: 56

Original Poster
Rep: Reputation: 15
I'm using Slackware 9.1.

I didn't find a XF86Config-4 file, is there any other place I can locate it?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change screen res. at boot?? pookguy88 Linux - Newbie 37 01-21-2005 05:03 PM
FREAKISHLY URGENT: Netgear Wireless USB Adapter MA111 nealkochhar Linux - Wireless Networking 2 06-10-2004 05:50 PM
urgently need to change screen res w/o restart drigz Linux - Software 2 05-23-2004 01:01 PM
how do i change the graphical res. from command line? justin9 Linux - Newbie 6 03-27-2004 04:16 AM
Can't Change Screen Res. in RH 7.2 justiceisblind Linux - Newbie 1 05-19-2002 08:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration