clearlinux / clr-installer

Clear Linux* OS Installer
GNU General Public License v3.0
92 stars 42 forks source link

Keymap selected at install time is ignored by installer and input method of OS #492

Open oDn opened 5 years ago

oDn commented 5 years ago

The installer ignores the selected keymap which is particularly problematic when setting the user password. I've installed Clear Linux multiple times and even the latest build of the installer has this problem. Once installed the OS also expects a US keyboard layout as an input method.

mdhorn commented 5 years ago

Thank you for the report.

Please share the output of localectl on the installed system.

Are you using the graphical desktop environment or the text-only server image?

What keyboard make and model? How is it connected? PS2, USB, USB-wireless, Bluetooth-wireless

oDn commented 5 years ago

Hi Mark,

Here's the output of localectl:

System Locale: LANG=en_US.UTF-8
    VC keymap: fr
   X11 layout: us

I'm using the graphical desktop. Clear Linux is installed with VMware Workstation 15.1.

I've noticed that if I change the keymap within live boot and then launch the installer, then I obtrain the right keymap when setting the password for the user.

mdhorn commented 5 years ago

@oDn Thank you for the information. We had validated this pretty well using the text-based installer, but perhaps it needs better validation using the graphical installer. My guess is we need to call some Gnome function after changing the keyboard for the currently running process to see the keyboard change.

We will try to look at this soon.

For the general graphical desktop, can you confirm that just having VC keymap set to fr is enough to properly see your French keyboard? It looks like we missed setting the X11 layout, so I'd guess if you connected to the desktop over VCN that the keyboard might not be working correctly.

oDn commented 5 years ago

@mdhorn, you're welcome.

I do indeed get the right keymap when using the virtual console. But anything involving X11 stays in en_US.

jwakre commented 5 years ago

The installer is not setting the X11 keyboard config. I can update this config with localectl and copy it to the target system, but it seems like the Gnome settings are configured separately.

@mrkz Is this a duplicate issue of clearlinux/distribution#634? Also, is there a preferred way for the installer to set Gnome keyboard settings for the target system?

jwakre commented 5 years ago

After syncing with @mrkz, I will pause on this issue and wait for his feedback on the best way for clr-installer/Gnome interactions.

mrkz commented 5 years ago

@mrkz Is this a duplicate issue of clearlinux/distribution#634?

Unsure really, I would say not the case because changing layout in live-session would not get you those in installed system.

Also, is there a preferred way for the installer to set Gnome keyboard settings for the target system?

Yes, gnome sets those settings by using schemas (which can be seen using gsettings or dconf)

So there's 2 ways we can handle this:

A) Grab used modifications (e.g: keyboard layout, favorite applications pinned in the dash, network preferences as setup in desktop, etc) from the clr-installer live image and push them into the installed user. The installer would need to copy the ~/.config/dconf/user file (which contains the user modifications of the environment) and place them into the user's installed system. Notice that this directory may not exists and must be created if that's the case.

drwx------   /home/mesiment/.config/dconf
-rw-r--r--  /home/mesiment/.config/dconf/user

B) Dump the keyboard configurations into a file that the GNOME session can handle later on when login in the first time. For this one you would need to dump the settings from the live session with dconf:

dconf dump /org/gnome/desktop/input-sources/ | tee input-sources.txt
[/]
mru-sources=[('xkb', 'us+altgr-intl'), ('xkb', 'latam'), ('ibus', 'libpinyin'), ('xkb', 'jp')]
per-window=false
sources=[('xkb', 'us+altgr-intl'), ('xkb', 'latam'), ('ibus', 'libpinyin'), ('xkb', 'jp')]

and then input-sources.txt should be loaded using dconf from the installed user-session. This blog post shows an example.

If using A), you would save all user modifications that are saved in schemas (e.g: theme setup, proxies, favorite apps, enabled extensions, keyboard layout, etc).

If using B) we would need to copy the dconf dump file into the installed system and also create a service that loads that data into user session.

mdhorn commented 4 years ago

Related to #429