Your message dated Tue, 3 Sep 2019 13:59:31 +0200
with message-id <[email protected]>
and subject line Re: Bug#820111: Info received (document how to use per-user
systemd --user services)
has caused the Debian Bug report #820111,
regarding document how to use per-user systemd --user services
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
820111: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=820111
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Severity: wishlist
X-Debbugs-CC: [email protected]
Dear maintainer,
please document how to use per-user systemd --user services.
- how to do that for a login console
- how to do that for an X session
(If there is any difference.)
Steps I done:
sudo apt-get install libpam-systemd dbus
sudo loginctl enable-linger user
Drop the service in /etc/systemd/user/mytest.service.
systemctl --user enable mytest
'ps aux | grep systemd' shows that 'systemd --user' is running.
Manual 'systemctl --user start mytest' works for me. But it is never
automatically started.
After reboot, 'systemctl --user status mytest' always shows loaded,
enabled, inactive, dead.
I might be doing something wrong. Please consider documenting how to do
that.
Cheers,
Patrick
--- End Message ---
--- Begin Message ---
> cat /etc/systemd/user/mytest.service
> [Unit]
> Description=mytest
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/bin/true
>
> [Install]
> WantedBy=multi-user.target
On Tue, 21 Feb 2017 00:03:00 +0000 Patrick Schleizer
<[email protected]> wrote:
> By Debian stretch default, there are some default systemd user unit
> files in `/usr/lib/systemd/user/`.
>
> With a different path on Debian stretch
> `/usr/lib/systemd/user/mytest.service`:
>
> ```
> [Unit]
> Description=mytest
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/bin/true
>
> [Install]
> WantedBy=default.target
> ```
>
> systemctl --user enable mytest
>
> Worked for me.
So, the problem is not the location of the mytest.service unit, but that
the above unit uses WantedBy=multi-user.target (incorrectly) and second
one WantedBy=default.target (correctly)
For user services, there is not multi-user.target or graphical.target,
only a default.target where the units should hook into.
This is sufficiently documented in the man pages imho, see e.g. man
systemd.special, so I'm closing this bug report.
Regards,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
--- End Message ---
_______________________________________________
Pkg-systemd-maintainers mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-systemd-maintainers