How to change the background color of gnome-terminal?

ziiweb picture ziiweb · Apr 28, 2012 · Viewed 71.8k times · Source

How to change the background color? I selected Profile > Background > solid color, but where can I select the color?

Answer

Paul picture Paul · Nov 9, 2012

There are two well-supported ways to change the background color of an xterm (remember xterm != Terminal).

A. Set the color when you create the xterm: E.g.,

% xterm -bg yellow &

OR

B. Edit .Xdefaults to include a color specification, such as the following: XTerm*background:yellow

% vi ~/.Xdefaults  (pick your favorite editor)

This can also be done by typing the following into an xterm:

% cat >> ~/.Xdefaults  <RETURN>
XTerm*background:yellow<RETURN>
<CTRL-D>

Whichever way you change .Xdefaults, the change will not take effect until either:

  • xrdb ~/.Xdefaults
  • your X server is restarted, probably the easiest way to do that is reboot your machine, or log out.

Then it will be set once and for all.