Wednesday 20 August 2008

Gnome or KDE is screwey; how do I reset my Gnome or KDE configuration?

The Gnome and KDE desktop environments can get into such a state that they either won't start or start more-or-less uselessly. Or you may just have configured a miserable combination of fonts, colours and desktop images and want to start afresh. In either case, it's simply a matter of logging out, renaming the configuration folder(s) and starting the desktop again.

Note that when you reset your configuration, you will lose all customizations made under those environments. For example: resetting your KDE configuration will reset your Konqueror bookmarks and cache, your Kmail settings, and your desktop wallpaper; resetting Gnome will result in your losing your theme settings, your Epiphany bookmarks, and your Nautilus settings. You can restore some of these settings by copying in specific files and folders from the backups made with the commands below.
KDE

All KDE settings are in a single folder in your home directory: .kde. Simply rename the folder:

1. logout
2. press Alt-Ctrl-F1 to switch to a console login
3. login
4. rename the .kde folder to .kde.date_and_time:
cd ~
mv .kde .kde.`date +%Y%m%d.%H%M`
exit
5. press Alt-Ctrl-F7 and login

You will now have no .kde folder so KDE will start afresh when you next login; your old settings are in .kde.date_and_time.
Gnome

1. logout
2. press Alt-Ctrl-F1 to switch to a console login
3. login
4. rename the Gnome folders to folder_name.date_and_time:
cd ~
tcsh
foreach d (.gnome .gnome2 .gconf .gconf2 .gnome-private .gnome2-private)
set dt=`date +%Y%m%d.%H%M`
mv $d $d.$dt
end
exit
5. press Alt-Ctrl-F7 and login

You will now have no Gnome folders so Gnome will start afresh when you next login; your old settings are scattered in the various .g* folders; frankly, I'm note sure which are where. But you may well find that you can save some of your settings by doing the following:

1. do steps 1 to 5 above
2. logout
3. press Alt-Ctrl-F1 to switch to a console login
4. login
5. replace the new .gconf folder with your original one:
cd ~
mv .gconf .gconf.fresh
\cp -pr .gconf.date_and_time to .gconf
exit
6. press Alt-Ctrl-F7 and login

No comments: