Adding Russian Phonetic YaZhert Keyboard to Linux

UPDATE: Upgrade to Linux Mint Cinnamon Version 19 broke this layout; it has to be added again. This custom configuration also seems to be reset with every update of some package...

In Linux Mint V19, keyboard layout names have changed slightly. You can start with ЯВЕРТЫ layouts offered by layouts "Russian (phonetic, with Win keys)" or "Russian (US, phonetic)".

UPDATE: FOR VERSION 19 OF MINT, YOU MUST INSTEAD ADD UNDER EVDEV.XML ENTRY FOR "Russian (phonetic, with Win keys)", OTHERWISE YOU WILL GET ERROR "Error activating XKB configuration. There can be various reasons for that"!!!

Confused? Here is the end result for Linux Mint V19 [DOWNLOAD ZIP].

 

UPDATE 2: Linux Mint Cinnamon v20.2 seems to now include "Russian (phonetic yazherty)" as an available option (you merely need to search for that layout and add it)! Great! I have not ensured full 1:1 exact inter-compatibility, but it seems same. Anyways, these instructions are still functional if you want to customize any and all key assignments, if anything is not for your liking!

============================================

The following is a procedure that worked for me for Linux Kernel: 3.16.0-38-generic x86_64 (64 bit), Desktop: Xfce 4.12.2, Distro: Linux Mint 17.2 Rafaela. It also worked on Linux Mint 17.2 Cinnamon.

It appears that with different versions / upgrades of Linux, files that need to be modified change routinely. Keep this in mind before trying to blame me of things not working!

The purpose of this article is to install Russian Phonetic Keyboard with the YaZhert (Яжерты) layout. Reference http://winrus.com/keyboard.htm

YaZHert Russian Phonetic Keyboard

Website referenced above is all that is needed to install the keyboard on Windows. On Linux, three files have to be modified by hand to achieve this layout.

First, we will enable the YaWert keyboard layout in Linux, which is simple.

Go to (System) Settings > Keyboard > Layout. Uncheck "Use system defaults" if it is checked. Now click the Add button. In the Keyboard layout selection window, navigate to Russian > Russian (phonetic WinKeys). Select it and click OK.

All that is left now is to specify the "Change layout option" and set the order of the languages (one on top of the list is default layout for the system).

 

Windows has a useful keyboard layout switches in the task bar. Linux may or may not come with one by default. In the case of Xfce, I had to first install the xfce4-xkb-plugin (In Mint, use the Software Manager). Then, right click on the Panel ("task bar"), Panel > Add New Buttons...

Search for Keyboard Layouts or similar, and Keyboard Layouts selection will appear. Add that to your task bar, and you can switch layout with your keyboard shortcut you specified prior, or with your mouse from GUI.

In the case of Cinnamon, a layout switcher appears automatically on the task bar. 

 

We have now succeeded in adding the YaWert (яВерт) layout. If it is YaZhert (Яжерты) that you are used to, you need to follow the rest of the article, and it should be clear and work for you.

Other people's articles on the Internet on how to modifications and tweaks to the Linux system are rarely geared to an inexperienced (newbie) Linux user, and are therefore rarely stand-alone and complete. I will have to mention any pre-requisite knowledge as needed.

Modifications to three system files would have to be done. This requires you to be able to work as Super User. A convenient (but some will claim as dangerous) way to do this is to create a Launcher ("command shortcut"). Right click on desktop, and select Create Launcher.

For Name, specify something like "File Manager as sudo"

For Command, specify "sudo nemo" or "gksudo thunar" or whatever else is appropriate for your distribution flavor...

For Working Directory, specify "/usr/share/X11/xkb/"

You should also give your Launcher an Icon.

The first time you double-click your Launcher you will get a prompt "Untrusted application launcher ...". Click Mark Executable. Then you will need to enter a sudo user passowrd every time Launcher launches.

Alternatively, from a command prompt you can type in "gksudo gedit" or "gksudo xed", or another name depending on what textual editor you have installed. After entering a sudo password, a text editor will appear, and you can select File>Open, edit system files, and be able to save into system locations below.

In the directory that opens (or navigate to /usr/share/X11/xkb/), you first want to make a backup of folders (directories) "symbols" and "rules". You can do this with GUI methods (copy and paste).

Now open "symbols". We will be modifying the "ru" file. You may want to make another backup of just this file.

If you have opened the file navigator thru a launcher, open the file (double-click). It should open in editor such as gedit or xed.

If you launched gedit/xed as gksudo, then use File>Open and navigate to files shown below.

Find line "Russian (phonetic WinKeys)" or "Russian (phonetic, with Win keys)". If you want to make your own layout based on an existing one, you will copy and modify existing code. UPDATE: For Linux Mint V19+ and other distributions, use "Russian (phonetic, with Win keys)" instead, as the entry in previous sentence is no longer available!

Add the following block of code below that block:

// YaZHert Russian Phonetic Keyboard Layout
// based on Russian standard keyboard and http://winrus.com
// Michael LoneWolf http://www.MKRD.info/
// Last Modified 13 Oct 2016 by Michael LoneWolf http://www.MKRD.info/
partial alphanumeric_keys
xkb_symbols "phonetic_RussianYaZHert" {

    include "ru(phonetic)"
    name[Group1]= "Russian (phonetic YaZHert)";

    //Needed to modify zhe, ve, lowercase yo, uppercase yo, lowercase hard sign, uppercase hard sign

    key    <LatX> {    [     Cyrillic_ha,     Cyrillic_HA    ]    };
    key    <LatH> {    [     Cyrillic_che,     Cyrillic_CHE    ]    };
    key    <AE12> {    [ Cyrillic_softsign, Cyrillic_softsign  ]    };
    key    <LatW> {    [    Cyrillic_zhe,    Cyrillic_ZHE    ]    };
    key    <LatV> {    [     Cyrillic_ve,     Cyrillic_VE    ]    };
    key    <AE06> {    [        6,     Cyrillic_io     ]    };
    key    <AE07> {    [        7,     Cyrillic_IO    ]    };
    key    <AE02> {    [        2, Cyrillic_hardsign       ]    };
    key    <AE03> {    [        3, Cyrillic_HARDSIGN    ]    };

};

 

Save and exit from the file.

We now need to modify two more files to propagate this change. We are going UP the file structure and into the rules folder (directory). There, we need to modify files "evdev.lst" and "evdev.xml". With the most recent version of Linux as shown in the beginning of the article DO NOT modify files "xfree86.lst", "xfree86.xml" or other as THIS WILL NOT CAUSE ANY CHANGES.

 

Find line in "evdev.lst" that says "Russian (phonetic WinKeys)" or "Russian (phonetic, with Win keys)". On the next line, add something like this (without the quotes):

"  phonetic_RussianYaZHert ru: Russian (phonetic YaZHert)"

Save and exit. UPDATE: FOR VERSION 19 OF MINT, YOU MUST INSTEAD ADD UNDER ENTRY FOR "Russian (phonetic, with Win keys)", OTHERWISE YOU WILL GET ERRORS!!!

 

Find block of code in "evdev.xml" that says

<description>Russian (phonetic WinKeys)</description>

UPDATE: FOR VERSION 19 OF MINT, YOU MUST INSTEAD ADD UNDER ENTRY FOR "Russian (phonetic, with Win keys)", OTHERWISE YOU WILL GET ERRORS!!!

Right below that code block, add this code block:

    <variant>
          <configItem>
            <name>phonetic_RussianYaZHert</name>
            <description>Russian (phonetic YaZHert)</description>
          </configItem>
        </variant>

 

Save and exit.

Close the File Manager window and/or gedit/xed because you are logged in as sudo and can cause damage to your system.

You should now be able to add this new language profile as described in the beginning of the article via Keyboard Layouts addition window!

 

 

Further Reading (most are good for technical details, but some details are mis-leading like I complained in the beginning):

http://www.dotkam.com/2007/06/25/custom-keyboard-layout-in-ubuntu-or-just-linux-2/

http://people.uleth.ca/~daniel.odonnell/Blog/custom-keyboard-in-linuxx11

http://askubuntu.com/questions/510024/what-are-the-steps-needed-to-create-new-keyboard-layout-on-ubuntu

http://ubuntuforums.org/showthread.php?t=944540

http://ubuntuforums.org/showthread.php?t=188761

http://michal.kosmulski.org/computing/articles/custom-keyboard-layouts-xkb.html

https://www.linux.com/news/creating-custom-keyboard-layouts-x11-using-xkb

https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions?action=show&redirect=Howto%3A+Custom+keyboard+layout+definitions

 



˅˅˅ Additional valuable information is available at one of the links below: ˅˅˅

 

Did you like the article? Let Google Search know by clicking this button: . Please link to content that you find useful on this website on your own website, forum or blog! You can also comment on this page below, or to ask a question or suggest a topic for me to research. There is a user-editable Wiki available on my website, as well as a Forum that you can contribute to. Site Map.

Page last modified 12-Jan-22 17:17:31 EST
Comments on this page: