Bugzilla – Bug 1125814
[Build 20190125] YaST2 keyboard module applies settings even when Cancel button is pressed on icewm
Last modified: 2022-09-21 15:02:33 UTC
Created attachment 797088 [details] YaST logs ## Steps to reproduce: 1. Change X11 keyboard setting (e.g. run setxkbmap -layout us,ru) 2. Run yast2 keyboard module 3. English US is preselected 4. Press Cancel button 5. English US is set as a keyboard layout, so settings from step 1) are overwritten. Please, find logs in the attachment.
I couldn't reproduce it in a openSUSE TW 20190125 using `yast-country 4.1.7`. Given steps, * Changed the keyboard layout to English US through Gnome settings * Run yast2 keyboard module * (Spanish was preselected) * Pressed Cancel button * Spanish layout **was not** set In the YaST logs it could be found > 2019-02-19 09:56:19 <1> linux-9x6v(7484) [Ruby] modules/Keyboard.rb:515 Setting keyboard to: <spanish> but the keyboard layout still being English US. In fact, when the "OK" button is pressed, is expected to find something like follow in the logs > 2019-02-19 10:00:53 <1> linux-9x6v(11065) [Ruby] modules/Keyboard.rb:879 Making keyboard settings persistent: command /usr/bin/localectl set-keymap es end with {"exit"=>0, "stderr"=>"", "stdout"=>""} Rodion, could you give us more information about the system? Thank you!
I have same version as you've mentioned. I have this problem on my laptop, where I have i3wm installed, so will try to reproduce it in some simpler env. What I've assumed that in case of pressing cancel there should be no log lines like: 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1401 Setting X11 keyboard to: <english-us> 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1402 Setting X11 keyboard: /usr/bin/setxkbmap -layout us -model microsoftpro -option terminate:ctrl_alt_bksp And as from the code: https://github.com/yast/yast-country/blob/master/keyboard/src/modules/Keyboard.rb#L1400 it actually executes those commands, which should not be the case. But let me update issue with steps for clean installation.
Ok, so I can easily reproduce it with ice-wm. Gnome handles keyboard layout differently. So here are the steps: 1. Install TW with icewm as WM 2. run xterm 3. Execute following commands: setxkbmap -layout us,ru setxkbmap -option 'grp:alt_shift_toggle' 4. One can switch between ru and us with alt-shift 5. Run `setxkbmap -query | grep layout` 6. It returns: "layout: us,ru" 7. Run `xdg-su -c 'yast2 keyboard'` 8. Click cancel in opened dialogue 9. Run `setxkbmap -query | grep layout` 10. It returns: "layout: us" I hope this helps. Let me know if you are still not able to reproduce the issue. And thanks for the prompt reply, I appreciate this style of work ;)
Thank you so much, Rodion. Regarding to >(In reply to Rodion Iafarov from comment #2) > I have same version as you've mentioned. I have this problem on my laptop, > where I have i3wm installed, so will try to reproduce it in some simpler env. > > What I've assumed that in case of pressing cancel there should be no log > lines like: > 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1401 > Setting X11 keyboard to: <english-us> > 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1402 > Setting X11 keyboard: /usr/bin/setxkbmap -layout us -model microsoftpro > -option terminate:ctrl_alt_bksp > > And as from the code: > https://github.com/yast/yast-country/blob/master/keyboard/src/modules/ > Keyboard.rb#L1400 > it actually executes those commands, which should not be the case. But let > me update issue with steps for clean installation. I am not pretty sure right now, but I guess that this is being executed in order to allow to use the "Test" input field. Anyway, following your detailed steps I was able to reproduce it in a fresh openSUSE TW installation using ice-wm :( So, I am going to track it in our Trello board. Thanks!
(In reply to David Diaz from comment #4) > Thank you so much, Rodion. > > Regarding to > > >(In reply to Rodion Iafarov from comment #2) > > I have same version as you've mentioned. I have this problem on my laptop, > > where I have i3wm installed, so will try to reproduce it in some simpler env. > > > > What I've assumed that in case of pressing cancel there should be no log > > lines like: > > 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1401 > > Setting X11 keyboard to: <english-us> > > 2019-02-18 17:08:41 <1> ri-laptop(31225) [Ruby] modules/Keyboard.rb:1402 > > Setting X11 keyboard: /usr/bin/setxkbmap -layout us -model microsoftpro > > -option terminate:ctrl_alt_bksp > > > > And as from the code: > > https://github.com/yast/yast-country/blob/master/keyboard/src/modules/ > > Keyboard.rb#L1400 > > it actually executes those commands, which should not be the case. But let > > me update issue with steps for clean installation. > > I am not pretty sure right now, but I guess that this is being executed in > order to allow to use the "Test" input field. > > Anyway, following your detailed steps I was able to reproduce it in a fresh > openSUSE TW installation using ice-wm :( > > So, I am going to track it in our Trello board. > > Thanks! I've adjusted severity and bug title as per our findings. Thanks a lot!
This is one of the very few places in YaST where we use "instant apply" so you can immediately work with the new settings; including testing the keyboard layout in the "Test" field. So this works as intended.