Change background colour in Xterm
I believe you happened to don't have one, so create a file named .Xresources
on your home directory:
touch ~/.Xresources
Then add following lines to .Xresources
file:
xterm*Background: your_background_color
xterm*Foreground: your_foreground_color
example:
$ cat $HOME/.Xresources
XTerm.vt100.background: black
XTerm.vt100.foreground: grey
See critical.ch/xterm for a list of colors which may be supported in your version of XTerm.
You can either restart X or run xdrb
command to apply change you have made:
xrdb -merge ~/.Xresources
xterm
Related videos on Youtube
vishal-wadhwa
Updated on September 18, 2022Comments
-
vishal-wadhwa over 1 year
I want to change Xterm's (not the gnome terminal) background colour in Ubuntu 16.04 but there happens to be no title bar. I could not even find the Xresources file.
Also, I want the colour change to be permanent not just during that session. And one more thing I cannot execute any commands during that session because that Xterm window is being launched by some other program (to be specific that program is "Code Blocks"). Please help me sort out this issue.
Xterm screenshot:
-
vishal-wadhwa over 7 yearsI did exactly what you explained, just added the colour names (white,black). But it did not help. Still the same.
-
Liso over 7 yearsHave you run
xrdb ~/.Xresources
command ? -
vishal-wadhwa over 7 yearsSince you mentioned that either I should restart X or run xrdb. So I restarted->no good, ran xrdb->no good. ran xrdb and restarted X->worked like a charm. Thank you
-
Admin almost 2 yearsShould we keep the
()
for the color?