Keyboard layout of terminal through X11 ssh tunnel is wrong - how to fix?












0















If I display a terminal over an ssh tunnel (X11 forwarding) to Xming on a Windows 10 PC, the keyboard setting is wrong. On the Ubuntu machine itself, the keyboard setting is correct. What puzzles me: if I check the keyboard settings with the usual commands on that terminal displayed on Xming, it all looks ok too. Just the keys do not match the configured language.



Instead, the actual keymap seems to be "us" !!



Ubuntu 18.04.2 LTS, swiss german locale.



I am stumped. Can you give me a pointer?



ssh to Ubuntu:
/etc/default/keyboard



XKBMODEL="logicd"
XKBLAYOUT="ch"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"


localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


Then open terminator or xterm, the window is displayed on by Xming on the PC:



localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


setxkbmap -query



rules:      xorg
model: pc105
layout: de_CH


setxkbmap -query | awk -F"(,|[ ]+)" '/layout:/ { print $2 }'



de_CH


gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+')" | sed -ne "s/['|)]//g;$(($current_layout+1))p"



ch


setxkbmap -print -verbose 10



Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules: xorg
model: pc105
layout: de_CH
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc+de_CH+inet(pc105)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de_CH+inet(pc105)" };
xkb_geometry { include "pc(pc105)" };


.. and so on..
All commands insists that I have the ch mapping active.



But I definitively have the us mapping active.



Examples:



- on keyboard produces in xterm /
? on keyboard produces in xterm _
! on keyboard produces in xterm }
& on keyboard produces in xterm ^


Anyone has a clue how I can set up the correct keymap?
As I mentioned before, the keymap is correct in any other situation.



Thanks
Dan










share|improve this question























  • I guess noone has an idea?

    – I grok it
    Mar 7 at 21:03
















0















If I display a terminal over an ssh tunnel (X11 forwarding) to Xming on a Windows 10 PC, the keyboard setting is wrong. On the Ubuntu machine itself, the keyboard setting is correct. What puzzles me: if I check the keyboard settings with the usual commands on that terminal displayed on Xming, it all looks ok too. Just the keys do not match the configured language.



Instead, the actual keymap seems to be "us" !!



Ubuntu 18.04.2 LTS, swiss german locale.



I am stumped. Can you give me a pointer?



ssh to Ubuntu:
/etc/default/keyboard



XKBMODEL="logicd"
XKBLAYOUT="ch"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"


localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


Then open terminator or xterm, the window is displayed on by Xming on the PC:



localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


setxkbmap -query



rules:      xorg
model: pc105
layout: de_CH


setxkbmap -query | awk -F"(,|[ ]+)" '/layout:/ { print $2 }'



de_CH


gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+')" | sed -ne "s/['|)]//g;$(($current_layout+1))p"



ch


setxkbmap -print -verbose 10



Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules: xorg
model: pc105
layout: de_CH
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc+de_CH+inet(pc105)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de_CH+inet(pc105)" };
xkb_geometry { include "pc(pc105)" };


.. and so on..
All commands insists that I have the ch mapping active.



But I definitively have the us mapping active.



Examples:



- on keyboard produces in xterm /
? on keyboard produces in xterm _
! on keyboard produces in xterm }
& on keyboard produces in xterm ^


Anyone has a clue how I can set up the correct keymap?
As I mentioned before, the keymap is correct in any other situation.



Thanks
Dan










share|improve this question























  • I guess noone has an idea?

    – I grok it
    Mar 7 at 21:03














0












0








0








If I display a terminal over an ssh tunnel (X11 forwarding) to Xming on a Windows 10 PC, the keyboard setting is wrong. On the Ubuntu machine itself, the keyboard setting is correct. What puzzles me: if I check the keyboard settings with the usual commands on that terminal displayed on Xming, it all looks ok too. Just the keys do not match the configured language.



Instead, the actual keymap seems to be "us" !!



Ubuntu 18.04.2 LTS, swiss german locale.



I am stumped. Can you give me a pointer?



ssh to Ubuntu:
/etc/default/keyboard



XKBMODEL="logicd"
XKBLAYOUT="ch"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"


localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


Then open terminator or xterm, the window is displayed on by Xming on the PC:



localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


setxkbmap -query



rules:      xorg
model: pc105
layout: de_CH


setxkbmap -query | awk -F"(,|[ ]+)" '/layout:/ { print $2 }'



de_CH


gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+')" | sed -ne "s/['|)]//g;$(($current_layout+1))p"



ch


setxkbmap -print -verbose 10



Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules: xorg
model: pc105
layout: de_CH
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc+de_CH+inet(pc105)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de_CH+inet(pc105)" };
xkb_geometry { include "pc(pc105)" };


.. and so on..
All commands insists that I have the ch mapping active.



But I definitively have the us mapping active.



Examples:



- on keyboard produces in xterm /
? on keyboard produces in xterm _
! on keyboard produces in xterm }
& on keyboard produces in xterm ^


Anyone has a clue how I can set up the correct keymap?
As I mentioned before, the keymap is correct in any other situation.



Thanks
Dan










share|improve this question














If I display a terminal over an ssh tunnel (X11 forwarding) to Xming on a Windows 10 PC, the keyboard setting is wrong. On the Ubuntu machine itself, the keyboard setting is correct. What puzzles me: if I check the keyboard settings with the usual commands on that terminal displayed on Xming, it all looks ok too. Just the keys do not match the configured language.



Instead, the actual keymap seems to be "us" !!



Ubuntu 18.04.2 LTS, swiss german locale.



I am stumped. Can you give me a pointer?



ssh to Ubuntu:
/etc/default/keyboard



XKBMODEL="logicd"
XKBLAYOUT="ch"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"


localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


Then open terminator or xterm, the window is displayed on by Xming on the PC:



localectl status



   System Locale: LANG=de_CH.UTF-8
VC Keymap: ch
X11 Layout: ch
X11 Model: logicd


setxkbmap -query



rules:      xorg
model: pc105
layout: de_CH


setxkbmap -query | awk -F"(,|[ ]+)" '/layout:/ { print $2 }'



de_CH


gsettings get org.gnome.desktop.input-sources sources | grep -Po "'[[:alpha:]]+')" | sed -ne "s/['|)]//g;$(($current_layout+1))p"



ch


setxkbmap -print -verbose 10



Setting verbose level to 10
locale is C
Trying to load rules file ./rules/xorg...
Trying to load rules file /usr/share/X11/xkb/rules/xorg...
Success.
Applied rules from xorg:
rules: xorg
model: pc105
layout: de_CH
Trying to build keymap using the following components:
keycodes: xfree86+aliases(qwerty)
types: complete
compat: complete
symbols: pc+de_CH+inet(pc105)
geometry: pc(pc105)
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de_CH+inet(pc105)" };
xkb_geometry { include "pc(pc105)" };


.. and so on..
All commands insists that I have the ch mapping active.



But I definitively have the us mapping active.



Examples:



- on keyboard produces in xterm /
? on keyboard produces in xterm _
! on keyboard produces in xterm }
& on keyboard produces in xterm ^


Anyone has a clue how I can set up the correct keymap?
As I mentioned before, the keymap is correct in any other situation.



Thanks
Dan







ssh keyboard-layout tunnel






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 21 at 16:35









I grok itI grok it

234




234













  • I guess noone has an idea?

    – I grok it
    Mar 7 at 21:03



















  • I guess noone has an idea?

    – I grok it
    Mar 7 at 21:03

















I guess noone has an idea?

– I grok it
Mar 7 at 21:03





I guess noone has an idea?

– I grok it
Mar 7 at 21:03










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120168%2fkeyboard-layout-of-terminal-through-x11-ssh-tunnel-is-wrong-how-to-fix%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1120168%2fkeyboard-layout-of-terminal-through-x11-ssh-tunnel-is-wrong-how-to-fix%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?