GNOME Bugzilla – Bug 338274
Broadcast=false do not works
Last modified: 2006-04-18 21:36:55 UTC
Please describe the problem: In gdm config file, when Broadcast=false is set it works like Broadcast=true. To isolate the problem, I am only modifying /usr/share/gdm/defaults.conf for test cases. But, of course, I had tried all config files combinations (/etc/gdm/gdm.conf{,-custom}) Steps to reproduce: 1. Just set Broadcast to false and it don't work. Actual results: Expected results: Does this happen every time? Yes Other information: I hacked the code a little bit, but I still not recognize the problem. In my case, which I don't use broadcast, I did a workaround that is only comment out the first call of gdm_chooser_find_bcaddr function, on , gui/gdmchooser.c:gdm_chooser_add_hosts. Just like: if (strcmp (name, "BROADCAST") == 0) { // gdm_chooser_find_bcaddr (); continue; } So I put my hosts at "Host" field and the funny thing is that "Broadcast" is need to be set to True. Thus, with these workaround above, and "Broadcast=True", "Host=foo, bar" the broadcast becomes false and it works properly for me. My suggestion is to change this define: daemon/gdm.h:#define GDM_KEY_BROADCAST "chooser/Broadcast=true"
I think I know what the problem may be. Could you edit gui/gdmchooser.c and notice this line (it appears twice in gdm_read_config and gdm_reread_config) gdm_config_get_string (GDM_KEY_BROADCAST); Please change the function call to gdm_config_get_bool (GDM_KEY_BROADCAST); This may be causing the problem since the key is really a bool not a string, so this code is in error. I fixed this in CVS head. Does this fix the problem? You may also need to backout some of the hacks you put in place above to workaround the problem you report.
This is a duplciate bug. Note that the needed file is in the attachment of the duplciate bug, so you can get past your compile issue. *** This bug has been marked as a duplicate of 338079 ***
Sorry, didn't mean to mark this as a duplicate - so reopening. Did this fix your problem, so I can close the bug?
Created attachment 63620 [details] [review] Finally fix broadcast :) I did fix the broadcast config file option and remove 3 lines that make non sense to me. Before remove these 3 lines, when "Hosts="(empty) and "Broadcast=false", gdm made broadcast.
Tiago. Thanks for the posting. You are right that the way GdmHosts was being set up was incorrect. I believe I have fixed this in CVS head, though not quite in the same way you suggest in your patch. I'm a bit confused about the need to remove this code: - if (bcaddr == NULL && - queryaddr == NULL) - gdm_chooser_find_bcaddr (); +// if (bcaddr == NULL && +// queryaddr == NULL) +// gdm_chooser_find_bcaddr (); Why is queryaddr NULL in your situation? Also what problems does this code cause you? Even if this function fails, I don't think it would cause gdmchooser to exit or otherwise fail.
Hey Brian! I wasn't clear enough before. I don't see any reason to do broadcast when there isn't hosts set manually ("Hosts=") and even broadcast is set to no ("Broadcast=false") in conf file. Well, as I said to you, I saw gdm code for the first time one week ago. So, I'm not sure if these 3 lines do what I say above. Anyaway, the bug was already fixed :)
Well, the code only calls gdm_chooser_find_bcaddr if both bcaddr and querryaddr is NULL. I suspect this is an error condition, and the function doesn't actually get called in the normal case. Unless you notice both being NULL. Anyway, I think the bug is fixed, so I'm closing it. Please reopen if there is any work left to be done. If you could test and verify that gdm2 from CVS head works okay that would be nice.
Tested. Works okay! Thanks Brian