[systemd-devel] Help on Automatic Symlink XDG_DATA_HOME
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Fri Nov 1 18:14:08 PDT 2013
On Sat, Nov 02, 2013 at 12:51:11AM +0000, systemdkiosk at yopmail.com wrote:
> Zbigniew Jędrzejewski-Szmek wrote:
>
> > Are you sure that systemd is actually running
> > with this variable set?
>
> Excellent question, and no, I'm not sure.
> If you can tell me how to determine the
> answer, please do.
>
> What I can say is that
>
> 1) XDG_DATA_HOME is set in /etc/profile.d on
> Arch Linux, the first script that runs
> from that folder. The same script sets all
> the other XDG vars too.
Oh, I think that won't work. systemd is executed by systemd
with a standard set of variables [1].
'systemctl --user show-environment' will show what's set.
[1] http://www.freedesktop.org/software/systemd/man/systemd.exec.html#Environment%20variables%20in%20spawned%20processes
> 2) To my knowledge this arrangement works
> fine in every other respect. All the apps,
> and Arch as well, use XDG vars as intended.
> In other words, systemd is the ONLY thing
> that (creates, and then,) uses ~/.local.
/etc/profile* is unfortunately shell-only, so it's not something
that systemd can use directly. I think that adding a custom pam
module would be a better option here (c.f. pam_env(8)).
Zbyszek
More information about the systemd-devel
mailing list