Subject: Re: [X2Go-Dev] Bug#744: user-local keystrokes.cfg does not work

From: Mihai Moldovan <[email-masked]>
Date: Fri, 16 Jan 2015 15:27:17 +0100

On 15.01.2015 11:56 PM, Mike Gabriel wrote:
> Thanks for your patch, Horst.

I totally forgot about that. Thanks.

>> Do we actually WANT to make ~/.nx/foo override /etc/x2go/foo *for
>
> First: We want to allow users to override system-wide settings by
> user settings.

Yes, my point was explicitly about ~/.nx vs. /etc/x2go. ~/.x2go
overriding /etc/x2go is naturally OK.

>> x2goagent*? Or do we rather want to get rid of ~/.nx and
>> /etc/nxagent entirely within x2go components (which, really, would
>> make some sort of sense, especially if $SOMETHING created
>> ~/.nx/config/keystrokes.cfg and users wonder why
>> /etc/x2go/keystrokes.cfg does not take any effect.)
>
> This indeed is a bit of a drama, I agree.
>
> 1. We want to provide NX-X11 to people who still use NX (e.g.
> FreeNX).
>
> To provide this, we have to think generically here. Paths like ~/.nx
> or /etc/nxagent/ are hard-coded in NX-X11 and nxagent and I think
> that is ok. All X2Go'ish paths should be overridden via env vars or
> otherwise.

And that's fine. nxagent (itself) should rely on ~/.nx and /etc/nxagent.

I'm just saying that for x2goagent, it would be smarter to ignore ~/.nx
and /etc/nxagent, thus only taking ~/.x2go and /etc/x2go into consideration.

> In nxagent, there is some code that checks ARGV[0] (== nxagent? ==
> x2goagent?) and triggers the branding of start-up screens of desktop
> sessions (the gray X2GO logo).

Well, if we have that anyway, we can expand on that. Horst's new patch
sounds great by making use of exactly that.

> Maybe for setting paths (esp. ~/.x2go/keystrokes.cfg), some similar
> mechanism should be used?

Wait... there's ~/.x2go/config/keystrokes.cfg and
~/.x2go/keystrokes.cfg? What's the difference between those?

>> Actually, I see another problem there. Wouldn't it be smarter to
>> consider both ~/.x2go/foo and /etc/x2go/keystrokes.cfg (if
>> existent), with values in ~/.x2go/foo overriding those of the
>> global configuration file? A priority-based merge would really be
>> the thing we're looking for. I've got something like that lying
>> around.
>
> It would be smarter, indeed. But one step at a time.

On 15.01.2015 10:27 PM, Horst Schirmeier wrote:
> For example, IMHO it'd require introducing a way to completely
> remove/disable /etc/x2go/keystrokes.cfg definitions via directives in
> user-local files, instead of only overriding key definitions.

I'm not so sure anymore. As pointed out, merging means that you cannot
(easily) delete keys in the global config file. I didn't think of that one.

Mihai