Enabling the " Keyboard Layout " indicator with country flags



So as the name says I will tell you how to switch to the flag version of the keyboard layout indicator.

At first you will need png images for the flags . Download the flags for your layouts .
Open gimp and rescale them to 26x10 (width x height). Rename them to your layout language
like for US layout rename the image as “us.png” , for Russian rename to ru.png and etc.
Then put them in ~/.icons/flags .
After that install dconf-editor (if not installed). Open dconf-editor and go to
org/mate/desktop/peripherals/keyboard/indicator and check the “show-flags” option .


This is brilliant and much needed!

Which is this not integrated into the MATE desktop by default?


Well it is :smiley: . The option is just not included in the keyboard preferences , for a unknown reason . Maybe 'couse most of the icon themes don’t have country flags in them .The function dates back to gnome 2.X as I remember and gnome-flashback has it too .


Well, shouldn’t the distribution provide those flags?

It’s not very user-friendly to expect them to manually add their flag icons somewhere. Don’t you think? :slight_smile:

And once I add the flags, how do I start the keyboard indicator?


Well it’s not the distribution thing to provide these flags . It’s the developers .

Thats the esiest way . The flags are a feature of default tray indicator.


Who is the developer in this case?

Let’s get in touch with them! :slight_smile:


Simply as https://github.com/mate-desktop/libmatekbd . The Mate desktop team .


Cool, thanks!

As far as I can see they are already working on this?


To set this from terminal on Ubuntu MATE 18.04 LTS we need one simple command

gsettings set org.mate.peripherals-keyboard-xkb.indicator show-flags true

Also posted this solution on AskUbuntu for better visibility :slight_smile:

But it does not work on Ubuntu MATE 16.04 LTS out-the-box. It shows GTK_STOCK_STOP icon ().
I reported bug 1783543 to launchpad. Copying flags to ~/.icons/flags or upgrading to MATE 1.16 from xenial-mate PPA solves the problem.