2

I installed xrdp on my Linux FC 17 KDE server, so that I can use mstsc from Windows to connect to it.

All works really well, except that I have a Swiss keyboard, and when I type say a Z, I get a Y on the screen (Swiss is QWERTZ and not QWERTY).

I installed Linux on the server while a Swiss keyboard was attached to it. Locally it works fine.

I tried adding a Swiss layout in the window called "Keyboard - KDE Control Module", but that doesn't help.

I use the same user, whether logging in locally or remotely.

How do I fix this problem?

3
  • Please log on to the server, open a terminal and post the output of this command: echo $LANG
    – terdon
    Jan 16, 2013 at 21:05
  • en_US.UTF-8 - that's wrong! What do I do now? :-) Jan 16, 2013 at 21:09
  • @AntKutschera Buy a US keyboard? ;-)
    – weberc2
    Jan 16, 2013 at 21:11

1 Answer 1

0

Since you saw that the $LANG variable is wrong, you should try setting it in your ~/.bashrc.

Sorry, spoke too soon, and did not think. The $LANG variable controlls all aspects of your locale, not the keyboard layout as such. As far as I can tell, the easiest fix for this would be to add this line to your ~/.bashrc:

setxkbmap -layout de_CH

Now, I am not at all sure that is the correct name for the swiss layout you are using. I had a look around and this page suggests either de_CH or fr_CH. However, neither works on my system but that might be just because I don't have the relevant layouts. Play around with setxkbmap just open a terminal and try out some layouts:

setxkbmap -layout de_CH
setxkbmap -layout fr_CH

etc etc.

You can have a look at some locale names at /usr/share/i18n/locales/, maybe you can identify the one you need :).

6
  • doesnt work :-( I set it, reboot, logged in remotely, checked the LANG variable which now reads de_CH.UTF-8 (Swiss German variant), but the keyboard is working the same as before :-( Jan 16, 2013 at 21:21
  • 1
    All it did was to make my shell output german error messages :-) Jan 16, 2013 at 21:27
  • Yeah, sorry, see my updated answer.
    – terdon
    Jan 16, 2013 at 21:33
  • The setxkbmap doesnt work for me either. I am getting a bit further with this: forums.fedoraforum.org/showthread.php?t=265100 The first part (creating the file and putting it under /etc/xrdp and then rebooting works, but there are quite a few differences between my thinkpad T410 keyboard and that one. are there any graphical tools which I can use where I can click a key and see its code? Jan 16, 2013 at 22:15
  • setxkbmap really should work... You just have to figure out the correct layout name. Have you tried a german german layout, as opposed to a swiss one? This command gives me a QWERTZ kezboard: setxkbmap -layout de
    – terdon
    Jan 16, 2013 at 22:26

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.