Reset Unity and Gnome to default values
Solution 1
This worked for me! I've just reset a broken Unity desktop where my user's theme had turned ugly and the dash and top left tray and system menu had stopped appearing. None of the apps seemed to be broken, it was only the very desktop environment I wanted to reset. I did this by moving these two directories out of the way: ~/.config/compiz and ~/.config/dconf. Before I reached to this conclusion, I had run "unity --reset" and "unity --reset-icons", but as far as I could tell, they didn't influence my setup one bit.
Instructions:
Log out of X. I can't do this, since my logout menu didn't appears.
Find a virtual terminal (press Ctrl+Alt+F1) and login.
Kill X if you can't logout:
sudo killall Xorg
X will die, restart, and switch virtual terminal. Switch back with Ctrl+Alt+F1.
Then run:
mv -v ~/.config/compiz-1 ~/.config/compiz-1.BROKEN mv -v ~/.config/dconf ~/.config/dconf.BROKEN
Then go back to X (Ctrl+Alt+F7) and login.
You should now have been set back to a working Unity desktop environment, but without resetting any of your application settings. Also, you can restore the directories, if you wish, since they where just renamed and not deleted.
Solution 2
If you want to reset Unity (this will only reset the Unity settings in CompizConfig Settings Manager and leave the other CCSM settings intact), open a terminal (or press ALT + F2) and enter:
unity --reset
If you want to reset the Unity Launcher icons (dock bar on the left) to their initial state, run the following command:
unity --reset-icons
Solution 3
Try these three commands:
gconftool-2 --recursive-unset /apps/compiz-1
unity --reset &
rm -rf .gnome .gnome2 .gconf .gcond .metacity
Then, restart PC
NEXT TIME: install 'Ubuntu Tweak', and backup your desktop settings
sudo add-apt-repository ppa:tualatrix/next
sudo apt-get update
sudo apt-get install ubuntu-tweak [0.6 beta, Oneiric capable]
sudo apt-get install ubuntu-tweak-0 [old version]
Solution 4
You can try and identify where the config files that are causing problems are by creating a new user in user accounts. Now if you log into the new user you have created and everything looks fine then you must still have bad settings in your home directory.
You can try moving hidden config folders until you find the one containing the unity/gnome settings.
If your settings are still wrong for the new user then system level config files have been changed, to remove these changes use:
sudo apt-get -o DPkg::options::=--force-confnew --reinstall install <package>
This will force dpkg to replace modified config files with the original ones losing all post install customizations. Check man dpkg for more details
Related videos on Youtube
lucacerone
Updated on September 18, 2022Comments
-
lucacerone over 1 year
Possible Duplicate:
How do I reset my Unity configuration?
How do I reset GNOME to the defaults?Apparently I've messed up a lot with my Unity and Gnome 3 settings and now my system looks ugly, and even if I made changes (using gnome-tweak-tool for example) to my configuration nothing seems to work. Can you guys tell me how to delete all the Unity and Gnome related settings (like also compiz and all other similar ones) and restart with the settings of an installation from scratch??
I'd really appreciate your help, thanks a lot guys!
-
jrg over 12 yearsPossible duplicates - askubuntu.com/questions/56313/… - askubuntu.com/questions/17610/…
-
-
lucacerone over 12 yearsHi enzotib, this doesn't work. What I'd like is removing al my settings (not only the user but also the systems one). Of course I don't want to remove ALL my settings (rm -r .* is not a good choice for me...) but only the unity compiz and gnome related ones. Both user and system wide. Also I could reinstall al the default packages, but I can't find a list for them!
-
lucacerone over 12 yearsThis is a good advice! I'll try it as soon as I'm in my office! In the meanwhile can you please tell me which are the packages controlling gnome, unity and compiz??? Thanks a lot!!!
-
Ciaran Liedeman over 12 yearsUse a package manager like synaptic to see unity and compiz's dependencies, as those packages are metapackages and don't actually install anything. Its a lot easier if you remember which conffiles you edited because then you can just use dpkg -S /etc/compizconfig/config, which will give you the owning package of the file you give it.Then you can use the above command to restore the conffile.
-
lucacerone over 12 yearsHi Anarci. I've created a new user and its Unity session looks fine. So does the Gnome Classic session. But the Gnome session doesn't look like standard Gnome 3 session, it still looks like the Gnome Classic one. I've tried the command for the Gnome package, but nothing changed. What other can I try?
-
Ciaran Liedeman over 12 yearsI'm not sure what else to try.
cd ~; rm -rf .gnome .gnome2 .gconf .gconfd
rather move the files instead of deleting them. These are where all the gnome conf user files are stored but if gnome session looks strange between users I'm not sure what else to try. Maybe posting a screenshot will help? -
Ciaran Liedeman over 12 yearsBefore that you can try
gconftool-2 --direct \ --config-source user-configuration-source \ --recursive-unset
to restore default preferences of a user -
lucacerone over 12 yearsHi Anarci, where is the user-configuration-source of users???
-
Ciaran Liedeman over 12 years@Luca Oops my mistake, Replace user-configuration-source with the configuration source in the .gconf directory in the home directory of the user. So try
gconftool-2 --direct \ --config-source ~/.gconf \ --recursive-unset
-
lucacerone over 12 yearsThanks David, I'll try this as soon as I get to the broken computer :) (Particularly useful is the advice for Next Time :))
-
Jo-Erlend Schinstad over 12 yearsThe default applications are available as a package called ubuntu-desktop. If you install it, you'll install all the defaults. You'll not remove non-defaults, though.
-
Jo-Erlend Schinstad over 12 yearsThanks for the tip about using --reset-icons. I didn't know about that one. :)
-
cfi over 12 yearsSuggest to replace "rm" with "mv" to some <samename>.bak backup files and dirs
-
cfi over 12 yearsAlso add
~/.cache
~/.compiz*
~/.fontconfig ~/.local ~/.themes - I'm still unsure if this is a complete list or if some of these are not required to restore unity & gnome3. I'm having the same issue. -
cfi over 12 yearsWith all of these (original answer plus my comment) moved, Gnome3 again works as expected. Unity desktop still only shows a stripped down desktop with no launcher at all, no lenses anywhere, and the base menu in the top bar
-
Huseyin over 10 yearsThanks @david6 your solution worked for me too in askubuntu.com/questions/364958/restore-old-desktop