X2Go Bug report logs - #744
user-local keystrokes.cfg does not work

version graph

Package: x2goagent; Maintainer for x2goagent is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goagent is src:nx-libs.

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

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

Severity: normal

Tags: patch, pending

Found in version 2:3.5.0.29-0x2go1~git20150113.557+wheezy.heuler.1

Fixed in version 2:3.5.0.29

Done: X2Go Release Manager <git-admin@x2go.org>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#744: user-local keystrokes.cfg does not work
Reply-To: Horst Schirmeier <horst@schirmeier.com>, 744@bugs.x2go.org
Resent-From: Horst Schirmeier <horst@schirmeier.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Thu, 15 Jan 2015 15:20:01 +0000
Resent-Message-ID: <handler.744.B.14213350507097@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: report 744
X-X2Go-PR-Package: x2goagent
X-X2Go-PR-Keywords: 
Received: via spool by submit@bugs.x2go.org id=B.14213350507097
          (code B); Thu, 15 Jan 2015 15:20:01 +0000
Received: (at submit) by bugs.x2go.org; 15 Jan 2015 15:17:30 +0000
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
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: Fri Apr 19 16:08:47 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.