[LightDM] Setting environment variables the correct way for lightdm/XFCE4
OmegaPhil
OmegaPhil at startmail.com
Fri Feb 5 01:21:30 PST 2016
Ah sorry for not saying - Debian Testing (up to date). Yes,
'/etc/environment' is enough for propagating LIBAU, but one or possibly
more things are messing with LD_PRELOAD, between that early PAM stage
and the XFCE4 session manager starting.
Yeah the PAM file looks fine, for reference:
==================================================================
#%PAM-1.0
# Block login if they are globally disabled
auth requisite pam_nologin.so
# Load environment from /etc/environment and ~/.pam_environment
session required pam_env.so readenv=1
session required pam_env.so readenv=1 envfile=/etc/default/locale
@include common-auth
-auth optional pam_gnome_keyring.so
@include common-account
# SELinux needs to be the first session rule. This ensures that any
# lingering context has been cleared. Without out this it is possible
# that a module could execute code in the wrong domain.
# When the module is present, "required" would be sufficient (When SELinux
# is disabled, this returns success.)
session [success=ok ignore=ignore module_unknown=ignore default=bad]
pam_selinux.so close
session required pam_limits.so
session required pam_loginuid.so
@include common-session
# SELinux needs to intervene at login time to ensure that the process
# starts in the proper default security context. Only sessions which are
# intended to run in the user's context should be run after this.
session [success=ok ignore=ignore module_unknown=ignore default=bad]
pam_selinux.so open
# When the module is present, "required" would be sufficient (When SELinux
# is disabled, this returns success.)
-session optional pam_gnome_keyring.so auto_start
@include common-password
==================================================================
On 04/02/16 21:29, Robert Ancell wrote:
> What OS are you using? The pam_env module should bring all the variables
> from /etc/environment into a user session.
>
> See /etc/pam.d/lightdm to check if it is configured like that.
>
> On Fri, 5 Feb 2016 at 09:44 OmegaPhil <OmegaPhil at startmail.com> wrote:
>
>> I currently need to set LD_PRELOAD systemwide in order to work around an
>> aufs kernel memory allocation problem - '/etc/environment' LD_PRELOAD is
>> obeyed by shells launched outside a GUI, however anything launched
>> through lightdm doesn't get this. I can add the export to '~/.bashrc',
>> however I need it also present for any GUI program launched from the X
>> session.
>>
>> Fiddling with '/etc/profile.d/' scripts and adding it to lightdm's
>> init.d script didn't work, looking through lightdm's source (e.g.
>> seat.c) suggests it gets stripped unless LIGHTDM_TEST_ROOT is set,
>> however setting this in '/etc/environment' or in the init.d script still
>> doesn't cause LD_PRELOAD to be honoured.
>>
>> The only thing that 'works' is adding the exports to
>> '/etc/xdg/xfce4/xinitrc', just above the '# run xfce4-session if
>> installed' block.
>>
>> Is there a recommended way (other than this) for a sysadmin to set
>> LD_PRELOAD that is respected by lightdm/XFCE4/etc?
>>
>> Thanks for any help
>>
>> _______________________________________________
>> LightDM mailing list
>> LightDM at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/lightdm
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/lightdm/attachments/20160205/6bed94f7/attachment.sig>
More information about the LightDM
mailing list