Read more

xterm: Have a black background by default

Arne Hartherz
April 20, 2012Software engineer at makandra GmbH

xterm by default uses black text on white background.

Illustration book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
Read more Show archive.org snapshot

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.
Posted by Arne Hartherz to makandra dev (2012-04-20 16:53)