5

I'm trying to understand the capabilities of .Xresources yet I cannot get it do do even the most simple of configurations. For instance, I want to be able to change the background color of my terminal.

In my .Xresources file I have:

*background: #FFFFFF

I save that and then run

xrdb -merge ~/.Xresources

I have tried exiting the terminal, logging off then back on, and restarting. No luck.

I know I could change the background by using Edit-->Profile Preferences-->Colors but I want to understand Xresources

Edit: I asked this quesion on Ubuntu Forums and received this response from Toz

Which terminal program are you using? The process you list works fine for xterm (and other Xt library-derived applications). If you're using gnome-terminal or xfce4-terminal, then you're out of luck - neither terminal doesn't use Xresources to set its properties. You have to use the configuration system that the program uses.

At the time I was not using xterm so it didn't make sense to use .Xresources.

1
  • You could summarize the answer provided by Toz @ UF as an answer here.
    – user25656
    Dec 17, 2013 at 5:30

3 Answers 3

1

.Xresources doesn't work for me either anymore. My workaround is to use /etc/X11/app-defaults/XTerm-color and /etc/X11/app-defaults/XTerm.

1

From what you're saying (specifically your reference to the menu entry Edit-->Profile Preferences-->Colors) I infer that you are using gnome-terminal.

That is the reason it doesn't work: gnome-terminal does not use the ~/.Xresources or ~/.Xdefaults files. It has its own configuration, stored elsewhere (specifically, ~/.gconf/apps/gnome-terminal/).

Also see here: https://bbs.archlinux.org/viewtopic.php?pid=1003284

Back in the old days, when everything was streamlined and standardized on GNU/Linux, basically any terminal program would use those files. But nowadays, every developer is doing their own thing, especially when you look to Gnome, KDE and consorts.

If you would like to understand and play around with the ~/.Xresources and ~/.Xdefaults files, use an old-school X terminal such as xterm, rxvt or urxvt.

0

You can export your XENVIRONMENT as follow:

export XENVIRONMENT="${HOME}/.Xresources"

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.