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):
Pingbacks are closed.