Gentoo Archives: gentoo-amd64

From: Randy Barlow <randy@×××××××××××××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Systemd migration: opinion and questions
Date: Tue, 24 Feb 2015 20:41:57
Message-Id: 54ECE20F.3070408@electronsweatshop.com
In Reply to: [gentoo-amd64] Systemd migration: opinion and questions by Marc Joliet
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 02/24/2015 03:15 PM, Marc Joliet wrote:
5 > === User units ===
6 >
7 > I would like to convert some programs I start in .xprofile to units
8 > that are started by my users's systemd instance. I started off
9 > with mpd, but it doesn't start automatically ("systemctl --user
10 > start mpd" works fine, though), even though it's enabled:
11 >
12 > % systemctl --user status mpd ● mpd.service - Music Player Daemon
13 > Loaded: loaded (/usr/lib64/systemd/system/mpd.service; enabled)
14 > Active: active (running) since Di 2015-02-24 19:39:46 CET; 1h 6min
15 > ago Main PID: 1091 (mpd) CGroup:
16 > /user.slice/user-1000.slice/user@××××.service/mpd.service └─1091
17 > /usr/bin/mpd --no-daemon
18 >
19 > Feb 24 19:39:46 marcec systemd[384]: Started Music Player Daemon.
20 > [...]
21 >
22 > Also:
23 >
24 > % tree .config/systemd/ .config/systemd/ └── user ├── mpd.service
25 > -> /usr/lib64/systemd/system/mpd.service └──
26 > multi-user.target.wants └── mpd.service ->
27 > /home/marcec/.config/systemd/user/mpd.service
28 >
29 > Is the symlink the problem? Do I have to create an actual file?
30 > Is the target.wants wrong?
31
32 I ran into this problem as well. It is indeed the symlink! There is an
33 RFE filed for this:
34
35 https://bugzilla.redhat.com/show_bug.cgi?id=1014311
36
37 You don't have to create the entire file either though, it turns out.
38 It is possible to inherit a unit in a unit, so you could create a unit
39 that just inherits the one from /usr/lib. I've never tried this with a
40 user unit, but I suspect it would work. Read the section "Example 2.
41 Overriding vendor settings" at the end of this page:
42
43 http://www.freedesktop.org/software/systemd/man/systemd.unit.html
44
45 - --
46 R
47 -----BEGIN PGP SIGNATURE-----
48 Version: GnuPG v1
49
50 iQIcBAEBAgAGBQJU7OIPAAoJEHhEzLg73SRiSCkP/jTv3EWAUTKo5xWFSknMUdUc
51 EfKIc5i4dVX47IKpMF2jKH3201gZ6XJD9GwJW4MFcrM6Ay4q+JiowActdwihptWW
52 keTkJsZ3CrKm6ulD6rkugA443cjKKdeVPdRSCz9FNEH5T5PRqMTRLwnRendDI/9+
53 CKD1l6WTLGaHTpsmgVrKC7HBaZd4GLzGC7izrHcVuzUHUu3vJzxR/xMfjYALeU5J
54 EPdyHsgydN42IMbox+mD1IlSfQXWIV1YxyOgTSNoLUlpApkDzZpFoF7SauNMHW93
55 DwUwSqFxfvft28gVEmykc31oILzI41aVgNd+pZLCjzl9WDEWpxsqIpXqS2jiX2iD
56 NheSTuloR9zbz1Cs0tsY+T9QkQv/PVuGcDfymuHbaZsUdm3HoIkPTF1DeYN2zpIP
57 zpsJFBKQ05lE/sXpBR229QUvQHBasmczq99TvGKFxkz4JBpQybPbEbqZ862eveg3
58 H+Zi8/y3vvT2ISYNIvnrLDyAgf/6nLRue82I7eWvBcvuaHHeUGvTXSnN32QJBtY3
59 Zk5ZlpW1t9YT84jv6hXThS948N8NKJJrxa5dFiocGuTzhBdcLtlNheizPDPGprUM
60 a3inD7SQxw/9U93VMyRPuA9H5gA70ssQRXCvrRHQoV7U+g5qucWV53cXo3bZpBmY
61 MR5hDLvnQVIr/RHzmQ1E
62 =hUb2
63 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-amd64] Systemd migration: opinion and questions Marc Joliet <marcec@×××.de>