maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets (https://talk.maemo.org/showthread.php?t=74278)

brokensmile 2011-06-28 15:29

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
and mostly m getting dis

"addr_me_cs_addtocontacts"
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.

brokensmile 2011-06-28 15:30

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
wen applock will b completely ready?

SPARTAN563 2011-06-28 19:51

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Hi BrokenSmile,
That "sudo" command may not be installed on your N900. In that case, make sure you have suduser tools installed before running it.
You could also try running "sudo gainroot" before entering "initctl emit AppLockStartDaemon"

In other news, the GUI is going to take a bit longer as I have decided to teach myself QML on this project. Will keep you all updated with the progress when there is something to show for it.

brokensmile 2011-06-28 22:23

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Hi thankz alot .... now its working cool.... but wen i try to lock Keyboard Launch Monitor - Pressing a number key on your deskto
with code
~ $ run dbus-send --dest=com.sierrasoftworks.AppLock /com/sierrasoftworks/AppLock com.sierrasoftworks.AppLock.Daemon.AddSearch string:PhoneKeypress string:session string:"type='method_call',interface='com.nokia.Ca llUI',member='ShowDialpad'
>
i try direct code and and added run and dat code but its not working and i even try wid applock --add it is also not working ... so plz say abt keyboard lock thankz in advance

SPARTAN563 2011-07-01 22:33

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
2 Attachment(s)
Alright, just so you guys don't think I've forgotten you, here are some screenshots of the UI that will be bundled with v0.3.0
It may be refined a bit in the days to come but this will probably be what it looks like. Most of the UI is functional, and it loads the .desktop files successfully.

I have also added GNU gettext support for getting application names, replacing the hardcoded list. Although there are a few apps that are being difficult with regards to that, Ovi Store and the User Guide are the two main culprits.

I am also looking at implementing a file system that allows you to specify an override for certain applications like Contacts and Phone which need to monitor more than one DBus call.

Then I still need to write up the new Service file parsing code, hopefully plugging a few small holes.

Anyway, without further ado, the images:
http://talk.maemo.org/attachment.php...1&d=1309559235
This is a the main screen, all written in QML with some nice kinetic scrolling effects.

http://talk.maemo.org/attachment.php...1&d=1309559235
And the app properties dialog. This appears when you click on an app. Similar to the standard Maemo dialogs, when you tap out of it it gets hidden.
Also, QML based with a nice slide-in/slide-out effect

Also, the UI is all multithreaded, so it should remain responsive while doing background work like loading the .desktop files.

cutehunk04 2011-07-02 17:10

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1043059)
Alright, just so you guys don't think I've forgotten you, here are some screenshots of the UI that will be bundled with v0.3.0
It may be refined a bit in the days to come but this will probably be what it looks like. Most of the UI is functional, and it loads the .desktop files successfully.

I have also added GNU gettext support for getting application names, replacing the hardcoded list. Although there are a few apps that are being difficult with regards to that, Ovi Store and the User Guide are the two main culprits.

I am also looking at implementing a file system that allows you to specify an override for certain applications like Contacts and Phone which need to monitor more than one DBus call.

Then I still need to write up the new Service file parsing code, hopefully plugging a few small holes.

Anyway, without further ado, the images:
http://talk.maemo.org/attachment.php...1&d=1309559235
This is a the main screen, all written in QML with some nice kinetic scrolling effects.

http://talk.maemo.org/attachment.php...1&d=1309559235
And the app properties dialog. This appears when you click on an app. Similar to the standard Maemo dialogs, when you tap out of it it gets hidden.
Also, QML based with a nice slide-in/slide-out effect

Also, the UI is all multithreaded, so it should remain responsive while doing background work like loading the .desktop files.


when is the realize of update

brokensmile 2011-07-04 21:46

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Hiiii is it ready now!

SPARTAN563 2011-07-05 11:35

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
@brokensmile: Try running
Code:

sudo gainroot
apt-get update

If it says that there is a new version of AppLock available, then it is ready. Until then I am working on it.

@Everyone else:
Status update, I am busy trying to fix a bug in the daemon that causes it to crash when I add a DBus monitor from the UI. This may/may not be a limitation of libdbus and I will look into it. If it is a problem with libdbus then I will have to restart the daemon after each set of locks is added. That shouldn't be a major problem since I will just add a "Save" or "Restart Daemon" button to the UI. It just results in a slightly longer period between clicking save and having the changes take effect.

I am also working on displaying the current lock status of an application as an icon in the list to make it easier for you to view the currently locked items, I may also add a set of filters.

The UI has also been modified a bit, it now shows icons for the applications in the list as well as in the details view and it has been turned into a fullscreen application (supposedly that improves the performance of QML apps).

brokensmile 2011-07-06 21:32

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
@spartan
i tried to update many times but still i dint get update waiting for it ....

SPARTAN563 2011-07-06 21:48

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by brokensmile (Post 1046081)
@spartan
i tried to update many times but still i dint get update waiting for it ....

That is because there isn't an update yet... When there is one it will appear as an update and I will post it here. Wait patiently until that time

warhawk007 2011-07-07 03:19

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1046087)
That is because there isn't an update yet... When there is one it will appear as an update and I will post it here. Wait patiently until that time

Hey, its been a while since I visited this thread. I was having my exams and was busy with it. Nice to see you've already come up with a UI. It looks promising. Take your time. Hope you'd add portrait mode support as its being part of almost every new app released nowadays. And QML is definitely the choice for a good looking UI. So how far is your work progressing? Waiting for an update.

Cheers! :)

SPARTAN563 2011-07-07 21:58

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
1 Attachment(s)
Version 0.3.0 released
Just finished working on the UI and getting it more or less stable. There are a few small problems which still need to be fixed but for the most part it is usable.

New Features
  • A UI, obviously, all written in QML
  • Application Override files to allow specific applications to provide their own lock information. Useful for apps which require more than 1 DBus monitor.
  • Default overrides provided for Contacts, Phone and Terminal which make use of shortcuts or other functions that need monitoring.
  • Supports localisation information used in certain .desktop files (will support changing your language soon)
  • Phone is locked as soon as the UI is opened to prevent people from unlocking your apps... ;)

Known Problems
  • Removing a DBus monitored application that has been locked takes some time (up to 20 seconds) during which time the UI is unresponsive.
  • Adding a DBus monitored application does not take effect until you click on the menu and choose "Refresh Daemon"
  • Substitution files are not used for command line adds just yet (Will be fixed in v0.3.1)

Creating AppOverride files
AppOverride files use a basic INI structure, they are formatted in the following way:
Code:

Name=App Name, if you want to override it, otherwise leave this out
DesktopFile=app.desktop
[DBus]
AppName_Shortcut=<dbus-monitor watch expression>
AppName_Keypress=<dbus-monitor watch expression>
AppName_somethingelse=<dbus-monitor watch expression>
[Bin]
AppName_EXE=/path/to/exe
AppName_EXE2=/path/to/second/exe

You can specify as many DBus monitors and paths as you like, though they should all have unique names.

DBus watch expressions can be read about in the DBus Documentation under "Matches", they are structured like this in general:
Code:

type='method_call',interface='com.nokia.CallUI',member='top_application'
Release Info
The autobuilder is not functioning at the moment, I will try again tomorrow morning and attempt to upload the package for building. Lets hope the problem is fixed soon

Intermediate Release
Since the problem with Autobuilder is still giving me hassles I have hosted the .deb on my website. You can download it
HERE

warhawk007 2011-07-09 13:29

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1046691)
Version 0.3.0 released
Just finished working on the UI and getting it more or less stable. There are a few small problems which still need to be fixed but for the most part it is usable.

New Features
  • A UI, obviously, all written in QML
  • Application Override files to allow specific applications to provide their own lock information. Useful for apps which require more than 1 DBus monitor.
  • Default overrides provided for Contacts, Phone and Terminal which make use of shortcuts or other functions that need monitoring.
  • Supports localisation information used in certain .desktop files (will support changing your language soon)
  • Phone is locked as soon as the UI is opened to prevent people from unlocking your apps... ;)

Known Problems
  • Removing a DBus monitored application that has been locked takes some time (up to 20 seconds) during which time the UI is unresponsive.
  • Adding a DBus monitored application does not take effect until you click on the menu and choose "Refresh Daemon"
  • Substitution files are not used for command line adds just yet (Will be fixed in v0.3.1)

Creating AppOverride files
AppOverride files use a basic INI structure, they are formatted in the following way:
Code:

Name=App Name, if you want to override it, otherwise leave this out
DesktopFile=app.desktop
[DBus]
AppName_Shortcut=<dbus-monitor watch expression>
AppName_Keypress=<dbus-monitor watch expression>
AppName_somethingelse=<dbus-monitor watch expression>
[Bin]
AppName_EXE=/path/to/exe
AppName_EXE2=/path/to/second/exe

You can specify as many DBus monitors and paths as you like, though they should all have unique names.

DBus watch expressions can be read about in the DBus Documentation under "Matches", they are structured like this in general:
Code:

type='method_call',interface='com.nokia.CallUI',member='top_application'
Release Info
The autobuilder is not functioning at the moment, I will try again tomorrow morning and attempt to upload the package for building. Lets hope the problem is fixed soon

Wow....eagerly waiting to test it....could you please host the file somewhere....I'm really looking forward to see that UI in action!
The wait seems so long! :(

Thanks a lot!!

Edit: Now that the Ui is completed, I suggest you update the frontpage by removing the commands and adding the UI screenshots instead considering the UI is capable of doing everything done via the command line.

cheers :)

SPARTAN563 2011-07-09 16:54

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Okay, temporary solution since the autobuilder is still not working: Download Here

brokensmile 2011-07-09 20:17

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
@Spartan
gr8!!! but wen i click the icon its opening and jus closing by itself.... so wen it will b ready

SPARTAN563 2011-07-09 20:38

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Hmm, I think that may be an issue caused by having a previous version installed. You can try fixing it by doing the following:
Code:

cd /usr/share/applications/hildon
sudo gainroot
nano AppLock.desktop

Change "Exec=*" to be:
Code:

Exec=/opt/applock/AppLock -ui

cutehunk04 2011-07-09 21:53

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
here is the screenshot...there is no save option,...after changing the code what should i do ....

http://i55.tinypic.com/iqddl3.png

SPARTAN563 2011-07-09 22:39

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Press "Ctrl+O", "Enter", "Ctrl+X"

brokensmile 2011-07-10 04:06

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
wen i type the first code in xterminal ..... i got dis

[rootNokia-N900:~]$ cd /usr/share/applications/hildon
[rootNokia-N900:/usr/share/applications/hildon]$ sudo gainroot
root is not in the sudoers file. This incident will be reported.
[rootNokia-N900:/usr/share/applications/hildon]$ nano AppLock.desktopBusyBox v1.18.5 (Debian 1.18.5power2) multi-call binary.

Usage: sendmail [OPTIONS] [RECIPIENT_EMAIL]...

Read email from stdin and send it

Standard options:
-t Read additional recipients from message body
-f sender Sender (required)
-o options Various options. -oi implied, others are ignored
-i -oi synonym. implied and ignored

Busybox specific options:
-w seconds Network timeout
-H 'PROG ARGS' Run connection helper
Examples:
-H 'exec openssl s_client -quiet -tls1 -starttls smtp
-connect smtp.gmail.com:25' <email.txt
[4<username_and_passwd.txt | -au<username> -ap<password>]
-H 'exec openssl s_client -quiet -tls1
-connect smtp.gmail.com:465' <email.txt
[4<username_and_passwd.txt | -au<username> -ap<password>]
-S server[:port] Server
-au<username> Username for AUTH LOGIN
-ap<password> Password for AUTH LOGIN
-am<method> Authentication method. Ignored. LOGIN is implied

Other options are silently ignored; -oi -t is implied
Use makemime applet to create message with attachments

and i was waiting and after sometime i press enter and one more line i got

bash: /usr/bin/nano: No such file or directory

brokensmile 2011-07-10 04:30

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
and wen i edit the applock.desktop

the content i hav seen its something like dis

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=AppLock
Exec=/opt/applock/AppLock
Icon=AppLock
X-Window-Icon=AppLock
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable


wen i change exec= ....
Exec=/opt/applock/AppLock -ui
and wen i sav it says file is read only

cutehunk04 2011-07-10 06:56

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
hi... got it working.. after opening the app. i have lock the conversation but still i can open the conversation... why ???

baboo 2011-07-10 21:44

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
hi,im trying to lock apps from the UI but its not working,i pressed lock but its not locking any app as if the button is not working...

SPARTAN563 2011-07-10 21:48

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
@cutehunk04, If you are locking apps that depend on DBus monitoring then you need to either restart the daemon or click on AppLock (the top of the window) followed by clicking the button. That is a temporary workaround for a problem where the UI would freeze for 30 seconds or so on each lock.

@baboo, Make sure that the daemon is running, it sounds like it isn't. Open up the menu (click on AppLock at the top of the window) and see what is says for Daemon Status. If it says it is running but it still doesn't work then try running this from the terminal:
Code:

sudo gainroot
initctl emit AppLockStopDaemon
initctl emit AppLockStartDaemon

REMEMBER
This app is still VERY much in a state of active development. That means it is likely to break, not work and generally fail to secure your device in any semblance of reliability at the moment. The only reason it is available for download NOW is because people wanted to test it out and keep an eye on the progress of its development.
PLEASE don't treat it as a finished app, don't expect it to work most of the time, don't even expect it to work some of the time. At the moment it is BUGGY and there are a number of hoops you need to jump through to get it working. I am tempted NOT to fix those for the time being since if you don't even know what nano is or how to save a file in it, then you are most definitely NOT QUALIFIED to reflash your phone if it does break.

I would also like to reiterate that I accept NO RESPONSIBILITY whatsoever for any damages that may be caused through the use, or installation, of this application.

I'll try and help you out if you do break something but understand that this is done as nothing more than a hobby, and since people asked for an app to do these things.

/END RANT

Progress Update
Got around to doing some of the work to get the app up to version 0.3.1 today. Changes include fixing the problem with the .desktop file for the app (not launching when you click on it's shortcut in the menu) as well as some work to get substitution files working from the command line. I am also going to re-look at how the daemon is set up to hopefully improve the way setting of options is handled from the UI. What I may end up doing is another rewrite of the database system and rather than selective listening of DBus events, listening to all of them and comparing them to entries in the database, that would provide real-time settings updates without any of the problems currently seen however it would also result in slightly greater battery usage. Then again, if you were launching apps enough for that to be a problem, it wouldn't...

Will keep you guys updated as it progresses however I am finishing my holiday on the 12th and heading back to University where I will actually have to do proper work, so forgive me if updates are a little less frequent from now on ;)

baboo 2011-07-10 22:16

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1048503)
@baboo, Make sure that the daemon is running, it sounds like it isn't. Open up the menu (click on AppLock at the top of the window) and see what is says for Daemon Status. If it says it is running but it still doesn't work then try running this from the terminal:
Code:

sudo gainroot
initctl emit AppLockStopDaemon
initctl emit AppLockStartDaemon


Sorry man i did that but still isn't working,i tried to lock "Opera" app from terminal and it says that its locked,then when i open the ui ,i see it locked and again the lock/unlock button does nothing and it actually isn't locked and works normally :confused:

SPARTAN563 2011-07-10 22:19

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Hmm, try opening up a terminal and running this:
Code:

applock -d
The leave that running in the background and open up the UI, see if you can lock Opera there, then click on the Reload Daemon button in the menu and finally try to start Opera. If the daemon crashes or prints a message that looks bad then post it here and I'll see what I can figure out from it.

Thanks :)

warhawk007 2011-07-10 22:46

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1048503)

REMEMBER
This app is still VERY much in a state of active development. That means it is likely to break, not work and generally fail to secure your device in any semblance of reliability at the moment. The only reason it is available for download NOW is because people wanted to test it out and keep an eye on the progress of its development.
PLEASE don't treat it as a finished app, don't expect it to work most of the time, don't even expect it to work some of the time. At the moment it is BUGGY and there are a number of hoops you need to jump through to get it working. I am tempted NOT to fix those for the time being since if you don't even know what nano is or how to save a file in it, then you are most definitely NOT QUALIFIED to reflash your phone if it does break.

I would also like to reiterate that I accept NO RESPONSIBILITY whatsoever for any damages that may be caused through the use, or installation, of this application.

I'll try and help you out if you do break something but understand that this is done as nothing more than a hobby, and since people asked for an app to do these things.

/END RANT

Progress Update
Got around to doing some of the work to get the app up to version 0.3.1 today. Changes include fixing the problem with the .desktop file for the app (not launching when you click on it's shortcut in the menu) as well as some work to get substitution files working from the command line. I am also going to re-look at how the daemon is set up to hopefully improve the way setting of options is handled from the UI. What I may end up doing is another rewrite of the database system and rather than selective listening of DBus events, listening to all of them and comparing them to entries in the database, that would provide real-time settings updates without any of the problems currently seen however it would also result in slightly greater battery usage. Then again, if you were launching apps enough for that to be a problem, it wouldn't...

Will keep you guys updated as it progresses however I am finishing my holiday on the 12th and heading back to University where I will actually have to do proper work, so forgive me if updates are a little less frequent from now on ;)


I was the one who requested for this app and no matter who complains about instability or bugs, I'll still be there to test your development. I dont mind flashing my phone once in a while :) and I'd definitely want to see this as a stable app some day!

Thanks a lot! Stay in touch here while you're back at university. I'm on a 2 week leave too after exams.

Please dont completely abandon this project like some developers do when they get too busy with life. Keep this thread alive. I'll always be poppin in here to check for any updates once in a while.

My best wishes for you.
:)

baboo 2011-07-10 22:59

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1048519)
Hmm, try opening up a terminal and running this:
Code:

applock -d
The leave that running in the background and open up the UI, see if you can lock Opera there, then click on the Reload Daemon button in the menu and finally try to start Opera. If the daemon crashes or prints a message that looks bad then post it here and I'll see what I can figure out from it.

Thanks :)

well that didnt work either:
/home/user # applock -d
Maemo applications must be run with the run-standalone.sh script!
QGtkStyle was unable to detect the current GTK+ theme.
Could not connect to session bus

thankyou for your patience ;)

SPARTAN563 2011-07-11 08:05

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
@baboo, the "Could not connect to session bus" message means the daemon is running. Run this from your terminal beforehand then:
Code:

ps | grep AppLock
kill <process code for AppLock -d>
applock -d

@warhawk
Thanks, I don't intend on leaving this project unfinished, though at the same time I am a lot less than interested in providing tutorials to some of the less educated here about how to use their phones. What may well end up happening is me sending people like you the latest versions and leaving v0.2.2 in the repo for everyone else until there is a stable version. At least that would prevent the majority of people who don't have a clue from using the app. *Starts thinking up a questionnaire for deciding who gets to download it* :D

At the end of the day, if someone doesn't know how to use the terminal then they should really not 1) have Extras-Devel enabled or 2) be testing a pre-release/Alpha application. I am just waiting for someone to post here saying something like
Quote:

OMG man, I jst instld yr app n wen I ran it mah ph lck. nw i dunno wht the lck cde is? plz hlp!!!11!!!
*Facepalm*

SPARTAN563 2011-07-11 09:01

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Okay, quick vote, I'd like to know which to the following solutions you guys would prefer when it comes to detecting applications that are launched based on their command line arguments. Say Python/Bash scripts.

Command Line Comparison
  • Exact match, case sensitive
  • Exact match, case insensitive
  • Contains match, case sensitive
  • Contains match, case insensitive
  • Regular Expressions
  • Use a combination of one of the above and an application path (python/bash interpreter)

Determining when to monitor command lines
  • Monitor all applications which have command line arguments based purely on those command line arguments (not on the app's path) BAD IDEA AFAIAC
  • Monitor any command line that ends with .sh or .py
  • Monitor any command line that contains .sh or .py
  • Try and determine whether an argument in a command line is a file, and if so, if it ends with .sh or .py, monitor that command line (Would take a LOT of time to code this up)
  • Try to parse the #!/usr/bin/env python part of a file, if it exists to determine whether or not to monitor the command line

Please choose a combination of the above and if possible substantiate your answer.

Currently I am leaning towards a case sensitive contains search for the command line, using an "ends with .sh/.py -> monitor" search system.

warhawk007 2011-07-11 10:02

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Fixed the UI booting problem. But like cutehunk04 said, pressing the Lock button in the UI doesnt seem to do anything. Applications are still unlocked. And for your reference, I even restarted the daemon through command line even though UI reported the daemon is running.

and applock-d in the termnal gives this output:

~ $ applock -d
AppLock Daemon - Loading Settings
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
Loading Application Monitor
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QStr ing,QString,QString)
QSqlQuery::exec: database not open
Loading Session Bus Monitor
QSqlQuery::exec: database not open
Session Filters:
DBus Monitor Connected
DBus Monitor Running
Message Recieved on DBus Type= "signal" Sender= "org.freedesktop.DBus" Destination= ":1.747"
Signal - Interface: "org.freedesktop.DBus" && Member: "NameAcquired"
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
Adding Filter: "Contacts_Keypress" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='search_append'"
Adding search to settings
QSqlQuery::exec: database not open
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Shortcut" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='top_application'"
Adding search to settings
QSqlQuery::exec: database not open
Adding filter to monitor
Filter Added
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
Adding Filter: "Conversations" ( "session" )
"type='method_call',interface='com.nokia.Messaging UI',member='top_application'"
Adding search to settings
QSqlQuery::exec: database not open
Adding filter to monitor
Filter Added
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open

SPARTAN563 2011-07-11 15:53

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Warhawk, could you try running the daemon as admin and tell me if it gives the same problems? It may be that your settings.db file is not writable, or readable, by user-level apps...

cutehunk04 2011-07-11 16:13

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Spartan563@ if i try to lock the conversation or contact app.will it work ???

SPARTAN563 2011-07-11 16:31

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Yeah, works here. I have written up an override system which allows you to specify overrides for certain applications (Contacts, Phone, Ovi Store, User Guide and XTerm are included by default)

All works here, so I am very confused as to why it is breaking there...

warhawk007 2011-07-11 16:48

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1048958)
Warhawk, could you try running the daemon as admin and tell me if it gives the same problems? It may be that your settings.db file is not writable, or readable, by user-level apps...

Running as root would always give me:

/home/user # applock -d
Maemo applications must be run with the run-standalone.sh script!
QGtkStyle was unable to detect the current GTK+ theme.
Could not connect to session bus

Running without root privileges gave me the previous output.

For your reference, I had even tried stopping and restarting the daemon. But doesnt work. :(

SPARTAN563 2011-07-11 16:51

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Okay, try this:
Code:

sudo gainroot
killall AppLock
ps | grep AppLock
#Should give no entries, maybe a "grep AppLock" entry
applock -d

Should work, that is what I have been doing most of the time for debugging purposes. I will look into the Upstart script to see whether or not that is the cause of the problem but it shouldn't be...

warhawk007 2011-07-11 17:19

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1049003)
Okay, try this:
Code:

sudo gainroot
killall AppLock
ps | grep AppLock
#Should give no entries, maybe a "grep AppLock" entry
applock -d

Should work, that is what I have been doing most of the time for debugging purposes. I will look into the Upstart script to see whether or not that is the cause of the problem but it shouldn't be...

:)

well upon running "applock -d" as root, it always returns the same error, ie, "Could not connect to session bus"

I just restarted the daemon again. Then when I run, applock-d without root privileges, got this output.

$ applock -d
AppLock Daemon - Loading Settings
Loading Application Monitor
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QStr ing,QString,QString)
Loading Session Bus Monitor
Session Filters:
DBus Monitor Connected
DBus Monitor Running
Message Recieved on DBus Type= "signal" Sender= "org.freedesktop.DBus" Destination= ":1.993"
Signal - Interface: "org.freedesktop.DBus" && Member: "NameAcquired"
Locked application launched: "/opt/maemo/usr/bin/dorian"
Locking phone
Phone locked
Adding Filter: "Contacts_Keypress" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='search_append'"
Adding search to settings
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Shortcut" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='top_application'"
Adding search to settings
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Keypress" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='search_append'"
Adding search to settings
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Shortcut" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='top_application'"
Adding search to settings
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Keypress" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='search_append'"
Adding search to settings
Adding filter to monitor
Filter Added
Adding Filter: "Contacts_Shortcut" ( "session" )
"type='method_call',interface='com.nokia.osso_addr essbook',member='top_application'"
Adding search to settings
Adding filter to monitor
Filter Added

So it successfully loaded the daemon now. And it locks the "Dorian" app which I added via command line.
But coming back to the UI, I still cant lock or unloak apps. I cant even unlock the "Dorian" app using the UI.

EDIT: Well, clicking "unlock" in the UI on "Dorian" removed it from the database but the lock icon failed to disappear in the UI. This made me confused.
Added contacts and conversations to the database using the UI. The UI fails to show a lock icon but, since I was having terminal running the daemon, it showed me that the Ui registered keypresses and added contacts to the database. This fails to show up in the UI though. And sadly the daemon fails to lock contacts or conversations even though they are in the database.

warhawk007 2011-07-11 18:16

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
AppLock v3.0: My views and conclusions

1. The UI fails to do anything or atleast fails to register what its doing.
This means: We run "applock-d" in terminal and start the UI from the app launcher.
In the GUI, when we click on a particular app, for example "contacts", the UI seems to do nothing but the command line shows that the UI made an attempt to add the selected application and its services to the database. But in reality, there is no effect whatsoever. The app is not locked. Tested this multiple times.

2. The UI does remove apps from the database
When clicking on unlock, even though the UI seems to do nothing again, the terminal shows that the application was removed and yes, in reality, it is removed. The UI crashes when trying to remove applications with dbus events like conversations for example but again, the application gets successfully removed. Confirmed this.

3. Applock still works like before, i.e you can add and remove apps using the CLI and this works. The only thing I was never able to get working was the "keypress events" i.e, the application should have locked contacts on pressing a key on the hardware keyboard, but it didnt. But most apps which are added to the database this way, adds a "lock" icon in the GUI and gets locked.

4. The GUI doesnt seem to behave according to what is happening in the background. Locking an application through the GUi is almost impossible though it does detect input from the user, as seen on the command line. But in reality, the app never gets locked this way.
Applications which are added using the CLI show a "lock" icon in the GUI but when unlocked through the GUI, fails to remove the "lock" icon beside the application. Tested and confirmed.

So well, these are my conclusions on v.3.0 and also the bugs I found. Hope I was able to point out the bugs clearly.

Keep up the work and keep it alive! :) This is definitely a good start as we reached till here. Thanks again! Patiently waiting for bug-fixes.
Cheers! :)

SPARTAN563 2011-07-11 18:33

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Wow, thanks :D
Finally a useful report that I can use :D

Okay, lets see what I can make of it so far, and lets see if I can elaborate on what the causes are for some of the bugs.

1. Hmm, I will add an animation or notification on the UI to try and show some info there while I am doing stuff. I am actually seriously considering multithreading the entire thing, even though that is a pain in Qt (I love C#'s multithreading implementations). Anyway, I am not entirely sure what is causing the lock not to be removed. The problem may be that the DBus calls I am making do not block the thread they are called from, and since lock statuses are cached (to prevent a ton of calls to the daemon when you are scrolling the app list, read up on QML's way of creating list views for more info on why this is necessary) the lock status may be being updated before it has been changed. Will look into this ASAP

2. Now this is weird, I just ran it again on my phone and it didn't remove any apps. Thing is, it was doing so previously so I am not sure what is up, am almost certain this is a permissions problem with the settings.db file. In v0.3.1 I have changed the Upstart script to start the daemon as user rather than root. With any luck this will mean that the settings.db file gets created, and owned, by the user and this will avoid the problems we've been having. As for the UI "crashing" when you remove an app with DBus events. It doesn't actually crash, if you leave it for about 30 seconds it starts responding again. I have no idea why it takes this time, have fiddled around with all my DBus code and haven't made any difference to it. Gonna test out restarting the daemon to apply the changes in v0.3.1. I seriously think that restarting the daemon is going to be faster than the current method. That being said, Binary apps (one's where the app's path is monitored) all seem to lock and unlock immediately (when it works)

3. WOW, okay that shouldn't be the case with some apps (maybe just Contacts and Phone). Basically the override files add their own custom entries into the database. So when you add contacts to the list of locked apps it actually adds 2 entries to the database, neither one called "Contacts". So that won't appear as a locked app but it will lock when you attempt to use the shortcut. As for the keypress one not working, I got it working here so maybe you typed it in wrong? Not sure, anyway with any luck v0.3.1 will work and then you won't need to worry about manually adding them ;)

4. Hmm, what you may find is that you added them using the CLI with the Daemon not running? If that was the case then that would definitely help me pinpoint the problem. Since the CLI falls back on its own code should the daemon not be running. What this means though, is if I am going to just restart the daemon to apply changes I can directly interact with the Settings files from the UI, making it a bit faster for one and probably increasing stability a bit. Will look into this.

Thank you SO much for sending me a decent report to work with, would be interested to know if your success with the CLI was A) as root user and B) with the daemon running
Also, if you could run an "ls -l" in /opt/applock and tell me what the owner and permissions on your settings.db file are it could be useful (I have probably messed with mine so I don't trust it)

warhawk007 2011-07-11 18:49

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Quote:

Originally Posted by SPARTAN563 (Post 1049056)
Wow, thanks :D
Finally a useful report that I can use :D

Okay, lets see what I can make of it so far, and lets see if I can elaborate on what the causes are for some of the bugs.

1. Hmm, I will add an animation or notification on the UI to try and show some info there while I am doing stuff. I am actually seriously considering multithreading the entire thing, even though that is a pain in Qt (I love C#'s multithreading implementations). Anyway, I am not entirely sure what is causing the lock not to be removed. The problem may be that the DBus calls I am making do not block the thread they are called from, and since lock statuses are cached (to prevent a ton of calls to the daemon when you are scrolling the app list, read up on QML's way of creating list views for more info on why this is necessary) the lock status may be being updated before it has been changed. Will look into this ASAP

2. Now this is weird, I just ran it again on my phone and it didn't remove any apps. Thing is, it was doing so previously so I am not sure what is up, am almost certain this is a permissions problem with the settings.db file. In v0.3.1 I have changed the Upstart script to start the daemon as user rather than root. With any luck this will mean that the settings.db file gets created, and owned, by the user and this will avoid the problems we've been having. As for the UI "crashing" when you remove an app with DBus events. It doesn't actually crash, if you leave it for about 30 seconds it starts responding again. I have no idea why it takes this time, have fiddled around with all my DBus code and haven't made any difference to it. Gonna test out restarting the daemon to apply the changes in v0.3.1. I seriously think that restarting the daemon is going to be faster than the current method. That being said, Binary apps (one's where the app's path is monitored) all seem to lock and unlock immediately (when it works)

3. WOW, okay that shouldn't be the case with some apps (maybe just Contacts and Phone). Basically the override files add their own custom entries into the database. So when you add contacts to the list of locked apps it actually adds 2 entries to the database, neither one called "Contacts". So that won't appear as a locked app but it will lock when you attempt to use the shortcut. As for the keypress one not working, I got it working here so maybe you typed it in wrong? Not sure, anyway with any luck v0.3.1 will work and then you won't need to worry about manually adding them ;)

4. Hmm, what you may find is that you added them using the CLI with the Daemon not running? If that was the case then that would definitely help me pinpoint the problem. Since the CLI falls back on its own code should the daemon not be running. What this means though, is if I am going to just restart the daemon to apply changes I can directly interact with the Settings files from the UI, making it a bit faster for one and probably increasing stability a bit. Will look into this.

Thank you SO much for sending me a decent report to work with, would be interested to know if your success with the CLI was A) as root user and B) with the daemon running
Also, if you could run an "ls -l" in /opt/applock and tell me what the owner and permissions on your settings.db file are it could be useful (I have probably messed with mine so I don't trust it)

Well, restarting and stopping the daemon only worked with root privileges. Also adding and removing applications required root privileges maybe due to the location of the .desktop files.

And running "applock -d" as root would never work for me and would return a "could not connect to session bus" error.
Hence, "applock-d" worked without root privileges. You just had to launch the terminal and run "applock-d" as it is.

And for the permissions,

/opt/applock # ls -l
-rw-r--r-- 1 root root 5120 Jul 11 23:15 settings.db
/opt/applock #

:) cheers!

SPARTAN563 2011-07-11 18:56

Re: [ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
 
Okay, well you can try this then and let me know if it works:
Code:

sudo gainroot
initctl emit AppLockStopDaemon
ps | grep AppLock
kill <applock process ids>
cd /opt/applock
chown users:user settings.db
chmod 777 settings.db
exit
applock -d

Then start up the UI from another terminal and see if you can add/remove items from the UI.


All times are GMT. The time now is 21:16.

vBulletin® Version 3.8.8