View Single Post
Posts: 2 | Thanked: 3 times | Joined on Nov 2011
#1
Hey all,

I'm trying to write a script (using dbus, but if other options are better, please let me know) to programmatically show the lock screen, simulating a power button press when the n900 is locked. Is there any way to do this?

I've tried monitoring dbus for the power button press, and came up with this dbus command:
Code:
dbus-send --type=signal --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer_logicaldev_input org.freedesktop.Hal.Device.Condition string:'ButtonPressed' string:'power'
Alas, it doesn't work (nothing happens). Just for the record, the n900 was locked when I tried this (over SSH), and when I pressed the actual power button, the lock screen appeared.

Any help is much appreciated.