From a0c54bbc0d558f64c047f03a4a6f0ec49e935a77 Mon Sep 17 00:00:00 2001 From: mviereck Date: Thu, 26 Dec 2019 15:15:19 +0100 Subject: [PATCH] --nxagent: Revert previous commit. Allow --keymap=clone #208 --- CHANGELOG.md | 2 +- x11docker | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 270d7c09..dfc1d3de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Project website: https://github.com/mviereck/x11docker ## [Unreleased] ### Changed - - `--nxagent`: Use `keyboard='clone'` for xkb settings. + - `--nxagent --keymap=clone`: Clone xkb settings from host in nxagent. [(#208)](https://github.com/mviereck/x11docker/issues/208) diff --git a/x11docker b/x11docker index bab4c249..dd657a96 100755 --- a/x11docker +++ b/x11docker @@ -2979,10 +2979,17 @@ mode=$Screensize # set keyboard layout case $Xkblayout in "") # set layout from host. - Nxagentoptions="$Nxagentoptions,keyboard='clone'" + command -v setxkbmap >/dev/null && { + Nxagentoptions="$Nxagentoptions,keyboard=$(setxkbmap -query | grep rules | awk '{print $2}')/$(setxkbmap -query | grep layout | awk '{print $2}')" + } || note "Could not check your keyboard layout due to missing setxkbmap + If you get mismatching keys, please install setxkbmap. + $Wikipackages" ;; *) # --keymap - Nxagentoptions="$Nxagentoptions,keyboard='evdev/$Xkblayout'" + case $Xkblayout in + clone) Nxagentoptions="$Nxagentoptions,keyboard='clone'" ;; + *) Nxagentoptions="$Nxagentoptions,keyboard='evdev/$Xkblayout'" ;; + esac ;; esac