29

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?

  • 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 '12 at 0:09
  • What does "relog" mean? I mean, how can I relog? – Nave Nobel Feb 6 '17 at 7:26
  • 1
    @NaveNobel I think he means to say a relogin. – theTuxRacer Feb 7 '17 at 5:08
15

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

  • 2
    I have, but I see a white BG only. – theTuxRacer Nov 23 '10 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. – theTuxRacer Nov 23 '10 at 11:44
  • Is this the same for all user account including root?.. or just for your account? – aneeshep Nov 23 '10 at 11:56
  • Which is the theme you are using ? – aneeshep Nov 23 '10 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 '10 at 12:46
27

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

  • 1
    thx this worx.. – haps10 Mar 31 '12 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). – Halil Özgür Oct 26 '13 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). – elika kohen Oct 14 '15 at 20:41
  • How do I undo this? – Tom Hale Sep 11 '16 at 7:31
  • nope. did not work – prayagupd Sep 29 '16 at 23:32
19

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

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

  • 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. – theTuxRacer Nov 23 '10 at 11:21
  • cp: cannot stat '/home/prayagupd/.gconf/apps/gnome-terminal': No such file or directory – prayagupd Sep 29 '16 at 23:33
  • None of this is working for me :( – Kishan Oct 21 '17 at 5:30
4

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...

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.