Reply
Thread Tools
Posts: 105 | Thanked: 299 times | Joined on Sep 2010
#1
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);
 

The Following 17 Users Say Thank You to Iktwo For This Useful Post:
Posts: 35 | Thanked: 10 times | Joined on Jan 2012
#2
Awesome, it was something in demand ... For me at least
Will try when i get home
 

The Following User Says Thank You to kingpin For This Useful Post:
Posts: 33 | Thanked: 4 times | Joined on Feb 2012
#3
I'm need this app, I'm will buy it in store.ovi.
 
Posts: 33 | Thanked: 4 times | Joined on Feb 2012
#4
Anyone care to upload/mail me the .deb, so I can try it on N9 ?
 
Posts: 105 | Thanked: 299 times | Joined on Sep 2010
#5
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..
 

The Following 2 Users Say Thank You to Iktwo For This Useful Post:
Posts: 705 | Thanked: 300 times | Joined on May 2011
#6
it is a very useful tool to protect our privacy.

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

The Following User Says Thank You to youmeego For This Useful Post:
Posts: 33 | Thanked: 4 times | Joined on Feb 2012
#7
Originally Posted by youmeego View Post
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.
 
Posts: 44 | Thanked: 5 times | Joined on Apr 2012 @ Pakistan
#8
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's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#9
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..
Thanks

Last edited by Schturman; 2012-04-20 at 23:37.
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#10
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...

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

EDIT2:
Solved ! solution here...

Last edited by Schturman; 2012-04-21 at 02:29.
 

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

Thread Tools

 
Forum Jump


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