How to customize Xterm using Xterm options and the Xresources file
I’m used to the way xterm looks on ubuntu: white text on a black background. Linux Mint has a different color layout for xterm: black text on a white background.

To have white text on black background run xterm with the following command:
xterm -bg black -fg white
Not just the back and foreground colors can be customized, you can also set the cursor color or title to replace the default “xterm” title. Try the following command:
xterm -bg black -fg white -cr red -title "custom title"
It should open a new xterm with white text on black background but also with a red cursor and a title set to custom title, without the quotes. Run xterm -help to see what other modifications can be done to xterm.
Customizing xterm with a command like the previous is easy but any change made to the layout isn’t permanent so you have to run xterm again with the same options each time. To make them permanent you can use the Xresources file, wich is read every time the system boots. To have the same layout of white text, black background, red cursor and a custom title edit your .Xresources file (e.g. nano ~/.Xresource) and add the following lines:
xterm*background: black xterm*foreground: white xterm*cursorColor: red xterm*title: custom title
To apply the changes without rebooting your system use the command:
xrdb -merge ~/.Xresources
and now every time you open the xterm terminal you’ll have the same layout:

0 comments
