After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510921 - e-a-n treats sound file as a simple filename instead of path - no sound for calendar alarm
e-a-n treats sound file as a simple filename instead of path - no sound for c...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Calendar
3.10.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2008-01-21 00:25 UTC by r.lopez.negrete
Modified: 2017-08-25 10:01 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10



Description r.lopez.negrete 2008-01-21 00:25:33 UTC
No sound with calendar alarm. I've left the defaults in the alarm/play sound configuration, and also specified a particular file to play. In both cases no sound can be heard. The pop-up's are working correctly, and evolution can play sounds when I recieve mails.


Distribution: Ubuntu 7.10 (gutsy)
Gnome Release: 2.20.1 2007-10-19 (Ubuntu)
BugBuddy Version: 2.18.1
Comment 1 André Klapper 2008-01-21 07:41:08 UTC
is esd running on your computer?
Comment 2 r.lopez.negrete 2008-01-21 16:22:08 UTC
Yes, esd is running in my computer.

$ ps aux | grep esd
rush      6894  0.0  0.3   5236  3556 ?        SL   Jan17   0:00 esd

thanks,
 Rodrigo
Comment 3 Sebastien Bacher 2008-07-30 12:43:54 UTC
there is a bug about a similar issue on https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/162544

"

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."
Comment 4 maximiliano 2008-11-15 14:30:51 UTC
Have the same problem with Ubuntu Intrepid and Evolution 2.24.1
Comment 5 André Klapper 2012-02-08 12:27:02 UTC
Hi r.lopez.negrete / maximiliano, 
if you have time, could you please check again whether this issue still happens in Evolution 3.2.2 or 3.0.3 and update this report by adding a comment and changing the "Version" field and provide information about your distribution? 
The sound stack in GNOME has changed quite a lot in the meantime...
Thanks a lot.
Comment 6 maximiliano 2012-02-08 15:21:37 UTC
I have no luck with Ubuntu 11.10 and Evolution 3.2.2
Comment 7 André Klapper 2015-02-15 16:42:45 UTC
Is this still a problem in 3.12 or 3.10?
Comment 8 maximiliano 2015-02-24 11:19:03 UTC
3.10.4 still have the problem
Comment 9 Milan Crha 2017-08-25 10:01:09 UTC
(In reply to maximiliano from comment #8)
> 3.10.4 still have the problem

That's odd, because that version uses

   filename = g_filename_from_uri (url, NULL, &error);

and then passes the result (if succeeded) to ca_context_play(), as can be seen here:
https://git.gnome.org/browse/evolution/tree/calendar/alarm-notify/alarm-queue.c?h=gnome-3-10#n1902

I verified in the code that the passed file name is a file name with full path, not a URI.

The sound is properly played when sound theme in system preferences is enabled, at least here.