X2Go Bug report logs - #750
Update keystrokes.cfg docs for nx-libs 3.5.0.29

Package: wiki.x2go.org; Maintainer for wiki.x2go.org is x2go-dev@lists.x2go.org;

Reported by: Horst Schirmeier <horst@schirmeier.com>

Date: Thu, 15 Jan 2015 15:20:01 UTC

Severity: normal

Tags: patch

Done: Mihai Moldovan <ionic@ionic.de>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 15 Jan 2015 15:17:30 +0000
From horst@schirmeier.com  Thu Jan 15 16:17:29 2015
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED
	autolearn=ham version=3.3.2
X-Greylist: delayed 400 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Thu, 15 Jan 2015 16:17:28 CET
Received: from quickstop.soohrt.org (quickstop.soohrt.org [85.131.246.152])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id E1F2E5DA53
	for <submit@bugs.x2go.org>; Thu, 15 Jan 2015 16:17:28 +0100 (CET)
Received: (qmail 7145 invoked by uid 1014); 15 Jan 2015 15:10:46 -0000
Date: Thu, 15 Jan 2015 16:10:46 +0100
From: Horst Schirmeier <horst@schirmeier.com>
To: submit@bugs.x2go.org
Subject: user-local keystrokes.cfg does not work
Message-ID: <20150115151045.GI22378@quickstop.soohrt.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Package: x2goagent
Version: 2:3.5.0.29-0x2go1~git20150113.557+wheezy.heuler.1

A user-local ~/.nx/config/keystrokes.cfg (as described on
<http://wiki.x2go.org/doku.php/wiki:advanced:nx-keyboard-shortcuts>,
which, btw, still talks about the singular file name "keystroke.cfg") is
not read by nxagent, incapacitating users from overriding system-wide
defaults.

The core reason is the way x2goagent communicates the custom
/etc/x2go/keystrokes.cfg path to nxagent:

NXAGENT_KEYSTROKEFILE=/etc/x2go/keystrokes.cfg
export NXAGENT_KEYSTROKEFILE

In nxagent's keystroke-file search order, this environment variable is
tested for before ~/.nx/config/keystrokes.cfg is looked at.  As a simple
remedy, I suggest imitating nxagent's search order in the x2goagent
wrapper script:

---
 debian/wrappers/x2goagent | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/wrappers/x2goagent b/debian/wrappers/x2goagent
index 129c7ca..750c651 100644
--- a/debian/wrappers/x2goagent
+++ b/debian/wrappers/x2goagent
@@ -29,7 +29,15 @@ test -x $NX_LIBS/../x2go/bin/$NXAPP && export NX_LIBS=$NX_LIBS
 
 export LD_LIBRARY_PATH
 
-NXAGENT_KEYSTROKEFILE=/etc/x2go/keystrokes.cfg
-export NXAGENT_KEYSTROKEFILE
+for CONFIG in ~/.x2go/config/keystrokes.cfg ~/.nx/config/keystrokes.cfg \
+              /etc/x2go/keystrokes.cfg /etc/nxagent/keystrokes.cfg
+do
+	if [ -r "$CONFIG" ]
+	then
+		NXAGENT_KEYSTROKEFILE=$CONFIG
+		export NXAGENT_KEYSTROKEFILE
+		break
+	fi
+done
 
 exec $NX_LIBS/../x2go/bin/$NXAPP "$@"

-- 
PGP-Key 0xD40E0E7A


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sat Nov 23 10:40:18 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.