Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-09-2006, 01:18 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 5

Rep: Reputation: 0
XORG.CONF file messed up, how do I edit on boot?

Hi im a newbie to this and find this forum really helpful...

Recently I've tried to make my Fedore Core 4 look like a Mac OS by reading a tutorial online. It told me to edit the xorg.conf file, so i did and restarted and now it will not boot into a GUI/KDE (GNU?)..just a DOS/Terminal lookalike screen where I can still login etc and seem to have the commands there. I dont really want to reinstall fedora again as I've done alot to it (i.e drivers etc)

I just want to know how I can make the xorg.conf file how it was.. I do remember the scripts I put in so can always re-edit it (if i know the commands and someway of deleting them and resaving the xorg.conf)

Old 03-09-2006, 01:31 PM   #2
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
A lesson for the future... always backup your xorg.conf file before you make any changes to it.

Your computer is still fully functional, it's just missing the graphical X server.

Login as root, then type
"pico /etc/X11/xorg.conf" to open xorg.conf in a simple editing program.
Now comes the hard part... figure out what you changed before and change it back to the way it was, then save the file and quit pico.

Once you've done that, type startx to see boot up the X server again.
If this works, then next time you reboot it should go directly into X again.
Old 03-09-2006, 01:34 PM   #3
Registered: Mar 2005
Location: Winnipeg, MB
Distribution: Raspbian, Debian, Slackware, OS X
Posts: 443
Blog Entries: 9

Rep: Reputation: 32
As I recall, Fedora boots to GUI by default, so you have to get yourself into text mode. Since you asked how to edit "on boot" :

When you get to the Grub screen, select Fedora and press "e" that will allow you to edit a line in your Fedora Entry.
select the line with "kernel" in it and press "e" again. add "3" to the end of that line.
Press enter, then "b" to boot that configuration.

That should boot you directly to text mode where you can (as root) edit your /etc/X11/xorg.conf back to a workable state.

*edit changed the word "will" into "should"

Last edited by truthfatal; 03-09-2006 at 01:39 PM.
Old 03-09-2006, 01:36 PM   #4
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
If you have a command line, you should be able to do this.

1) Login
2) change directories cd /etc/X11
3) list the contents ls
4) change to root su, enter the root password
5) you should see "xorg.conf" listed, maybe there's a backup file "xorg.conf.bak" or something like that
6) If there is a backup, first cp xorg.conf xorg.conf.bak2 then cp xorg.conf.bak xorg.conf
6b) If there is no backup, edit the file nano xorg.conf and put a "#" in front of each line you want to comment out
7) Save the file Ctrl-X say yes to save the file
8) Restart the xserver Ctrl-Alt-Backspace
Old 03-09-2006, 02:02 PM   #5
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252

Rep: Reputation: 31
If this computer is on a network with other computers, it may be easier to just let it boot then ssh into from another box and then edit the file. Either way, you need to get to the command line and edit the file.
Old 03-09-2006, 08:33 PM   #6
Senior Member
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
Depending on the editor that was used, the old xorg.conf could have been automatically backed up already, with the name xorg.conf~. Look for that first, and if it is there just use it.
Old 03-10-2006, 11:25 AM   #7
LQ Newbie
Registered: Feb 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks everyone, back in linux now and sorted :-)


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
xorg.conf bad configured, how to edit Monjawi Linux - General 2 09-23-2005 11:08 PM
messed up xorg.conf losingfight Linux - Newbie 13 04-28-2005 02:23 PM
Can't edit Xorg.conf pautasso Linux - Newbie 3 08-14-2004 10:27 AM
edit xorg.conf rather than XF86Config? ICO Slackware 2 07-25-2004 12:17 PM
xorg.conf > how to edit ? visvent Linux - Software 3 06-07-2004 02:14 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:20 PM.

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