Other than English keyboard layout?

Do you have an English keyboard? Well, you can probably skip this post, unless you are doing very international stuff.

The following are my experiences with various flavors of Ubuntu.

Normally the keyboard is selected during the installation. However, if you use LiveCDs, VMs, terminal servers (LTSP) it happens sometimes that the target machine assumes an English keyboard and it gets difficult to enter – / + ? and similar punctuation.

Here is how you change the layout.

1. Inside X-Windows things are easy. The command

setxkbmap layout

is all you need. I don’t remember where the layout parameter is defined, but for my Finnish keyboard it is “fi”. I guess Google is your friend when you can’t guess your own layout’s code.

2. On the console it’s not that easy.

The command is

sudo dpkg-reconfigure console-setup

That’s the easy part. It will walk you through many questions, I didn’t find all of them easy to answer.

Have a look at file /etc/default/console-setup to see your current settings and maybe even take a backup before running the command.

The process is not that fast, so if you only have to enter a couple of characters you might be faster to type blindly…

I guess internally reconfiguring runs the command setupcon. It has options to set only keyboad layout and skip the fonts (or vice versa). I have not tried it at all, not sure whether theres is any difference compared to invoking dpkg-reconfigure

Advertisements

About usrmisc

I'm a software guy and intend to write down my own miscellaneous learnings here instead of on some papers, which I don't find again. Let's see how that goes. I work mainly with Linux.
This entry was posted in HOWTO and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s