Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I load the settings from ~/.Xresources when system is loaded? Currently, I write

xrdb ~/.Xresources

everytime I start the system and I'd like to automate it somehow.

I use Ubuntu 12.04 with LightDM.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

It's automatically read by some DMs, but in your case, you can add the following command to your ~/.initrc so that it's executed at each session start:

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

The first part ensures that you won't get an error if you decide to delete .Xresources in the future, and the -merge option allows you to add your custom properties to the ones that can have been previously defined, instead of replacing the whole set.

If this still doesn't do, try creating a ~/.xprofile file that contains the following line: USRRESOURCES=$HOME/.Xresources

share|improve this answer
    
Thanks for the answer. Sadly, it doesn't work for me. Maybe it's because I use LightDM which doesn't read .initrc I'm not sure. –  evfwcqcg Sep 30 '12 at 13:02
2  
That's just weird, LightDM is supposed to read and merge .Xresources automatically. What are the permissions? Are you sure the name is correct? –  m4573r Sep 30 '12 at 13:54
    
Yes, the name is correct and permissions are -rw-rw-r--. I also tried to change permissions to 777 (sudo chmod 777 ~/.Xresources) but without luck. –  evfwcqcg Sep 30 '12 at 14:24
1  
Hmm... found this bit on a forum: create a ~/.xprofile file that contains the following: USRRESOURCES=$HOME/.Xresources –  m4573r Sep 30 '12 at 18:31
    
Thank you very much, it works! –  evfwcqcg Sep 30 '12 at 19:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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