Q. I had messed up my Ubuntu Linux X windows configuration by editing files. Now all I want is my default settings back to previous state. How do I reconfigure X.org windows system?
A. You need to use dpkg-reconfigure command which reconfigures packages after they have already been installed. Pass it the names of a package or packages to reconfigure. It will ask configuration questions, much like when the package was first installed.
Ubuntu reconfigure xorg
Type any one of the following command to reconfigure X.org windows system:
As the root user:
# dpkg-reconfigure xserver-xorg
OR as a normal user:
$ sudo dpkg-reconfigure xserver-xorg
Just follow on screen questions and you should able to restore or reconfigure to previous state.
See also:
- Black Screen While Starting X window system error and solution
🐧 12 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Thanks!
I put this also in my blog so that more users can find a solution faster.
Delete /etc/X11/xorg and done
sudo dpkg-reconfigure -phigh xserver-xorg
for automatic configuration
I have a problem with the w window, when I power on my PC, and after progressing ubuntu logo, there will appear a blue screen with the gray screen in it(SYSTEM CONFIGURATION,select language).
I lost my X window. I use the sudo dpkg-reconfigure -phigh xserver-xorg but it did not work and got me this
debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
what should I do?
Hamed
I would avoid using the -phigh setting as it can cause problems. The autodetect is no good if you originally did anything other than click next next next on the configuration part of the Ubuntu install (other than the partitioning).
Hi, in my case sudo dpkg-reconfigure -phigh xserver-xorg was sucessfull I have puppy linux runnig as frugal, My sin was to try to set the audio controls from Puppy…
Just wanted to say thanks for this great share… It really saved my day, i was about to renistall my OS because of xorg problem.
Hi, in my case with BOSS Linux ver. 3 sudo dpkg-reconfigure xserver-xorg then sudo startx was sucessfull I have BOSS linux running smoothly but I have to do it on every startup, how can I set it permanently anyone plz help, My sin was to set the Display card setting which I have to do by above sudo in command line mode. now plzzzzzzzzzz help to do it fix permanently to avoid again and again.
I can not login into my graphical interface. Whenever I hit login after giving password, it goes blank for a few second and returns me the same screen again with no error. I’m using ubuntu 11.04 64bit. My system is running fine on tele-terminal, but can not get into the graphical terminal.
I don’t know what I did to my system. I have a ATI HD 6770 gpu in my desktop and perhaps I tried to use xbmc from their repository. I have now uninstalled xbmc from my system fully, but it didn’t solve my problem. I tried to reconfigure the xserver, gdm; but nothing works.
Please help me, otherwise I have to make a fresh install of my system.
Another solution is:
# X -configure
and then copy the new configuration into /etc/X11/xorg.conf (replacing this file)
__
Matias Colli
Perito Informático Forense
M.N A-128 COPITEC
Thankyou for this solution. I have a laptop that has bios administrator password set. The prevents booting from flash or DVD for traditional install. I cloned a hard drive on another Ubuntu system then used dpkg-reconfigure to get it to work properly.