[X2Go-Commits] x2goserver.git - build-main (branch) updated: 3.0.99-2-50-gd9c027b

X2Go dev team git-admin at x2go.org
Wed Dec 4 06:17:25 CET 2013


The branch, build-main has been updated
       via  d9c027bc304c5131c11e7baa312433dbba7a4cc2 (commit)
      from  d9fbb184b688c5c9dc376e07a8e4ae071fb45d28 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 bin/x2gosetkeyboard |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100755 bin/x2gosetkeyboard

The diff of changes is:
diff --git a/bin/x2gosetkeyboard b/bin/x2gosetkeyboard
new file mode 100755
index 0000000..022f97d
--- /dev/null
+++ b/bin/x2gosetkeyboard
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# Copyright (C) 2007-2011 X2go Project - http://wiki.x2go.org
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Copyright (C) 2011  Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+# Copyright (C) 2011  Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
+
+set -e
+
+# set up paths
+X2GO_SESSION_ROOT=${HOME}/.x2go
+X2GO_SESSION_DIR=${X2GO_SESSION_ROOT}/C-${X2GO_SESSION}
+
+# client keyboard configuration
+X2GO_CLIENT_KBD_FILE=${X2GO_SESSION_DIR}/keyboard
+
+test -f ${X2GO_CLIENT_KBD_FILE} || exit 0
+
+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)
+
+}
+
+update_keymap() {
+
+        # 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="-options $XKB_OPTIONS"
+
+        # update keyboard map
+        setxkbmap $XKB_RULES $XKB_MODEL $XKB_LAYOUT $XKB_VARIANT $XKB_OPTIONS
+}
+
+### main ###
+read_keyboard_file
+update_keymap


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list