Is there any config files for xterm for default settings? For example, on my system, xterm start with black text on white background, and I want it the other way around. I can do it by starting it with:

xterm -bg black -fg white.

I want to set in a config file that if I run it without arguments, it will start with these options.

2 Answers 2


Add these lines to a file named .Xdefaults in your home directory.

xterm*background:   black
xterm*foreground:   white

Then, run xrdb .Xdefaults and launch xterm :)

And here's a full guide to .Xdefaults if you want more: http://wiki.archlinux.org/index.php/Xdefaults


Just adding an updated answer:

Atlas:~$ cat .Xresources
XTerm*background:   black
XTerm*foreground:   white

Things to note: Attributes in the file are case sensitive. Xresources has replaced Xdefaults.

Also if your xterm window (and other terminals) are slow - because the window takes several seconds to redraw the text - this can be extremely distracting, and seems to occur on some systems like the AMD Ryzen systems for some reason when switching workspaces, then add:

XTerm*renderFont: true
XTerm*faceName: VeraMono
XTerm*faceSize: 10

And forcing the system to render the fonts will fix the slow redraw / re-rendering of xterm windows contents, which can be extremely distracting when switching workspaces.

To apply:

xrdb .Xresources

All future xterminals you open will now work as they should.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .