Hi everyone!
Since my computer st the office is always on nowadays, i can't use reboots and shutdowns as indicators of when i started and ended work as i did before.
So i thought i use login / logout events instead - but they seem not to be logged/protocolled anywhere.
I can't see anything of that kind in journalctl, /var/log/lightdm/ does not change in any way when i log out and in again and those "lightdm.log" files don't seem to have such information - or i can't identify it.
(The display manager seems to be LightDM with slick-greeter since it is an (in that regard) unchanged Mint 19.3 Cinnamon.)
Has anyone an idea how such logging can be accomplished?
LightDM logging of login and logout attempts
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
LightDM logging of login and logout attempts
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: LightDM logging of login and logout attempts
Write a simple bash script with a desktop launcher to log when you started and again when you finish.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: LightDM logging of login and logout attempts
Hi,
This can be informative
Example
Interpretation - Booted and logged in at 7:05. Logged out at 7:11, logged back in at 7:12.
Note on this system in /etc/systemd/logind.conf I've set
The default is no. On systems with the default, user sessions aren't stopped on logout so you'd get output like this which isn't quite as clearcut.
Interpretation - Booted and logged in at 5:52, logged out at 6:57 (i.e if lightdm has started then steve has either logged out or the switch user function has been invoked), logged back in at 6:57, rebooted at 7:04
This can be informative
Code: Select all
journalctl -b | grep -E 'Started Session|Stopping Session'
Code: Select all
steve@steve-Inspiron-5580:~$ journalctl -b | grep -E 'Started Session|Stopping Session'
Jul 02 07:05:03 steve-Inspiron-5580 systemd[1]: Started Session c1 of user lightdm.
Jul 02 07:05:10 steve-Inspiron-5580 systemd[1]: Stopping Session c1 of user lightdm.
Jul 02 07:05:10 steve-Inspiron-5580 systemd[1]: Started Session c2 of user steve.
Jul 02 07:11:51 steve-Inspiron-5580 systemd[1]: Stopping Session c2 of user steve.
Jul 02 07:11:52 steve-Inspiron-5580 systemd[1]: Started Session c3 of user lightdm.
Jul 02 07:12:00 steve-Inspiron-5580 systemd[1]: Stopping Session c3 of user lightdm.
Jul 02 07:12:00 steve-Inspiron-5580 systemd[1]: Started Session c4 of user steve.
Note on this system in /etc/systemd/logind.conf I've set
KillUserProcesses=yes
The default is no. On systems with the default, user sessions aren't stopped on logout so you'd get output like this which isn't quite as clearcut.
Code: Select all
steve@steve-Inspiron-5580:~$ journalctl -b -1 | grep -E 'Started Session|Stopping Session'
Jul 02 05:52:02 steve-Inspiron-5580 systemd[1]: Started Session c1 of user lightdm.
Jul 02 05:52:13 steve-Inspiron-5580 systemd[1]: Stopping Session c1 of user lightdm.
Jul 02 05:52:13 steve-Inspiron-5580 systemd[1]: Started Session c2 of user steve.
Jul 02 06:57:45 steve-Inspiron-5580 systemd[1]: Started Session c3 of user lightdm.
Jul 02 06:57:51 steve-Inspiron-5580 systemd[1]: Stopping Session c3 of user lightdm.
Jul 02 06:57:51 steve-Inspiron-5580 systemd[1]: Started Session c4 of user steve.
Jul 02 07:04:40 steve-Inspiron-5580 systemd[1]: Stopping Session c2 of user steve.
Jul 02 07:04:40 steve-Inspiron-5580 systemd[1]: Stopping Session c4 of user steve.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: LightDM logging of login and logout attempts
OMG i'm so f***** lazy. BIG Sorry.
... i was googling how to solve a problem - found this thread and thought: Interesting - this guy has *the exact same problem*. (isn't there a facepalm Smiley anywhere?)
However - that unfortunately doesn't work:
-> nothing changed.
I am not closing the session - i just log lock the Screen (Ctrl-Alt-l). Maybeeeee - that's not called "logging out" on second thought - but that's what i do.
I guess then there also isn't a point in writhing any scripts then?
... i was googling how to solve a problem - found this thread and thought: Interesting - this guy has *the exact same problem*. (isn't there a facepalm Smiley anywhere?)
However - that unfortunately doesn't work:
Code: Select all
journalctl --since 2021-03-24 -b | grep -E 'Started Session|Stopping Session'
Mär 30 18:19:00 oakland systemd[1]: Started Session 41239 of user rydell.
Mär 31 17:51:20 oakland systemd[1]: Started Session 42718 of user rydell.
<logging out>
<logging in>
journalctl --since 2021-03-24 -b | grep -E 'Started Session|Stopping Session'
Mär 30 18:19:00 oakland systemd[1]: Started Session 41239 of user rydell.
Mär 31 17:51:20 oakland systemd[1]: Started Session 42718 of user rydell.
I am not closing the session - i just log lock the Screen (Ctrl-Alt-l). Maybeeeee - that's not called "logging out" on second thought - but that's what i do.
I guess then there also isn't a point in writhing any scripts then?