Adding keyboard layout to GDM in control center not possible
I have had a problem that has come and gone over the years when I install Gnome + GDM on Arch: I can't add or change the keyboard layout in GDM the 'normal' way. It's like the Gnome installation don't recognize that GDM exists. When I'm using Fedora, this can be done through the gnome-control-center. I (mysteriously) got this to work one time when installing Gnome on Arch, but have no idea what I did differently during the install process.
I use colemak and constantly write my login password wrong every time I start my machine, because it defaults to qwerty – which is mildly annoying. Someone else having this problem, and can someone point me in the right direction to solve this?
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- 75impw
11 comments
May you need to edit ~/.dmrc file, like this:
My .dmrc file looked like this:
And I tried adding
Variant=colemakwithout luck.Try to change "utf8" to "UTF-8"
According to the wiki, this method is for the legacy GDM (2.0). Usually there is a keyboard layout changer in the upper right corner of the GDM login screen, when multiple layouts are selected trough the control center.
I don't know how to fix the missing stuff in gnome-control-center. I would try to reinstall the gdm package. You could first remove the home directory of the gdm user account. Installing the package should create a new one. That home directory is normally
/var/lib/gdm. You can check by running the following at the command line:About how to fix the keyboard for gdm without gnome-control-center, if you use Xorg, you can set the system default using
localectl. This localectl tool will create an Xorg config file /etc/X11/xorg.conf.d/00-keyboard.conf.Looking through things here, I think you are supposed to set Colemak for a US keyboard like this:
You can research that stuff like so:
This localectl can btw. also configure the console keymap if you didn't yet do that and want to do it as well. I can see a "colemak" line in the output of "localectl list-keymaps".
If you are using Wayland and not X, things work differently and I think the localectl tool will do nothing.
About how to try to set the keyboard manually for Gnome+Wayland, I found out that you can log into the gdm user account like this:
You can browse Gnome's settings like so:
You can also try to hunt down the setting that's about the keyboard layout with grep. I think it's this one here:
Next, you would try to set what you see in your user account for the gdm user account. For my example here, it seems changing that entry in gsettings can be done like this:
I don't know if this works, but it's at least not printing an error when I run it.
If you break something, you should be able to fix things by deleting the home of the gdm user and recreating it by reinstalling the gdm package.
Wow, thanks for this really detailed answer! I tried deleting
/var/lib/gdmand reinstalling it, but it did not help. I am pretty sure both GDM and Gnome run on Wayland as default. I think GDM transitioned first, ang Gnome followed later. Why do you thinklocalectlwouldn't work when using Wayland? Are you sure it is X only?What I find really strange is that the option for adding more languages / layouts to GDM is not available in the gnome-control-center, as it is in other distros. My hypothesis is that it is caused by a "disconnect" between the Gnome installation and GDM somehow. Maybe this is caused by the install order of GDM in the gnome package? Another theory of mine is that the initial setup wizard needs to be installed separately in Arch, and is default in Fedora, and that this is a missing link.
I heard that for Wayland, each desktop has to do its own thing for a lot of stuff that was previously the job of X. With X, the desktops are all asking the X server for what's up with the keyboard and the monitors and such, and the localectl is writing that X config file I mentioned.
I'm guessing the localectl tool does not know about all the different Wayland window managers that might be out there. I don't know if it maybe does know about config files of something big like Gnome.