Perform an action on logout?

2 respostas [Última entrada]
Hans
Desconectado
Joined: 04/18/2022

Hi.
How can I make the system do certain action when I log out?
For example, write to ~/mylog.log some information like

/usr/bin/env
/usr/bin/uptime
date '+%A %d %B %Y %R'

???

Magic Banana

I am a member!

Desconectado
Joined: 07/24/2010

First of all, do you know 'last'? You can simply execute 'last' in a terminal to have a glimpse and read 'man last' for more.

https://askubuntu.com/a/796157 seems to answer your question.

Hans
Desconectado
Joined: 04/18/2022

Thank you very much, I really wanted exactly what last does!