Notices


Reply
Thread Tools
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#1
Status: startuplock 1.1.0: added the same code to /etc/X11/Xsession.d/08startuplock

Code:
$ cat /etc/event.d/startuplock 
start on started hildon-desktop
console none
service

script

proximity_state="`cat /sys/devices/platform/gpio-switch/proximity/state`"

if [ "$proximity_state" = "closed" ]; then
  dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked"
fi

end script
Currently in case you are starting the phone on the move and have to put it to a pocket you can't be sure that nothing will be clicked accidentally. This script locks the screen on startup in case proximity sensor reports being closed. Plus it can also save some tiny amount of energy in case you are rebooting the phone often.

I'm currently on the move myself, will package it in several hours.

Last edited by int_ua; 2013-10-17 at 08:11.
 

The Following 14 Users Say Thank You to int_ua For This Useful Post:
nokiabot's Avatar
Posts: 1,974 | Thanked: 1,834 times | Joined on Mar 2013 @ india
#2
Good use case though i wanted proximity lock unlock
 

The Following User Says Thank You to nokiabot For This Useful Post:
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#3
Uploaded to extras-devel.
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#4
Originally Posted by int_ua View Post
Uploaded to extras-devel.
Great I think it's a good idea.

To make it even better (potential for separate package) I think a GUI with a list of checkboxes with optional boottime scripts.

*Proximity Lock on Boot
*Disable Cam key lock on Boot
etc .. etc..
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following 3 Users Say Thank You to sixwheeledbeast For This Useful Post:
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#5
Originally Posted by sixwheeledbeast View Post
*Disable Cam key lock on Boot
I don't think I got it, what do you mean exactly?
Originally Posted by nokiabot View Post
Good use case though i wanted proximity lock unlock
And this one too, please add more details.

Last edited by int_ua; 2013-09-17 at 23:02.
 
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#6
Originally Posted by int_ua View Post
I don't think I got it, what do you mean exactly?
There are many things you can run at boot via upstart.
If we had a list we could make a tickbox style GUI to enable them. This way each user can select which ever is required.

I use this to enable the camera key even if the device is locked. I can then use it for skipping track etc..

Originally Posted by int_ua View Post
And this one too, please add more details.
This I think will be a bad idea.
I am assuming nokiabot wishes the device auto locks on proximity close all the time and not just at boot time.

I think there is stuff in the repo that can do this (I remember testing something a while ago). The issue is it effects battery life due to polling the prox sensor all the time.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 2,290 | Thanked: 4,133 times | Joined on Apr 2010 @ UK
#7
It would appear startuplock is not working for some.
It's got -1 points on testing page.
http://maemo.org/packages/package_in...plock/1.1.0-0/

What 's idea behind the new X.session.d part?
Is it not somewhere I would expect to find a program to be adding files.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#8
Originally Posted by sixwheeledbeast View Post
It would appear startuplock is not working for some.
Thanks for the info
Until proven otherwise I think the tester didn't understand what the package must do and just didn't try to cover the sensor during startup. Any suggestions to improve the description?
Originally Posted by sixwheeledbeast View Post
What 's idea behind the new X.session.d part?
Is it not somewhere I would expect to find a program to be adding files.
It allows to lock the screen much earlier[, the second after unlock code and/or offline mode requests]. It has the same code that's in the event.d folder.

Last edited by int_ua; 2013-12-21 at 03:40.
 

The Following 2 Users Say Thank You to int_ua For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 04:38.