184

I've been messing around with Unity and broke something, how do I "start over"?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Jorge Castro
  • 71,754

12 Answers12

116

The following command does not work on newer distributions (as the reply is ERROR: the reset option is now deprecated).

For 12.04 and older

The simplest way is to hit "open a Terminal" or hit Alt-F2 and run the command:

unity --reset
strpeter
  • 146
Kees Cook
  • 17,473
112

For 12.10 - 13.04

I, along with jokerdino and amithkk have created a python script that cleanly resets Unity for Quantal and above.

It is hosted on github at https://github.com/phanimahesh/unity-revamp

The script is now bundled with Unity Tweak Tool. You can install it using

sudo add-apt-repository ppa:freyja-dev/unity-tweak-tool-daily
sudo apt-get update
sudo apt-get install unity-tweak-tool

For 13.10 & 14.04

sudo apt-get install unity-tweak-tool

To reset Unity, do

unity-tweak-tool --reset-unity

Note - if this does not resolve your Unity issues then the following Q&A may apply to you:


What happens behind the scenes?

Simple. We chase each individual setting that Unity uses, and reset them to their default values, and then reload unity to apply changes. Ah yes, we also kill Unity and compiz before we start, since it is known to get tricky if we change settings under compiz's nose.


Why is this better compared to using dconf-editor or dconf reset ?

  • Didier Roche (didrocks), the author of unity python wrapper says dconf reset does not work in all cases.
  • The consensus among Unity developers is that the settings be modified using Gsettings instead of dconf directly.


What exactly is dconf ?

A little history

  • The configuration settings were managed by gconf earlier.
  • Gnome provides Gsettings as a replacement for gconf.
  • Gsettings is a high level api that manipulates the settings stored in a backend.
  • Unity stores its settings in the backend dconf since it can be loaded much faster than gconf.
Mahesh
  • 12,738
  • Could you explain why this is better than unity --reset, which is the currently accepted answer? – Flimm Dec 24 '12 at 10:33
  • 1
    12.10 and above : unity --reset was not implemented in 12.10. Efforts are underway to get it restored in 13.04. Meanwhile, this is the best bet. – Mahesh Jan 01 '13 at 17:31
  • 6
    Update: I could not complete the automated tests in time and hence a patch I made is not included in 13.04. However, unity-tweak-tool in raring (13.04) comes bundled with this script. unity-tweak-tool --reset-unity should cleanly reset unity. – Mahesh Apr 09 '13 at 13:58
  • FYI that ppa doesn't work: "Unable to locate package unity-reset" – NoBugs Aug 07 '13 at 01:54
  • Also it seems the program from that github address doesn't work on 13.04 :( All I get is tons of errors, "Error spawning command line dbus-launch --autolaunch....... Child process exited with code 1" – NoBugs Aug 07 '13 at 02:01
  • 1
    @Mahesh Apparently that requires you to be in the desktop session, not Ctrl+Alt_Fterminal? What do you do if it segmentation faults after "Loading plugin: unityshell"? – NoBugs Aug 07 '13 at 02:15
  • The PPA isn't needed for 13.04 and 13.10 right? – Seth Jan 09 '14 at 17:06
  • @Seth The PPA isn't "needed", but recommended since the PPA includes several bug fixes that were fixed after publishing to the repos. – Mahesh Jan 11 '14 at 17:04
  • @Mahesh So the repos don't have the most up to date version? – Seth Jan 11 '14 at 17:30
  • @Seth Yep. Updating package in the repo is a lengthy process. – Mahesh Jan 12 '14 at 07:28
  • The same happens to me as @Nobugs: All I get is tons of errors, "Error spawning command line dbus-launch --autolaunch....... Child process exited with code 1 – Rui Marques Oct 14 '15 at 15:38
  • 3
    unity-tweak-tool --reset-unity works on 16.04 after a reboot. – Joel DeWitt Jun 10 '16 at 22:00
  • +1 makes this a great answer :-) Thanks, it helped! – andy256 Jul 08 '16 at 09:25
29

As Kees said, running unity --reset will reset all of the launcher options, but it won't remove your custom favorites. To also remove any launchers you've added to the launcher, run

unity --reset-icons

Or manually by:

gsettings reset com.canonical.Unity.Launcher favorites

I would recommend running the gsettings command before unity --reset, so that you won't have to restart unity for the gsettings key reset to take effect.

Alex Launi
  • 1,922
20

Try to do this:

  1. Login into Ubuntu
  2. Open a terminal by hitting Ctrl + Alt + T
  3. Insert and run this commands:

    gconftool-2 --recursive-unset /apps/compiz-1
    unity --reset
    
  4. Restart, this should work.

hg8
  • 13,462
eNry
  • 343
14

For Ubuntu 12.10 (Revised, again)

OK, here it is. You can use 'dconf reset' as previously outlined and will do exactly what 'unity --reset' used to do.

dconf reset -f /org/compiz/

Then restart:

compiz --replace & disown

Apparently it would actually be better to stop compiz before using the 'dconf reset'. Which I'm currently working on.

You can also look at the settings you have:

dconf dump /org/compiz/

To reset the unity icons you can still use

unity --reset-icons

This information is from a variety of sources, after much googling.

fabricator4
  • 8,375
  • 1
    Only this one is workable for my laptop. Thank!!!! CompizConfig Settings Manager is so horrible...leading so many problems...Bad experience!!! – Casper Jan 29 '14 at 16:08
7

Install ubuntu tweak. The beauty of ubuntu tweak is that you can save desktop and application settings and restore after you messed something up. It also has a function to go back to original settings.

enter image description here

dago
  • 2,384
  • 2
    Ubuntu Tweak, AFAIK, does not work with Ubuntu 11.10 yet. Also, I think this answer needs more detail on which specific settings need to be changed. – Knowledge Cube Oct 20 '11 at 15:38
7

If you've messed with the indicators and need to reset those see this question:

Jorge Castro
  • 71,754
4

For 12.10 — 13.04 [maybe older]

I use this workaround to reset the unity configuration. But with Unity, it resets all configurations such as the custom wallpaper, themes, icon themes etc.

  1. Delete the user specific dconf database file:

      rm ~/.config/dconf/user
    
  2. Then Logout and Login again.

IMPORTANT! Be sure that you BACKUP this file, because you lose ALL Unity's settings and switch to default!

Anwar
  • 76,649
4

Sometimes people accidentally turn off the Unity plugin or setting an unsupported option in CCSM can cause it to break.

You can turn it back on by following these directions:

Jorge Castro
  • 71,754
0

I ran across this thread after my Unity 2d desktop suddenly refused to display launchpad and title bar (for all users), for no apparent reason. Autohide was disabled. Reenabling Unity in CCSM as sugggested in other threads was part of the solution, but none of the other measures suggested in this and several other related threads, including, but not limited to:

Reinstalling unity

Reinstalling ubuntu desktop

Removing all relevant (e.g. compiz, gconf, etc.) configuration information

helped me to completely resolve these symptoms.

unity --reset

would not work for me. After delivering a variety of error and information messages, it would always hang at:

Setting Update "run_key"

as shown in the log posted in the thread titled "unity has vanished" for unity run with no arguments.

I noticed that the error message delivered by:

/usr/lib/nux/unity_support_test -p

was similar to some of the errors reported by unity --reset:

error while loading shared libraries: libGL.so.1:

cannot open shared object file: No such file or directory.

After extensive searching, I found the following solution (courtesy of J.D. Bartlett):

Get the path of libGL.so.1 by using the command locate libGL.so.1.

Add a link to the library in /usr/lib/ as shown in the following example:

sudo ln -s /usr/lib/i386/mesa/libGL.so.1 /usr/lib

Restart the computer.

This not only allowed both unity_support_test-p and unity --reset to run, it also allowed Unity 2d to start. Like the author of the above-mentioned post, I have no idea what caused my problems. I am also still not sure whether the link is a complete solution, or whether I should reinstall the graphics libraries completely, but since creating the link, everything has worked fine for a few weeks now.

R B
  • 316
  • 1
  • 4
  • 19
0

For 11.10 and later

From http://wiki.ubuntuusers.de/Unity/FAQ

cd ~; rm -rf .gnome .gnome2 .gconf .gconfd .metacity .compiz-1 .config/compiz-1 .config/dconf
jokerdino
  • 41,320
-1

Myself, I'd simply try rm -rf ~/.compiz-1