Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

GNOME Terminal has a few built-in color schemes:

Built-in color schemes in GNOME Terminal

How can I add more to this list?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Although there is a similar question at Unix&LInux, I can perhaps add some new information and expand some of the points made there in order to give you a few useful pointers. However, it is true to say that you cannot add another 'built in' scheme to the menu as those existing ones are defined in the source code, as you can see if you examine the latest code release.

You could of course patch the source to include your scheme in the choices and then compile the program, but there are some other alternatives which centre around scripting and which I discuss further below.

If you created a color scheme by experimenting with the menus (as in the screenshot below),

enter image description here

you could back it up by noting the instructions in this answer:

Or you could run gconftool-2 -R /apps/gnome-terminal >> file.txt and then use those values in the resulting text file as the basis for a script. A script would be best, as it would be tedious to manually reapply those values by using gconftool-2 or even by editing the .xml file from the correct profile in /home/mike/.gconf/apps/gnome-terminal.

So it seems that scripting is the easiest way to apply or reapply your color scheme settings to any gnome-terminal profile of your choice.

A good model could be provided by the solarised color scheme, which is itself based on the work here. As noted at the github page,

In Gnome terminal, you can add or edit profiles from the menu bar. However, this functionality is not easliy available from command line. Here, you'll find a script that will set the palette colors, foreground, background and highlight colors to a light or dark color scheme, overwriting a color profile you choose.

It would seem to be possible to adapt the method used for scripting the solarised color scheme, and substitute your own color palettes, etc. After running in terminal

git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git

and then using cd to get to the resulting folder, you could examine the scripts and files. In the gnome-terminal-colors-solarized folder, there is a script called install.sh in which gconftool-2 is used to apply the values which are specified in the files in the color sub-folder.

It should be possible to create your own custom profile and then change the values of the files in the colors folder, and tweak the scripts if necessary, and then you should be able to apply and reapply your own color scheme, just like you can with the solarised scheme.

If you want to produce a really interesting and original color scheme you might need to do some reading and research from here and other sources on terminal color schemes, and which are best for long periods of terminal usage.

share|improve this answer
add comment

This small script (from the Tomorrow Night theme), besides being an older version will get the job of installing the said theme, and is also rather easy to comprehend.

tomorrow-theme / Gnome-Terminal / setup-theme.sh

#setup-theme.sh
####!/usr/bin/env sh
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/palette "#000000000000:#919122222626:#777789890000:#AEAE7B7B0000:#1D1D25259494:#68682a2a9b9b:#2B2B66665151:#929295959393:#666666666666:#CCCC66666666:#B5B5BDBD6868:#F0F0C6C67474:#8181A2A2BEBE:#B2B29494BBBB:#8A8ABEBEB7B7:#ECECEBEBECEC"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/background_color "#1d1d1f1f2121"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/foreground_color "#c5c5c8c8c6c6"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/bold_color "#8A8ABEBEB7B7"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/bold_color_same_as_fg "false"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/use_theme_colors "false"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/use_theme_background "false"
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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