xterm: Have a black background by default

xterm by default uses black text on white background.

To change that to something like "light gray on black", do a

vim ~/.Xresources

...and put this in there:

xterm*background: black
xterm*foreground: lightgray

Afterwards, feed these changes to your current X session:

xrdb ~/.Xresources

Any subsequent xterm will be colored white on black background.

Hint:

  • While you're at it, you can also set xterm's font in your ~/.Xresources file. Just add xterm*faceName: monospace:pixelsize=14.
  • If you don't want to change your default, use command line arguments: xterm -bg blue -fg yellow
  • Setting xterm*background or xterm*foreground changes all xterm colors, including menus etc. To change it for the terminal area only, set xterm*vt100.background and xterm*vt100.foreground -- unfortunately, -bg and -fg will no longer work properly this way.
Arne Hartherz