12

I am running Lubuntu in a VirtualBox guest on a Windows 7 host.

I have started the X server XMing on the host.

I use Putty with X-forwarding to ssh into the guest and use it to start lxterminal.

This works pretty well except that my Swedish keyboard presses are not coming across correctly. The effect is that I seem to be using a US keyboard although I am not. E.g. when I press 'ΓΆ', ';' appears in the terminal. The same happens in xterm too.

Running this in the lxterminal:

$ setxkbmap -v 10 -query

Produces:

Setting verbose level to 10
locale is C
Applied rules from xorg:
rules:      xorg
model:      pc105
layout:     se
Trying to build keymap using the following components:
keycodes:   xfree86+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+se+inet(pc105)
geometry:   pc(pc105)
rules:      xorg
model:      pc105
layout:     se

So it seems that the layout is set correctly. Right?

Is there anything I can do?

Peter Jaric
  • 2,076
  • 5
  • 28
  • 37

2 Answers2

15

There is an option called "Additional parameters for Xming" in configuration of Xming/XLaunch. If you pass something like

-xkbmodel pc105 -xkblayout us,se -xkboptions grp:ctrl_shift_toggle

You will have the same effect as in solution from Peter but without using any other programs. Found solution here: http://my.opera.com/paintenzero/blog/xmi

  • Thanks! I will try it out as soon as possible, since my solution has a problem: I need to rerun it quite frequently. – Peter Jaric Sep 10 '12 at 13:19
  • 4
    Turns out this solves the issue for me, if I just use "-xkblayout fi" (fi is Finnish, se won't work, don't ask me why). According to https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/35611 Swedish and Finnish keyboard layouts do not differ at all. – Peter Jaric Sep 12 '12 at 12:42
  • I also managed to get it working when specifying `-xkblayout fi`. Weird that Swedish keyboard layout doesn't seem to work. – HelloGoodbye Jul 22 '22 at 15:05
3

I solved it myself. By chance I discovered the command lxkeymap. It seems to be the same dialog that is used to select keymap when installing Lubuntu. In it, Sweden was selected, but Swedish was not, so I selected that and pressed Apply. Now it works as it should!

Peter Jaric
  • 2,076
  • 5
  • 28
  • 37