PDA

View Full Version : [SOLVED] .Xsession or .Xdefaults???



Barriehie
January 21st, 2010, 05:00 AM
I've seen references to both but nothing that states which to use, or is it even relevant???

I figure whichever gets employed can be used by:


if [ -f $HOME/{whichever} ]; then
xrdb -merge $HOME/{whichever}
fi


But, which is the correct file to use and where does the other one go???

TIA,

Brandon Williams
January 21st, 2010, 10:03 PM
.Xsession is a script used for session initialization. It doesn't contain resource variable definitions to be passed to xrdb. If you use a custom session (at least I think that gdm calls it a custom session), then the .Xsession script will be executed, if it exists, in place of the standard session init methods. You would be responsible for correctly initializing all elements of your desktop environment in that case. There is also a file called ~/.xsessionrc, which can be used to add extra processing to X startup in a case where you are using one of the standard session (not custom).

The standard gdm startup actually expects the file to be called .Xresources, in which case it will be loaded automatically without you having to do anything else.

If you use .Xdefaults, then it won't be automatically merged, as in your example, but I think that X will still use it automatically. This method is dependent upon avoiding preprocessor directives (such as #define).

Barriehie
January 21st, 2010, 10:25 PM
Thank you! Best explanation I've seen. :)