23

I have recently upgraded my PC from Lubuntu 14.10 to 15.10. Before the upgrade my keyboard layout matched my Danish keyboard. But after the upgrade I probably have a standard English/US layout.

  • Preferences/Language Support, doesn't let me configure the keyboard layout.
  • Preferences/Keyboard and Mouse, only let me configure stroking delay and similar.

I don't know about iBus and fcitx, as far as the tooltip infomation tells me, its for more complex languages such as Chinese.

I don't have a US icon in the taskbar, no keyboard and/or language icon at all.

Things I have tried:

  • Running the following in a terminal works, but only until the next reboot:

    setxkbmap -layout dk
    
  • I got the following parameter in the file /etc/default/keyboard:

    XKBLAYOUT="dk"
    
  • Installing and running the app Lxkeymap changes the keyboard to Danish when I run it, but rebooting will change the layout back to US.

I don't want anything fancy, I just want to set my keyboard layout to Danish. How can I do that?

  • 2
    You can try with this guide – trunk96 Jun 17 '16 at 16:14
  • In Ubuntu Unity, the correct System Settings section is "Text Entry" and not "Keyboard". Do you have that in Lubuntu too? – Byte Commander Jun 17 '16 at 16:17
  • Having an old PC, I try to avoid Unity, thus using Lubuntu. But I normally have no clue as where to change stuff. I cannot find any Text Entry and Lubuntu don't seem to have a System Settings application like Unity. – Chau Jun 17 '16 at 16:20
  • 1
    If that does not work, you can try the terminal command setxkbmap -layout dk (I think that dk should mean Danish...) – Byte Commander Jun 17 '16 at 16:20
  • 1
    Try to edit /etc/default/keyboard. That should survive a reboot. ;) – Gunnar Hjalmarsson Jun 17 '16 at 17:05
43

Some googling and a test led me to this:

Right click the panel -> Add / Remove Panel Items -> Add -> Keyboard Layout Handler

That adds an icon to the panel, and by right clicking it and selecting "Settings", a GUI tool for managing keyboard layouts shows up.

To add languages, "keep system layout" should be unchecked.

  • 3
    Works on lubuntu 16.04 – Luigi Lopez Apr 17 '18 at 1:26
  • 5
    Works on lubuntu 18.04 – user1053510 Oct 23 '18 at 12:53
7

I believe this solution only works if systemd is implemented? It works for me in Lubuntu 16.04. Let's check first if this works.

Go to the terminal and type in

localectl status

You should have this (partically the VC Keymap and X11 layout). If there isn't a command or something, I'm out of ideas.

 System Locale: LANG=en_AU.UTF-8
                LANGUAGE=en_AU:en_GB:en
     VC Keymap: us
    X11 Layout: us

If so, the following should fix it.

localectl set-keymap dk
localectl set-x11-keymap dk

I had set the GB keyboard instead of the US keyboard myself so my situation is quite similar. Unfortunately I don't have much know-how so maybe the following has changed more than you would want, but I haven't experienced any problems myself.

Solution adapted from Meuh's answer: https://unix.stackexchange.com/a/307767

  • 1
    works like a charm, this should be selected as correct answer ^_^ – Cesar Nov 18 '17 at 9:52
  • localectl set-keymap de worked perfect for setting german keyboard layout. Thx – domih Jan 15 at 9:39
2

On Lubuntu, complementing solutions above: Right-click on the bottom panel, and add the Keyboard Layout Handler.

At this point it only handles "US English", and the US flag appears (can be changed to text).

To add support to the US International (with dead keys), right click on the flag and enter to Settings.

In the Keyboard Layouts frame, click +Add. A nice list with flags of all countries in the world is displayed. Select US English again, but observe the diminutive triangle shaped icon to the left of it: it will expand to a rather complete list of variants, one of which is the wanted US Intl. with dead keys.

You can pick the key combination to activate it (I use Right Alt). Once installed you can also click on the flag icon in the panel: each click toggles the layout.

Now you have the wanted layout, in my case I frequently write in Spanish on a US keyboard. Apostrophe+vocal gives you the accents, also the ñ. áéíóúü.

  • The only that worked great even inside playonlinux programs! – madlymad Mar 31 at 19:11
1
  1. In Lubuntu, open up a terminal window with ctrl-alt-t
  2. type sudo apt install lxkeymap
  3. type your password
  4. close terminal window
  5. click on the startbutton, preferences, lxkeymap
  6. click on your country in the left column
  7. click on your keyboard choice in the right column
  8. click Apply
  9. you can test how the keys work in the line at the bottom of the lxkeymap window
  10. close lxkeymap window

For me, having bought a laptop with an English keyboard, but being a Dutch user, so wanting to be able to type "e for an ë, the combination of United Kingdom and English (UK, international with dead keys) works fine. Before that the combination of United States and English (US, international with dead keys) worked fine.

  • This does not answer the question. The OP stated that "Installing and running the app Lxkeymap changes the keyboard to Danish when I run it, but rebooting will change the layout back to US." – stumblebee Feb 28 '18 at 2:10
0

As previous tries did not solve the problem, here is a workaround:

echo "setxkbmap -layout dk" >> ~/.xsessionrc 

Referance: https://wiki.debian.org/Keyboard

0

Had a similar problem with the german qwertz keyboard in a Lubuntu variant for eeepc. After some search I installed the Lxkeymap tool. It adds the missing selection options to the LXDE GUI.

  • 2
    You could add the steps you did in detail to installing the tool, this would improve your answer. – Videonauth Oct 28 '17 at 14:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.