Linux – Autoload .Xresources when system is started

linuxUbuntuubuntu 12.04xorg

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.

Best Answer

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