<div dir="ltr"><div>What OS are you using? The pam_env module should bring all the variables from /etc/environment into a user session.<br><br></div>See /etc/pam.d/lightdm to check if it is configured like that.<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, 5 Feb 2016 at 09:44 OmegaPhil <<a href="mailto:OmegaPhil@startmail.com">OmegaPhil@startmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I currently need to set LD_PRELOAD systemwide in order to work around an<br>
aufs kernel memory allocation problem - '/etc/environment' LD_PRELOAD is<br>
obeyed by shells launched outside a GUI, however anything launched<br>
through lightdm doesn't get this. I can add the export to '~/.bashrc',<br>
however I need it also present for any GUI program launched from the X<br>
session.<br>
<br>
Fiddling with '/etc/profile.d/' scripts and adding it to lightdm's<br>
init.d script didn't work, looking through lightdm's source (e.g.<br>
seat.c) suggests it gets stripped unless LIGHTDM_TEST_ROOT is set,<br>
however setting this in '/etc/environment' or in the init.d script still<br>
doesn't cause LD_PRELOAD to be honoured.<br>
<br>
The only thing that 'works' is adding the exports to<br>
'/etc/xdg/xfce4/xinitrc', just above the '# run xfce4-session if<br>
installed' block.<br>
<br>
Is there a recommended way (other than this) for a sysadmin to set<br>
LD_PRELOAD that is respected by lightdm/XFCE4/etc?<br>
<br>
Thanks for any help<br>
<br>
_______________________________________________<br>
LightDM mailing list<br>
<a href="mailto:LightDM@lists.freedesktop.org" target="_blank">LightDM@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/lightdm" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/lightdm</a><br>
</blockquote></div>