Re: [systemd-devel] Can't make local user.conf work
On Mon, Mar 7, 2016 at 7:31 AM, G D'Arezzo wrote: > On 29 February 2016 at 19:05, Kok, Auke-jan H > wrote: >> On Sun, Feb 28, 2016 at 8:26 PM, G D'Arezzo 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 > > > Is this a feature which never happened or should it work? I'm fairly sure it just never happened. Auke ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Can't make local user.conf work
On 29 February 2016 at 19:05, Kok, Auke-jan H wrote: > On Sun, Feb 28, 2016 at 8:26 PM, G D'Arezzo 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 Is this a feature which never happened or should it work? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Can't make local user.conf work
On Sun, Feb 28, 2016 at 8:26 PM, G D'Arezzo 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 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Can't make local user.conf work
On Thu, Feb 25, 2016 at 7:06 PM, Guido D'Arezzo wrote: > Hello, I’m trying to run user systemd services with DefaultEnvironment set > in a user.conf under $HOME/.config/systemd/ but it isn't being read. > The only .conf files I have seen being read are /etc/systemd/user.conf and > /etc/systemd/user.conf.d/*.conf > > It should work, according to this page (under Environment Variables): > https://wiki.archlinux.org/index.php/Systemd/User > > and these words (though I can't find many other references to its use): > > "You can use DefaultEnvironment in user.conf, and place that either in > /etc/systemd/user.conf, or in ~/.config/systemd/user.conf." > > > https://lists.freedesktop.org/archives/systemd-devel/2014-March/017514.html > > > This doesn't mention user.conf but does it mean any .conf files in or under > there should be read? no, this path contains config files with a special format only, and arbitrary files in here are not read. Consider this the user equivalent of /etc/systemd/ > "Additionally, --user also adds the home-directory of the user as > source: ~/.config/systemd/user/" > > > https://lists.freedesktop.org/archives/systemd-devel/2014-August/022745.html > > but the suggestion later on > > "to create a file in: > ~/.config/systemd/user/your_service.conf.d/your_drop_in_file.conf" > > and in man systemd.unit > > Along with a unit file foo.service, a directory >foo.service.d/ may exist. All files with the suffix ".conf" >from this directory will be parsed after the file itself is >parsed. This is useful to alter or add configuration settings >to a unit, without having to modify their unit files. Make >sure that the file that is included has the appropriate >section headers before any directive. > > fails with systemctl complaining about the .conf file heading: > Unknown section 'Manager' You probably want to use [Service] instead. Auke ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel