I got a bit annoyed with Gnome 3.36 lock screen behavior, but I cannot find any specification or document that would describe the intended behavior in this case. Please help me figure out if this behavior was intended intended or a bug.
GNOME 3.36.3 allows to set a different set of input languages for the Login Screen. I put only English there and it works (passwords are always entered in English) but only when I login after a reboot (aka Login Screen).
When in the Lock Screen after locking the screen, this language setting has no effect. It seems that Lock screen (gnome-screensaver) uses last active window’s language (keyboard layout) instead of default keyboard language.
Is it the intended behavior that Lock Screen does not honor this setting for the Login Screen?
Is there any update coming that will fix this issue?
the login screen is handled in a specific session, it’s GDM;
the lock screen is handled by your own GNOME Shell session;
(off-by-one error) and “gnome-screensaver” is dead.
The keyboard layout of GDM could be configured, so that’s what’s used in the login screen. It allows different users to be able to log in, even if they are not used to the same keyboard.
In your own lock screen, it’s quite expected that you know how to use the keyboard, as that’s the one of your session. So, no “bug” here, even if that mean you have to know how to type your password in two different layouts (in the worst and not-so-common case where you’re using in your session a different layout than the one-and-only-one you’ve set in GDM). But then, why not add your layout to GDM and use that one to write your password for login?
Could things work differently? maybe, but that’s hard to design. For example, if your session is an admin one, would you expect that your password, when prompted in a Shell popup, would be written using the GDM layout also? that would feel quite bad.
Finally, the issue you’ve found looks related to the case where the user has activated the option to configure the keyboard layout per window, causing the layout used in the lock screen to be unpredictable.
Edit: clarification of the intended behavior, in which you set your layout in GDM and use it for login.
@arnaudb thank you a lot for explaining the mechanics of this!
So, no “bug” here, even if that mean you have to know how to type your password in two different layouts
I did not understand this part - if my password is in English, how can it be typed in a different layout, say Russian or Japanese?
in the worst and not-so-common case where you’re using in your session a different layout than the one-and-only-one you’ve set in GDM
My setup is as follows: GDM is set to English, my session is set to English, Russian and Polish. I use one language per computer (NOT per window).
The ideal behavior [*] I would like to achieve: when I type my password on Lock Screen my keyboard is switched to English, but then when I log into the session, it is switched to whatever layout I was using before. This is how it is done in MacOS, and it is a very convenient behavior.
would you expect that your password, when prompted in a Shell popup, would be written using the GDM layout also? that would feel quite bad
Which subsystem is responsible for shell popups?
In my case - yes, I would prefer the Shell popups to switch to English when they ask for my password. Again, this is how it is done on MacOS, which limits passwords to English only. On the other hand I see how that would be problematic for people who use non-english passwords in the shell.
Anyways I personally did not have problems when entering passwords into the shell because I use English for everything shell-related.
Sorry for an already long list of questions, but if you were so kind answer these:
Can my “ideal behavior” [*] be achieved with some gnome settings?
If not, can a gnome shell extension be written to achieve this behavior?
If I were to propose a design change in the current Gnome behavior, where would I start?
@voddan: I assumed “layout” as just a variation of the place of the letters (because I’m French), but right, you have to use “a correct layout” if you’re writing an English password when you want to type the rest of your stuff in a non-latin-writing language.
But, can’t you just use a password in the same language you’re using? I think that’s what the designers expected, and I think you’re complicating stuff by not doing that, really. Maybe you’ve a specific setting that doesn’t allow you that? I’m curious.
That’s managed by GNOME Shell, also. We’ve made things simple.
I use both English and Russian through the day, constantly switching between the 2. So using any one language for password would not resolve this problem.
can’t you just use a password in the same language you’re using? I think that’s what the designers expected
Sadly, it seems to be the case that (English-speaking) designers assumed the rest of the world was mono-lingual. I work in a US company, and we have to fight it here. You use French, so you must feel my pain
AFAIU, the situation is as follows (feel free to correct me here):
The was a mistake made in the initial design of the Lock Screen which did not take into account multi-lingual users who have to switch between 2 or more layouts.
The best way to solve this problem is to discuss this with Gnome designers, update the specification, file a ticket and work from there.
To do (2) I’ll need to contact people responsible for design changes in Gnome shell. Who do I need to talk to? What is the best way to engage them?
Concurrently with (2) I can try to find or create a Gnome shell extension that would switch languages as I want it. Are you certain that there is API to switch languages when in Lock Screen? Is there a similar API to switch language in the Shell password popup?
Again, thank you a lot for your help!
It would be really hard to figure out how this all works on my own.
Thinking multi-lingual is hard; really, and in many details. And as that’s not something all/most users need… that’s regularly something that’s lost/broken/neglected. No magic here, as long as there’s not a group of people checking specifically designs for that kind of stuff, things cannot really improve.
Well, calling it a mistake is a bit harsh, as the problem is easy to solve and consequently handled by the current design: you just have to set the correct layout in the lock screen when you write your password; and that’s something you should be used to do, as you’re already using the two layouts. The only question is: can something be done better for that use case, without breaking stuff for other people?
(And, by the way, I think you’re forgetting about the main reason why you can set the layout in GDM: multi-users computers, in which different people use different layouts. What layout should then be used, if there are more than one there?)
Would something like “my password should be typed in <keyboardlayout>” work, allowing not to have to set a specific keyboard layout from wherever you type your password? That looks promising, but would probably come with many corner cases also… Too tired now to think more about this now.
I’d probably first file a bug against GNOME Shell for explaining the problem. @allanday, what’s the preferred way currently to talk with the design team about this kind of (quite complex) things?
There’s probably a way to handle that as an extension, but I don’t know how exactly. Just changing the /org/gnome/desktop/input-sources/mru-sources dconf key doesn’t automatically change the keyboard layout sadly, so you should read the code of the keyboard layout changer from the top bar of the Shell to see how it does things.