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 91531 - gnome-session login sound plays even if disabled
gnome-session login sound plays even if disabled
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.0.x
Other All
: Normal normal
: 2.0.3
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-08-23 15:23 UTC by Havoc Pennington
Modified: 2006-07-26 13:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Improved login sound patch. (838 bytes, patch)
2006-03-29 00:14 UTC, Scott Robinson
none Details | Review
patch used by the Ubuntu package (973 bytes, patch)
2006-05-09 14:46 UTC, Sebastien Bacher
none Details | Review

Description Havoc Pennington 2002-08-23 15:23:13 UTC
See patch attached to
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=71664
Comment 1 Mark McLoughlin 2002-09-12 04:29:49 UTC
Hmm, the patch is a bit too simplistic I think. You could get to that
case if the user has configured a certain sound for login but it can't
be located. In that case you *do* want to fall back to the system sound.
Comment 2 dserodio 2004-11-29 18:11:06 UTC
Any news on this bug? It's been open for 2 years!
Comment 3 Scott Robinson 2006-02-28 23:22:36 UTC
Any news on this bug? It's been open for 4 years!

The Redhat patch may have been "simplisitic", but it certainly solved the problem. One way is noticibly broken while the other is certainly a corner case.

Please apply this _one line_ patch before release of 2.14!
Comment 4 Scott Robinson 2006-03-29 00:14:31 UTC
Created attachment 62258 [details] [review]
Improved login sound patch.

The following test cases have been accounted for in this patch:

	Default login sound.
	No sound.
	Different sound.
	Different sound, not found absolute filename.
	Different sound, not found relative filename.

In the file not found conditions, the default login sound is played. In the other conditions, the expected behavior occurs.
Comment 5 Sebastien Bacher 2006-05-09 14:46:27 UTC
Created attachment 65095 [details] [review]
patch used by the Ubuntu package

The patch from redhat doesn't work if you have a default system sound defined

I've used that patch with the Ubuntu package, it works fine on my box. An other way would be to modify load_login_sample_from() to return an int and make a case for "key with no value" then
Comment 6 Vincent Untz 2006-07-26 13:22:40 UTC
I committed another patch, without a global variable.