Tuesday, 7 April 2009

Locking KDE and shutting off monitors

When I was a Windows user I had this great program called Wizmo which allowed me to easily script all sorts of funky things to do with locking my screen when I leave my computer.

now under Linux I have, of course, been able to lock my screen but it leaves the backlights burning on the monitor until the system times out and turns the monitor off. so what I wanted was a script-able command to lock KDE and cut signal to the monitors. well here ya go
/usr/kde/3.5/bin/dcop kdesktop KScreensaverIface lock & xset dpms force off

DCOP or rather Desktop COmmunications Protocol was designed to allow intercommunication between KDE applications and xset which describes itself as "User preference utility for X."

I'd go into more detail but I think the commands are pretty self explanatory, now all that was left to do was place the command in a bash script and put that onto my kmenu

No comments:

Post a Comment