Getting your KDE sessions to lock on Laptop Lid Close (A quick and hacky script...)
Last update on .
For those using an ACPI laptop (testing only with the Toshiba Satellite 5100) who want the KDE session to lock when the lid is closed (so that the lid can be closed in a semi-public area to prevent casual snooping), here's a simple script that locks all of the KDE sessions on the machine. Note that it doesn't lock any console sessions you might have open (that is, ctrl-alt-f1 sessions).
To install, add the following to your /etc/acpi/events/default file (assumes your lid events are button/lid):
Then create the actions/lid_lock_shutdown.py file with approximately these contents (assumes your lid instance is button/lid/LID):
Comments are closed.
Pingbacks are closed.
Michaelk on 07/14/2007 7:13 a.m. #
A more user-friendly method is to click on the power icon in the kde system tray and select "lock screen" under "when laptop screen closed".