How to show the login screen instead of the lock screen?
Solution 1:
To create the shortcut
- Go to the Settings Manager from the menu.
- Go to Keyboard.
- In the Application Shortcuts tab press on Add.
- Enter
dm-tool switch-to-greeter
then press OK. - Press the desired hotkey.
To run a command after 2 idle minutes
- Create a bash script, containing:
#!/bin/bash # The target may depend on your system. i8042 is mouse and keyboard on mine. log=/proc/interrupts target=i8042 measure_activity() { count=$1 interrupts_start=`grep $target $log | awk '{ print $2 }'` interrupts_stop=`sleep 1 && grep $target $log | awk '{ print $2 }'` if [ "$interrupts_start" == "$interrupts_stop" ] ; then ((count++)) if [ $count -eq 120 ] ; then dm-tool switch-to-greeter measure_activity 0 else measure_activity $count fi else measure_activity fi } measure_activity 0 &
Make it executable.
Add it to Application Autostart tab of Session and Startup.
P.S.: I've got the script from here and I edited it for you.