How to fix a keyboard indicator (in GNOME 3.8)

Recently and occasionally I have discovered a tiny issue, which I was forced to observe, every time I was looking at my desktop. This has happen after I have decided to add a keyboard layout for russian language, which was based on german phonetics. So this is what I ended with:

Quickly I have got slightly frustrated, because I started to mix up things a little bit, so I started to look at gnome’s source code, especially searching for a xml database in gnome-control-center and gnome-desktop, and gave up it this idea, as I was not able to find anything particular useful and started to ask around in the IRC channels. Lucky, as people sometimes say that any initiative can be hardly punished, I have got a response from Rui Matos, one of the GNOME developers working on gnome-desktop. He pointed me out to the right direction:

rtcm, I mean, how this names “de1” and “de2” or “ru” are generated, where can I find the corresponding code?
ibqn: the code is in the gnome-desktop module, but it’s just simply getting what’s defined in xkeyboard-config’s data, see
rtcm, so why is it called “de2” and not “ru” instead? looks like a bug
ibqn: those labels are the elements, if you believe that specific layout should have ‘ru’ as its short description, file a bug (preferably with a patch) in freedesktop’s bugzilla
rtcm, thank you for making it clear to me.
ibqn: no prob, I hope I helped 🙂

The following procedure was almost straightforward, I simply cloned their git repository, modified the corresponding file, I believe should be right, committed it locally and finally created a trivial one liner patch:

From 2cbb166e05eae603a2e640eeb3558942a89ecd7e Mon Sep 17 00:00:00 2001
From: Evgeny Bobkin <>
Date: Thu, 16 May 2013 14:15:26 +0200
Subject: [PATCH] Fix keyboard indicator for russian (germany, phonetic)

 rules/ | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/ b/rules/
index 5996738..2735723 100644
--- a/rules/
+++ b/rules/
@@ -3223,6 +3223,8 @@
+            <!-- Keyboard indicator for Russian layouts -->
+            <_shortDescription>ru</_shortDescription>
             <_description>Russian (Germany, phonetic)</_description>

As a gentoo user I also have the ability to test every particular package and change its source code without risking or being afraid of irreparably breaking my system, because, due to this modifications, all broken libraries can be easily tracked down and fixed by recreating their reverse dependencies (with revdep-rebuild for example). Therefore I have copied the xkeyboard-config ebuild to my local overlay and included the created patch to it, so I was able to test it and thus fixed the issue. Afterwards, I have filed a bug report and shortly this patch was included upstream. One more success story.

So, what can you do if you have no ability to apply the patch or use the latest version, or even if you want to fix the similar issue locally on your computer? There is also an easy way: you should try to modify the base.xml file accordingly, probably located here:

$ vim /usr/share/X11/xkb/rules/base.xml

And in the case of a new issue, please also open a bug report (with an attached patch to it), so that other people can also profit from your work done.

PS: By the way my stand alone research was not that vain as I have described above, I finally found after years of looking for it, the source code of the Cyrillic (Transliterated) input method plugin, you observe every time when you right-click the mouse pointing on the text field (or entry box), followed by selecting the bottom menu item “Input Methods”


4 thoughts on “How to fix a keyboard indicator (in GNOME 3.8)

    • можно)) я же написал в конце что достаточно отредактировать /usr/share/X11/xkb/rules/base.xml ты наверно просто не дочитал до конца)))

  1. А, да, не заметил 🙂
    Прочитал пост подробнее, все-таки у меня другая проблема, что индикаторы вообще не показываются.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s