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 333435 - gdmsetup fails to 'disable' sounds completely
gdmsetup fails to 'disable' sounds completely
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.13.x
Other All
: Normal minor
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-05 03:26 UTC by Jesse Keating
Modified: 2006-03-07 00:19 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description Jesse Keating 2006-03-05 03:26:16 UTC
Please describe the problem:
Enabling sounds, and then disabling sounds leaves a custom.conf that still plays
sounds.

Steps to reproduce:
1. use gdmsetup to enable sound actions
2. gdmrestart
3. use gdmsetup to disable sound actions
4. gdmrestart


Actual results:
generates custom.conf with:
SoundOnLogin=false
SoundOnLoginFile=/usr/share/sounds/startup3.wav
SoundOnLoginSuccessFile=/usr/share/sounds/info.wav
SoundOnLoginFailureFile=/usr/share/sounds/email.wav

and sound still happens upon login (but not LoginReady)

Expected results:
A custom.conf that results in no sounds being played.

Does this happen every time?
yes.

Other information:
Uncommenting the 4 lines results in a gdm that does not play sounds.
Comment 1 Brian Cameron 2006-03-06 21:40:46 UTC
I believe I fixed this bug in CVS head.  Could you test as well for me?
Comment 2 Jesse Keating 2006-03-06 23:22:52 UTC
I have just tested this, seems to do the job.  Oddly enough when adding sounds, a gdm-restart isn't necessary, just a log out, log in.  However when disabling sounds, a log out / log in does the old style not play the login ready but play the login successful.  After a gdm-restart, no sound is played from gdm.  So I'd say this is fixed, sortof.
Comment 3 Brian Cameron 2006-03-07 00:19:28 UTC
I'm glad to hear it is working better.  Previously the checkboxes weren't actually being looked at, so that was badly broken.  Now at least the settings work.

I'm confused why it isn't quite working in terms of logout/login recognizing the
settings.  Note that the main GDM daemon starts up a slave for each display (this is the gdm-binary process that is the child of the main gdm-binary process).  Note that it is the slave that pays attention to the login success/failure sounds and manages them.

If the slave isn't restarted on logout/login, then it would make sense that it would not notice that the config value changed.

Note that in gdmsetup that the main daemon calls the slave with notify options.
Perhaps gdmconfig.c and slave.c need new notify values for the GDM_KEY_SOUND_ON_LOGIN_SUCCESS and GDM_KEY_SOUND_ON_LOGIN_FAILURE keys so these
notifies are passed onto the slave.  The code is straightforward with examples for other notify values.

If you wanted to test this out and see if this fixes the problem, I'd accept a patch.  Also, it might make the greeter behave better if in the gdm_read_config file if we loaded in these sound values and in gdm_reread_config if we  just restarted the greeter if these keys change.

It's confusing, though, why it would work for setting them and not for unsetting them if notify is the problem, though.  Not sure why it would notice in one case but not the other.

Note that there *are* notifies being sent if you change the actual sound file, so if you are changing the soundfile setting in addition to turning it "on", this might be why it is working when you turn it on, but not when you turn it off.