maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] LockApp - Lock your applications with a simple password (https://talk.maemo.org/showthread.php?t=82129)

Iktwo 2012-02-06 01:12

[Announce] LockApp - Lock your applications with a simple password
 
Lock your applications with a simple password or custom screens.


A friend of mine asked me if I could do something to lock email and sms application, so I made and app that does something very simple, it launches another app, it's very simple and it's still a WIP, but it does the job and maybe someone else need it.

You need to install the app and modify the .desktop launcher of the application you want to lock (I think you need root access for that, so I think it won't be possible to upload it to store, someone please tell me if it is possible).


the application install in
Code:

/opt/lockapp/bin/lockapp
and you need to give as argument the name of the screen used (currently two ships with the app, LockMe made by me and ImNotDrunk made by Flako Pana), those are located in

Code:

/opt/lockapp/bin/qml
Also you need to provide the name of the app to launch, so a simple example of how does it work in a .desktop file is:
Code:

Exec=/usb/bin/invoker --global-syms --wait-term --type=e /opt/lockapp/bin/lockapp LockMe /usr/bin/fenix %U
Instructions:
1.- Install LockApp application http://iktwo.wikidot.com/local--file....0.0_armel.deb

2.- Backup .desktop file of the app you want to lock (as root):
Code:

cp /usr/share/applications/mail.desktop /usr/share/applications/mail.desktop.back
3.- Edit the .desktop file (as root) I use nano, you can use vi

Code:

nano /usr/share/applications/mail.desktop
4.- Change the Exec line to something like this:

Code:

Exec=/usb/bin/invoker --global-syms --wait-term --type=m /opt/lockapp/bin/lockapp LockMe /usr/bin/fenix %U
*In applications that have X-Maemo-Service (email, messaging, gallery, ..) you need to remove that line, so don't skip the backup step.

The default password for LockMe it's
Code:

password
I'm still working on this, I'm trying to make a configuration GUI, maybe it would be easier with a script to lock and unlock the .desktop file..

Creating a custom lock screen:
If you want to create another lock screen you can do it with some very easy steps, you can see the code of LockMe.qml and ImNotDrunk.qml

You can define the interface as you wish and call a simple method.

Code:

wMain.startApplicationDetached();
If you need a random number you can use (where 15 is the limit, 1-14)
Code:

wMain.getRandomNumber(15);
Also there's an interface to access QSettings:

To save:
Code:

void saveSetting(QString key, QVariant value);
To access values:
Code:

QString getStringSetting(QString key, QString defaultValue);

bool getBoolSetting(QString key, bool defaultValue);

int getIntSetting(QString key, int defaultValue);

double getDoubleSetting(QString key, double defaultValue);


kingpin 2012-02-06 04:58

Awesome, it was something in demand ... For me at least
Will try when i get home

banong 2012-03-25 06:34

Re: [Announce] LockApp - Lock your applications with a simple password
 
I'm need this app, I'm will buy it in store.ovi.

banong 2012-03-30 01:29

Re: [Announce] LockApp - Lock your applications with a simple password
 
Anyone care to upload/mail me the .deb, so I can try it on N9 ?

Iktwo 2012-03-30 03:12

Re: [Announce] LockApp - Lock your applications with a simple password
 
The deb is there, I haven't build a GUI, but it works, just follow the instructions and tell me if you have a problem.. here's the link again

http://iktwo.wikidot.com/local--file....0.0_armel.deb

I'll work on a better version soon..

youmeego 2012-03-30 14:17

Re: [Announce] LockApp - Lock your applications with a simple password
 
it is a very useful tool to protect our privacy.

i hope you improve it and bring it to ovi store soon.

banong 2012-03-31 04:12

Re: [Announce] LockApp - Lock your applications with a simple password
 
Quote:

Originally Posted by youmeego (Post 1186080)
it is a very useful tool to protect our privacy.

i hope you improve it and bring it to ovi store soon.

Please, let us support this promising app.

THANK YOU, Iktwo.

addy007 2012-04-19 21:17

Re: [Announce] LockApp - Lock your applications with a simple password
 
i m using winscp for the edit,
completely new to these things.
tried to edit the messaging-ui.desktop
even after writing the correct password, it says request denied etc.
i really need this app.. followed ur every step,,
just cant edit system files..
even ran the application as admin..
no success .. help me out

Schturman 2012-04-20 16:50

Re: [Announce] LockApp - Lock your applications with a simple password
 
Hi
Can you explain me hot to change default password ?
If i understand right, I need to edit this line:
Code:

            Keys.onReturnPressed: {
                wMain.getStringSetting("password","password");

and this:
Code:

            text: qsTr("Validate")
            onClicked: {
                wMain.getStringSetting("password","password");

And instead "password","password" I need to write my pass, like "1234","1234" ?

I also have a problem.. After installation and editing of mail.desktop file like in your example, my app opened normally without LockMe screen..
And when i deleted this line: X-Maemo-Service=com.nokia.fenix
icon of the mail app disappeared..
What wrong ? Maybe something because of updating to PR1.2 ?

PS. I also tested with messaging-ui.desktop - also not work, it's opened normally without LockMe screen..
Only gallery and video working like expected with LockMe screen..

PS2. I also have another problem after playing with you app and uninstalling it, now i have two messaging icons on the homescreen, both of them can open messaging app, but i have only one messaging-ui.desktop file and I don't know how to remove on of this desktop icons from my homescreen.. If I removed messaging-ui.desktop, it's remove both of them.. Reboot/refresh not help :(
What can I do ?

PS3. I also did some interesting test.. I installed this app again and I edited messaging-ui.desktop file like in the example and now one of this conversation app's opens with password asking and one opens normally without LockMe.. :confused:
Thanks

Schturman 2012-04-21 00:27

Re: [Announce] LockApp - Lock your applications with a simple password
 
SOLVED:
I played with messaging-ui.desktop file again..
I removed this line: X-Maemo-Service=com.nokia.messaging-ui and saved the file...
After this I added this line back and saved this file and one of conversation icons is disappeared... :D

EDIT:
NOT solved... After couple of minutes the icon is appeared again on my home screen :mad:

EDIT2:
Solved ! solution here...


All times are GMT. The time now is 10:34.

vBulletin® Version 3.8.8