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 696288 - Custom keyboard layout doesn't work
Custom keyboard layout doesn't work
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
3.10
Depends on:
Blocks:
 
 
Reported: 2013-03-21 13:46 UTC by Jiri Stransky
Modified: 2019-03-20 11:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jiri Stransky 2013-03-21 13:46:22 UTC
I have a custom keyboard layout (https://github.com/jistr/czenglish) and I'd like Gnome to use it. I set the dconf key org.gnome.desktop.input-sources.sources to "[('xkb', 'cen+nerd')]", which should be the Gnome 3.6 way to set a keyboard layout, but it doesn't work. If I add more layouts to the list, only the "stock" layouts get shown in the keyboard selection menu in panel, not my custom layout. Even if I don't use the variant and set it to just "[('xkb', 'cen')]", it still doesn't work.

The keyboard layout is installed into the system correctly. Running `setxkbmap -layout cen -variant nerd` works well.

(Previously, with Gnome 3.4, I used the layout by setting dconf key org.gnome.libgnomekbd.keyboard.layouts to "['cen\tnerd']" and it worked well.)
Comment 1 Matthias Clasen 2013-03-22 12:12:04 UTC
Rui, didn't we talk in Brno about adding a place for dropping custom layouts ?
Mike wanted that too
Comment 2 Rui Matos 2013-03-22 14:09:05 UTC
Yes, we probably need to pick layout meta data from a directory where system administrators and packages can drop individual files into.

The problem here is that we need a minimum of meta data for each layout:

* short name - usually a 2 letter code like 'cs' to show in the top panel
* description - a translatable name like 'Czech'

and we get this from the xkeyboard-config rules xml file[1]. That's why just dropping the layout definition into /usr/share/X11/xkb/symbols isn't enough for it to show up in GNOME.

[1] http://cgit.freedesktop.org/xkeyboard-config/tree/rules/base.xml.in
Comment 3 Matthias Clasen 2013-03-22 19:11:16 UTC
(In reply to comment #2)
> Yes, we probably need to pick layout meta data from a directory where system
> administrators and packages can drop individual files into.
> 
> The problem here is that we need a minimum of meta data for each layout:
> 
> * short name - usually a 2 letter code like 'cs' to show in the top panel
> * description - a translatable name like 'Czech'
> 
> and we get this from the xkeyboard-config rules xml file[1]. That's why just
> dropping the layout definition into /usr/share/X11/xkb/symbols isn't enough for
> it to show up in GNOME.
> 
> [1] http://cgit.freedesktop.org/xkeyboard-config/tree/rules/base.xml.in

Right. I thought we had discussed the possibility of picking up an extra rules file, e.g. from ~/.config/xkb/rules/extra.xml
Comment 4 dhardy 2014-10-11 09:27:47 UTC
I thought /usr/share/X11/xkb/rules/base.xml was meant to list all this information?

Reading extra rules from the home directory would obviously be better, but I have amended the rules/base.xml file on my system and still don't get my custom layouts in the list.
Comment 5 Rui Matos 2014-10-13 11:36:40 UTC
Try editing /usr/share/X11/xkb/rules/evdev.xml
Comment 6 GNOME Infrastructure Team 2019-03-20 11:08:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/208.