answered
2015-07-28 11:28:14 +0200
Regarding temporarily disabling the device lock
I have no idea, but maybe @rainisto can cue in.
Regarding keeping the display on
While the settings ui only allows selecting between normal and keep display on while charging, mce itself supports all the blanking inhibit modes inherited from maemo: disabled, stay-on-with-charger, stay-on, stay-dim-with-charger & stay-dim.
For example "stay-dim" inhibit mode can be activated from command line via
mcetool --set-inhibit-mode=stay-dim
or via D-Bus with something equivalent to
dbus-send --system --type=method_call --print-reply=y --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.set_config string:/system/osso/dsm/powerkey/blanking_mode variant:int32:1
But do note that applications should use blank prevention D-Bus interface instead of toggling settings (at least without direct user interaction). Convenience functionality for doing this from Qt/Qml/glib apps exists in nemo-keepalive. But since it is not yet harbour approved, lower level dbus interface needs to be used - more info at https://together.jolla.com/question/93323/harbour-api-request-keep-screen-onprevent-screen-blanking/
Comment from @rainisto:
There are few ways to prevent display lock from appearing, one is to send fake events that resets the useractivity idle timer.
Second way is to edit automatic_locking config value. But you cannot do that by direcyly editing the /usr/share/lipstick/devicelock/devicelock_settings.conf
-file (since the values are also stored in another hidden place, but you need to use the devicelock tool which asks your current lockcode to change the values. Like if your lockcode is 123345, then command would be 1st to get the current value that you can restore:
/usr/lib/qt5/plugins/devicelock/encpartition --get-config-key /desktop/nemo/devicelock/automatic_locking
And then change the value to -1 (which will prevent locking):
/usr/lib/qt5/plugins/devicelock/encpartition --set-config-key 123345 /desktop/nemo/devicelock/automatic_locking -1
And in the end restore the original value, forexample 60:
/usr/lib/qt5/plugins/devicelock/encpartition --set-config-key 123345 /desktop/nemo/devicelock/automatic_locking 60
And disclaimer: commandline utility is not supported by harbour and can change at anytime, so applications should not rely on that one.
did you check
rudi ( 2015-07-27 15:57:40 +0200 )edithttps://together.jolla.com/question/98578/command-to-lock-device/ ?
Well, I came across that app before and didn't try it since I thought it would not do what I was looking for, so I just installed it.
Not sure, either I do not get the point of that app or it is a relict from times where the "Lock device with power button" or by swipe down on home screen was not available. As far as I can tell all that app does is lock the device according to the normal device lock settings. It cannot add or remove the PIN requirement.
I agree the introductory text Do you also hate to enter a password each time you lock the screen? Tired of going through all those menus, just to change the time to lock your device immediately? could make one think it just does this, but I do not achieve it.
Tim Drub ( 2015-07-27 19:32:30 +0200 )editHei Tim,
Try fiddling with
mcetool
, of course, at your own risk.LVPVS out.
LVPVS ( 2015-07-27 23:24:12 +0200 )editNice call, I installed the tools, still I have not found what I am looking for. Since the mce tools originate from the Nokia days, is it possible not all the options are relevant to the Jolla device?
Anyway, if someone knows that this should work with the mce tools I'd appreciate any help very much. Thanks.
Tim Drub ( 2015-07-28 10:31:32 +0200 )edit