GNOME Bugzilla – Bug 674251
Documentation not clear when g-s-d doesn't apply settings after hotplug-command
Last modified: 2012-10-09 09:08:48 UTC
According to the comment for run_custom_command in: http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/gsd-input-helper.c g-s-d doesn't apply the default settings if the hotplug-command returns 1 According to the source code and to the comment in: http://git.gnome.org/browse/gnome-settings-daemon/tree/plugins/common/input-device-example.sh g-s-d doesn't apply the default settings if the hotplug-command returns 0 I'd recommend to fix the comment in gsd-input-helper.c to make it 0, like in the code. Also it would be worth documenting this behaviour in the comment of the setting itself, there: http://git.gnome.org/browse/gnome-settings-daemon/tree/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in I'd add a sentence like: The command should return 0 if the default settings should not be applied to the device.
Created attachment 224939 [details] [review] input: Clarify hotplug command exit value handling The code and the comments were confused as to whether 0 or 1 should be the magic value to mean "don't configure this device any more". We are now using an exit value of "1" to mean "don't touch this device", as it requires the user explicitely saying that they don't want the device touched anymore. An empty script shouldn't cause all the configuration to suddenly break...
Attachment 224939 [details] pushed as 0c909e6 - input: Clarify hotplug command exit value handling