File indexing completed on 2021-12-21 14:17:28

0001 #!/bin/sh
0002 # This helper script unlocks the Plasma5 screenlocker of the session given by argument,
0003 # should the locker ever crash.
0004 #
0005 # Requirements: ConsoleKit[2] & qdbus
0006 #
0007 
0008 # list running sesions
0009 list_sessions ()
0010 {
0011     ${cklistsessions_EXECUTABLE} | grep -oE '^Session[^:]*'
0012 }
0013 
0014 # unlock_session <session_name>
0015 unlock_session ()
0016 {
0017     ${qdbus_EXECUTABLE} --system org.freedesktop.ConsoleKit "/org/freedesktop/ConsoleKit/$1" org.freedesktop.ConsoleKit.Session.Unlock
0018 }
0019 
0020 if [ $# -ne 1 ] ; then
0021   list_sessions
0022 else
0023   unlock_session $1
0024 fi
0025