Reply
Thread Tools
Alfred's Avatar
Posts: 855 | Thanked: 612 times | Joined on Oct 2010 @ Germany
#11
What about "wifiunlock" or "wlanunlock" or smth that hasn't even with wifi to doб like "homeunlock"?

EDIT:

Originally Posted by hawaii View Post
WireLock? SSIDSecure? WiLock? Wi-Lo?
Actually Wi-Lo sounds really cool=)
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#12
Decided to use my friend's idea ConnLock.

I haven't uploaded it to extras-devel, because I want to fix couple things first, but here is .deb:
http://hosted.laasonen.net/connlock_0.1.0-1_all.deb

There is something really strange about osso-systemui. Power button menu randomly stops working. I first thought it was just my shell script which was directly reading pwrbutton, but it's now happening with my python/dbus version Is it just me? Any suggestions?



Last edited by laasonen; 2011-04-09 at 00:08.
 

The Following User Says Thank You to laasonen For This Useful Post:
Posts: 225 | Thanked: 105 times | Joined on May 2010
#13
why REMOVED?
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#14
Originally Posted by Pillum View Post
why REMOVED?
Added it again, but there is a problem with osso-systemui (read my last post).

Last edited by laasonen; 2011-04-08 at 23:53.
 
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#15
Originally Posted by laasonen View Post
There is something really strange about osso-systemui. Power button menu randomly stops working. I first thought it was just my shell script which was directly reading pwrbutton, but it's now happening with my python/dbus version Is it just me? Any suggestions?
Excuse me if I'm misunderstanding anything, but instead of watching to see if the power button is pressed and then calling the SystemUI D-Bus method that unlocks the device, why not just disable locking when a selected network is connected to and then re-enable it when the device disconnects?

You can turn off the autolock by changing the value of GConf key /system/osso/dsm/locks/devicelock_autolock_enabled

Last edited by jstokes; 2011-04-09 at 20:17.
 

The Following User Says Thank You to jstokes For This Useful Post:
hawaii's Avatar
Posts: 1,030 | Thanked: 792 times | Joined on Jun 2009
#16
^^

Easily done using /etc/network/if-up.d/ and watching iwconfig for the associating SSID.
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#17
Originally Posted by jstokes View Post
Excuse me if I'm misunderstanding anything, but instead of watching to see if the power button is pressed and then calling the SystemUI D-Bus method that unlocks the device..
The python version is using dbus, but the idea is the same:
Code:
self.bus.add_signal_receiver(self.unlock, path='/com/nokia/mce/signal', dbus_interface='com.nokia.mce.signal', signal_name='tklock_mode_ind')
Originally Posted by jstokes View Post
...why not just disable locking when a selected network is connected to and then re-enable it when the device disconnects?

You can turn off the autolock by changing the value of GConf key /system/osso/dsm/locks/devicelock_autolock_enabled
Tried it and at least this doesn't open it, when it's already locked:
Code:
gconftool -s -t bool /system/osso/dsm/locks/devicelock_autolock_enabled false
So if you you lock your device when you are at work for example and then you go home, it will ask the password when you open it.

I have been testing the dbus devlock_close call more.

If I lock the device with dbus like this:
Code:
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'
And then unlock it like this:
Code:
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'
Everything works great, but when I lock it with the power button menu and then use dbus to unlock, the power button menu stops working, until I use dbus to lock it again and then open it with password. Could someone confirm this?

Last edited by laasonen; 2011-04-09 at 20:57.
 

The Following User Says Thank You to laasonen For This Useful Post:
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#18
Originally Posted by laasonen View Post
Could someone confirm this?
I can't confirm this as I have no N900, but you can enable D-Bus eavesdropping and see if anything different happens when locking from the menu
 

The Following 2 Users Say Thank You to jstokes For This Useful Post:
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#19
Code:
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.devlock_callback int32:2
That will make MCE tell SystemUI to close the keypad on n8x0 and should do the same on n900, might have to change the 2 to a 0 though. You will still need to toggle the gconf value to keep the keypad from opening when the timeout expires.
 

The Following 2 Users Say Thank You to auouymous For This Useful Post:
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#20
Originally Posted by auouymous View Post
Code:
dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.devlock_callback int32:2
That will make MCE tell SystemUI to close the keypad on n8x0 and should do the same on n900, might have to change the 2 to a 0 though. You will still need to toggle the gconf value to keep the keypad from opening when the timeout expires.
Works, thanks a lot
 

The Following User Says Thank You to laasonen For This Useful Post:
Reply

Tags
d1ckheads, scripts


 
Forum Jump


All times are GMT. The time now is 19:07.