Thursday, 18 April 2013

CONFIGURE X Window How To Get Your X Back


CONFIGURE X How To Get Your X Back


          In case of pure disaster you can lose your X, and mess up your X-Config file. This tells you how to fix that.
In the case of a failing X you get thrown back to the prompt in a text console in runlevel 3, just to check that do:

$ root   ( not "su" because you´re not logged in as user yet )
< password >
# init 3


This because the following actions should absolutely not be done in another run level. ( In Ubuntu and Debian please boot up in "safe mode" )


We stay logged in as root and first do:

# Xorg -configure

The screen will go black for a few seconds because it will generate an new xorg.conf file, it will put a “xorg.conf.new” in root's home directory ( /root ). . . . so check this with:

# ls   /root
If the file is indeed there we can first check if it works with this command:

# Xorg -config /root/xorg.conf.new

You should get a gray ( or blue ) screen with an X-shaped mouse cursor, this means it´s working. If so we get back to the prompt with:
< Ctrl+Alt+Backspace >

Now we back up the old xorg.conf file, just to be sure we can compare later if needed:

# cp /etc/X11/xorg.conf /etc/X11/xorg.conf-BACKUP

Next we move the new xorg.conf file to its place:

# mv /root/xorg.conf.new /etc/X11/xorg.conf

I hope all went smooth up until now, because then we can:

# reboot

No comments:

Post a Comment