33

I updated my Ubuntu but it crashed during installation and I was not able to recover it (my hard drive crashed). I changed my hard drive and re-install ubuntu

I saved all my important docs (bookmark, documents etc...)

One thing I was unable to recover is the profile from my shell (I changed the color scheme, title, number of lines scrollback etc...)

Where can I save this so next time something happens I won't have to set my terminal settings all over again?

33
+100

GNOME Terminal profiles are stored in: ~/.gconf/apps/gnome-terminal/profiles.

(You might want to back up the whole .gconf directory, though.)

| improve this answer | |
  • 3
    This is now obsolete. So if your ~/.gconf is empty, see the answer by Abell for newer method using dconf/gsettings. – wisbucky Mar 8 '17 at 1:13
  • @lgarzo the codes are 12 bytes instead of 6 why? – alhelal Feb 5 '18 at 17:21
7

Newer gnome-terminal (3.8+ I think) stores its config in dconf instead gconf.

gsettings list-recursively | grep -i org.gnome.Terminal

More info about the change https://askubuntu.com/a/91409/79266

| improve this answer | |
  • Unfortunately this doesn't list the profile settings, only the global ones and the profile IDs. – egmont Oct 22 '17 at 10:12
1

In case someone lands here looking for a way to change the terminal settings from console (eg for vagrant provisions), the gconftool-2 command can be used. For example:

gconftool-2 --set /apps/gnome-terminal/profiles/Default/background_darkness --type=float 0.50

You can get the relevant setting keys from the ~/.gconf/apps/gnome-terminal/profiles/Default/%gconf.xml file.

| improve this answer | |
  • Just as the accepted answer, this one is also obsolete now. – egmont Oct 22 '17 at 10:11
0

I don't think this will change the gnome terminal background color etc. but it will edit BASH's behavior. The BASH config files for the individual user are stored in the .bashrc file in your home directory. Note that since it is a dot file it is hidden by default. Use ls -a from the terminal to see the file or invoke view hidden files in nautilus to reveal it. There is also a .profile file but it is often easier to keep all your edits in .bashrc.

Now learning how to config BASH (or other shell) is a whole other topic.

| improve this answer | |
-1

If you have a separate /home partition and if u don't format it while installing Ubuntu, all your user settings will remain intact (since all user settings will be stored in /home partition). Its always advisable to create multiple partitions (one independent partition for / so that while reinstall only that partition can be formatted)

| improve this answer | |
  • another partition on the same drive will not change anything correct? – aki Nov 29 '11 at 13:23
  • 3
    You don't need a separate partition to do this, the installer defaults to saving data in /home. – Jorge Castro Nov 29 '11 at 13:42

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