M HYPE SPLASH
// news

Change background colour in Xterm

By Abigail Rogers

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:

enter image description here

1 Answer

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)

See 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 ~/.Xresources
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy