I want to log the logins/logouts of my users.
For the logins I only need to modify /etc/profile
and add my command or edit any .profile
for an specific user.
But for the logouts I don't know if there is a default/centralized way to do it like /etc/profile
for logins.
I see some example for CLI sessions, but I want to register GUI/CLI sessions.
Thanks
/etc/profile
can't work - it's just that it relies on the user's X (or Wayland etc.) session being started as a child of a Bourne-type login shell - which is not a given. See for example X session wrapper. – steeldriver Feb 16 '22 at 13:22