📜 ⬆️ ⬇️

Again about the layout of Birman, and the switching of layouts in general in the coming 8.10

Disclaimer


Everything described below applies to Ubuntu 8.10 (interpid), although it is likely to affect future stable versions.

Pay attention that some of the steps described below can lead to unpredictable :) consequences.

Prehistory


Some time ago, o4kapuk described in the article And again about the layout of Birman how to “get support for the“ typographic ”functionality by means as close as possible to the standard ones.”
')
For me, both at home and at work, this decision led to the following problems:
  1. After the reboot, the layout did not switch. This problem each time had to be solved by calling the configuration applet and changing some parameter in the “Additional parameters”.
  2. After some updates, the layout broke down completely. I had to reinstall the necessary files
  3. After updating to 8.10, the method stopped working completely.


Who is to blame and what to do?


Step 1

To begin with, since some time the winkeys version has become the “default option” in the file
/ etc / X11 / xkb is not mentioned in the layout. In spite of this, let us repeat the third step from the article mentioned: add the variant winkeys_typo:

       <layout>
       <configItem>
         <name> ru </ name>
         <shortDescription> Rus </ shortDescription>
         <description> Russia </ description>
       </ configItem>
       <variantList>
         <variant>
           <configItem>
             <name> winkeys_typo </ name>
             <description> Winkeys + Typography </ description>
           </ configItem>
         </ variant>
         <variant>


Step 2

And here we are in for a surprise: now the / etc / X11 / xkb / symbols / ru file is not the most suitable place to add the winkeys_typo variant. Open the file / usr / share / X11 / xkb / symbols / ru and add the already familiar code:
 partial alphanumeric_keys
 xkb_symbols "winkeys_typo" {
 include "ru (winkeys)"

 name [Group1] = "Russia - Typography";

 key.type [group1] = "FOUR_LEVEL";

 key <TLDE> {[Cyrillic_io, Cyrillic_YO, acute, approxeq]};
 key <AE01> {[1, exclam, onesuperior, onesuperior]};
 key <AE02> {[2, quotedbl, twosuperior, twosuperior]};
 key <AE03> {[3, numerosign, threesuperior, threesuperior]};
 key <AE04> {[4, semicolon, section, section]};
 key <AE05> {[5, percent, 0x01002030, 0x01002030]};
 key <AE11> {[minus, underscore, emdash, hyphen]};
 key <AE12> {[equal, plus, notequal, plusminus]};
 key <AD01> {[Cyrillic_shorti, Cyrillic_SHORTI, q, onequarter]};
 key <AD03> {[Cyrillic_u, Cyrillic_U, EuroSign, oneeighth]};
 key <AD04> {[Cyrillic_ka, Cyrillic_KA, registered, R]};
 key <AD05> {[Cyrillic_ie, Cyrillic_IE, trademark, onethird]};
 key <AD09> {[Cyrillic_shcha, Cyrillic_SHCHA, masculine, O]};
 key <AC01> {[Cyrillic_ef, Cyrillic_EF, approxeq, A]};
 key <AC02> {[Cyrillic_yeru, Cyrillic_YERU, section, S]};
 key <AC03> {[Cyrillic_ve, Cyrillic_VE, degree, D]};
 key <AC04> {[Cyrillic_a, Cyrillic_A, sterling, F]};
 key <AC06> {[Cyrillic_er, Cyrillic_ER, h, onehalf]};
 key <AC07> {[Cyrillic_o, Cyrillic_O, doublelowquotemark, J]};
 key <AC08> {[Cyrillic_el, Cyrillic_EL, left double dupotemark, lefts single quotemark]};
 key <AC09> {[Cyrillic_de, Cyrillic_DE, right double dupotemark, rights singlequotemark]};
 key <AC10> {[Cyrillic_zhe, Cyrillic_ZHE, leftsinglequotemark, seconds]};
 key <AC11> {[Cyrillic_e, Cyrillic_E, rightsinglequotemark, minutes]};
 key <AB02> {[Cyrillic_che, Cyrillic_CHE, multiply, 0x010022C5]};
 key <AB03> {[Cyrillic_es, Cyrillic_ES, copyright, copyright]};
 key <AB08> {[Cyrillic_be, Cyrillic_BE, guillemotleft, doublelowquotemark]};
 key <AB09> {[Cyrillic_yu, Cyrillic_YU, guillemotright, rightdoublequotemark]};
 key <AB10> {[period, comma, ellipsis, comma]};
 key <SPCE> {[space, space, nobreakspace, nobreakspace]};

 include "level3 (ralt_switch)"
 };

Step 3

The layout appeared in the list and it all worked? Well, you were lucky ... but I was not very lucky: there were no layouts on the list.
In search of a solution, I stumbled upon such a discussion .
Having tried different options, I stopped at the following:

Step 3.1

Edit the / etc / default / console-setup file:

 XKBMODEL = "logimel"
 XKBLAYOUT = "us, ru"
 XKBVARIANT = ", winkeys_typo"


Pay attention to XKBMODEL = "logimel" - this is a model of your keyboard, some additional keys did not work for me until I stopped at this one. By the way, it is possible to understand which one you have; the file /usr/share/X11/xkb/rules/base.lst will help you.

Step 3.2

sudo dpkg-reconfigure console-setup :)
Here you can simply press enter, but if it doesn’t click - press tab first :)
As a result, get a bunch of messages like "WARNING: Undefined kernel key code for xxx" - do not pay attention. At the end there should be a message “[OK] update-initramfs: Generating /boot/initrd.img-2.6.27-3-generic”

Step 4

And now let's solve the old problem of switching failures upon reboot - for this, let's clear the gnome's keyboard configuration file: sudo gedit ~ / .gconf / desktop / gnome / peripherals / keyboard / kbd /% gconf.xml -> ctrl + a -> ctrl + s: )

Step 5

Yes, no matter how awful it sounds - we reboot and everything should work. If not ... check everything again.

Conclusion and sentence



The disadvantages of this method, like the previous one, are problems with compatibility with future versions of ubuntu, but it is better to spend an hour or two to solve these problems and get a perfectly working typographic layout than to watch what Habr did with quotes here.

On the other hand, why not include this option in the basic delivery? This I appeal to developers who will not be difficult to make changes to the distribution.

Source: https://habr.com/ru/post/40543/


All Articles