You are not logged in.

#1 2020-11-29 14:55:49

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

[Solved] systemd --user units in /etc - where do they come from ?

I've been looking at systemd --user to make sure only things I want are started.

$ ls -lR /etc/systemd/user/
/etc/systemd/user/:
total 8
drwxr-xr-x 2 root root 4096  2 dec  2018 default.target.wants
drwxr-xr-x 2 root root 4096 14 okt 10:55 sockets.target.wants

/etc/systemd/user/default.target.wants:
total 0
lrwxrwxrwx 1 root root 50  2 dec  2018 xdg-user-dirs-update.service -> /usr/lib/systemd/user/xdg-user-dirs-update.service

/etc/systemd/user/sockets.target.wants:
total 0
lrwxrwxrwx 1 root root 36  2 dec  2018 dirmngr.socket -> /usr/lib/systemd/user/dirmngr.socket
lrwxrwxrwx 1 root root 46  2 dec  2018 gpg-agent-browser.socket -> /usr/lib/systemd/user/gpg-agent-browser.socket
lrwxrwxrwx 1 root root 44  2 dec  2018 gpg-agent-extra.socket -> /usr/lib/systemd/user/gpg-agent-extra.socket
lrwxrwxrwx 1 root root 38  2 dec  2018 gpg-agent.socket -> /usr/lib/systemd/user/gpg-agent.socket
lrwxrwxrwx 1 root root 42  2 dec  2018 gpg-agent-ssh.socket -> /usr/lib/systemd/user/gpg-agent-ssh.socket
lrwxrwxrwx 1 root root 43  2 dec  2018 p11-kit-server.socket -> /usr/lib/systemd/user/p11-kit-server.socket
lrwxrwxrwx 1 root root 37 14 okt 10:55 pipewire.socket -> /usr/lib/systemd/user/pipewire.socket
$ 

I don't know what put the xdg-user-dirs-update.service there, but can live with it being started automagickally.

The sockets in /etc/systemd/user/sockets.target.wants are different though.

The only reason pipewire is installed on my system is that it recently became a hard dependency of kwin (which I DO want to use sometimes).
I don't want or need pipewire .

$ pacman -Qo /etc/systemd/user/sockets.target.wants/pipewire.socket 
error: No package owns /etc/systemd/user/sockets.target.wants/pipewire.socket
[panoramix@silverbolt ~]$ systemctl --user status pipewire.service 
● pipewire.service - Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● pipewire.socket
[panoramix@silverbolt ~]$ systemctl --user status pipewire.socket 
● pipewire.socket - Multimedia System
     Loaded: loaded (/usr/lib/systemd/user/pipewire.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Sun 2020-11-29 12:31:50 CET; 3h 16min ago
   Triggers: ● pipewire.service
     Listen: /run/user/1000/pipewire-0 (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/pipewire.socket

nov 29 12:31:50 silverbolt systemd[835]: Listening on Multimedia System.
$ 

the symlink is not put there by pacman and the pipewire user service is disabled.
The socket however is active and allows starting pipewire on demand.

I can ofcourse mask the socket, but would like to understand what put it there in the first place.

Last edited by Lone_Wolf (2020-11-29 16:33:04)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2020-11-29 15:13:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved] systemd --user units in /etc - where do they come from ?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-11-29 15:43:11

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] systemd --user units in /etc - where do they come from ?

So pipewire socket enabling upon install is a decision from archlinux devs, not upstream.
I'll think about whether this is important enough for me to register a bug report .

How did you figure that out , trilby ?



Next higher on the list is p11-kit-server .

$ pacman -Qo /etc/systemd/user/sockets.target.wants/p11-kit-server.socket 
error: No package owns /etc/systemd/user/sockets.target.wants/p11-kit-server.socket
[panoramix@silverbolt ~]$ systemctl --user status p11-kit-server.socket 
● p11-kit-server.socket - p11-kit server
     Loaded: loaded (/usr/lib/systemd/user/p11-kit-server.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Sun 2020-11-29 12:31:50 CET; 4h 4min ago
   Triggers: ● p11-kit-server.service
     Listen: /run/user/1000/p11-kit/pkcs11 (Stream)
     CGroup: /user.slice/user-1000.slice/user@1000.service/p11-kit-server.socket

nov 29 12:31:50 silverbolt systemd[835]: Listening on p11-kit server.
$ systemctl --user status p11-kit-server.service 
● p11-kit-server.service - p11-kit server
     Loaded: loaded (/usr/lib/systemd/user/p11-kit-server.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
TriggeredBy: ● p11-kit-server.socket
       Docs: man:p11-kit(8)
$ 

I use lxqt / openbox perhaps this is lxqt policy agent related ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2020-11-29 15:50:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved] systemd --user units in /etc - where do they come from ?

Lone_Wolf wrote:

How did you figure that out , trilby?

I'm not sure what you mean.  I looked at the install file, and there's the command enabling it.  There's not much to figure out.

Lone_Wolf wrote:
$ pacman -Qo /etc/systemd/user/sockets.target.wants/p11-kit-server.socket

No package should ever own such files - those are symlinks of enabled services.  Check what owns the target of the symlink.  Then check the install script for that package and you'll have your answers.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2020-11-29 16:10:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] systemd --user units in /etc - where do they come from ?

Thanks, that clarifies it.

$ pacman -Qo /usr/lib/systemd/user/p11-kit-server.socket 
/usr/lib/systemd/user/p11-kit-server.socket is owned by p11-kit 0.23.21-1
$

https://github.com/archlinux/svntogit-p … it.install does indeed enable it.

I'll investigate the other symlinks further to see if they all come from .install files.

Added

looks like all of them come from .install files .
https://github.com/archlinux/svntogit-p … nk/install enables 5 sockets.

xdg-user-dirs-update.service comes from https://github.com/archlinux/svntogit-p … rs.install

All of the files under my /etc/systemd/user folder have been placed there by .install files.
That makes 4 packages that enable things without telling anything and there may be a lot more.

Not sure how to bring this up with devs, but my question from #1 has been answered.
marking as [solved]

Last edited by Lone_Wolf (2020-11-29 16:32:10)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2020-11-29 16:56:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] systemd --user units in /etc - where do they come from ?

Note all these units are enabled by default on first install, but not on upgrade. So you don't need to mask them.

If they were created by package() then you'd have no choice but to mask them as disabling them would be overridden on every package update.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2020-11-29 18:38:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved] systemd --user units in /etc - where do they come from ?

Lone_Wolf wrote:

Not sure how to bring this up with devs...

You could request a change on the bug tracker, but frankly this is not something that could result from oversight or accident: the packagers made deliberate choices to enable these by default.  This seems to fit the general direction that arch is moving and it doesn't seem likely to change (at least the general trend will not likely change, even if a dev or two reconsiders these settings in the short term).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2020-11-30 12:19:45

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] systemd --user units in /etc - where do they come from ?

Thanks for  the help eschwartz and trilby.

I checked xdg-user-dirs-update.service and it seems to be useful when a user logs in the first time or changes their locale .
To me that's not enough usecase to run it on every user log in.
Removed all symlinks from those 2 folders under /etc/systemd/user using systemctl --global disable foo , sofar no issues.

Looking at all the things I had to disable / mask on this installation (and the previous one) to work like I want them to, this general trend appears to have been present for much longer then I thought and has gotten stronger overtime.

Last edited by Lone_Wolf (2020-11-30 12:20:21)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB