#727 add Russian keyboard layout in X11
Closed 2 years ago by kevin. Opened 3 years ago by mx.
mx/fedora-kickstarts master  into  master

l10n/fedora-live-games-ru_RU.ks l10n/fedora-livecd-kde-ru_RU.ks
file renamed
+22 -3
@@ -1,9 +1,12 @@ 

- # fedora-livecd-kde-ru_RU.ks

+ # fedora-live-games-ru_RU.ks

+ #

+ # Description:

+ # - Russian Fedora Live Spin with the game Desktop Environment

  #

  # Maintainer(s):

  # - Sergey Mihailov <sergey.mihailov at gmail.com>

  

- %include ../fedora-livecd-kde.ks

+ %include ../fedora-live-games.ks

  

  lang ru_RU.UTF-8

  keyboard ru
@@ -11,9 +14,25 @@ 

  

  %packages

  langpacks-ru

- hunspell-ru

  

  # exclude input methods

  -m17n*

  -scim*

+ -iok

+ %end

+ 

+ %post

+ # add keyboard layout in X11

+ cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"

+ # Written by systemd-localed(8), read by systemd-localed and Xorg. It's

+ # probably wise not to edit this file manually. Use localectl(1) to

+ # instruct systemd-localed to update it.

+ Section "InputClass"

+         Identifier "system-keyboard"

+         MatchIsKeyboard "on"

+         Option "XkbLayout" "us,ru"

+         Option "XkbVariant" ","

+         Option "XkbOptions" "grp:alt_shift_toggle"

+ EndSection

+ EOF

  %end

@@ -0,0 +1,38 @@ 

+ # fedora-live-kde-ru_RU.ks

+ #

+ # Description:

+ # - Russian Fedora Live Spin with the K Desktop Environment (KDE), default 1.4 GB version

+ #

+ # Maintainer(s):

+ # - Sergey Mihailov <sergey.mihailov at gmail.com>

+ 

+ %include ../fedora-live-kde.ks

+ 

+ lang ru_RU.UTF-8

+ keyboard ru

+ timezone Europe/Moscow

+ 

+ %packages

+ langpacks-ru

+ 

+ # exclude input methods

+ -m17n*

+ -scim*

+ -iok

+ %end

+ 

+ %post

+ # add keyboard layout in X11

+ cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"

+ # Written by systemd-localed(8), read by systemd-localed and Xorg. It's

+ # probably wise not to edit this file manually. Use localectl(1) to

+ # instruct systemd-localed to update it.

+ Section "InputClass"

+         Identifier "system-keyboard"

+         MatchIsKeyboard "on"

+         Option "XkbLayout" "us,ru"

+         Option "XkbVariant" ","

+         Option "XkbOptions" "grp:alt_shift_toggle"

+ EndSection

+ EOF

+ %end

l10n/fedora-live-lxde-ru_RU.ks l10n/fedora-livecd-lxde-ru_RU.ks
file renamed
+20 -4
@@ -1,12 +1,12 @@ 

- # fedora-livecd-lxde-ru_RU.ks

+ # fedora-live-lxde-ru_RU.ks

  #

  # Description:

- # - German Fedora Live Spin with the light-weight LXDE Desktop Environment

+ # - Russian Fedora Live Spin with the light-weight LXDE Desktop Environment

  #

  # Maintainer(s):

  # - Sergey Mihailov <sergey.mihailov at gmail.com>

  

- %include ../fedora-livecd-lxde.ks

+ %include ../fedora-live-lxde.ks

  

  lang ru_RU.UTF-8

  keyboard ru
@@ -14,10 +14,26 @@ 

  

  %packages

  langpacks-ru

- hunspell-ru

  

  # exclude input methods

  -ibus*

  -m17n*

  -scim*

+ -iok

+ %end

+ 

+ %post

+ # add keyboard layout in X11

+ cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"

+ # Written by systemd-localed(8), read by systemd-localed and Xorg. It's

+ # probably wise not to edit this file manually. Use localectl(1) to

+ # instruct systemd-localed to update it.

+ Section "InputClass"

+         Identifier "system-keyboard"

+         MatchIsKeyboard "on"

+         Option "XkbLayout" "us,ru"

+         Option "XkbVariant" ","

+         Option "XkbOptions" "grp:alt_shift_toggle"

+ EndSection

+ EOF

  %end

@@ -1,7 +1,10 @@ 

  # fedora-live-workstation-ru_RU.ks

  #

+ # Description:                                                                  

+ # - Russian Fedora Live Spin with the Gnome Desktop Environment

+ #

  # Maintainer(s):

- # Sergey Mihailov <sergey.mihailov at gmail.com>

+ # - Sergey Mihailov <sergey.mihailov at gmail.com>

  

  %include ../fedora-live-workstation.ks

  
@@ -11,9 +14,25 @@ 

  

  %packages

  langpacks-ru

- hunspell-ru

  

  # exclude input methods

  -m17n*

  -scim*

+ -iok

+ %end

+ 

+ %post

+ # add keyboard layout in X11

+ cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"

+ # Written by systemd-localed(8), read by systemd-localed and Xorg. It's

+ # probably wise not to edit this file manually. Use localectl(1) to

+ # instruct systemd-localed to update it.

+ Section "InputClass"

+         Identifier "system-keyboard"

+         MatchIsKeyboard "on"

+         Option "XkbLayout" "us,ru"

+         Option "XkbVariant" ","

+         Option "XkbOptions" "grp:alt_shift_toggle"

+ EndSection

+ EOF

  %end

l10n/fedora-live-xfce-ru_RU.ks l10n/fedora-livecd-xfce-ru_RU.ks
file renamed
+21 -2
@@ -1,4 +1,7 @@ 

- # fedora-livecd-xfce-ru_RU.ks

+ # fedora-live-xfce-ru_RU.ks

+ #

+ # Description:

+ # - Russian Fedora Live Spin with the Xfce Desktop Environment

  #

  # Maintainer(s):

  # - Sergey Mihailov <sergey.mihailov at gmail.com>
@@ -11,9 +14,25 @@ 

  

  %packages

  langpacks-ru

- hunspell-ru

  

  # exclude input methods

  -m17n*

  -scim*

+ -iok

+ %end

+ 

+ %post

+ # add keyboard layout in X11

+ cat > /etc/X11/xorg.conf.d/00-keyboard.conf << "EOF"

+ # Written by systemd-localed(8), read by systemd-localed and Xorg. It's

+ # probably wise not to edit this file manually. Use localectl(1) to

+ # instruct systemd-localed to update it.

+ Section "InputClass"

+         Identifier "system-keyboard"

+         MatchIsKeyboard "on"

+         Option "XkbLayout" "us,ru"

+         Option "XkbVariant" ","

+         Option "XkbOptions" "grp:alt_shift_toggle"

+ EndSection

+ EOF

  %end

@@ -1,19 +0,0 @@ 

- # fedora-livecd-electronic-lab-ru_RU.ks

- #

- # Maintainer(s):

- # - Sergey Mihailov <sergey.mihailov at gmail.com>

- 

- %include ../fedora-livedvd-electronic-lab.ks

- 

- lang ru_RU.UTF-8

- keyboard ru

- timezone Europe/Moscow

- 

- %packages

- langpacks-ru

- hunspell-ru

- 

- # exclude input methods

- -m17n*

- -scim*

- %end

@@ -1,19 +0,0 @@ 

- # fedora-livedvd-games-ru_RU.ks

- #

- # Maintainer(s):

- # - Sergey Mihailov <sergey.mihailov at gmail.com>

- 

- %include ../fedora-livedvd-games.ks

- 

- lang ru_RU.UTF-8

- keyboard ru

- timezone Europe/Moscow

- 

- %packages

- langpacks-ru

- hunspell-ru

- 

- # exclude input methods

- -m17n*

- -scim*

- %end

add Russian keyboard layout in X11

@adamwill Can you confirm this keyboard layout bit is needed here? Or perhaps @whot could look?

No, this doesn't really make sense to me. First, this is only configuring X here, not Wayland which is the default session (on workstation anyway).

Second, this configuration will/should be immediately overwritten once you log into the desktop environment. That's the case with GNOME anyway, it'll overwrite the layout with whatever you've configured in gsettings.

That gsettings value (and whatever the other DEs use) will cater for a Wayland session as well.

That aside, manually writing a file with a comment

# Written by systemd-localed(8), ....

is not ideal :)

First of all :
A person may choose a different wayland when entering.

Second :
https://pagure.io/fedora-kickstarts/blob/master/f/l10n/fedora-live-workstation-ja_JP.ks
and see other language exclude engl.

Third : The person may choose a different wayland:
It would be correct to choose localectl, but this can be run without D-Bus when building live and it does not work !

In the fourth:
I don't insist that people use it and can't switch the keyboard, it's their choice.
But then I ask you to remove my mail and name from these files, because I can't let it be with an error !

cat > /etc/X11/xorg.conf.d/00-keyboard.conf

Such ugly hack should not be merged. xorg.conf is deprecated and must not be used in production.

Please rework your PR to use the keyboard setting. Something like this:

keyboard --xlayouts=us,ru --switch=grp:alt_shift_toggle ru

I remover section : %post from ks.
change line keyboard ru
to : keyboard --xlayouts=us,ru --switch=grp:alt_shift_toggle ru
Create new LIVE-CD and start its. NO CHANGE KEYBOARD !

It's not for nothing that files in other languages don't use it.
What other offers will be ?

@whot

Written by systemd-localed(8), ....

is not ideal :)

I load from live cd and run cmd: localectl set-x11-keymap us,ru '' , grp:alt_shift_toggle
its commad create file : /etc/X11/xorg.conf.d/00-keyboard.conf
i copy its file in KS, since the localctl command does not work when creating a Live-CD.

@whot Just tested - in current state keyboard statement is broken and cannot create /etc/X11/xorg.conf.d/00-keyboard.conf file on the Live CD.
I've created new bug: https://bugzilla.redhat.com/show_bug.cgi?id=1899524.

Pull-Request has been closed by kevin

2 years ago