LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-19-2003, 02:00 PM   #1
ZFighteR
LQ Newbie
 
Registered: Dec 2002
Location: Rhode Island
Distribution: Redhat 9 (Psyche)
Posts: 26

Rep: Reputation: 15
Question I need help in the termal


Ok hear is just how stupid I am. I was installing the NVIDIA drivers for RH8 and I commented the wrong line in the XF86Config file and now Xserver will not start and I have no GUI so I have to log in by text.

The question I was wondering was either what command could i use to rename my XF86Config.backup file to XF86Config or how could I edit my XF86Config file in the text mode?
 
Old 02-19-2003, 02:09 PM   #2
Palin
Member
 
Registered: Feb 2003
Location: A Meatlocker, well feels like one
Distribution: Gentoo
Posts: 292

Rep: Reputation: 30
try the mv command
is nano installed?
 
Old 02-19-2003, 02:27 PM   #3
ZFighteR
LQ Newbie
 
Registered: Dec 2002
Location: Rhode Island
Distribution: Redhat 9 (Psyche)
Posts: 26

Original Poster
Rep: Reputation: 15
what does the mv command do?
 
Old 02-19-2003, 02:29 PM   #4
Palin
Member
 
Registered: Feb 2003
Location: A Meatlocker, well feels like one
Distribution: Gentoo
Posts: 292

Rep: Reputation: 30
moves a file
either into a directory or into a new name
mv origfile newfile I believe
 
Old 02-19-2003, 04:55 PM   #5
Texicle
Member
 
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
Re: I need help in the termal

Quote:
Originally posted by ZFighteR
Ok hear is just how stupid I am. I was installing the NVIDIA drivers for RH8 and I commented the wrong line in the XF86Config file and now Xserver will not start and I have no GUI so I have to log in by text.

The question I was wondering was either what command could i use to rename my XF86Config.backup file to XF86Config or how could I edit my XF86Config file in the text mode?
I've only used the vi text editor so I'll tell you how to do it in vi. First, login as root in command line without X running. Next:

vi /etc/X11/XF86Config

You'll now have your XF86Config file open and ready for editing. Use your down arrow key or PageDown key to get to where you want to make a correction. Once you find your # that is out of place, press your "i" key on your keyboard for Inserting text. Hit your Delete key to remove the #. Next, put your cursor where you actually want the # sign for commenting out to go. Enter your # sign. Now, press your ESCAPE key. Type in

:wq

Notice that there's a " : " infront of wq? You need that. You will see what you're typing at the bottom left of your screen. After you've typed :wq you need to hit Enter. You will have edited your file now.

However, if you want to use your old working back up of XF86Config, type this instead of editing:

mv /etc/X11/XF86Config.backup /etc/X11/XF86Config

assuming that XF86Config.backup is the name of the back up file. Additionally, if you want to add options to the mv command type:

man mv

for a list of available options. I would recommend reviewing the options you can pass to the command before running the command itself. Hope this helps.
 
Old 02-19-2003, 05:10 PM   #6
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
btw, if you do something terrible in vi (ppl new to vi have a tendency to delete lots of stuff, etc.) then type <esc> : q !
(without the spaces)
and you will exit w/o saving. then I guess you could try again.
; )

there are better ways to do everything in vi, but this should give you enough to get your X back.
also typing "/" followed by a word will search for it. so if you know what you commented wrong:
/word
will find it faster for you.
 
Old 02-19-2003, 05:43 PM   #7
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
Wink The above is why I recommend nano....

<su>
nano -w /etc/X11/XF86Config

OR

nano -w /etc/X11/XF86Config-4

This will put you into the config file. Edit what you want, then:
CTRL -o (to save)
and
CTRL-X (to exit)

You're welcome to visit the linx in my sig which contains a copy of one of my XF86Config files. For reference.

Last edited by je_fro; 02-19-2003 at 05:45 PM.
 
Old 02-19-2003, 05:51 PM   #8
ZFighteR
LQ Newbie
 
Registered: Dec 2002
Location: Rhode Island
Distribution: Redhat 9 (Psyche)
Posts: 26

Original Poster
Rep: Reputation: 15
Thanks
 
  


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 On
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:18 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