What is X you might ask? Back in the day there was a graphical 'windowing' interface named W for Unix systems. This allows graphics to be on the screen, the mouse pointer to do stuff, etc...The successor to W is... X, which does the same job of allowing graphics on your computer. Maybe some day there will be a Y and a Z?
Anyways, resetting that file:
In a terminal (I use Konsole on KDE), run as root:
shell# dpkg-reconfigure xserver-xorg
or as your normal user, if you have sudo access:
shell$ sudo dpkg-reconfigure xserver-xorgFrom here you will have a few pages to go through; for the most part you can accept the defaults, but here is a brief overview of each page and the settings that I've chose. This is NOT a graphical application, so your mouse won't work here — use the [Tab] key to move around to various fields and [Enter] to 'click' a button ([Space Bar] may work also).
Run the above command, and on Page X you'll see...
Page 1. Use kernel framebuffer device interface?
No
Page 2. Autodetect keyboard layout?
Your call, but US keybd select No; if you don't know if you have a US keybd or if it has a lot of odd buttons, select Yes. Note that selecting Yes will give MORE PAGES than what I have listed here.
3. Keybd layout:
us
Well, I've got a US keybd; if you have something else or selected Yes to the first question, this may be something else.
4. XKB rule set to use:
xorg
5. Page 5 is some info; hit [tab] to highlightand then [enter] to pick
6. Keybd model:
accept default (pc104 on my computer)
7. Users of U.S. English keyboards should generally leave this entry blank
Click OK
8. Keyboard variant:
I kept myne blank, as recommended in Page 7
9. Experienced users can use any options compatible with the selected XKB model, layout and variant.
[Tab] to get toand [Enter] to move forward
10. Keyboard options:
I prefer my [Caps Lock] key to function as another [Control] Key (although I've really modified it to be a compose key in KDE, and likely this can be done at this screen — anyone know how?) and my 'Windows' key the function as a Meta key. If you want these enter this info on this tenth screen:
ctrl:nocaps altwin:meta_win
That should be it to recreate your XOrg file, now located at /etc/X11/xorg.conf and the Terminal should also report where your previous XOrg configuration file is located (backed up), if there was one before.
To test your new XOrg configuration file, restart X from your KDE or GNOME login screen, or reboot the whole computer if you're a Windows user.