How to re-install xorg xserver completely in ubuntu

ubuntu

After Messing up with ATI or NVIDIA graphics drivers , if you want to switch back to Xorg’s default configuration then follow this simple guide to completely reinstall and reconfigure xorg server in ubuntu/mint/debian .

sudo apt-get purge xorg "xserver-*"
sudo apt-get purge lightdm plymouth
sudo rm -rf /etc/X11/xorg
sudo apt-get autoremove

after that , if you are getting ‘ ubuntu blank screen of death ‘ then try this , reboot and while grub on screen press e to edit boot args then remove quiet splash , or login in recovery mode then update grub file

sudo nano /etc/default/grub 

then find quiet splash and remove that line and add GRUB_CMDLINE_LINUX="nomodeset"

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="nomodeset"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

grub

installing xserver

lets install xorg xserver in ubuntu

sudo apt-get install xauth xorg openbox lightdm plymouth
sudo apt-get install ubuntu-desktop

or easy way to install , ubuntu-desktop is by using tasksel

sudo apt-get install tasksel
sudo tasksel

and choose ubuntu desktop from list , and press okay .
tasksel

please wait , until it finish then reboot

sudo reboot
Tagged With : -
Add Comment