Thorsten Kukuk wrote: > > * The pids now refer to the session leader, which is a parent (or ancestor) > > of the process which has allocated the pty. > > Depends on your application. For the majority of applications, which we > evaluated, the PIDs reported by logind were identical to the PID from utmp.
Well, for me it's the opposite: For all desktops that I evaluated, the PIDs reported by sd_session_get_leader — which is the replacement that you recommend in <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md> (and I don't see any other one) — are different from the PID in utmp. Only for inbound ssh do I see the same PID. * Wayland-based desktops: - GNOME: systemd returns the PID of the gdm-session-worker process. utmp contains the PID of the gdm-wayland-session process (a child process of the former). - KDE: systemd returns the PID of the sddm-helper process. utmp contains the PID of the startplasma-wayland process (a child process of the former). * X11-based desktops: - Budgie: systemd returns the PID of a lightdm process. utmp contains the PID of the gnome-session-binary process (a child process of the former). - Cinnamon: systemd returns the PID of a lightdm process. utmp contains the PID of the cinnamon-session process (a child process of the former). - MATE: systemd returns the PID of a lightdm process. utmp contains the PID of the mate-session process (a child process of the former). - Xfce: systemd returns the PID of a lightdm process. utmp contains the PID of the xfce4-session process (a child process of the former). - SoaS: systemd returns the PID of a lightdm process. utmp contains the PID of a python3 process (a child process of the former). - LXQt: systemd returns the PID of the sddm-helper process. utmp contains the PID of the lxqt-session process (a child process of the former). - Sway: systemd returns the PID of the sddm-helper process. utmp contains the PID of the sway process (a child process of the former). - LXDE: systemd returns the PID of the lxdm-session process. utmp contains no PID at all! (Oh oh, looks like a bug in lxsession.) Find attached the experiments' outputs. Bruno
outputs.tar.gz
Description: application/compressed-tar