maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;) (https://talk.maemo.org/showthread.php?t=73068)

Gusse 2011-05-24 09:37

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Quote:

Originally Posted by MasterZap (Post 1014234)
No, this should not happen. Which build are you running? Are you starting it from the icon or command line? And if from the command line, are you "user" or "root" when doing so?

/Z

Program is started from menu icon, not command line.
Same issue with versions: 0.9.4-36 & 0.9.4-37.

MasterZap 2011-05-24 09:38

Re: A Question about User Interface
 
Quote:

Originally Posted by morti (Post 1014233)
Short answer:

Makes perfect sense in my opinion, this is how I would expect it to work and I bet everyone already has it configured this way.
I would go with mode b).

Thinking about it some more, I actually disagree.

If I said "no" to background updates (by unchecking it) I then per definition want nothing to happen "in the background", regardless if the app is running or not... so for example, if I am composing a nice manual check in to the location I'm at, I don't want to be preempted by some auto-check in in the back. Or I may be turning it off for bandwidth reasons, or whatever.

Remember you can still MANUALLY check in, even if the daemon isn't running.

The only thing you are missing is Latitude updates.... but also remember, these explicitly live in the user interface behind the "Run in background" checkbox... which is off. Sould latitude updates still happen? Methinks not!

Then I'd rather add an explicit manual latitude update mode for that case.

So I decided that "run in background=OFF" really means the daemon is completely off.

Quote:

Originally Posted by morti (Post 1014233)
Long answer:

There are two separate cases in mode b):

- If you don't have the background daemon running, you are probably starting the main program in order to update your position and to see the map/check in - daemon should be on while the main program is running.

You need no daemon to manually check in (except for Latitude, which is a special case)

Quote:

Originally Posted by morti (Post 1014233)
My humble (and possibly too laborious) suggestion is:
Keep the background daemon and the main program daemon separate from each other. When the user starts the main program, you could suspend the background daemon until the main program is closed. The settings should be separate as well, as the use cases for using the background daemon and running the main program are typically rather different.

This is sort of what is happening. Check ins that happen when you press the "Check In" button is a different thing than the daemon auto-checking you in.

All that is missing really is a manual way to check in to Latitude.... which is quite easy to add.

/Z

morti 2011-05-24 10:12

Re: A Question about User Interface
 
Thanks for the clarification, it seems I had a slightly different idea about what running the daemon means. Taking your description into account, this does make sense - I also wouldn't want auto check-ins to happen while I'm running the main program.

As you said, the only thing missing with your description is a way to update latitude without the daemon - manual check ins for this sounds like a good solution.

MasterZap 2011-05-24 10:25

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Quote:

Originally Posted by Gusse (Post 1014260)
Program is started from menu icon, not command line.
Same issue with versions: 0.9.4-36 & 0.9.4-37.

That's odd. Doesn't happen here. Do you have the updated busybox, by any chance?

What does this line print for you:

Code:

ps -a | grep "zaploc-daemon"

EDIT: Try build 0.9.4-39.


/Z

Gusse 2011-05-24 11:19

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Quote:

Originally Posted by MasterZap (Post 1014279)
That's odd. Doesn't happen here. Do you have the updated busybox, by any chance?

Yes I have. Is this a problem? Should I revert back?

Quote:

Originally Posted by MasterZap (Post 1014279)
What does this line print for you:

Code:

ps -a | grep "zaploc-daemon"

EDIT: Try build 0.9.4-39.


/Z

Using 0.9.4-39.
If background service is OFF, then it shutdown OK (no ghost program running in backgroung)
If background service is ON, then
Code:

~ $ ps -w|grep "zaploc-daemon"
3815 user 50968 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
3951 user 50820 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4066 user 50824 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4130 user 2832 S grep zaploc-daemon

Above is after 3rd time closing ZapLoc. Each time a new daemon is added.

MasterZap 2011-05-24 11:27

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Quote:

Originally Posted by Gusse (Post 1014319)
Yes I have. Is this a problem? Should I revert back?

Other people have had the same issue w. new busybox, but it was due to a wrong "ps -e | grep" line I used (-e not a proper option in new busybox, and it was wrong anyway, was supposed to be -a)

However, that should have been fixed in 39... :/ Strange.

Quote:

Originally Posted by Gusse (Post 1014319)
Using 0.9.4-39.
If background service is OFF, then it shutdown OK (no ghost program running in backgroung)
If background service is ON, then
Code:

~ $ ps -w|grep "zaploc-daemon"
3815 user 50968 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
3951 user 50820 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4066 user 50824 S /usr/bin/python /opt/zaploc/zaploc-daemon.py -d
4130 user 2832 S grep zaploc-daemon

Above is after 3rd time closing ZapLoc. Each time a new daemon is added.

What's "-w", I wonder? "-a" (all users) is what I would have expected to use....?

If you start ZapLoc from xterm and see what it prints ("Starting Daemon", "Stopping Daemon" etc. like that) would be helpful. Ideally run as "user", not "root".

Actually the exact output of this would be very helpful:
Code:

ps -a | grep "python.*zaploc-daemon.py" | grep -v grep | awk '{print $1}'
/Z

Gusse 2011-05-24 11:37

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Quote:

Originally Posted by MasterZap (Post 1014325)
Other people have had the same issue w. new busybox, but it was due to a wrong "ps -e | grep" line I used (-e not a proper option in new busybox, and it was wrong anyway, was supposed to be -a)

However, that should have been fixed in 39... :/ Strange.



What's "-w", I wonder? "-a" (all users) is what I would have expected to use....?

If you start ZapLoc from xterm and see what it prints ("Starting Daemon", "Stopping Daemon" etc. like that) would be helpful. Ideally run as "user", not "root".

/Z

There seems to be only one option in the new busybox for ps and it is -w, -a is not valid (w = wide output). Don't know why this modifications is done?
Code:

~ $ ps --help
BusyBox v1.18.4 (Debian 1.18.4power4) multi-call binary.

Usage: ps

Show list of processes

Options:
w Wide output


ndi 2011-05-24 11:51

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
IMO, for the paranoid, app should use a flag. E.g., a file on disk, created on start, deleted on end, or, better, locked when app starts.

Daemon doesn't updte if file isn't locked, so start and stop daemon is only a matter of resources, not security. So even if it doesn't stop right, it simply sits there.

ETA: App closing could check daemon has stopped. Exiting could issue a kill and inform user it's done or not via a ps | grep

Gusse 2011-05-24 13:48

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Uninstalled "Enhanced Busybox 1.18.4" and now ZapLoc works OK.
Thanks for your help!

Edit: I tried once again with new BusyBox with procps installed, which brings better ps tool, but still not working as it should.

MasterZap 2011-05-24 13:51

Re: [Announce] ZapLoc - a Gowalla/Foursquare/Facebook places/Latitude aggregator - "All your location based services are belong to us" ;)
 
Ok, then I will remove "-a", I must have misunderstood the earlier poster about the problems w. new busybox "ps". It seems the current busybox actually ignores all options anyway (gladly takes "-klptzyxm") so it doesn't matter anyway....

Will be fixed later....

/Z


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

vBulletin® Version 3.8.8