
This works perfectly. Just a couple comments though. After you run the first one, 'sudo dpkg-reconfigure locales', reboot the Pi. When you go to change the second one, 'sudo dpkg-reconfigure keyboard-configuration', select your keyboard model or the generic of that brand. On the next window, select 'English (US)' at the top of the list. Then select 'the default for the keyboard layout' in the next window. Select '<no composite key>' in the next window. Finally, in the last window select '<no>'. Reboot the Pi again. Those last two options may be different if you prefer - I am only explaining what I did so that I could type the correct double-quotation marks AND back-slashes while writing Python code. You can also do all of this from the terminal window.W. H. Heydt wrote:Change to US k/b config...
Use this...
- Run 'sudo dpkg-reconfigure locales' and changing from en_GB.UTF-8 to en_US.UTF-8
(or whatever country setting you need).
- Run 'sudo dpkg-reconfigure keyboard-configuration' and change the keyboard to USA PC101
(again, change as needed).
- Reboot.
You make the changes by using cursor keys and hitting 'space' to select or deselect an entry.
Note that to get the keyboard-configuration to work, you have to be on the console. For the locale setting, you can do it from the console or from another machine using an ssh connection (e.g. PuTTY). By "console", I mean directly on the Pi without LXDE up, or in LXDE using the terminal program.
Why can't you do this when you have no keyboard connected:W. H. Heydt wrote:Change to US k/b config...
…
- Run 'sudo dpkg-reconfigure keyboard-configuration' and change the keyboard to USA PC101
(again, change as needed).
…
Note that to get the keyboard-configuration to work, you have to be on the console. For the locale setting, you can do it from the console or from another machine using an ssh connection (e.g. PuTTY). By "console", I mean directly on the Pi without LXDE up, or in LXDE using the terminal program.
Code: Select all
sudo dpkg-reconfigure keyboard-configuration
I knew this, but I would like to hack dpkg-reconfigure keyboard-configuration so that it doesn't require a connected keyboard. Now, I workaround this by having a numeric keyboard connected. The purpose is to make better videos of using Raspi-Config without using a keyboard, but still configuring one that could be connected. Here is a video I made: http://youtu.be/oihYkX-8KEADougieLawson wrote:The keyboard layout for PuTTY with SSH is a function of PuTTY not a function of the remote machine you're connecting to.
raspi-config is just a simple shell script that calls dpkg-reconfigure keyboard-configuration then invoke-rc.d keyboard-setup start.
But I wanted to make a video for new users with wrong keyboard, without me as a youtuber needing a real keyboard. I don't see why one must have a keyboard connected in order to configure a keyboard that one wants to connect later. It would be good if the program to change the keyboard (Raspi-Config in this case) could detect the keyboard automatically, but that doesn't seem to be the case, and thus it is pointless to require a connected keyboard. Even if it could detect a keyboard-type it should not prevent users from overriding the setting or configure another keyboard that will be used later using a wrong keyboard. Since the keyboard configuration program (dpkg-reconfigure keyboard-configuration) seems to be written in Perl I could hack out the line that requires a keyboard, but I haven't been able to find it.DougieLawson wrote:I think you are way off track compared to the normal user. NOOBS expects that the new user will have a keyboard and mouse on first boot. It's not until you've completed the install and raspi-config that you'd get the network and sshd running and be able to go headless.
For what you're trying to do something like raspbian-ua-netinst may be more suitable.
Since Debian runs on lots of different platforms, it may be that it wants to know whether you have a USB keyboard or one connected to a proprietary Apple or Sun or HP bus. Or it could just be so that "dpkg-reconfigure --all" does not ask unnecessary questions when run remotely on a headless server.mob-i-l wrote:Why can't you do this when you have no keyboard connected:
It works also with numeric keyboards, and also with the dongle of a wireless keyboard (I've not tried this last thing myself).DougieLawson wrote:You can run raspi-config with ANY USB QWERTY keyboard.