![]() |
Show the lock screen via script (dbus or other)
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' Any help is much appreciated. |
Re: Show the lock screen via script (dbus or other)
shell script (taken from
http://meego.gitorious.org/meego-mid...sts/mcetorture) Code:
#!/bin/sh |
Re: Show the lock screen via script (dbus or other)
Holly sh*t man, I'd never have got that in a million years. Thank you so much. For that torture script also, gonna study it carefully later, I'm sure it'll come in handy later on.
The purpose of this is I'm trying to do something about the problem others and myself are having of, the phone being locked and receiving a call, it getting unlocked and you accidentally pressing the touchscreen buttons (either answering or rejecting the call). I've already managed to, when the incoming call rings, if the phone was locked, lock it again. But the screen just stays black, although it plays the ringing tone. I wanted a visual warning that it was actually ringing, specially for when I put it in silent. So I thought of showing the lock screen. I also plan to flash the led in a diferent color and rhythm, maybe a violet or orange tone, to distinguish it form the "missed call" and "full battery" ones, which are more common. Now my next step is to try to get the calling number or contact name and write it on the lock screen. Wish me luck, and if you have any ideas that you care to share, they're more than welcome. You're apparently the local wizard :D Cheers, Heliton |
Re: Show the lock screen via script (dbus or other)
Quote:
correct me if am wrong that script will open the power button? because really i want a script to open the power button because mine is damage |
Re: Show the lock screen via script (dbus or other)
Quote:
because it most be a root. thank you |
Re: Show the lock screen via script (dbus or other)
Does it work with
sudo <scriptname> |
Re: Show the lock screen via script (dbus or other)
Quote:
|
Re: Show the lock screen via script (dbus or other)
Quote:
Code:
echo "/full/path/to/script"|root |
Re: Show the lock screen via script (dbus or other)
Quote:
on a qbw i did put Code:
echo "/home/user/MyDocs/Power.sh"|root |
Re: Show the lock screen via script (dbus or other)
Quote:
Code:
echo "sh /home/user/MyDocs/Power.sh"|root |
Re: Show the lock screen via script (dbus or other)
Quote:
|
Re: Show the lock screen via script (dbus or other)
Quote:
.desktop thank you |
Re: Show the lock screen via script (dbus or other)
i think the most hardest command ever that nicolai and JonWW did help me with show the power bottom via script thank you guys.
i have a question, can i create animated command like the power button when i pressed it pop up from from the up corner or what ever direction and inside this button put what ever commands. or if any application to install in my N900 that contains animated menu bar and customize my script commands? thank you. |
All times are GMT. The time now is 13:24. |
vBulletin® Version 3.8.8