This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 3ee38d4 README.md: whitespace fixes and typo correction. new 1a47b96 debian/changelog: syntax fix. new fd68fe4 x2goserver/bin/x2gosetkeyboard: make compatible with changes in Arctica's nxagent. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 +++- x2goserver/bin/x2gosetkeyboard | 53 ++++++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 21 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 1a47b962913c8aed3bc880e723d361a8f83b8346 Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Mar 3 12:40:28 2017 +0100 debian/changelog: syntax fix. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7380a04..3049b39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -167,7 +167,7 @@ x2goserver (4.1.0.0-0x2go1.2) UNRELEASED; urgency=low * debian/po: + Translate DebConf templates to Danish. - [Kaan Ozdincer ] + [ Kaan Ozdincer ] * debian/po: + Translate DebConf templates to Turkish. -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit fd68fe4fba70ee6f6260e40ec97662923428bdcb Author: Mihai Moldovan <ionic@ionic.de> Date: Fri Mar 3 12:36:54 2017 +0100 x2goserver/bin/x2gosetkeyboard: make compatible with changes in Arctica's nxagent. Also change to an all-bash algorithm. Cherry-picked from release/4.0.1.x branch. --- debian/changelog | 2 ++ x2goserver/bin/x2gosetkeyboard | 53 ++++++++++++++++++++++++++---------------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3049b39..7896175 100644 --- a/debian/changelog +++ b/debian/changelog @@ -247,6 +247,8 @@ x2goserver (4.0.1.21-0x2go1) UNRELEASED; urgency=medium pure bash and let script fail if no display port is available. - x2goserver/sbin/x2gocleansessions: fix syntax error introduced in last change to this file. + - x2goserver/bin/x2gosetkeyboard: make compatible with changes in + Arctica's nxagent. Also change to an all-bash algorithm. * x2goserver.spec: - Add mandatory perl-generators Build-Requires as per https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl diff --git a/x2goserver/bin/x2gosetkeyboard b/x2goserver/bin/x2gosetkeyboard index 4b79f7e..e5961d2 100755 --- a/x2goserver/bin/x2gosetkeyboard +++ b/x2goserver/bin/x2gosetkeyboard @@ -53,15 +53,39 @@ if ! [ -f ${X2GO_CLIENT_KBD_FILE} ]; then exit 0 fi -read_keyboard_file() { - - # retrieve keyboard settings from keyboard file in X2Go session dir - XKB_RULES="$(cat ${X2GO_CLIENT_KBD_FILE} | egrep "^rules.*" | head -n1 | cut -d "=" -f2 | cut -d" " -f1)" - XKB_MODEL="$(cat ${X2GO_CLIENT_KBD_FILE} | egrep "^model.*" | head -n1 | cut -d "=" -f2 | cut -d" " -f1)" - XKB_LAYOUT="$(cat ${X2GO_CLIENT_KBD_FILE} | egrep "^layout.*" | head -n1 | cut -d "=" -f2 | cut -d" " -f1)" - XKB_VARIANT="$(cat ${X2GO_CLIENT_KBD_FILE} | egrep "^variant.*" | head -n1 | cut -d "=" -f2 | cut -d" " -f1)" - XKB_OPTIONS="$(cat ${X2GO_CLIENT_KBD_FILE} | egrep "^options.*" | head -n1 | cut -d "=" -f2 | cut -d" " -f1)" +# Used to hold options to setxkbcomp. +typeset -a setxkbcomp_opts +# retrieve keyboard settings from keyboard file in X2Go session dir +read_keyboard_file() { + # Cache file contents. + typeset -a file_content + typeset line='' + while IFS='' read -r line; do + file_content+=("${line}") + done < "${X2GO_CLIENT_KBD_FILE}" + + # Append last line if not terminated by a newline. + [[ "${line}" ]] && file_content+=("${line}") + + for line in "${file_content[@]}"; do + # Extract the keys, their values and add to setxkbcomp_opts. + typeset key='' + for key in "rules" "model" "layout" "variant" "options"; do + typeset regexp='^[[:space]]*'"${key}"'[[:space:]]*=[[:space:]]*"?(.*)"?[[:space:]]*' + if [[ "${line}" =~ ${regexp} ]]; then + typeset value="${BASH_REMATCH[0]}" + + if [ -n "${value}" ]; then + # Handle a special substitution case for evdev-based rules. + # FIXME: find out why that substitution is needed in the first place! + [ "${key}" = 'rules' ] && value="${value//evdev/base}" + + setxkbcomp_opts+=("-${key}" "${value}") + fi + fi + done + done } reset_keymap() { @@ -69,19 +93,8 @@ reset_keymap() { } update_keymap() { - - if [ "$XKB_RULES" = "evdev" ]; then - XKB_RULES="base" - fi - # prepare for setxkbmap call - [ -n "$XKB_RULES" ] && XKB_RULES="-rules $XKB_RULES" - [ -n "$XKB_MODEL" ] && XKB_MODEL="-model $XKB_MODEL" - [ -n "$XKB_LAYOUT" ] && XKB_LAYOUT="-layout $XKB_LAYOUT" - [ -n "$XKB_VARIANT" ] && XKB_VARIANT="-variant $XKB_VARIANT" - [ -n "$XKB_OPTIONS" ] && XKB_OPTIONS="-option $XKB_OPTIONS" - # update keyboard map - setxkbmap $XKB_RULES $XKB_MODEL $XKB_LAYOUT $XKB_VARIANT $XKB_OPTIONS + setxkbmap "${setxkbcomp_opts[@]}" } ### main ### -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git