Sunday, March 16, 2008

How to restore xorg.conf

Few weeks back I messed up with my Ubuntu Graphics Manager and it stopped starting Gnome display manager.It stucks at command prompt with a message Xserver failed to start and I couldn't see GUI any more.Obviously, i tried 'startx' without success.Then I tried 'sudo dpkg-reconfigure xserver-xorg' to configure my graphics environment from command prompt.Some how I could configure only 4bit color depth and un fortunately it didn't allow me higher bit color depth.It was horrible to see the 4bit color depth screen and i decided to try other methods.If you have backup file of xorg.conf you can restore with 'sudo cp /etc/X11/xorg.conf.mysave /etc/X11/xorg.conf' where xorg.conf.mysave is your backup file.In my case i couldn't figure out the backup file correctly in /etc/X11 directory as there seems to be more than one.

I decided to try another method from ubuntu forums which says xorg 7.2 has a pretty useful feature.That is if you delete xorg.conf file then it will regenerate a new one with default settings.First I have checked the version of my xorg by typing 'X -version' and confirmed it is version 7.2.Then I have deleted my xorg.conf file by typing 'sudo rm /etc/X11/xorg.conf' .It worked like magic and i could see my GUI again.Thanks to ubuntu forums.

9 comments:

alamosh said...

thanks man your solution worked perfectly!

you win the internet!

alamosh said...

thanks man your solution worked perfectly!

you win the internet!

alamosh said...

thanks man your solution worked perfectly!

you win the internet!

au said...

thankkkkkkkkkkkkkkkkkkkkkkkk you!

En Tay said...

thx ... I don't think that the solusion is gonna be this easy :D

Ashwin P. said...
This comment has been removed by the author.
frank said...

Saved my day!

Unknown said...

everything worked fine., except that
I still couldnt see if there is any restored xorg.conf in /etc/X11

Konika said...

Hi
I am trying your methods but it all say read only file system.
I am stuck with xorg.conf file