How to change the background color of gnome-terminal?

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.


I would suggest reversing the default foreground and background colors using

xterm -rv