eric services defined in that directory
Plz also know that the scandir contains service definitions for s6-svscan
in directory format, NOT 66 fronetnds. 66 frontends are in ${HOME}/.66/service/
.
vixalien PAM ... I believe that's what used by systemd to launch user services.
User instances of systemd [and services started by them] are NOT in the login session.
Some info:
Here, the login system on systemd on my production/office system:
● session-3.scope - Session 3 of User pramodvu
Loaded: loaded (/run/systemd/transient/session-3.scope; transient)
Transient: yes
Active: active (running) since Tue 2025-01-14 09:31:48 IST; 10h ago
Invocation: 162cc1e733474e8e9f178eeabf3d1c61
Tasks: 9
Memory: 64.5M (peak: 104.9M, swap: 20.3M, swap peak: 20.4M, zswap: 3.6M)
CPU: 366ms
CGroup: /user.slice/user-1010.slice/session-3.scope
├─1529 /usr/bin/greetd --session-worker 12
├─1576 /usr/bin/kwalletd6 --pam-login 10 11
└─1577 /usr/bin/startplasma-wayland
# Extra log output cut out for brevity
Jan 14 17:44:03 inspiron3511pvu systemd[1]: session-3.scope: Unit now frozen-by-parent.
Jan 14 19:48:21 inspiron3511pvu systemd[1]: session-3.scope: Unit now thawed.
The greetd session worker is greetd's helper which creates a new login session, and launches the process defined in Exec=
in /usr/share/wayland-sessions/
. It runs the command to start KDE plasma.
cat /proc/${PID}/sessionid
[PID is in the above output] of the above 3 processes are exactly correct, i.e. 3
.
But here, all other processes are started as systemd --user
units.
cat /proc/$(pidof plasmashell)/sessionid
[OR kwin_wayland OR whatever] and /proc/$$/sessionid
and /proc/self/sessionid
all have a different session... 4
.
But, loginctl user-status
:
pramodvu (1010)
Since: Tue 2025-01-14 09:31:47 IST; 4h 10min ago
State: active
Sessions: 4 *3
Linger: no
Unit: user-1010.slice
├─session-3.scope
│ ├─1529 /usr/bin/greetd --session-worker 12
│ ├─1576 /usr/bin/kwalletd6 --pam-login 10 11
│ └─1577 /usr/bin/startplasma-wayland
└─user@1010.service
├─app.slice
# Rest of the tree
So the login session and the systemd-user session is NOT same.
Again, the systemd session
$ loginctl session-status 4
4 - pramodvu (1010)
Since: Tue 2025-01-14 09:31:47 IST; 4h 11min ago
State: active
Leader: 1558 (systemd)
Remote: no
Service: systemd-user
Type: unspecified
Class: manager
Idle: no
and the login session:
$ loginctl session-status 3
3 - pramodvu (1010)
Since: Tue 2025-01-14 09:31:47 IST; 4h 11min ago
State: active
Leader: 1529 (greetd)
Seat: seat0; vc1
TTY: tty1
Remote: no
Service: greetd
Type: tty
Class: user
Idle: yes since Mon 2025-01-13 20:02:16 IST ((null))
Unit: session-3.scope
├─1529 /usr/bin/greetd --session-worker 12
├─1576 /usr/bin/kwalletd6 --pam-login 10 11
└─1577 /usr/bin/startplasma-wayland
# Logs
Jan 14 17:44:03 inspiron3511pvu systemd[1]: session-3.scope: Unit now frozen-by-parent.
Jan 14 19:48:21 inspiron3511pvu systemd[1]: session-3.scope: Unit now thawed.
Some attributes:
Login session: [assigned to VT, but idle since only the starter is present]
$ loginctl show-session 3
Id=3
User=1010
Name=pramodvu
Timestamp=Tue 2025-01-14 09:31:47 IST
TimestampMonotonic=39793011
VTNr=1
Seat=seat0
TTY=tty1
Remote=no
Service=greetd
Scope=session-3.scope
Leader=1529
Audit=3
Type=tty
Class=user
Active=yes
State=active
IdleHint=yes
IdleSinceHint=1736778736567458
IdleSinceHintMonotonic=0
CanIdle=yes
CanLock=yes
LockedHint=no
And the systemd one [noVT, but non-idle since KDE runs here]
$ loginctl show-session 4
Id=4
User=1010
Name=pramodvu
Timestamp=Tue 2025-01-14 09:31:47 IST
TimestampMonotonic=39858917
VTNr=0
Remote=no
Service=systemd-user
Leader=1558
Audit=4
Type=unspecified
Class=manager
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
CanIdle=no
CanLock=no
LockedHint=no
So there is explicitly different sessions for the login and for the user-services. I ask the 66 devs @eric , to try using the same session instead of this.
Note: All attributes other than User, SID, VTNr, leader and maybe the name, is only in logind, NOT in the kernel, so don't worry about them in 66.
The separation is mainly due to the kernel's limitation of setsid()
, where only the leader can only be launched into new sessions.
Se turnstiled, which solves this by making the session leader itself the user-service-manager.
But boot-user@ etc. should be handled differently.