Gentoo Archives: gentoo-amd64

From: Marc Joliet <marcec@×××.de>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: Systemd migration: opinion and questions
Date: Wed, 25 Feb 2015 19:18:03
Message-Id: 20150225201746.55b7a2f4@marcec.fritz.box
In Reply to: [gentoo-amd64] Re: Systemd migration: opinion and questions by Duncan <1i5t5.duncan@cox.net>
1 Am Wed, 25 Feb 2015 10:33:37 +0000 (UTC)
2 schrieb Duncan <1i5t5.duncan@×××.net>:
3
4 > Marc Joliet posted on Tue, 24 Feb 2015 21:15:45 +0100 as excerpted:
5 >
6 > > I would like to convert some programs I start in .xprofile to units that
7 > > are started by my users's systemd instance. I started off with mpd,
8 >
9 > It looks like you got this sorted, but FWIW...
10 >
11 > I just use the standard system level mpd.service here. It drops privs
12 > and runs as its own user, and it listens localhost for connections from
13 > clients run as normal users, which pretty well limits any potential
14 > security issues, and that means I can control it via either my normal X
15 > user and GUI client, or mpc or whatever as either my normal user or my
16 > admin user (or root, for that matter).
17 >
18 > In fact, IMO that's mpd's biggest advantage over most other players. I
19 > don't have to be in X to play music, and in fact, I can not only quit X,
20 > but log out as the user I started playing the music with, and have it
21 > continue uninterrupted, controlling it when I need to using mpc from
22 > whatever other user (here, normally my admin user).
23 >
24 > IOW, I really do use it as the system service/daemon that the name, mpd,
25 > music player daemon, implies.
26 >
27 > And as such, I don't /want/ to start it from user login or service, I
28 > want it as a system service, which is how I run it. =:^)
29
30 I used to run it like that when I was still using pure ALSA, but then I
31 switched to pulseaudio, and didn't want to be in the unsupported "running
32 pulseaudio in system mode" class of users. I actually did run mpd as a system
33 service that connected to my users pulseaudio instance, but that was... such an
34 ugly hack.
35
36 But either way, if you start mpd in ~/.xprofile, for example, and let it
37 daemonise, it will still keep running after you log out. And mpd still doesn't
38 exit when I quit my desktop session, so that has yet to be a problem (more
39 precisely, the user instance of systemd doesn't exit).
40
41 But if you want to just turn your computer on and listen to music, then that's
42 obviously suboptimal, having to log in to start your music player ;) .
43
44 (Personally, I want to set up a NAS and a RaspberryPi or similar as a sort of
45 music center (i.e., I don't plan on archiving DVD rips or anything, at least
46 not currently). My desktop would be too obtrusive and power hungry for such a
47 setup.)
48
49 > But you're king of your own boxes. If you want to run it as a user-level
50 > service and have it quit when you logout that user, go right ahead.
51 > Don't let the fact that such usage bothers me and I don't see the point,
52 > if you're running it as your normal user anyway, there's all those other
53 > player apps, why use mpd in that case, bother you. (No, that isn't
54 > sarcasm. Yes, it does bother me, but it's your box and your choice, and
55 > presuming to take that away from you would bother me **FAR** more. So do
56 > it the way that works best for you! =:^)
57
58 Again, it *doesn't* terminate when I log out. Secondly, I like the various UIs
59 for it (I primarily use mpc with the media keys of my keyboard, and ncmpcpp and
60 sonata otherwise, though mostly the former), and that I can control it remotely
61 (I do so from the laptop often).
62
63 But really, what I like the most is the background nature of it. Or put
64 differently, mpd is unobtrusive (I mean, it has to be, it's a daemon for crying
65 out loud ;) ). I can start playing music and forget that MPD is there. The
66 music is simply "there", if you get what I mean.
67
68 On the laptop, however, I do in fact run something else when I'm not at home,
69 namely MOC, which is the next best thing (it can daemonise, too, and is
70 similarly unobtrusive, but only has one UI).
71
72 Greetings
73 --
74 Marc Joliet
75 --
76 "People who think they know everything really annoy those of us who know we
77 don't" - Bjarne Stroustrup

Replies

Subject Author
Re: [gentoo-amd64] Re: Systemd migration: opinion and questions Rich Freeman <rich0@g.o>