How to Reset Ubuntu/Gnome Settings to Defaults without Re-installing

14 02 2007

As a new user, there comes a time (or there will come a time) when you are playing around with Ubuntu/Gnome, trying different themes, different engines, different window managers, etc, and all of a sudden you run into a problem that you can’t seem to find a way to fix it.

Computer FrustrationMaybe some of your customized settings are causing your gnome-panel to crash all the time or causing your windows and applications to look ugly, even having window buttons (close, minimize) disappear. You start Googling and spending a lot of time - sometimes days - trying to find how you can fix it.

You are frustrated (sometimes hitting your monitor/tower yelling some vulgarities at it as if it understands and you will kill it if it doesn’t fix it… there’s no Valentine’s love there, that’s for sure) and are ready to go back to Microsoft Windows.

But wait!

You keep thinking, “I wish I could just reset it back to its defaults, like a clean install, without losing all my applications and data.”

Well, you’re in luck. There is a way to reset your Desktop settings back to their defaults. If you keep in mind that everything in Linux is a file, all of its settings are files. All of Gnome’s customizations are located in their own specific folders. And these settings are user specific; they are in your Home folder. If you would create another user and log in with that user, you wouldn’t have any of the problems you are having in your own account. If you remove all these folders, you essentially remove all the settings. Therefore, we will remove the folders needed to reset Ubuntu/Gnome back to its defaults.

UPDATE (2008.01.30): Keep in mind that this will only reset your Gnome-specific settings. If you are having problems with your video card, display, x-server, etc., this WILL NOT fix your problems.

If you don’t have access to your graphical (GUI) desktop to delete these folders in Nautilus or you’re stuck at the login screen, drop to a terminal by hitting CTRL + ALT + F1, login to your account, and run this command:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

Get back to your GUI desktop by hitting CTRL + ALT + F7.

Login and VOILÀ! Just like the first time you ever logged into your Gnome desktop.


Actions

Information

57 responses to “How to Reset Ubuntu/Gnome Settings to Defaults without Re-installing”

15 02 2007
Carol (00:33:41) :

Hi, I’m glad I bumped into your ubuntu blog. My hubby has been trying to install ubuntu all week. Yesterday, he finally got it installed and added the KDE, but not without some problems with trying to get the drivers for the graphics card installed.

Now today he installed some OS that makes the screens flop around. Hahaha. Sorry I can’t remember what it’s called. I’m not sure what the fascination is with all this, but he is determined to figure it out.

I’ll show him your blog, thanks

18 02 2007
telpe (19:57:56) :

Thank you

19 02 2007
Kevin Guertin (13:49:51) :

Glad I could help. :)

23 02 2007
15 03 2007
kyle (10:13:50) :

thx too

i nearly thought about reinstalling windows….. no, not quite, but i got very, very annoyed indeed…

25 03 2007
Laurent (11:37:30) :

Just installed Ubuntu with Parallels on my Mac.

You saved me hours on this one.

Thanks !

31 03 2007
Christoph (16:38:26) :

Hi.
I’ve been trying to install Ubuntu on my OQO for the last hours. After playing around with the screen resolution I ended up with my screen beeing set wrong and no way to switch it back.
Gladly I found your instructions!!

Thanks

4 04 2007
stuffBlog » Blog Archive » More screen resolutions for Ubuntu in Parallels Desktop Mac (07:17:43) :

[...] screen just showed garbage, no matter how often I tried to reconfigure X. Finally I came across a link that solved my problem, and best of all, it’s really easy: delete your gnome settings and [...]

28 04 2007
marty (07:54:17) :

thanks dude!! my window controls all disappeared??? i couldnt close windows or use the “show desktop” button or right click on the desktop or anything.. i had to install xubuntu-desktop so i could still use my computer for doing work today and then found this tonight :) perfect, did the trick.. now i dont have to completely remove gnome and start again, which is what i was going to do!! many thanks.

2 05 2007
Im (10:22:53) :

Very useful. Thank you.

3 05 2007
larc (04:13:35) :

Thanks for the tip, but I still having problems with Compiz hiding windows buttons and topbar… :(

6 05 2007
richard (10:13:59) :

every time i booted up, the top portion of each window was gone! (no minimize, resize or close buttons)! i’m really not sure what i did to make this happen. i wasn’t messing around with themes or anything else to do with the appearance of the gnome desktop. deleting the indicated folders and restarting did the trick. thanks for the guide!

7 05 2007
JJNova (17:28:56) :

Maybe it should be pointed out somewhere that all of a persons Evolution mail setting will be lost when performing this technique. Now I have to go through and re-establish all of my accounts. Some of which I no longer know the passwords to :/

8 05 2007
Kevin Guertin (02:08:19) :

Wow… that’s odd. I wonder why those settings would be in those folders? I didn’t have this issue since I use Thunderbird. Can anyone else using Evolution confirm this?? Maybe I’ll test it out while logged in with another user account…

9 05 2007
ERivas (10:54:25) :

I know this is specific to Ubuntu, but could you venture a guess as to the equivalent in the xfce4 Xubuntu desktop? I might be confusing terminology or technology so I apologize ahead of time and thank you for your help!

I accidentally deleted some of my panels, tried to restore them (following some online tips) and now the desktop is totally messed up.

Any help is appreciated.
-Ed

9 05 2007
tomr (14:46:46) :

and the equivalent for kubuntu would be appreciated too…

11 05 2007
Anon (14:05:55) :

For those who’ve lost their window borders and buttons (close, minimize etc.), the solution is to open a terminal window and type in metacity --replace & Unfortunately this only seems to solve the problem until you logout - next time you login you’ll have to run that command again.

Any tips on how to get metacity back permanently? I’m considering adding that command to my Gnome login scripts but that seems like a bit of a hack.

FWIW from googling around this appears to be a common problem with Beryl, but I can confirm that it’s not just limited to Beryl (I haven’t installed it since I’m accessing Ubuntu via VNC).

11 05 2007
Kevin Guertin (14:26:54) :

As the post suggests, removing the .metacity folder from your Home folder should do the trick. It worked for Marty and Richard, as both have commented that it works.
rm -rf .metacity

11 05 2007
Anon (15:04:37) :

Removing the .metacity directory didn’t fix the missing window decorations problem for me - after logging in again I still don’t get them until I run “metacity –replace &”.

11 05 2007
Kevin Guertin (15:42:19) :

Hmmm… odd. Have you checked the Ubuntu Forums? There may be an answer there for your specific issue.

11 05 2007
Anon (16:06:08) :

I have, but most of the ones I’ve found are regarding problems with Beryl (which I don’t have installed).

11 05 2007
Kevin Guertin (18:51:43) :

Did you ever have Beryl installed at one point or another?? If so, there may be some settings still sitting somewhere that are causing problems. Try logging in as a different user to see if you still have the same issue. If you don’t have that issue as a different user, then we can safely say that the culprit lies within your Home directory, narrowing down your troubleshooting.

Also, if you are using the Ubuntu 7.04 Feisty Fawn, the new Desktop Effects (Compiz) could be the culprit if you’ve enabled it under System > Preferences > Desktop Effects at one point or another.

[EDIT] Also try a different theme. Use the Ubuntu default to see if that helps. It may be a bad Metacity theme or you are missing a theme engine to properly handle your windows.

15 07 2007
will turner (10:54:30) :

cheers for that. i moved all the toolbars around and cudnt move them back =p

16 07 2007
selcuk (17:43:20) :

thank you so much!!

26 07 2007
Sebastiaan (15:08:27) :

Hi, thank you for your advise. However, it does not help for me :I

I installed through the Gnome Art manager a login theme, splash screen, background and window theme. Now I cant get ubuntu to start, I do see the Ubuntu progress bar, a blue screen, a black one and than the little “waiting/loading” circle.

When I sellect Ubuntu, kernel, 2.6.20-16-generic (recovery mode) and wait untill the “terminal” comes up (it does show me as user) and type what you advised and press enter and restart, it still gives the same problem.

If I run my live CD in safe graphics mode I see the following error at the bottom.
Fatal server error:
Caught signal 11. Server aborting

Through the file browser on my live CD (in normal mode) I can see the themes that I downloaded, but I can’t make any changes since I’m not the “owner” when I work with the live CD.

Any advise for this newbie?

5 08 2007
jrandombloke (03:26:05) :

Thanks, that was bloody brilliant!!!!

You saved me hours of reinstalling pain I had to go through in Ubuntu. I don’t know why Ubuntu just doesn’t make the supposed failsafe session to be truly failsafe, and have beryl disabled by default, which would be the logical thing to do.

However, your hack saved me. Thanks very much!

11 08 2007
Gordon (02:24:39) :

I’m using Evolution and had horrible graphics problems since installing “Desktop Effects”

I noted the risk to Evolution and decided the risk was worth it.

I now have a nice clean installation and though I had to set up my accounts again, it’s not a great problem for me.

Thanks for the help

12 08 2007
andotyjazz (15:21:57) :

First of all. I am very thankful that I found this, your post. Yes its true, I’ve been googling around how to reset my settings back to its defaults. Truly heaven sent post. Thanks again and again…. really love all your tweaks. You rock. :-)

2 09 2007
TRPW (21:49:10) :

Hey, thanks a lot man

My application launcher was freezing gnome everytime i launched a program, now it’s working again…
of course i have to configure all over again, but is a lot better than installing ubuntu again
Thanks a lot

9 09 2007
Hyperar (11:20:47) :

Last I checked, Beryl wasn’t even installed by default. Compiz on the other hand was installed by default, but not enabled by default, as of Ubutnu Feisty Fawn.

22 09 2007
Jetz (01:16:14) :

That will teach me for messing around with ruby and customizations; thanks saved me from a probable reinstall

regards

11 10 2007
Drew (14:56:52) :

Thank you! I was going crazy! GL Desktop made my screen go blank-there was stuff there, my mouse moved over stuff and changed to cursor or pointer-but I couldn’t see anything. THANK YOU! This solved my problem, the only thing now is changing all my customized stuff back to the way I like it, but at least I can see what I’m doing!!!!!

27 11 2007
nldisu (02:34:19) :

Thanks for your tip!! It worked! It reset the desktop back to its default setting.

27 12 2007
mmiller (22:09:51) :

I tried your command in hopes it would reset my monitor setting. I’m brand new to Ubuntu and messed up on that setting to help the flickering and ended up with a black flashing/flickering screen. This command didn’t help. Is there something else to do?
Thanks.

5 01 2008
MisterChief (16:54:10) :

You mention about if Beryl had ever been installed, well, that’s what I tried to do once.

Since, I can’t start up the Linux computer - If I try to access the GUI, it says it has to be in low-graphics mode. I ame using 7.10 Ubuntu. Any help?

Thanks

30 01 2008
Kevin Guertin (19:38:16) :

Keep in mind that this will only reset your Gnome-specific settings. If you are having problems with your video card, display, x-server, etc., this WILL NOT fix your problems.

31 01 2008
reset your Gnome desktop « GNUosphere (19:57:53) :

[...] your Gnome desktop This tip is too useful not to share. Running a computer lab with Gnome (Ubuntu GNU/Linux) means desktops [...]

10 02 2008
Nick (18:59:34) :

Great idea. Just about the simplest way to do it. Still, you might want to recommend reverting to metacity first with “metacity -replace” before wiping your compiz settings. I think ubuntu should work a bit more on stability before adding more features. I’ve got a high-end graphics card that keeps crashing (not that I mind the command line).

11 02 2008
Eric (13:40:25) :

This worked like a charm after I moved my brother’s home folder to his new PC in an attempt to migrate from Fedora Core 2(!) to Ubuntu 7.10.

I nearly had it figured out by myself, except for the part about doing it from the command line. Thanks for the tip!

12 02 2008
Kevin Guertin (09:48:51) :

Hi Nick,

Thanks for the info… I had written this post before I could ever use Compiz.

So you say that if you delete those folders, it will also delete all of your Compiz settings?? I haven’t reset my system in quite some time. Which folder contains the Compiz settings? .metacity?

17 02 2008
…for the adult in you » Wombats are nice (14:20:17) :

[...] Comment on How to Reset Ubuntu/Gnome Settings to Defaults without … [...]

21 02 2008
Ron (11:17:13) :

I did the command with “sudo” now i cant log in. i am getting a blank orange screen after the loging screen. I did the command without sudo from CTRL+ALT+F1 but still nothing.How can i fix it?
Please
Thanks

24 02 2008
Fred (15:13:20) :

Hi, Will that work if the screen is wrong already at the logon window ? I’d like to reset the system wide settings, not only one user’s preferences. I know this is possible, but what’s the file(s) involved ?

27 02 2008
[SYSTEMS] (07:21:32) :

Thanks i’ll try it …
i hope it will work ;)

11 03 2008
j.k (09:53:55) :

This actually ended up screwing me up more. I’ve been using Ubuntu for a couple years, but on occasion my GUI gets hosed. I’ve never really found a sound method for fixing it. I’ve actually tried this very thing before on my own, stumbled across your page when researching a new way to reset things. Oh well.

13 03 2008
Roger (16:41:19) :

Woohoo! I’m so glad you guys fixed this for me.

14 03 2008
Jasper (11:17:41) :

Thanks a lot! A real live-saver. Video Resolution got too high for the monitor and no way to reset this. As a non linux expert (hate it?) It was awesome to see a clear instruction and even more it really worked!!! Opposed to so much poor documentation. Thanks again!

17 03 2008
Angel (21:37:01) :

Thanks. It has save me a lot of time. With an OS like Ubuntu where in one spend a lot of time downloading dependencies in the internet and very little help with the package documentation. This command is really life saving… Ubuntu is really a very good OS with people like around.

Thanks and keep on helping Ubuntu users.

25 03 2008
fabio (07:58:23) :

Thanks for your post. i had the same problem and i solved thanks to you !!

25 03 2008
fabio (09:29:39) :

I solved the “metacity” problem once forever uninstalling from synaptic package manager the compiz package. All window controls are now back ;) hope this can help someone ;)

15 04 2008
Ben2talk (00:00:19) :

Okay, so rm -rf .gnome .gnome2 .gconf .gconfd .metacity will do the trick and reset the defaults - but does so by DELETING the folders.

My guess is that it’s really better to remember these folders and the locations. If you’re having trouble booting, you can boot from liveCD, or login to KDE or I found that with Enlightenment installed, I could load Egnome when gnome failed…. then get a ROOT NAUTILUS going (code: gksudo gnome) and navigate to these folders, then rename them (example AA.gnome AA.gnome2) and then reboot. This way, you can always rename and delete the AA to restore them.

I found a few problems recreated from the old days by doing a complete delete - I wouldn’t be so drastic again.

22 04 2008
- (14:09:42) :

Moving the files to backup location could be a better option than removing them completely, just in case you wants to try old settings later or finds a fix to the problem.

27 04 2008
Bunny (15:40:16) :

Thank so much! This really fixed everything.

27 04 2008
Bunny (15:41:09) :

Thank so much! This fixed it!

29 04 2008
Saul (11:08:07) :

Thank you, you save from reinstalling. The odd thing is that I was having xserver problems and I thought it was the video card driver. Reseting gnome actuality solve my problem! Envy NG was not working solving the issue.
****************************
Ubuntu 8.04 64bits
Nvidia quadro pro fx 1400
Dell presicion 670
****************************

4 05 2008
melb0n (21:18:26) :

rm -rf .metacity

worked perfectly. after I updated, my screen was doing 800*600. I did rm -rf .metacity and It worked

15 05 2008
monkeyhouse (09:08:12) :

if you just want to get reset the layout of the panels, notification icons, clock, buttons, etc then you can just do this :

rm -r ~/.gconf/apps/panel

backup the folder before as always. you can even just delete the folder from the file browser.

logout and back in and the screen layout will be back at the default and you will NOT lose your Evolution or anything other settings.

as this folder is part of the list included in the main post you can always try JUST this folder first to see if it does what you want before trying all the folder listed above.

happy deleting!

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>