34

I fooled around with the colors and stuff, in the terminal, and now want to go back to the maroon and white default config of the the terminal. What files do I have to delete?

3
  • 2
    Deleting ~/.gconf/apps/gnome-terminal or using gconftool --recursive-unset /apps/gnome-terminal as others suggested works, but you need to relog to see changes.
    – user52504
    Mar 29, 2012 at 0:09
  • What does "relog" mean? I mean, how can I relog?
    – Nave Nobel
    Feb 6, 2017 at 7:26
  • 1
    @NaveNobel I think he means to say a relogin. Feb 7, 2017 at 5:08

7 Answers 7

28

Try gconftool --recursive-unset /apps/gnome-terminal

5
  • 1
    thx this worx..
    – haps10
    Mar 31, 2012 at 10:07
  • This is also useful (along with other command line options) if you disabled menu access in the terminal settings by accident (and can't access the menu). Oct 26, 2013 at 9:07
  • Very useful -- especially if gnome-terminal is no longer working through SSH through -X. (Like messing up a profile with a custom theme). Oct 14, 2015 at 20:41
  • How do I undo this?
    – Tom Hale
    Sep 11, 2016 at 7:31
  • nope. did not work
    – prayagupa
    Sep 29, 2016 at 23:32
22

Ubuntu 16.04

This simple command works in Ubuntu 16.04.

dconf reset -f /org/gnome/terminal/legacy/profiles:/

Reset only the default profile

However, if you want to reset only the default profile, which uses UUID b1dcc9dd-5262-4d8d-a863-c897e6d979b9 by default, you can use

dconf reset -f /org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9/

Note: This method should work in Ubuntu 15.04, 15.10 and may work in 14.04 too! But I haven't tested on those versions

3
  • 2
    dconf reset -f /org/gnome/terminal/legacy/profiles:/ does the trickc on ubuntu 16
    – prayagupa
    Sep 29, 2016 at 23:36
  • @prayagupd Yes. that too works. but it can clear all profiles preference. and it was in my answer
    – Anwar
    Sep 30, 2016 at 5:01
  • Also worked on Debian 9.4.
    – Rodrigo
    Apr 1, 2018 at 4:24
16

In terminal click on the 'Edit' menu then 'Profile Preferences'. It will pop up the 'Editing Profile' Window. to reset the color make sure that you have selected the check box named 'Use colors from system theme' in the 'Colors' tab.alt text

7
  • 2
    I have, but I see a white BG only. Nov 23, 2010 at 9:22
  • I also tried creating a new profile, but that didnt help. Things like changing the Cursor shape, produced instant changes in the terminal. but changing the colors, unfortunately did not. Nov 23, 2010 at 11:44
  • Is this the same for all user account including root?.. or just for your account?
    – aneeshep
    Nov 23, 2010 at 11:56
  • Which is the theme you are using ?
    – aneeshep
    Nov 23, 2010 at 12:31
  • It depends on the theme you are using. if you select the default theme 'Ambiance' and follow the above you will get a terminal with maroon and white colors. Or if you want to keep your current theme then you need edit the terminal profile to get the desired output.
    – aneeshep
    Nov 23, 2010 at 12:46
10

If you want to do a complete reset of the Gnome Terminal settings, you can remove the ~/.gconf/apps/gnome-terminal directory which contains them. I would close all terminal windows on your desktop. Then switch away from the GUI with Ctrl+Alt+F1 and login on the console.

You should probably backup the directory first, with something like:

cp -a ~/.gconf/apps/gnome-terminal ~/terminal-settings.bak

Then remove it:

rm -rf ~/.gconf/apps/gnome-terminal

Now, you can switch back to the GUI with Alt+F7 or Alt+F8 and launch the terminal. It should be reset to system default settings.

3
  • 1
    :D wow, thanks Sir! But I am afraid, that did not work! And I havent changed the color-schemes, so its not that the settings are default, but the colors are new. Nov 23, 2010 at 11:21
  • cp: cannot stat '/home/prayagupd/.gconf/apps/gnome-terminal': No such file or directory
    – prayagupa
    Sep 29, 2016 at 23:33
  • None of this is working for me :( Oct 21, 2017 at 5:30
6

In order to reset terminal , one must understand first what part you want to reset exactly - do you want to reset graphical looks ? do you want to reset the shell ?

First of all, default terminal in Ubuntu is gnome-terminal so for 99% of new users, I assume you're using gnome-terminal. Advanced users, who use something other than gnome-terminal will have to refer to manuals of their respective terminal emulators.

Resetting gnome-terminal GUI preferences to default

In order to reset gnome-terminal it is sufficient to do this:

dconf reset -f /org/gnome/terminal/legacy/profiles:/ 

Alternatively, you could use GUI tool called dconf-editor.

NOTE: Multiple answers here suggest gconftool-2. However, GConf

. . .was deprecated as part of the GNOME 3 transition. Migration to its replacement, GSettings and dconf, is ongoing (source)

Resetting shell

It is a frequent question by users that they have something with their shell, and now the text in terminal looks different or they see an error. Simple, quick and dirty way is to get rid of old ~/.bashrc file and replace it with default one, stored in /usr/share/base-files/dot.bashrc You can do so via terminal or via GUI - doesn't matter. Via terminal, you'd do cat /usr/share/base-files/dot.bashrc > ~/.bashrc and via GUI - delete old file, copy /usr/share/base-files/dot.bashrc from file manager to your home folder and rename as .bashrc

Gnome Terminal doesn't open

So you have changed some setting and now gnome-terminal doesn't work. Great, what now ? Luckly, there's couple of ways to get around this.

One, start xterm. By default, Ubuntu comes with two terminal emulators. xterm is the original terminal emulator for X11 GUI and has been around since long ago, when dinosaurs of Unix systems roamed the earth. You can use it to call the dconf command mentioned above, as well as reset your ~/.bashrc config file.

Another approach, would be use dconf-editor tool, again mentioned above. If you don't have it installed - use Software Center to get it.

Finally, you can always purge and reinstall the terminal. Purging the gnome-terminal means any config files associated with it will be removed and it will be installed from scratch. The command to do so is sudo apt-get remove --purge gnome-terminal and then sudo apt-get install gnome-terminal. This can be done via xterm or TTY (Ctrl+Alt+F[1-6])

I did something to my prompt , I want it to look like user@hostname:~$ again.

Here's the thing: the prompt has two static parts username@hostname: and $. The one in the middle, ~, means your current working directory. Just like in file manager, when you jump to different directories, the terminal will display the directory in which you're working right now. So for example:

xieerqi@eagle:~$ cd /etc
xieerqi@eagle:/etc$ cd /home/$USER/Desktop
xieerqi@eagle:~/Desktop$ 

If you want to see ~ again, all you have to do is jump back to your home directory:

xieerqi@eagle:~/Desktop$ cd
xieerqi@eagle:~$ 

If you want to permanently get rid of the directory information in your prompt, you should edit your ~/.bashrc file. Add this line:

PS1="\u@\h:$"

Save the file and run source ~/.bashrc . Now you have a static prompt. Big problem is that you won't see where you are at the moment, so you will have to rely on pwd command for that and be careful not to delete valuable files ( so you have been warned :)

You can also use bash --posix which will display this type of prompt:

$ bash --posix
bash-4.3$ 

I don't want to deal with this, just give me working terminal

That's fairly easy: install some other terminal emulator. Oh, and there's plenty to choose from. Personally, I'd recommend terminator, guake or sakura

2

When you are in Terminal, go to Edit > Profile preferences, or press Alt+E-O to open the Editing Profile dialog. After make sure to select everything as below images.

Also, make sure that the value of PS1 in ~/.bashrc file is:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

general

title and command

colors

background

scrolling

compatibility

0

I played with it which resulted in removing all colors.. and kept me with monochrome..No difference between file and directories.

Try either of this:

ls --color=auto  
ls --color=tty

Reference: https://www.cyberciti.biz/faq/how-to-turn-on-or-off-colors-in-bash/

Might help someone...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .