Install autolog by entering the following commands in the terminal:
sudo apt update sudo apt install autolog
Log out idle users
The program reads the utmp file, entry by entry. The username for each 'user process' is compared to the entries in the configuration file. The first entry to match both the name, the group, and the tty line of the process will be used to conduct the automatic logout.