Cannot switch keyboard layouts on fresh installs
On a fresh install, switching keyboard layouts does not work out of the box.
Steps to reproduce:
- Fresh install of Xfce 4.16 (e.g on Xubuntu 20.04 and openSUSE Tumbleweed)
- Open Keyboard Settings
- Add any keyboard layout to the list
- Try switching with either keyboard shortcuts or panel plugin.
Looking at keyboard settings, the switch for "system defaults" is disabled by default (I think it used to be enabled in previous versions of Xfce).
After the "system defaults" has been switched on and off a keyboard-layout.xml file is created in ~/.config/xfce4/xfconf/xfce-perchannel-xml/. The creation of this file seems to allow switching keyboard layout.
A possible solution is to have "system defaults" enabled by default and let users switch that off manually. I tested it by placing a keyboard-layout.xml file in /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/
<?xml version="1.0" encoding="UTF-8"?> <channel name="keyboard-layout" version="1.0"> <property name="Default" type="empty"> <property name="XkbDisable" type="bool" value="true"/> </property> </channel>`
Tested and reproduced on openSUSE Leap 15.3 beta, Tumbleweed and Xubuntu 20.04