1

I'm using Ubuntu MATE 14.04 LTS, 16.04 LTS and 18.04 LTS.

I want to change current keyboard layout indication from text (for example ru, en) to the corresponding country flags.

How can I do this?

3

On Ubuntu MATE 18.04 LTS you need to send one command:

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

it will change MATE Panel appearance from

ru in mate-panel

to

russian flag in mate-panel


On Ubuntu 16.04 LTS having MATE 1.12 this method does not work out-the-box (it is bug 1783543), but we have two options here:

  • download flags manually and place them in home folder:

    mkdir -p ~/.icons/flags
    cd ~/.icons/flags/
    wget https://raw.githubusercontent.com/linuxmint/flags/master/usr/share/iso-flag-png/{ru,us}.png
    

    then toggle layout indicator state:

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

    and we will get flags in place. Note: I used ru and us, you can pick others from LinuxMint GitHub repository.

  • use newer MATE 1.16 from official xenial-mate PPA:

    sudo apt-add-repository ppa:ubuntu-mate-dev/xenial-mate
    sudo apt update
    sudo apt full-upgrade
    

    then enable flags

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

    and we can get flags in place after reboot and login.


On Ubuntu 14.04 LTS we need to download flags manually (as in 16.04 LTS):

mkdir -p ~/.icons/flags
cd ~/.icons/flags/
wget https://raw.githubusercontent.com/linuxmint/flags/master/usr/share/iso-flag-png/{ru,us}.png

then toggle layout indicator state:

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

and we will get flags in place.

  • can we do the same thing with a standard Ubuntu (using gnome)? NB: you lost connection after appearance change – damadam Jul 25 '18 at 13:51
  • The solution above does not fail on theme appearance change. It may fail if somebody miss flag for new language :) About GNOME currently we have solution for Unity (runs indicator-keyboard) and GNOME FlashBack (using gnome-panel with indicator-keyboard) on Ubuntu 14.04 LTS and 16.04 LTS. – N0rbert Jul 25 '18 at 17:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.