Linux – How to load ~/.Xresources when starting X

arch linuxlinuxxorg

I've edited my ~/.Xresources and issued xrdb -merge ~/.Xresources and it worked perfectly. However when I restart X, the settings are changed to default. I've also added xrdb -merge ~/.Xresources in ~/.xinitrc but that did not worked. Please give a solution.
I'm using Arch Linus with awesome wm.

Best Answer

If you aren't using a display manager to login, you need to add the following to your ~/.xinitrc file.

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

Most display managers will load ~/.Xresources automatically.