Monday, February 23, 2009

Repair a Broken Xorg File

A reader recently tried out Ubuntu Netbook Remix's desktop-switcher and it killed his xserver-xorg file. He rebooted and could not load into Ubuntu's graphical user interface. He left a comment about how he had to reinstall Ubuntu to fix his Mini. Reinstalling Ubuntu for a broken xorg file is like killing a mosquito with a hand grenade. Reinstalling is not necessary, the fix is simple and can be done in about three minutes.

A Little Background On The X-Server:
The X.Org Server (officially the X.Org Foundation Open Source Public Implementation of X11) is the X server in the official reference implementation of the X Window System.

The X Window System (commonly X or X11) is a computer software system and network protocol that provides a graphical user interface (GUI) for networked computers. It implements the X display protocol and provides windowing on raster graphics (bitmap) computer displays and manages keyboard and pointing device control functions. In its standard distribution, it is a complete, albeit simple, display and human interface solution, but also delivers a standard toolkit and protocol stack for building graphical user interfaces on most Unix-like operating systems and OpenVMS, and has been ported to many other contemporary general purpose operating systems. Most modern GUIs developed for Linux and other UNIX-like systems, such as GNOME, KDE, and Xfce, use the X Window System as a foundation.
from Wikipedia


How to Fix Your xorg.conf File:
In a terminal type:
sudo dpkg-reconfigure xserver-xorg
This will allow you to reconfigure your xorg settings, fixing any resolution or graphic problems. In most cases, selecting the default options will fix the majority of your issues.


How To Access the Failsafe Terminal:
If you can't boot into a graphical user interface, you can always access the failsafe terminal from your GDM (Gnome Display Manager) screen.
Start your computer and wait until you get to the GDM (pictured below).
Ubuntu_8.04_login_screen
1. Click the Options menu and select the "Select Session..." option
2. Choose the Failsafe Terminal option
3. Log in with your username and password
4. Run the command as you would in the regular terminal:
sudo dpkg-reconfigure xserver-xorg
5. For most users, select the default settings
6. Reboot your machine and everything should be in working order

Have a question or problem that this article doesn't cover?
Ask our Ubuntu Mini 9 Google Group for help.

5 comments:

jaq said...

Hi I have loved your site. As soon as I received my Dell Mini 9, I tricked it out to the letter following your directions. No problems what so ever, until now.

I retrieved the desktop-switcher app and tried to use it. As soon as I switched, I immediately regretted a number of things. 1. I had ditched the remix theme and went with a more traditional desktop with compiz settings enabled. I wish I would have disabled the compiz settings before having switched desktops. The open windows went very wonky, somewhat transparent and some completely invisible until I managed to click on them. 2. I wish I read your Xorg article before choosing to install the desktop-switcher app.

So,currently all I have is a desktop with wallpaper and nothing else. I can't even open terminal with a alt/f2. I did follow your directions for repairing a broken Xrog file and no luck.

If you have any additional advice, I would appreciate it. I have been hitting the forums looking for solutions but so far none have been forthcoming.

thank jack

jaq said...

Now that I am more awake today, I realize I am not fully completing the Xorg repair process. I didn't really know what to expect when I attempted this. But now that I have to tried to repair five or six times, I realize I have an impediment.

I start the reconfigure and answer numerous questions regarding keyboard setup. I then get thrown back to failsafe terminal with the following message:

xservice-xorg postinst warning:overwriting possibly customised configuration file;backup in /etc/X11/xorg.conf.2009025111540

I am unable to change any of the graphical issues I am facing.

I do realize it was foolish of me to try and switch back and forth from Netbook Remix and a compiz enabled desktop. Part of me just wanted to push the envelope a bit and see what happens. I had read in numerous places that the Dell Mini 9 couldn't really support high graphical use. But I was running compiz settings on high without any issues. So I figured I would throw caution to the wind ;)

Any help you might provide would be great. I also have a thread going on over at ubuntu forums:

http://ubuntuforums.org/showthread.php?p=6799209#post6799209

Kris said...

Oh man... I suggest we put a warning or something on the desktop switcher post.

I went right down the same path.
I switched my desktop and then tried to switch back - and nothing... No Alt F2. Just a desktop. I had to create a launcher and remember how to start a terminal.

I was running maximus with metacity.
I don't think it's xorg...

Trying a bunch of stuff now...
- Kris

redDEAD said...

Kris I did.

"Desktop-Switcher has been a long time coming to Intrepid. It's not perfect yet, it did have a problem remembering my theme preferences.
But now is the time to download, test, and report any bugs."

Robertg027@hotmail.com said...

ok, i screwed the crap out of my computer and nothing seems to help.
first off i found out that a big no-no is to make it auto log onto my account on the computer (as I am the only one that ever gets on it anyways.) so I never see the login screen. then I enabled the "blur windows" effect on my compiz. now when i get to my desktop, everything is all nice shiny but If i try to click on anything or pull up any window, everything turns black (starting with where the windows are.) then I can't see or do anything. how do I fix this without
installing "hammer" onto my computer with applied force?