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.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityHere's what I did:
Install gconf-editor sudo apt-get install gconf-editor
Fired it up from terminal gconf-editor
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.
~/.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.
Apr 18, 2017 at 7:44
As pointed through this question, since Ubuntu 15.10 Wily Werewolf gconf
has been substituted for dconf
configuration system.
Similarly as its precursor it provides a GUI tool named dconf-editor
that allow us to see and configure its schema. To install it run
sudo apt install dconf-editor
Likewise we can manage its configuration via command line, now using gsetting
. For example, if you want to set the background transparency level of terminal (let's say to 50%) you have to change it for the desired terminal profile.
In dconf
, org.gnome.Terminal.Legacy.Profile:
is the place where terminal profiles are stored, so you can list the existents profiles UUIDs running gsettings get org.gnome.Terminal.ProfilesList list
and then you can change the desired key through
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:[target-profile-UUID]/ background-transparency-percent 50
Observe that to achieve the change you also need to set use-transparent-background
to true
gconf-editor
. Settings are stored at~/.gconf/apps/gnome-terminal
. Most other terminals can be easily configured by simply editing a text file...