Public bug reported:

OS: Kubuntu Questing Beta release candidate

Steps to reproduce:

1. Boot the ISO
2. Click "Install Kubuntu"
3. Select German as the language to use on Calamares' welcome screen
4. Proceed to the keyboard layout selection screen
5. Ensure the chosen keyboard layout is "German - Standard"
6. Type a bit in the keyboard layout testing text box in the lower-left corner

Expected results: The keyboard layout should be set to German. This
should be reflected when typing in the texting text box.

Actual results: The keyboard layout is still US English.

The root cause of this failure isn't anything Calamares is doing wrong,
but is a problem caused by Ubuntu's configuration. Calamares attempts to
use org.freedesktop.locale1 to set the keyboard layout since that's
more-or-less the standard way of setting the system's keyboard layout,
but gets given an "Access denied" error, thus the keyboard layout
doesn't change. It may seem strange that Calamares would get an access
denied error despite running as root, but this is because of a
deliberate design decision in Debian and Ubuntu, configured in
`/usr/share/dbus-1/system.d/systemd-localed-read-only.conf`:

    <!--
    On Debian and derivatives keymap/locales/etc are not set via localed,
    but from legacy and incompatible components. But we still need to
    enable localed so that GNOME can query it. Ensure not even root can
    use it to modify the settings.
    -->

KDE doesn't appear to offer any other way for third-party apps to change
the keyboard layout dynamically. systemsettings has some way of changing
the keyboard layout dynamically, but how is a mystery. Setting the
keyboard layout in a configuration file and then restarting kwin would
possibly work if it wasn't for the fact that `kwin_wayland --replace`
kills the Wayland server and thus kills Calamares in the process.

The only almost decent way to fix this I can think of is to take
advantage of Xwayland, which does still allow dynamically changing the
active keyboard layout for XWayland specifically. Only Calamares and
anything else running under Xwayland will see the keyboard layout
change, but this is enough for the user to be able to type their disk
encryption or user login passwords and have them actually work after
installation. Doing this on the installer prompt screen requires doing
the following:

* Ensure `kwin_wayland` is started with the `--xwayland` switch
* Before launching Calamares, run `xhost si:localuser:root`
* Finally, run `sudo calamares` (WITHOUT providing Wayland connectivity 
environment variables)

Ironically, the Xwayland solution will require essentially undoing the
bugfix done at https://bugs.launchpad.net/ubuntu/+source/kubuntu-
installer-prompt/+bug/2124199 in favor of a different solution.

** Affects: kubuntu-installer-prompt (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2124209

Title:
  Fails to set keyboard layout when running under Wayland on Kubuntu

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kubuntu-installer-prompt/+bug/2124209/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to