LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 07-29-2004, 11:22 PM   #1
mapesju
Member
 
Registered: Jul 2004
Location: Saskatchewan
Distribution: Slackware 10.2
Posts: 45

Rep: Reputation: 15
Resolution Question


As it turns out, I changed my screen resolution to higher than what my video card can handle and I need help setting it back to 1024x786. I'm using Mandy9.2 (if that matters) and it boots directly to the terminal. Is there a file I can edit from the terminal that will change the resolution back.
Thanks for the help in advance.

Last edited by mapesju; 07-29-2004 at 11:23 PM.
 
Old 07-29-2004, 11:35 PM   #2
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
The file is "/etc/X11/XF86Config-4".
Good luck!
 
Old 07-29-2004, 11:39 PM   #3
mapesju
Member
 
Registered: Jul 2004
Location: Saskatchewan
Distribution: Slackware 10.2
Posts: 45

Original Poster
Rep: Reputation: 15
Thanks osvaldo. One more thing though. I'm a newbie so could someone please tell me the command to edit it?
 
Old 07-30-2004, 12:23 AM   #4
osvaldomarques
Member
 
Registered: Jul 2004
Location: Rio de Janeiro - Brazil
Distribution: Conectiva 10 - Conectiva 8 - Slackware 9 - starting with LFS
Posts: 519

Rep: Reputation: 34
Ok mapesju,
Here is the hard part. There are several editors in linux, each with the "love and hate" matter. As you are a newbie, I can't send you on the wild to look for one of your preference. I just can drive you through the ways I know. That said, the editor I use is "vi", the most ancient and ubiquitous and proficient editor. But you have to learn it to give the proficiency. As you are not interested in the moment about all this dissertation, I will prepare a step by step for you. First, you need to assume all the things I will write after the symbol "#" will be comments and instructions for you. Second, this editor has 2 modes. The first is called "command mode" and the second is "edit mode". Each command is composed by one letter (upper case and lowercase). The behavior of the command is different depending on the case. The default case is always lower. Some commands are preceded by ":" (colon) symbol. Into the editor, each character I will put on one line, you have to enter it without the <enter> key. When you enter a command, you automatically enter the edit mode. You return from edit mode using the <Esc> key. If you could understand this, it was the fastest vi course I never knew of. Remember, everything starting with # is a comment:
Code:
cd /etc/X11 # enter the directory
cp -a XF86Config-4 XF86Config-4.save # save a copy of the config file
vi XF86Config-4  # entering the editor. Here you can navigate with PgUp, PgDn and arrow keys
# You must go to near the end of the file, where the resolution is specified. You will see something
# like this:
#Section "Screen"
#       Identifier "Screen0"
#       Device     "Card0"
#       Monitor    "Monitor0"
#       SubSection "Display"
#               Depth     1
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#       SubSection "Display"
#               Depth     4
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#       SubSection "Display"
#               Depth     8
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#       SubSection "Display"
#               Depth     15
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#       SubSection "Display"
#               Depth     16
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#       SubSection "Display"
#               Depth     24
#                Modes    "1024x768" "800x600" "640x480"
#       EndSubSection
#EndSection
#
# The commands you can use:
# i - insert text
# R - replace text
# r - replace one character
# x - delete a character
# dd - delete one line
# o - insert one line under the cursor for editing
# O - insert one line over the cursor for editing
# u - undo the last change
# CTRL/R - redo the last undo
# :wq  (colon used) to save your changes and exit, enter 
# :q! quit without save changes(the last character is exclamation symbol
# Remember, you need to use "esc" to abandon "edit mode".
If you can't figure out the problem,
# post you XF86Config-4 and tell what is your vga board.

Last edited by osvaldomarques; 07-30-2004 at 12:26 AM.
 
Old 07-30-2004, 12:34 AM   #5
MATJA_KAE_92
Member
 
Registered: Jan 2004
Location: Slovenija
Distribution: Mandriva LE 2005
Posts: 54

Rep: Reputation: 15
Hello!
First of all, login as root.
Then use this commands:
cd /etc/X11 (change directory to /etc/X11)
vim XF86Config-4 (edit XF86config-4 with vim)
i (insert-make editing possible)

Quote:
Section "Screen"
Identifier "screen1"
Device "device1"
Monitor "monitor1"
DefaultColorDepth 24

Subsection "Display"
Depth 8
Virtual 1024 768
EndSubsection

Subsection "Display"
Depth 15
Virtual 1024 768
EndSubsection

Subsection "Display"
Depth 16
Virtual 1024 768
EndSubsection

Subsection "Display"
Depth 24
Virtual 1024 768
EndSubsection
EndSection
[esc] :wq (save changes and exit)
 
Old 07-30-2004, 12:54 AM   #6
mapesju
Member
 
Registered: Jul 2004
Location: Saskatchewan
Distribution: Slackware 10.2
Posts: 45

Original Poster
Rep: Reputation: 15
Sucess. X is working again. Thanks osvaldomarques and MATJA_KAE_92.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
question about screen resolution OsirisX Linux - Software 1 01-17-2005 04:25 PM
Monitor resolution question pen^2 Linux - Hardware 1 06-29-2004 08:29 AM
Yet another X monitor resolution question... Raptor Ramjet Slackware 6 10-30-2003 01:58 PM
Voodoo 3 Resolution Question Perrin7 Linux - Hardware 3 05-12-2003 01:10 PM
Name resolution question... (and more) WeNdeL Linux - Newbie 1 01-23-2003 06:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 01:41 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration