HJAST101
Posts: 37
Joined: Thu Aug 27, 2020 12:53 pm

How to change keyboard layout from login screen?

Thu Aug 27, 2020 4:26 pm

I wanted to change the keyboard layout so I can type in my language (which does not have any of the English characters) and the RPi (4) prompted to restart, so I did. Now I can't login because I can't type my password in English. Right clicking and selecting any of the input methods doesn't work. Is there any other way I can login into the RPi and revert the keyboard settings? I am using the latest version of Raspberry Pi OS, if that helps.
Last edited by HJAST101 on Thu Aug 27, 2020 6:12 pm, edited 2 times in total.

drgeoff
Posts: 12420
Joined: Wed Jan 25, 2012 6:39 pm

Re: URGENT!!! How to change keyboard layout from login screen.

Thu Aug 27, 2020 4:36 pm

There may be others but one long winded way out of your predicament is:

1. Use the computer you are using to access this forum to add an ssh or ssh.txt file to the FAT32 partition of the micro-SD card.

2. Connect RPi to the same router as your computer.

3. Boot the RPi with the ssh enabled card.

4, From the computer, ssh into the RPi and make necessary changes.
Quis custodiet ipsos custodes?

fanoush
Posts: 842
Joined: Mon Feb 27, 2012 2:37 pm

Re: URGENT!!! How to change keyboard layout from login screen.

Thu Aug 27, 2020 4:37 pm

try to press ctrl+alt+f1, there should be shell console, type sudo raspi-config, or ctr+alt+f2, there is also console but with login

You can also remove URGENT!!! from topic name, for rest of the world it is not urgent at all :-) Also you may get less replies with topic name like that.

HJAST101
Posts: 37
Joined: Thu Aug 27, 2020 12:53 pm

Re: How to change keyboard layout from login screen.

Thu Aug 27, 2020 5:11 pm

(replying to drgeoff)
ssh is already enabled on my RPi, and both devices are connected to the same router wireless-ly, so would they have the same IP address? Sorry if that is a stupid question, but I only got my RPi 2 days ago, and I'm pretty new to it. Also, my command line knowledge is good enough to get by, so what file do I need to edit, where is it located, and what do I need to edit in it?

HJAST101
Posts: 37
Joined: Thu Aug 27, 2020 12:53 pm

Re: How to change keyboard layout from login screen.

Thu Aug 27, 2020 5:16 pm

(replying to fanoush)

Pressing ctrl+alt+f1 takes me to the console, and says: "*insert host name here* login:", but only the following buttons work:
Numbers (and the special keys on them if I hold shift)
b
Space
and 2 or 3 other special keys on the keyboard.
What should I do now?

UPDATE: OK, so I was messing around a bit and put the login as "b" (as no other key would work), then put my normal password, just because. Of course, it said: "Login incorrect". But then something strange happened. Whenever I type any letter (apart from the letters I can already type), a white rectangle in place of a character is typed. Naturally, I typed "pi" and put my password, but it still said "Login incorrect".

btw the cursor already blinked whenever I typed a character as if it received the input, but nothing typed.

HJAST101
Posts: 37
Joined: Thu Aug 27, 2020 12:53 pm

Re: How to change keyboard layout from login screen?

Thu Aug 27, 2020 6:55 pm

(replying to drgeoff - again)
I scanned who was on my same wifi from the Mac terminal and the RPi didn't appear, so I ran it headless and connected it to ethernet and scanned again and found the RPi. I just sshed into it (for the first time on this pc) and the terminal said:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Aug 26 19:04:49 2020

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

I will run raspi-config by myself and see if I can figure it out, and I will update this post with the results.

UPDATE: GREAT NEWS!!!
I did this in the terminal:

pi@(hostname censored):~ $ raspi-config
Script must be run as root. Try 'sudo raspi-config'
pi@(hostname censored):~ $ sudo raspi-config
Reloading keymap. This may take a short while
FAIL
New password:
Retype new password:
passwd: password updated successfully
pi@(hostname censored):~ $ sudo shutdown
Shutdown scheduled for Thu 2020-08-27 19:59:05 BST, use 'shutdown -c' to cancel.
pi@(hostname censored):~ $
pi@(hostname censored):~ $ Connection to (IP address censored) closed by remote host.
Connection to (IP address censored) closed.

I changed the password to something numeric (as these were the only keys that work) and I can finally login and change things! :D
If this doesn't work, I'll update this post again. Thanks a lot, drgeoff!

UPDATE2: Just logged in and changed the keyboard layout back to English. Everything looks fine!

fanoush
Posts: 842
Joined: Mon Feb 27, 2012 2:37 pm

Re: How to change keyboard layout from login screen?

Fri Aug 28, 2020 8:03 am

Great you got it sorted. About the console on first/second screen (ctrl+alt+f1 of maybe f2) I wonder whether it is configurable somewhere, I have always one console there where I am already logged in automatically after each boot. Standard raspbian install on pi4, don't rememeber setting it somewhere.

HJAST101
Posts: 37
Joined: Thu Aug 27, 2020 12:53 pm

Re: How to change keyboard layout from login screen?

Fri Aug 28, 2020 11:53 am

@fanoush
I think it's because automatic login is default for the pi, and I turned it off.

Return to “Troubleshooting”