LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-14-2005, 07:36 PM   #1
Bryanlee
Member
 
Registered: May 2005
Location: Honolulu, HI
Distribution: Ubuntu 10.04
Posts: 56

Rep: Reputation: 15
Restoring an old xord.config file


Hi everyone,
I would like to know how to go back to an old xorg.conf file. I made a few changes to the file and i have had a few minor problems since then so i would like to go back to the old one if possible. I have the old file (xord.conf.old) in the same directory as the one that is currently in use. Also i have notice that if i restart my background screen will change to a default blue screen, but im not sure if thats related to the xorg.conf problem. I hope that made sense to you guys. Thanks again for all your help.

Bryan

Mandrake 10.1
2.6 kernel

Last edited by Bryanlee; 05-14-2005 at 07:37 PM.
 
Old 05-14-2005, 08:12 PM   #2
thewizard20
Member
 
Registered: Sep 2003
Location: ny
Distribution: slackware 9.1
Posts: 73

Rep: Reputation: 15
have you compared both files most likely the old file is the one before you made changes. before you make changes make sure you make backupfiles
 
Old 05-14-2005, 09:23 PM   #3
Bryanlee
Member
 
Registered: May 2005
Location: Honolulu, HI
Distribution: Ubuntu 10.04
Posts: 56

Original Poster
Rep: Reputation: 15
yes the other .conf file is the backup, but i am unsure as how to revert back to it.
 
Old 05-15-2005, 05:58 AM   #4
Bryanlee
Member
 
Registered: May 2005
Location: Honolulu, HI
Distribution: Ubuntu 10.04
Posts: 56

Original Poster
Rep: Reputation: 15
anybody have any suggestions?
 
Old 05-15-2005, 09:06 AM   #5
thewizard20
Member
 
Registered: Sep 2003
Location: ny
Distribution: slackware 9.1
Posts: 73

Rep: Reputation: 15
need to open the file up with wich ever editor you like to use. and save the file as xorg.conf
 
Old 05-15-2005, 09:14 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
If you have a backup copy, then it's a trivial process.[list=1][*]Log out of Gnome/KDE/whatever GUI you use[*]Hit Ctrl-F1 to get a text-based terminal (You may need to use Ctrl-Alt-F1)[*]Log in as root[*]Issue init 3 on the command line (this kills the GUI)[*]cd to the directory containing your xorg.conf files[*]Make a copy of your current config: mv xorg.conf xorg.conf.bad[*]Restore the backup: mv xorg.conf.old xorg.conf[*]Issue init 5 (this starts the GUI again - it will read the old xorg.conf since you switched it)[*]Logout of root[*]Hit Ctrl-F7 to get the GUI login screen[*]Log into the GUI as your normal user.[/list=1]
 
Old 05-15-2005, 04:47 PM   #7
Bryanlee
Member
 
Registered: May 2005
Location: Honolulu, HI
Distribution: Ubuntu 10.04
Posts: 56

Original Poster
Rep: Reputation: 15
ok i followed the steps that you gave above everything worked just fine until i tried to issue init 5. this is what i got.

[root@localhost bryan]# init 5
INIT: Switching to runlevel: 5
Starting display manager:
Assigning raw devices: Cannot open master raw device '/dev/rawctl' (no such file or directory)
Cannot open master raw device '/dev/rawctl' (no such file or directory)
Postmaster is already running grunnerSite listis missing: mailman
 
Old 05-15-2005, 05:23 PM   #8
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
I don't honestly know what those errors are about. I would check to make sure they aren't related to something else. I'm guessing they're related to servers/services you have running on the machine, but I can't say that with certainty. And unfortunately, I know next-to-nothing about raw devices. The last line you quoted would (this is a complete guess) relate to your MTA (mail transfer agent).

The init commands given previously transition your machine between running states (called runlevels). When transitioning to runlevel 3, the X server is shut down (the GUI) along with a number of other services. When the command to transition to runlevel 5 was given, all of those old services get started up again. If some of them were not shut down and try to get restarted, then that could be the cause for the errors.

Regardless, the messages you quoted don't indicate the X server failed to start. I would expect to see an "Unable to open display" message if the GUI had not started properly. So you can try switching to the GUI with Ctrl-F7 (or, again, Ctrl-Alt-F7). Also, sometimes the GUI is on other virtual terminals. So if you don't get the GUI with F7, try F2-F12.

Lastly, the init command sequence was to avoid a reboot. I don't know if you machine needs to stay on, but if not, then a reboot will definitely force the X server to reread the xorg.conf file.
 
Old 05-15-2005, 05:43 PM   #9
Bryanlee
Member
 
Registered: May 2005
Location: Honolulu, HI
Distribution: Ubuntu 10.04
Posts: 56

Original Poster
Rep: Reputation: 15
ok you will have to forgive my ignorance. I can login from the command line, but how do i get back into the gui (KDE) from there?
 
Old 05-15-2005, 08:35 PM   #10
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
If the GUI started up properly, then you get back to it by pressing Ctrl-F?? where the ?'s can be anything from 2 through 12. Typically, the GUI is set to F5 or F7. I can't say exactly which, because it can vary from one distribution to the next. When you try each combination, wait a few seconds; don't hit them all in rapid succession. You'll be able to tell when you try the right combination... trust me. If none of those work, then try Ctrl-Alt-F??.

If after all of that, you still can't get back to the GUI, then just reboot. After the reboot, the system should start normally.

If you're not sure how to reboot from the command line, then issue (as root): shutdown -r now
 
  


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
Restoring Apache httpd.conf file shof515 Fedora 1 11-24-2005 10:54 PM
Help restoring file permissions from a Dump bminish Linux - Newbie 3 12-12-2004 01:34 PM
Restoring a previous config? dworkin Linux - Newbie 7 03-28-2004 07:52 AM
Restoring a rm'ed file? sharpie Linux - Newbie 6 02-03-2004 03:05 AM
Restoring / Undeleting a file richardrex Linux - General 4 10-24-2003 07:59 AM


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