[Disclaimer - I haven't actually done any work on GPE apps. But I'm
hoping that an alarm mechanism would be flexible enough that non-GPE
apps, or little one-off scripts, could use it as well without too
much trouble. Incidentally, anybody know how OPIE/QPE handle this?
Or are they single-user?]
Hi. Seems to me that a good approach would be to allow apps to register
alarms in the form of "when this alarm kicks off, run this command
line as this user". The assumption would be that the command line
would usually be something like
/usr/bin/notify-my-own-weird-app-of-an-alarm 31FCE429
where that is a little stub that either finds a running instance
of /usr/bin/my-own-weird-app and signals it (via TCP/IP, X display
properties, signals, or whatever) to display the alarm with ID "31FCE429",
but it could also be something like
/usr/bin/madplay /usr/local/mp3/wakey-wakey.mp3
or
/usr/bin/gpe-message "Time to take your meds"
That would let individual apps that wanted to handle alarms do so
in as simple or as complex a fashion as they chose.
That leaves the issue of what happens when the user isn't logged in.
I wouldn't want to miss my plane because I happened to be demoing
my ipaq as a different user when the alarm was supposed to have gone
off. One approach would be to arrange for all past-due alarms to
trigger when the person next logs in. Another is to have a textual
description of the alarm and an app that can run as root to pop up
a notification window, to at least let the person looking at the ipaq
know that an alarm was supposed to have triggered. I think either
behaviour should be configurable, because whether you want one, the
other, both, or neither depends on how you generally use your ipaq
(and whether you share it). But anyway, I think that an app that
registers an alarm (commandline) should be required to also register
a textual description of the alarm that could be used in some sort
of "default" action if the command line can't be run. (That could
also be useful in a GUI letting you cancel or reschedule pending
alarms.)
The tricky thing is the authentication, since an app running as a
user needs to notify a daemon running as root to run an arbitrary
app as that same user. The right way probably involves public-key
cryptography, and my brain is starting to hurt.
Cheers,
-j.
-- Jay Sekora http://www.aq.org/~js/ js@aq.org AIM: jayaq `She's got a bowl of water, some dry food, a squeaky toy, and internet access. What more could a dog need?' - The vet in _Freefall_, http://www.purrsia.com/freefall/ff500/fv00404.htmReceived on Thu Sep 12 2002 - 18:35:23 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:01 EDT