Recreate Xorg Configuration
From MobileRobots Research and Academic Customer Support
On Debian Linux, the system that provides a graphical display (GUI) is called Xorg. Xorg is an implemenatation of the general X-Windows (specifically X11R6) system (it replaced the older "XFree86" implementation).
Some configuration, in particular regarding screen refresh rates and resolutions, as well as default keyboard layout, is in files in /etc/X11. The primary configuration file is xorg.conf. This file may be edited by hand, or it can be automatically generated based on currently attached monitor, etc.
To regenerate the file automatically, run this command as the root user or using sudo:
The new file will be saved in /root/xorg.conf.new. Follow the instructions printed to test. To use the new file, move it into the /etc/X11 directory (savting a backup of the old file) using this command as root or using sudo:
mv -b /root/xorg.conf.new /etc/X11/xorg.conf
You can also ask Debian to reconfigure the xserver-xorg package to change a few default settings such as keyboard layout:
Run as root or using sudo.