Closed Bug 337906 Opened 19 years ago Closed 19 years ago

Execute a script on an alarm [extension fodder]

Categories

(Calendar :: Alarms, enhancement)

All
Windows XP
enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: rpe2101, Unassigned)

References

Details

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060507 Mozilla Sunbird/0.3a2 There should be the option as an alternative to playing a file on an alarm to actually run a script/program/open a file. Currently if you want to do anything more complicated than sound a wav file sunbird is unable to help. By launching a script/program/openning a file at the alarm the sky is the limit. What I'll be using it for most immediately is running a script that will unmute my speakers, play an ogg file, and then remute my speakers. It is simply impossible for sunbird developers to support every single thing that a user would want to do at an alarm (imagine having to support ogg/mp3 and essentially becoming a music player). By allowing people to execute arbitrary scripts, it allows a user to do whatever they want on a sunbird alarm. Reproducible: Always I have a working implementation of this. However I need some help on figuring how to present these patches to others.
Attachment #221953 - Attachment mime type: application/octet-stream → text/plain
Attachment #221953 - Attachment is patch: true
Comment on attachment 221953 [details] [diff] [review] Needed changes to pref/alarmPrefs.js Made from sunbird 0.3a2
A couple thoughts here: -Unlike with sounds, I find it unlikely that a single option, to be executed with each alarm, will be useful for many users. Therefore, I think a preference is the wrong way to go. -RFC2445 does allow for a program that should be run to be specified in a VALARM. Once we get calIAlarm up and running (bug 298358), an action of "PROGRAM" can be possible, which would be more along the lines of what I think you're looking for. -However, at that point, because the alarm is specified in the calendar-file, rather than by an explicit user action (setting a preference), there are severe security issues to keep in mind. (Think of a public 'holiday' file that when subscribed to has an old alarm which fires and actually runs a script deleting your entire hard-drive.)
I really doubt the need for this. It has security problems, it adds more UI, it is a potential source of bugs etc. And what's the gain? Sunbird is a calendar app, not a crontab-on-steroids.
"Unlike with sounds, I find it unlikely that a single option, to be executed with each alarm, will be useful for many users." Although a single script preference set to each alarm would be more useful (a la ical), allowing the execution of a script as specified in preferences, a user can do anything they want _more_ than play a wav file. To show why you'd want to do more than play wav files. "When's the last time you've had a bunch of wav files sitting around on your computer? If anything you have mp3's or if you're on windows probably some wma's. One would say that a developer would rather have the ability to run a file than having to implement all mp3, wma, ogg, etc interfaces and essentially become a music player." The way this patch is currently set up is to be able to run any file using the program set up to handle the file on the current system. If you have an ogg file this patch will run the file in whatever program is associated with it. This is _expected_ functionality for this feature. "Sunbird is a calendar app, not a crontab-on-steroids." First of all, having ~30 lines of code convert sunbird into a crontab-on-steroids is very little work for a large feature gain. Second, Crontab is unix centric, meaning it doesn't exist on windows. Third, chrontab does not have a user interface for anyone who would be using sunbird to run their favorite program/sound file on an alarm. Fourth, the UI for this feature fits right into the interface. Fifth, any security problems caused by a script that a user wrote themselves, is not sunbird's fault, which is apparent even to them.
(In reply to comment #7) > First of all, having ~30 lines of code convert sunbird into a > crontab-on-steroids is very little work for a large feature gain. Every 30 lines of codes are another 30 lines of code that can have bugs, need to be tested etc. > Second, > Crontab is unix centric, meaning it doesn't exist on windows. Windows has some kind of task planner. At least is used to have. If it was lost, there are hunderds of other applications filling the void. > Third, chrontab > does not have a user interface for anyone who would be using sunbird to run > their favorite program/sound file on an alarm. I'm sure there are hunders of programs to do that job too. It's just not the area sunbird is targetting. > Furth, the UI for this feature fits right into the interface. Even if it fits in, it is still UI that can confuse people. It the road away from simplicity and usuability. Not the road we want to go on. I'm still in favour of wontfixing this bug, and move the functionality to an extension
I'll wontfix it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
(In reply to comment #8) > (In reply to comment #7) > > First of all, having ~30 lines of code convert sunbird into a > > crontab-on-steroids is very little work for a large feature gain. > > Every 30 lines of codes are another 30 lines of code that can have bugs, need > to be tested etc. > True, but it still is a very large feature gain for a trivial amount of code. > > Second, > > Crontab is unix centric, meaning it doesn't exist on windows. > > Windows has some kind of task planner. At least is used to have. If it was > lost, there are hunderds of other applications filling the void. > It still has a taskplanner but it is rather lousy, and doesn't have a nice UI. The point is that you could do all your alarm stuff all from one spot (from sunbird) with the addition of a trivial amount of code. Yeah...hundreds? Which? Which even come close to a sunbird like interface? > > Third, chrontab > > does not have a user interface for anyone who would be using sunbird to run > > their favorite program/sound file on an alarm. > > I'm sure there are hunders of programs to do that job too. It's just not the > area sunbird is targetting. Again, which hundreds? Name a few that you would like to use? Especially with a nice calendar interface. Much less, find one that is open source. Even on linux which _has_ chron both Evolution, and Korganizer have this preference. Ical has this feature as well. Again the benefit of this feature addition is much larger than the cost. > > > Furth, the UI for this feature fits right into the interface. > > Even if it fits in, it is still UI that can confuse people. It the road away > from simplicity and usuability. Not the road we want to go on. > This is a _feature_, not some crazy emacs-like preference so people can enable buggy behavior. This preference takes up mininimal area of ample screen space where this preference is most intuitively found. > > I'm still in favour of wontfixing this bug, and move the functionality to an > extension Well, mvl, you're the lead guy. Whatever you want. I've wontfixed it.
The reason for my hesitation is not because this particular feature would be really bad. I just don't want to add more and more features. We need simplicity. The feature requested here can be done perfectly in an extension, so this one should be low priorty to get into the main app. (overlay the prefs, use the calIAlarmService to get notifications of alarms)
*** Bug 351484 has been marked as a duplicate of this bug. ***
#6 said: "Sunbird is a calendar app, not a crontab-on-steroids." Agreed; but then this means that I expect that it will be able to notify me that an alarm has fired -- wherever I am. Which for me means "find my presence and notify me by the most appropriate mechanism", where I have somehow been able to define "most appropriate". I can do all that in a script (à la KOrganizer); I can't think of a way to do it without a script. To give the very simplest example (which would actually suffice for me 99% of the time, and would be many many times better than the current restrictions): I would normally want alarms to be IMed to me. Why? Because right now unless I happen to be sitting in front of the virtual desktop on which Sunbird is running, I will not see a pop-up, and Sunbird will not play sounds under KDE (at least, it doesn't here). So I am almost guaranteed to miss alarms in the current implementation. But IMs almost always find me, no matter where I am, as long as I am near a computer. So an "IM me" preference would work for me almost all the time. But it doesn't seem like that'sthe real solution, because it's not as versatile as running a script. With a script the presence detection can be done properly: if (user is IMable) IM the user else send SMS to cell phone or maybe the "else" is" send user an e-mail or update a web page None of these is unreasonable (although personally I would use only the IM and SMS capability). In any case, the point is that there are simply too many reasonable ways to want to be alerted to expect Sunbird to include them; the only sufficiently flexible solution is to allow the user to run a script which can do all the donkey work. Without this capablity, it seems to me that the alarm feature of Sunbird is pretty much useless, at least when using KDE.
Summary: Execute a script on an alarm → Execute a script on an alarm [extension fodder]
If you read these other enhancements, you will see that although they are not duplicates, they are very similar: https://bugzilla.mozilla.org/show_bug.cgi?id=180890 https://bugzilla.mozilla.org/show_bug.cgi?id=282565 https://bugzilla.mozilla.org/show_bug.cgi?id=360799 The implementation of them all would probably fall within the same code. Also, if you read this old enhancement above, somebody actually came up with the code changes necessary back in 2006 to implement 'running a script on an alarm'. At the time, it was not going to be implemented into Lightning, but with these other similar requests maybe it's time to open it back up and have another look. So everybody go vote for these other enhancements, and also, let's try to get all the votes considered together to get the feature implemented. Thanks
I concur that the current implementation of alarms could be improved a lot. Would someone be interested in mentoring a group of students developing an add-on that would implement the feature?
See: Bug 360799 - Email an alarm message Should these be one task?
Component: Sunbird Only → Alarms
QA Contact: sunbird → alarms
We need such feature too How about an extension that would implement that new feature? • So users who prefer simplicity and or don't use that feature don't install that extension; • While users who need that feature install that extension. - - - For those interested there is a related new feature request at https://bugzilla.mozilla.org/show_bug.cgi?id=360799 Mockup of suggested new feature at https://bugzilla.mozilla.org/attachment.cgi?id=8622599 Mockup description at https://bugzilla.mozilla.org/show_bug.cgi?id=360799#c26 That new feature could be either implemented or be an extension Any volunteer for a patch or for an extension? I would be happy to contribute testing, quality assurance, documentation, and agile project management services if needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: