I use pam_usb and want to lock/unlock computer when USB stick is removed/inserted. For locking I use
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock and it works perfectly. For unlocking I've tried a series of commands I've found (most of them are aggregated here), but they don't work. Specifically, if we exclude those with KDE 4 syntax, they fall into 2 categories: those using
qdbus (relevant path here, several variations exists) /MainApplication quit which hang my Xorg completely, and those using
killall against screenlocker process, but the process just restarts instantly after that!
So, my question is: how to unlock KDE5 screen locked with its standard locker programmatically?