[X2Go-Commits] [x2goserver] 01/01: Setting keyboard layout in rootless X2GoKdrive sessions.
git-admin at x2go.org
git-admin at x2go.org
Tue Feb 22 19:17:00 CET 2022
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit 8a7c9d762f2e2daa3e456e8a6955400a23597c77
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Tue Feb 22 12:16:46 2022 -0600
Setting keyboard layout in rootless X2GoKdrive sessions.
---
debian/changelog | 1 +
x2goserver/bin/x2gostartagent | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 62210413..4d737e11 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -459,6 +459,7 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
- x2goterminate-session: terminate x2goruncommand and all processes
from the group.
- Support for rootless X2GoKdrive sessions.
+ - Setting keyboard layout in rootless X2GoKdrive sessions.
[ Tom Ruzicka ]
* debian/po: Add Czech debconf translation.
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index 9486e62e..0e85b46e 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -505,6 +505,18 @@ if [[ "${X2GO_SET_KBD}" = '0' ]] || [[ "${X2GO_KBD_TYPE}" != 'auto' ]]; then
mkdir -p -- "${SESSION_DIR}/keyboard"
fi
+if [[ "${X2GO_SET_KBD}" != '0' && "${X2GO_KBD_TYPE}" != 'auto' && "${X2GO_STYPE}" = 'A' ]]; then
+ XKBMAP="$(sed -e 's/\// /' -e 's/(/ /' -e 's/)/ /'<<< "${X2GO_KBD_TYPE}")"
+ XKBMODEL="$(awk '{print $1}' <<< "${XKBMAP}")"
+ XKBLAYOUT="$(awk '{print $2}' <<< "${XKBMAP}")"
+ XKBVARIANT="$(awk '{print $3}' <<< "${XKBMAP}")"
+ XKBMAP="setxkbmap -model ${XKBMODEL} -layout ${XKBLAYOUT}"
+ if [[ "${XKBVARIANT}" != "" ]]; then
+ XKBMAP="${XKBMAP} -variant ${XKBVARIANT}"
+ fi
+ DISPLAY=:${X2GO_PORT} ${XKBMAP}
+fi
+
if ps -p "${X2GO_AGENT_PID}" &>'/dev/null'; then
"${X2GO_LIB_PATH}/x2gosyslog" "${0}" 'notice' "successfully started X2Go Agent session with ID ${SESSION_NAME}"
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list