GNOME Bugzilla – Bug 670607
Wrong handling of variants
Last modified: 2012-02-22 19:42:24 UTC
The "Copy Settings" button in the region panel calls the "SetX11Keyboard" dbus method (implemented by systemd-localed) and passes everything as layout instead of properly distinct between layout and variant; resulting into a config file that X cannot parse: ----- g_dbus_proxy_call (localed_proxy, "SetX11Keyboard", g_variant_new ("(ssssbb)", layout, "", "", "", TRUE, TRUE), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, NULL); ----- As specific example "de nodeadkeys" will get passed as layout while only "de" is the layout and "nodeadkeys" is the variant: ------ <method name="SetX11Keyboard"> <arg name="layout" type="s" direction="in"/> <arg name="model" type="s" direction="in"/> <arg name="variant" type="s" direction="in"/> <arg name="options" type="s" direction="in"/> <arg name="convert" type="b" direction="in"/> <arg name="user_interaction" type="b" direction="in"/> </method> ------ Quoting Peter's comment from the downstream bug: ----------- In GNOME, go to the region and language panel, select a layout with a variant (e.g. German, nodeadkeys). Go to the System panel, click on "Copy Settings". This causes 00-system-setup-keyboard.conf to be linked to /dev/null and a new file 00-keyboard.conf is put in place by systemd. That file has a configuration that cannot be read by the X server. Option "XkbLayout" "at nodeadkeys" Should instead be: Option "XkbLayout" "at" Option "XkbVariant" "nodeadkeys" For multiple layouts, each value must be a comma-separated list. So if your layouts are "us,at(nodeadkeys)", the two options must be Option "XkbLayout" "us,at" Option "XkbVariant" ",nodeadkeys" Note the comma before nodeadkeys, otherwise it's assigned to the first layout (and us(nodeadkeys) doesn't exist). ---------
Created attachment 208209 [details] [review] region: Fix handling of variants in "Copy" button Instead of splitting the list of layouts into layouts and variants, we were expecting strings of the form: layout1 variant1, layout2 variant2 to be handled automatically. We should instead create the lists of layouts and variants separately before passing them to localed.
Created attachment 208211 [details] [review] region: Fix handling of variants in "Copy" button Instead of splitting the list of layouts into layouts and variants, we were expecting strings of the form: layout1 variant1, layout2 variant2 to be handled automatically. We should instead create the lists of layouts and variants separately before passing them to localed.
Created attachment 208215 [details] [review] region: Fix handling of variants in "Copy" button Instead of splitting the list of layouts into layouts and variants, we were expecting strings of the form: layout1 variant1, layout2 variant2 to be handled automatically. We should instead create the lists of layouts and variants separately before passing them to localed.
Works in my tests, please reopen if not. Attachment 208215 [details] pushed as b55d07e - region: Fix handling of variants in "Copy" button