Custom calendar alarm causes computer to beep rather than to play the specified sound; evolution-alarm-notify treats sound URI as simple filename

Bug #162544 reported by John S. Gruber
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Evolution
Fix Released
Medium
evolution (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

When a custom audio alarm is set by the evolution calendar function, it is stored in the calendar.ics file in a VALARM entry as an ATTACH line. The entry is entered as a file:// url. RFC 2445 defines the contents of an .ics calendar file and specifies that ATTACH lines must contain URI's or other particular entries, so this entry is correct. A simple filename would not conform to the standard.

The evolution-alarm-notify daemon treats this entry as a simple filename, and since "file:///filepath/filename" is not a filename it never exists. Since the filename doesn't exist alarm-notify uses the gnome beep function to create an audio alert rather than the sound.

Suggested resolution, at a minimum, evolution-alarm-notify could check for the existence of "file://" at the beginning of the entry and, if present, strip it before the filename check and subsequent passing of it as an argument to the gnome_sound_play function, which also takes a filename rather than an URI. This processing is done in evolution-2.12.0/calendar/gui/alarm-notify/alarm-queue.c function audio-notification.

To confirm, set a custom audio alarm. Kill the alarm-notify process. Manually edit the ATTACH line to contain the simple filename. Restart the alarm-notify process. The custom alarm sound should play at the appropriate time.

Circumvention
Use the "run a program" alarm option to run a program such as aplay with the sound filename as an argument. You will have to authorize the aplay program the first time it runs, but can then check the box to allow it run subsequently without interruption.

The gui doesn't seem to remember the sound selected the next time the alarm sound dialog box is opened. One might speculate that initialization of this dialog box might expect a filename rather than a gui in the calendar.ics file, but I haven't checked this wild guess.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. What version of Ubuntu do you use? How do you select the sound to use?

Changed in evolution:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thanks for getting back to me. I'm using Gutsy.

To trigger the error:

I selected calendar under evolution

I enter an appointment, then double click the entry to edit its details

I press the alarms button on the dialog box for an alarms dialog box

I select Customize as the alarm type and press the Add button to add the custom alarm

I then select the "Play a sound" alarm type and also set when, relative to the appointment, I'd like the alarm to sound

I then closed all the dialog boxes to save the appointment data

As noted above I was able to circumvent the problem by selecting the "Run a Program" alarm type in the add-custom-alarm
dialog box.

Please let me know should you like additional information.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Sorry, I left out an important detail--

in the add-custom-alarm box I also selected the audio file (wav) I wanted to be used as the alarm.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducible with the live environment of the Desktop CD of the development release - Hardy Heron. It would help us greatly if you could test with it so we can work on getting it fixed in the next release of Ubuntu. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

I tried it with Hardy alpha 6, and then updated hardy with the updates available today (3/18/2008).
It still doesn't work, I'm afraid. In fact, it no longer beeps either (using gnome beep).

I believe I'm doing what I did under Gutsy to produce the problem originally.

Please let me know if I can help.

Thanks.

Changed in evolution:
status: Incomplete → New
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in evolution:
status: New → Triaged
Changed in evolution:
status: Unknown → New
Revision history for this message
virtualmind (virtualmind) wrote :

I use Ubuntu 8.04, Evolution is version 2.22.3.1 and this case is confirmed.

I customize sound ogg/wav/mp3 is not reproducible but Evolution play a gnome beep.

Revision history for this message
virtualmind (virtualmind) wrote :

Item in Ubuntu 8.10.

Revision history for this message
godef (godef-th) wrote :

Idem in Intrepid, with evolution-2.24.3-Oubuntu1.
Thanks in advance for fixing this annoying bug.

Revision history for this message
virtualmind (virtualmind) wrote :

Item in Ubuntu 9.04 !
This problem is very complicated to resolve, why?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

you're welcome to submit patches if you want this to be fixed soon, but those kind of comments doesn't help at all the get the bug fixed.

Revision history for this message
xcape77 (xcape77) wrote :

it's still a problem in 10.4

Revision history for this message
Maximiliano (meilan) wrote :

Confirm the problem in a fresh install of Ubuntu 10.04.

Revision history for this message
runner (runner2) wrote :

A suggestion for solution and request for higher priority.

This bug is for some people a high priority. That is to say, some people need to be on time some places and it is the sound alarm that tells them to go because they are not watching the screen and the popup is too fast to be useful. It actually should stay up until user dismiss it just like alarm clock snooze.

This bug is around at least 2 years. In 9.04 I was able to get around "play sound" reminder by using "run program" which I made "play <sound file>". That worked in 9.04 but not in 9.10.

I am not claiming being expert on Evolution (in fact I am not expert), but here is my suggestion. Since the popup notifier does work for most people, here is how to fix "make sound" alarm. Copy the code of popup notification. In the middle replace the section doing popup with "system call to play/aplay <sound file>".
You can also apply it to "run program".
-regards

Revision history for this message
runner (runner2) wrote :

I should have added to above: In my case I don't get any sound at all. This was the nearest bug I saw. If somebody knows where is the bug "does not play reminder sound at all", pls let me know.

Changed in evolution:
importance: Unknown → Medium
Revision history for this message
Juan Simón (simonbcn) wrote :

It is a bit embarrassing that this bug is around at least 2 years without any solution!! :-(

Revision history for this message
hielos (hielos-deactivatedaccount) wrote :

2011 (three years now)

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

2012 ....4 years now

Revision history for this message
Jörg Frings-Fürst (jff-de) wrote :

change status to Invalid (see gnome-bugs)

Changed in evolution (Ubuntu):
status: Triaged → Invalid
Changed in evolution:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.