Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YaST Firstboot does not store Keyboard Layout #33

Closed
vinyanalista opened this issue Jun 5, 2016 · 3 comments
Closed

YaST Firstboot does not store Keyboard Layout #33

vinyanalista opened this issue Jun 5, 2016 · 3 comments

Comments

@vinyanalista
Copy link

vinyanalista commented Jun 5, 2016

I decided to use YaST Firstboot to handle initial configuration of a KIWI appliance of mine, whose source code can be found at GitHub and downloadable ISO can be found at SourceForge.

While testing, it happened that the keyboard layout selected at the initial configuration (Portuguese Brazil) was not kept after getting to the desktop environment (KDE).

How to reproduce

Since we are talking about a Live media, the problem can always be reproduced. You may download the latest ISO I built (for reference, its name ends with 20160604.iso) and start it with a VirtualBox virtual machine set up with UEFI enabled.

YaST Firstboot shows up. At the Welcome screen, click Next.

At the Language screen, select Portuguese (Brazilian) - Português brasileiro, click Next (changing the language is not really necessary, I'm just describing what I did).

At the Configuração do Teclado do Sistema (how it shows for me) / System Keyboard Configuration (translation to English) screen, select Português (Brasil) / Portuguese (Brazil), type anything in Portuguese (e.g. acentuação, which is accentuation in Portuguese, note the special characters), the test succeeds. Then, click Avançar / Next.

At the Contrato de Licença / License Agreement screen, click Avançar / Next.

At the Relógio e Fuso Horário / Clock and Time Zone screen, click Avançar / Next.

YaST Firstboot saves those settings (at least it should) and KDE shows up.

Now, if I open KWrite and start typing, for instance, acentuação, strange characters show up instead: acentua;'ao.

What I found

I know YaST stores settings in the /etc/sysconfig folder. So, to watch it, I rebooted the virtual machine and, when YaST Firstboot showed up, I switched to tty2 (Host key + F2, to send Ctrl + Alt + F2 to the VM). Then, logged in as root, I made a backup of the /etc/sysconfig folder:

# cp -R /etc/sysconfig/ /etc/sysconfig_original/

I switched back to tty7 and followed the steps above.

Once in KDE, I started Kompare and compared the /etc/sysconfig folder with its backup.

I found that most of the settings were kept. But looking at the beginning of the /etc/sysconfig/keyboard file:

# Keyboard mapping
# (/usr/share/kbd/keymaps/)
# e.g. KEYTABLE="de-latin1-nodeadkeys", "us" or empty for US settings
#
KEYTABLE=""

I realized that the KEYTABLE variable was still empty in the newer version.

Also, looking at the end of that same file:

# 
# Compose tables to be loaded.
# Compose tables are good for producing characters, which can not
#  be directly input from your keyboard, such as characters with
#  accents, currency signs, ...
# Please read /usr/share/doc/packages/kbd/README.SuSE for an
#  explanation.
# You may leave this variable empty (default compose table from kernel 
#  or KEYTABLE will be used then -- most keyboard maps don't have a
#  compose table, though)
# More than one compose table can be given. For a selection of possible
#  tables see /usr/share/kbd/keymaps/include/compose.*
# You can give more than one compose table, but only the last one will
#  determine the compose combinations.
#  The word "clear" has a special meaning:
#  Your compose table will be cleared, before more compose symbols are
#  added.
# The files compose.winkeys and shiftctrl may be used to map the 
#  <compose> key to the W*n menu key and Shift-Ctrl, respectively,
#  on a PC keyboard.
# A typical setting for Latin1 users (with a PC keyboard) may be
#  COMPOSETABLE="clear winkeys shiftctrl latin1.add"
# For latin2, this would be
#  COMPOSETABLE="clear winkeys shiftctrl latin2"
# A typical setting for sb. with a character set, where a matching 
#  compose table is missing (but with a PC keyboard), would be
#  COMPOSETABLE="winkeys shiftctrl"
# 
COMPOSETABLE="clear winkeys shiftctrl latin1.add"

I realized the COMPOSETABLE variable was changed, and a new variable YAST_KEYBOARD was set:

COMPOSETABLE="clear latin1.add"

# The YaST-internal identifier of the attached keyboard.
#
YAST_KEYBOARD="portugese-br,pc104"

YaST also does not store keyboard layout

If I open YaST, Layout do teclado do sistema / System Keyboard Layout, it shows Português (Brasil) / Portuguese (Brazil) as the selected keyboard layout. Nonetheless, if I try to type acentuação in the Teste / Test field, the test fails.

Maybe the value of the YAST_KEYBOARD variable explains why YaST shows Português (Brasil) / Portuguese (Brazil) as the selected keyboard layout, even though it is not actually applied.

Curiously, if I select any other keyboard layout, then select Português (Brasil) / Portuguese (Brazil) back, the test succeeds. Then, if I click OK and leave YaST, typing anywhere shows me what I expect.

Even after that, looking back at the /etc/sysconfig/keyboard file, the KEYTABLE variable is still empty.

I installed openSUSE Leap 42.1 on my laptop a few months ago. Every time I boot it up with openSUSE, I need to change the keyboard layout as described above before actually using it.

So...

Is there a bug concerning YaST and the keyboard layout setting, or am I doing something wrong? Could you please analyze that? Thanks in advice!

And congratulations for the very good distro! I use openSUSE for 3 years now and I contribute to the project as I can!

@vinyanalista
Copy link
Author

Actually, right now the latest ISO is still being uploaded, sorry...

@vinyanalista
Copy link
Author

Upload finished! :D

@ancorgs
Copy link
Contributor

ancorgs commented Oct 14, 2016

Please see https://bugzilla.suse.com/show_bug.cgi?id=1003618

YaST2 Firstboot is storing the value correctly. Something is apparently wrong with "br" keymap in Kamarada. Not YaST2-Firstboot fault.

@ancorgs ancorgs closed this as completed Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants