{"action":"created","issue":{"url":"https://api.github.com/repos/yast/yast-firstboot/issues/33","repository_url":"https://api.github.com/repos/yast/yast-firstboot","labels_url":"https://api.github.com/repos/yast/yast-firstboot/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/yast/yast-firstboot/issues/33/comments","events_url":"https://api.github.com/repos/yast/yast-firstboot/issues/33/events","html_url":"https://github.com/yast/yast-firstboot/issues/33","id":158533615,"number":33,"title":"YaST Firstboot does not store Keyboard Layout","user":{"login":"vinyanalista","id":1576506,"avatar_url":"https://avatars.githubusercontent.com/u/1576506?v=3","gravatar_id":"","url":"https://api.github.com/users/vinyanalista","html_url":"https://github.com/vinyanalista","followers_url":"https://api.github.com/users/vinyanalista/followers","following_url":"https://api.github.com/users/vinyanalista/following{/other_user}","gists_url":"https://api.github.com/users/vinyanalista/gists{/gist_id}","starred_url":"https://api.github.com/users/vinyanalista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinyanalista/subscriptions","organizations_url":"https://api.github.com/users/vinyanalista/orgs","repos_url":"https://api.github.com/users/vinyanalista/repos","events_url":"https://api.github.com/users/vinyanalista/events{/privacy}","received_events_url":"https://api.github.com/users/vinyanalista/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-05T02:12:23Z","updated_at":"2016-06-05T04:13:25Z","closed_at":null,"body":"I decided to use YaST Firstboot to handle initial configuration of a KIWI appliance of mine, whose source code can be found at [GitHub](https://github.com/kamarada/kiwi-config-Kamarada/commit/9adf8c7c0bedf378a6b9d55c6372359de413c743) and downloadable ISO can be found at [SourceForge](https://sourceforge.net/projects/kamarada/).\r\n\r\nWhile testing, it happened that the keyboard layout selected at the initial configuration (Portuguese Brazil) was not kept after getting to the desktop environment (KDE).\r\n\r\n# How to reproduce\r\n\r\nSince we are talking about a Live media, the problem can always be reproduced. You may [download the latest ISO](https://sourceforge.net/projects/kamarada/files/latest/download) I built (for reference, its name ends with **20160604.iso**) and start it with a VirtualBox virtual machine set up with UEFI enabled.\r\n\r\nYaST Firstboot shows up. At the **Welcome** screen, click **Next**.\r\n\r\nAt 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).\r\n\r\nAt 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**.\r\n\r\nAt the *Contrato de Licença* / **License Agreement** screen, click *Avançar* / **Next**.\r\n\r\nAt the *Relógio e Fuso Horário* / **Clock and Time Zone** screen, click *Avançar* / **Next**.\r\n\r\nYaST Firstboot saves those settings (at least it should) and KDE shows up.\r\n\r\nNow, if I open **KWrite** and start typing, for instance, `acentuação`, strange characters show up instead: `acentua;'ao`.\r\n\r\n# What I found\r\n\r\nI 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:\r\n\r\n```\r\n# cp -R /etc/sysconfig/ /etc/sysconfig_original/\r\n```\r\n\r\nI switched back to tty7 and followed the steps above.\r\n\r\nOnce in KDE, I started **Kompare** and compared the `/etc/sysconfig` folder with its backup.\r\n\r\nI found that most of the settings were kept. But looking at the beginning of the `/etc/sysconfig/keyboard` file:\r\n\r\n```\r\n# Keyboard mapping\r\n# (/usr/share/kbd/keymaps/)\r\n# e.g. KEYTABLE=\"de-latin1-nodeadkeys\", \"us\" or empty for US settings\r\n#\r\nKEYTABLE=\"\"\r\n```\r\n\r\nI realized that the `KEYTABLE` variable was still empty in the newer version.\r\n\r\nAlso, looking at the end of that same file:\r\n\r\n```\r\n# \r\n# Compose tables to be loaded.\r\n# Compose tables are good for producing characters, which can not\r\n#  be directly input from your keyboard, such as characters with\r\n#  accents, currency signs, ...\r\n# Please read /usr/share/doc/packages/kbd/README.SuSE for an\r\n#  explanation.\r\n# You may leave this variable empty (default compose table from kernel \r\n#  or KEYTABLE will be used then -- most keyboard maps don't have a\r\n#  compose table, though)\r\n# More than one compose table can be given. For a selection of possible\r\n#  tables see /usr/share/kbd/keymaps/include/compose.*\r\n# You can give more than one compose table, but only the last one will\r\n#  determine the compose combinations.\r\n#  The word \"clear\" has a special meaning:\r\n#  Your compose table will be cleared, before more compose symbols are\r\n#  added.\r\n# The files compose.winkeys and shiftctrl may be used to map the \r\n#  <compose> key to the W*n menu key and Shift-Ctrl, respectively,\r\n#  on a PC keyboard.\r\n# A typical setting for Latin1 users (with a PC keyboard) may be\r\n#  COMPOSETABLE=\"clear winkeys shiftctrl latin1.add\"\r\n# For latin2, this would be\r\n#  COMPOSETABLE=\"clear winkeys shiftctrl latin2\"\r\n# A typical setting for sb. with a character set, where a matching \r\n#  compose table is missing (but with a PC keyboard), would be\r\n#  COMPOSETABLE=\"winkeys shiftctrl\"\r\n# \r\nCOMPOSETABLE=\"clear winkeys shiftctrl latin1.add\"\r\n```\r\n\r\nI realized the `COMPOSETABLE` variable was changed, and a new variable `YAST_KEYBOARD` was set:\r\n\r\n```\r\nCOMPOSETABLE=\"clear latin1.add\"\r\n\r\n# The YaST-internal identifier of the attached keyboard.\r\n#\r\nYAST_KEYBOARD=\"portugese-br,pc104\"\r\n```\r\n\r\n# YaST also does not store keyboard layout\r\n\r\nIf 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.\r\n\r\nMaybe 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.\r\n\r\nCuriously, 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.\r\n\r\nEven after that, looking back at the `/etc/sysconfig/keyboard` file, the `KEYTABLE` variable is still empty.\r\n\r\nI 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.\r\n\r\n# So...\r\n\r\nIs there a bug concerning YaST and the keyboard layout setting, or am I doing something wrong? Could you please analyze that? Thanks in advice!\r\n\r\nAnd congratulations for the very good distro! I use openSUSE for 3 years now and I contribute to the project as I can!"},"comment":{"url":"https://api.github.com/repos/yast/yast-firstboot/issues/comments/223792154","html_url":"https://github.com/yast/yast-firstboot/issues/33#issuecomment-223792154","issue_url":"https://api.github.com/repos/yast/yast-firstboot/issues/33","id":223792154,"user":{"login":"vinyanalista","id":1576506,"avatar_url":"https://avatars.githubusercontent.com/u/1576506?v=3","gravatar_id":"","url":"https://api.github.com/users/vinyanalista","html_url":"https://github.com/vinyanalista","followers_url":"https://api.github.com/users/vinyanalista/followers","following_url":"https://api.github.com/users/vinyanalista/following{/other_user}","gists_url":"https://api.github.com/users/vinyanalista/gists{/gist_id}","starred_url":"https://api.github.com/users/vinyanalista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinyanalista/subscriptions","organizations_url":"https://api.github.com/users/vinyanalista/orgs","repos_url":"https://api.github.com/users/vinyanalista/repos","events_url":"https://api.github.com/users/vinyanalista/events{/privacy}","received_events_url":"https://api.github.com/users/vinyanalista/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T04:13:25Z","updated_at":"2016-06-05T04:13:25Z","body":"Upload finished! :D"}}
{"actor":{"display_login":"vinyanalista"}}