On Sun, Jun 18, 2017 at 01:52:05PM +0200, Martin R. Neuhaeusser wrote:
> it should be enough to set the environment variable in $HOME/.profile.
> 
> And this really works flawlessly for non-graphical logins.

For graphical (display manager) logins, see
<https://wiki.debian.org/Xsession>.

> The first
> bad thing that I had to realize is that for graphical logins, .profile
> is just not read. As it seems, one has to source .profile in a (Debian-
> specific) file which is called $HOME/.xsessionrc to ensure that
> .profile is read during graphical logins.

~/.xsessionrc does not exist by default, so it may or may not dot in
~/.profile.  Depends on what you put in it when you create it.

> Is it really expected behaviour that by default, all setting in
> .profile are ignored for graphical logins whereas they are evaluated
> for non-grahical ones?

Yup.

> Once I source $HOME/.profile from $HOME/.xsessionrc and login
> graphically, all variables that I define within $HOME/.profile are set
> as expected _except_ LD_LIBRARY_PATH. It seems that someone clears
> exactly this variable (on purpose?) without caring at all about its
> content.

Sounds like a desktop environment thing.  They are highly intrusive.
Just a few weeks ago, someone was trying to set their locale variables
at login, and GNOME was clobbering them.

> After some hours of trial-and-error, I finally gave up.

Which desktop environment are you using?  How attached to it are you?

Perhaps your DE has some mechanism for allowing "dangerous" variables
like LD_LIBRARY_PATH to be set by the end user.  Or perhaps it simply
"knows better" than you, and you will have to scrap it entirely to
achieve your goals.  Who knows?  Certainly not I.

Reply via email to