How to reset your Linux desktop environment

We have discovered that the desktop environment sometimes misbehaves: the panel at the bottom may no longer respond to mouse clicks, or the Home and Start Here icons may no longer open.

Our solution is to eliminate all configuration files related to: the file manager Nautilus, the desktop environment Gnome, the window manager Sawfish, and the X-server XFree86. Default versions of these files will be created automatically when you next log in.

Note: By following this procedure, you will lose many customizations, such as changes to your desktop background color, which icons appear on the desktop, and which icons appear in your panel.

  1. If you are logged in graphically, log out. (It is crucial that the following steps not be performed from within the graphical environment. Merely opening a Terminal window is insufficient. You must exit the graphical environment according to these instructions.)
  2. Press Ctrl-Alt-F1 to reach a text-only login screen.
  3. Log in to the text-only environment.
  4. Issue the following commands to delete things. Be careful to spell everything correctly (notice the period preceding the filenames)!
    cd
    rm -rf .AbiSuite
    rm -rf .acrobat
    rm -rf .adobe*
    rm -rf .cache
    rm -rf .config/xfce4
    rm -rf .djvurc
    rm -rf .dmrc
    rm -rf .esd*
    rm -rf .enlightenment
    rm -rf .esd*
    rm -rf .flexlmrc*
    rm -rf .fontalias
    rm -rf .fonts*
    rm -rf .gconf*
    rm -rf .gnome*
    rm -rf .gksu*
    rm -rf .gtkrc*
    rm -rf .ICEauthority
    rm -rf .icons
    rm -rf .java*
    rm -rf .kde
    rm -rf .macromedia
    rm -rf .maple
    rm -rf .matlab
    rm -rf .mc
    rm -rf .mcop
    rm -rf .metacity
    rm -rf .nautilus
    rm -rf .nautilus-metafile.xml
    rm -rf .netscape*
    rm -rf .openoffice
    rm -rf .recently-used
    rm -rf .rhn-applet.conf
    rm -rf .sawfish
    rm -rf .trash
    rm -rf .update-notifier
    rm -rf .Xauthority
    rm -rf .xsession-errors
  5. To make some Gnome applications run a bit faster, you can avoid some issues with lockfiles under NFS by giving the following command:
    ln -s /dev/null .recently-used
  6. Log out.
  7. Press Ctrl-Alt-F7 to return to the graphical login screen.
  8. Log in. You should have a brand new desktop.