7

Is there any way that we can edit the terminal preferences like background, colors, etc., from within the command line itself? The terminal is Gnome-terminal.

I'm using Ubuntu 14.04 trusty tahr.

  • gnome-terminal is usually configured with gconf-editor. Settings are stored at ~/.gconf/apps/gnome-terminal. Most other terminals can be easily configured by simply editing a text file... – jasonwryan Dec 27 '14 at 21:37
  • I accidentally overwrote the gconf.xml in gnome-terminal folder by "vim gconf.xml"(i am new to vim.. was trying to look at the structure of the key value pairs). How do i get it back? However, i dont seem to be getting anything weird in my new terminal windows that i'm opening. They seem fine. – Aman Dec 27 '14 at 21:58
5

Here's what I did:

  1. Install gconf-editor sudo apt-get install gconf-editor

  2. Fired it up from terminal gconf-editor

  3. Went to apps>gnome-terminal>profiles>Default inside gnome-editor

This will open up the key-value pairs for preferences. Edit the value corresponding to the required key.

Thanks for pointing me in the direction rather than giving the exact answer @jasonwryan . I learnt some other things along the way.

Now, I'm going to try to use gconftool-2 to do the exact same thing. I'm trying to eliminate the need for a GUI :)

Useful Links: What is Gconf

Addition: Using gconftool-2

The program gconftool-2 allows the user to interact with Gconf from the command-line.

For example, you wish to set the background darkness level of terminal

So, we have to set the key /apps/gnome-terminal/profiles/Default/background_darkness with a value (let's say 0.50)

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

Similar to this, we can set change other values corresponding to different keys.

  • 1
    I didn't find the path apps>gnome-terminal using gconf – JPCF Mar 16 '17 at 8:43
  • I know this is old, but the path, from your home directory is ~/.gconf/apps/gnome-terminal/profiles/Default/ ... Unfortunately you can't edit it if the gconfd2 server is running. Still trying to figure out where to tell it to stop, as it's not listed in services... Where's the text file config? Dear everyone, bring back the text file config. – blanket_cat Apr 18 '17 at 7:44

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.