How to force one layout (EN) to be default in lock screen with one user present?

As I am not a native speaker I use two layouts on my Fedora 39 Workstation: RU and EN. I also never use RU layout for logins and passwords.

My input sources are configured with EN layout first. And I enabled the switch to have different input sources per window.

So currently whenever I need to unlock the screen, the layout is set to RU and I have to change it before typing the password.

It is a mild annoyance, but it happens every time and I really don’t like it.

Is there a way to configure the layout for unlock screen somehow?

1 Like

Hello @bookwar ;
There are scripts as per gdm doc’s


Interfaces which continue to be supported in a stable fashion include the Init, PreSession, PostSession, PostLogin, and Xsession scripts.
Some daemon configuration options in the <etc>/gdm/custom.conf file continue to be supported. 
Also, the ~/.dmrc, and face browser image locations are still supported. 

There is discussion of the PreSession, PostLogin, and PostSession scripts being used for user customization options. I found the info at
https://help.gnome.org/admin/gdm/3.26/overview.html.en
[Edit] I’m thinking PreSession sets EN Language/Keyboard, PostLogin sets it to RU. WDYT? Just not sure if you can do it via gdmsetup or need manual intervention, probably the latter.

I tested a bit and it seems it currently keeps the layout setting of a window which was in focus before the screen was locked.

Thanks for pointing to the GDM configs, I’ll experiment with the dmrc and see if it helps.

Have you checked in the settings ? Region & Language, there you have the Login Screen option. As I understood if you use GDM as Display manager, it also should be used for locking the screen. Just in case you prefer the Gui version to solve your problem.

That is interesting. My Region & Language screen does not have the “Login Screen” settings at all.

And I have Fedora 39, updated to the latest gnome-control-center.

Where does it come from?

This is indeed strange :thinking:

Can you check with the inxi tool (you might have to install it) and see what you get under system:

inxi -Fzxx
System:
  Kernel: 6.6.8-200.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-13.fc39 Desktop: GNOME v: 45.2 tk: GTK v: 3.24.39 wm: gnome-shell
    dm: 1: GDM 2: LightDM note: stopped Distro: Fedora release 39 (Thirty
    Nine)

As you can se the Display Manager is shown there. On my example you see that GDM is the default (1). I do also have LightDM (2) but it is stooped. If you have something else than GDM on (1), this could be the reason for the absence of the config in the settings.

And also, just with Gnome 45 you see this settings. There is a tool you can install in Software GDM Settings, this is what I have installed maybe this is what you just need?

System:
  Kernel: 6.6.8-200.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-13.fc39 Desktop: GNOME v: 45.2 tk: GTK v: 3.24.39 wm: gnome-shell
    dm: GDM Distro: Fedora release 39 (Thirty Nine)

I haven’t tweaked anything on the system on that level, it is a default Gnome Workstation setup, but it was upgraded from a single install for a couple of years, so there might be impact of the upgrade process from earlier GDM/Gnome versions somewhere.

Yeah I get the same as you. Perhaps @ilikelinux has something special going on with Gnome?!?

Here, on fresh install of F39, Settings:Region and Language has separate panels for “Your Account” and “Login Screen”. I think the “Login Screen” only appears when you have more than one user. I always create two users.

Yeah, I don’t.

I’ll try and create a user to test that out though.
[edit] So you are correct. The option for login keyboard selection appeared after I created another user.
[edit 2]: If you remove the second user the option to select a different login keyboard disappears. Shouldn’t this be there for single users as well?

2 Likes

localectl: Control the system locale and keyboard layout settings | systemd Commands | Man Pages | ManKier

I think this is not relevant.

I already have the configuration of locales:

$ localectl status
System Locale: LANG=en_US.UTF-8
    VC Keymap: us
   X11 Layout: us,ru
  X11 Variant: ,
  X11 Options: grp:caps_toggle

But the lock screen behavior is not managed by the system locale.

GDM settings are separate from the lock screen.
The lock screen inherits your session settings.

Actually this is a known issue:

Here are some workarounds:

Yes I do have two users too.

It really looks like … the Gnome Manual shows to add this option separately. I just forgot that Gnome is still hiding config options and that this has to be added with dconf (Using long time the Mate-Desktop).

So the extension free solution/wokraround for the problem would be to create a second user like “dummy” and just deactivate with:

sudo usermod -L -e 1 dummy

I tested it and the option in the settings not disappears anymore.

p.s.
I changed the title to see that it is not depending on GDM as @vgaetera proposed.

Yeah, this has definetely to be fixed. I have the same issue