Ubuntu – Adding a second keyboard layout in Kubuntu 18.04

keyboard-layoutkubuntu

I have installed Kubuntu 18.04 and I am facing a problem with the keyboard layout. I have English as my first language and would like to add Greek as a second one also.

I have initially followed the instructions from here which suggested editing the /etc/default/keyboard file.

At the present the content of my config file are:

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="us,gr"
XKBVARIANT=",qwerty"
XKBOPTIONS="grp:alt_shift_toggle"

BACKSPACE="guess"

which does not made any major difference in my DE.
I have also tried from KDE System Settings > Input Devices > Keyboard > Layouts tab
enter image description here

At present I have 3 languages in my keyboard layout switcher:
English (US)
Greek (qwerty)
Greek (Greek).

Although I see the 3 options (only with right click though which I am not sure it's the default behavior) I cannot choose a different than the default (English) either by mouse or by keyboard.

I added 2 keyboard shortcuts to change layouts but to no avail.
enter image description here

Edit:
(Some extra information that might come handy)

In the Regional Settings I have added Greek also
enter image description here

I am not sure what I have done wrong but adding one extra language layout shouldn't be so hard. So, how can I proceed from here?

Best Answer

After a lot of research I managed to overcome the problem by a somewhat bizarre solution. At least in my case the system seemed to be able to toggle between English and Greek after this approach.

  • I added a 3rd language in the Configure layout... (in my case Spanish)
  • Enable Spare layouts
  • Also (I am not sure this is necessary but I followed that step also) I installed the 3rd language to Regional Settings dialog.
  • After logout I was able to use the keyboard shortcut.

The funny thing is that I removed the 3rd language after that and it still works (I only kept English and Greek which was my initial intention).

Hope that this would be helpful to anyone facing a similar problem.

Related Question