[systemd-devel] Help on Automatic Symlink XDG_DATA_HOME

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Nov 1 16:37:46 PDT 2013


On Fri, Nov 01, 2013 at 11:02:30PM +0000, systemdkiosk at yopmail.com wrote:
> Might some expert address:
> 
> https://bbs.archlinux.org/viewtopic.php?id=172220
> 
> It seems systemd pushes hard-wired paths irrespective of XDG vars, a
> possible bug.
> 
> On this box XDG_DATA_HOME and XDG_CACHE_HOME point outside $HOME, while
> XDG_CONFIG_HOME is the default ~/.config folder. XDG_DATA_DIRS is the
> default,
> /usr/local/share/:/usr/share/
Looking at the code, it seems that systemd will create the symlink
in ~/.local/share/systemd/user only if $XDG_DATA_HOME is not set.
Are you sure that systemd is actually running with this variable set?

> No file ~/.config/systemd/user exists. Still systemd insists on its
> symlink in .local and will manufacture all the parent dirs just to
> create that broken symlink to a nonexistent file.
Hm, this might be an actual bug. I guess that systemd should not create
the link if the destination doesn't exist.

> I'd like reliable ways to tell systemd how to use, or not use $HOME. If
> another way than XDG vars wil serve pray tell.
This should work.

Zbyszek


More information about the systemd-devel mailing list