Autoload .Xresources when system is started

5,871

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:
5,871
evfwcqcg
Author by

evfwcqcg

Updated on September 18, 2022

Comments

  • evfwcqcg
    evfwcqcg over 1 year

    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.

  • evfwcqcg
    evfwcqcg over 11 years
    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.
  • m4573r
    m4573r over 11 years
    Hmm... found this bit on a forum: create a ~/.xprofile file that contains the following: USRRESOURCES=$HOME/.Xresources