Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XTerm customize background/foreground color does not work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
kiigass
n00b
n00b


Joined: 21 Nov 2018
Posts: 29

PostPosted: Mon Sep 09, 2019 4:09 pm    Post subject: XTerm customize background/foreground color does not work Reply with quote

Hi,

Again, I need your help folks. I am a litte bit confused, because I think I must make a mistake here, but I cannot figure out where. I spent the better part of yesterday's evening and this afternoon on this, but I am still stuck.

Back on topic: I would like my xterm to have a dark background and light foreground colors. I had a look into /usr/share/X11/app-defaults/{XTerm,XTerm-color,UXTerm,UXTerm-color} and I found in *-color:
Code:
! Uncomment this for "white" text on a dark background.
!*VT100*foreground: gray90
!*VT100*background: black


OK, should be easy. So I uncommented these lines and started a new xterm. I still had the same white background and black text.
I tried those lines in .Xresources (followed by xrdb -merge .Xresources). No succes.

What's confusing me is that the files /usr/share/X11/app-defaults/{XTerm,XTerm-color,UXTerm,UXTerm-color} are read. I am sure of that, because other settings of these files are applied. Also, if I start xterm by xterm -bg black, it works.

Any ideas, why it does not work with my files?

thanks
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1994
Location: Frankfurt, Germany

PostPosted: Mon Sep 09, 2019 4:46 pm    Post subject: Reply with quote

  1. Try
    Code:
    xterm -fg yellow -bg red

    This should give you yellow text and a red background.

  2. To make color changes permanent, add the lines below to ~/.Xresources
    Code:
    xterm*foreground: yellow
    xterm*background: blue

    and run
    Code:
    xrdb -load .Xresources

    After that, start xterm:
    Code:
    xterm

    You should see yellow text and a blue background.
Back to top
View user's profile Send private message
kiigass
n00b
n00b


Joined: 21 Nov 2018
Posts: 29

PostPosted: Mon Sep 09, 2019 5:01 pm    Post subject: Reply with quote

hi, thanks for the reply. I am even more confused than before, because it works now (your steps). How do I make this permanent and system wide?
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1994
Location: Frankfurt, Germany

PostPosted: Mon Sep 09, 2019 5:12 pm    Post subject: Reply with quote

  1. Which Desktop Environment do you use?

  2. Look at your ~/.xinitc file. Does it call xrdb? If not, you may want to add something like
    Code:
    [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

    See: https://wiki.archlinux.org/index.php/x_resources
Back to top
View user's profile Send private message
kiigass
n00b
n00b


Joined: 21 Nov 2018
Posts: 29

PostPosted: Tue Sep 10, 2019 5:19 pm    Post subject: Reply with quote

I use i3wm.

Your suggestions do work on my system, which confuses me, but thats a minor problem. I have one more request though: I would like to make this setting global, i.e. for all users. I think I need to change the files /usr/share/X11/app-defaults/{XTerm,XTerm-color,UXTerm,UXTerm-color} for that, but it does not work for me :?
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1994
Location: Frankfurt, Germany

PostPosted: Tue Sep 10, 2019 6:12 pm    Post subject: Reply with quote

I just removed the xterm entries in ~/.Xresources:
Code:
nano ~/.Xresources
xrdb -load ~/.Xresources

and appended the lines below to '/usr/share/X11/app-defaults/XTerm' (as root):
Code:
xterm*foreground: orange
xterm*background: green

After that, I started xterm:
Code:
xterm

And there it is: a xterm window with green background and orange text. Looks ugly...
Back to top
View user's profile Send private message
kiigass
n00b
n00b


Joined: 21 Nov 2018
Posts: 29

PostPosted: Wed Sep 11, 2019 5:44 pm    Post subject: Reply with quote

Thank you very much. It works now for me, although I cannot explain why it did not before.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum