[systemd-devel] Can't make local user.conf work

Kok, Auke-jan H auke-jan.h.kok at intel.com
Mon Feb 29 19:07:09 UTC 2016


On Sun, Feb 28, 2016 at 8:26 PM, G D'Arezzo <gdarrezzo at gmail.com> wrote:
> "You probably want to use [Service] instead."
>
> Thanks for the suggestion, Auke.  Unfortunately, Service and
> DefaultEnvironment don't go together:
>
> [/home/temp/.config/systemd/user/test.service.d/user.conf:2] Unknown
> lvalue 'DefaultEnvironment' in section 'Service'
I just reread the man page for that. DefaultEnvironment is valid only
for user.conf, not any conf.d* file associated with a specific unit
(obviously, since those are not variants of "user.conf", but instead
are variants of unit files).

The [Manager] section is only valid in:

       /etc/systemd/user.conf, /etc/systemd/user.conf.d/*.conf,
/run/systemd/user.conf.d/*.conf,
       /usr/lib/systemd/user.conf.d/*.conf

The manual page systemd-user.conf(5) does not mention at all being
able to use ~/.config/systemd/. This seems like a shortcoming to me,
though.

Auke


More information about the systemd-devel mailing list