Subject: Keys do not release when using Emacs in X2GO Client

From: Yan Zhang <[email-masked]>
Date: Mon, 28 Jan 2019 13:56:23 +0800

Package: x2goclient
Version: 4.1.2.0

I am using Emacs 24.5.1 with x2go client version 4.1.2.0 in Windows 10. My
server OS is Ubuntu 16.04 and the x2goserver comes from the PPA repo.

The problem happens if I hit "ctrl+space" to start mark region in Emacs and
then press down "ctrl+n" to scroll down the region for a few seconds.
Usually after I release "ctrl+n", Emacs will leave the currently marked
region for further commands. But in the reported version of client, Emacs
keeps scrolling down until it reaches the end of the file. There is no way
to stop it within Emacs (e.g., "ctrl+g").

I have tried to move the cursor by keeping "ctrl+n" pressed down. This
issue does not happen after I release the key.

This issue happens when the session type is either "XFCE" or "published
application". I have not tested other session types as I do not have an
environment for that. And client version 4.1.1.1 does not seem to have this
issue.

Thanks and regards,
Yan

---

From: Ulrich Sibiller <[email-masked]>
Date: Tue, 12 Mar 2019 13:28:45 +0100

On Tue, Mar 12, 2019 at 12:38 PM Yan Zhang <[email-masked]> wrote:
>
> Package: x2goclient
> Version: 4.1.2.0
>
> I am using Emacs 24.5.1 with x2go client version 4.1.2.0 in Windows 10. My server OS is Ubuntu 16.04 and the x2goserver comes from the PPA repo.
>
> The problem happens if I hit "ctrl+space" to start mark region in Emacs and then press down "ctrl+n" to scroll down the region for a few seconds. Usually after I release "ctrl+n", Emacs will leave the currently marked region for further commands. But in the reported version of client, Emacs keeps scrolling down until it reaches the end of the file. There is no way to stop it within Emacs (e.g., "ctrl+g").
>
> I have tried to move the cursor by keeping "ctrl+n" pressed down. This issue does not happen after I release the key.

I do not get the difference between this and the description above.
Please explain!

> This issue happens when the session type is either "XFCE" or "published application". I have not tested other session types as I do not have an environment for that. And client version 4.1.1.1 does not seem to have this issue.

Please run "xev -event keyboard" inside the session and check if you
see all the KeyPress and KeyRelease events for you keys. If anyone is
missing this could explain your issue.

Uli

---

From: Yan Zhang <[email-masked]>
Date: Wed, 13 Mar 2019 16:09:51 +0800

Hi Ulrich,

On Tue, Mar 12, 2019 at 8:29 PM Ulrich Sibiller <[email-masked]>
wrote:

> > I am using Emacs 24.5.1 with x2go client version 4.1.2.0 in Windows 10.
> My server OS is Ubuntu 16.04 and the x2goserver comes from the PPA repo.
> >
> > The problem happens if I hit "ctrl+space" to start mark region in Emacs
> and then press down "ctrl+n" to scroll down the region for a few seconds.
The difference is whether I start mark region (by hitting "ctrl+space")
before moving cursor. The client will only stuck if I first start mark
region and then hold cursor-moving keys like "ctrl+n" or "ctrl+p" for a few
seconds.

> missing this could explain your issue.

 I tried "xev -event keyboard" in a XFCE session and did not observe any
missing keystrokes.

Thanks and regards,
Yan

---

From: Ulrich Sibiller <[email-masked]>
Date: Wed, 13 Mar 2019 10:04:36 +0100

>> > I am using Emacs 24.5.1 with x2go client version 4.1.2.0 in Windows 10. My server OS is Ubuntu 16.04 and the x2goserver comes from the PPA repo.

You could try updating your nx-libs to nightly and retry:
https://sunweavers.net/blog/node/20

> The difference is whether I start mark region (by hitting "ctrl+space") before moving cursor. The client will only stuck if I first start mark region and then hold cursor-moving keys like "ctrl+n" or "ctrl+p" for a few seconds.

Ok, understood. But still not replicable for me.

>  I tried "xev -event keyboard" in a XFCE session and did not observe any missing keystrokes.

Nor did I. So maybe this is bug in emacs. I tested with 24.3.1, can
you downgrade?

Uli

---

From: Bob Harold <[email-masked]>
Date: Wed, 13 Mar 2019 21:50:46 -0400

On Wed, Mar 13, 2019 at 5:17 AM Ulrich Sibiller <[email-masked]> wrote:

> >> > I am using Emacs 24.5.1 with x2go client version 4.1.2.0 in Windows
> 10. My server OS is Ubuntu 16.04 and the x2goserver comes from the PPA repo.
>

Just a thought - there is some lag in the screen updates from the remote
host when using a protocol like x2.  It is possible that holding the keys
for a few seconds, with auto-repeat, has buffered enough copies of the
keystroke to scroll the file all the way to the end, even after you let
go.  Is that possible?

-- 
Bob Harold

---

From: Ulrich Sibiller <[email-masked]>
Date: Thu, 14 Mar 2019 07:50:49 +0100

You mean NX, I guess, not X2 (there's no such protocol). However: I am
using NX over two chained WANs without such problems. For some time I even
used it for working on machines on the other side of the Atlantic ocean -
and it worked flawlessly.

@Yan: you could try setting the connection type to ADSL or even ISDN and
retry.

Uli

---

From: Михайло Падалка <[email-masked]>
Date: Thu, 14 Mar 2019 11:42:26 +0200

Well, just for note, from time to time I observe similar behavior even
without NX - when switching between apps with Alt-TAB - TAB key is
occasionally not released.
Looks like some bug either in kernel, or in Xorg, not sure where exactly.

Чт, 14 бер. 2019, 08:56 користувач Ulrich Sibiller <[email-masked]> пише:

>>> > The difference is whether I start mark region (by hitting
>>> "ctrl+space") before moving cursor. The client will only stuck if I first
>>> start mark region and then hold cursor-moving keys like "ctrl+n" or
>>> "ctrl+p" for a few seconds.
>>>
> _______________________________________________
> x2go-dev mailing list
> [email-masked]
> https://lists.x2go.org/listinfo/x2go-dev

---

From: Yan Zhang <[email-masked]>
Date: Thu, 14 Mar 2019 19:59:59 +0800

Hi Uli,

I found a temporary solution. If I disable the transient mark mode, under
which the selected region is highlighted, this issue goes away. So I guess
the issue is related to events generated by rendering the highlighted
region. And one thing I forgot to mention is that if I start emacs without
GUI (i.e., emacs -nw), I do not have this issue.

On the other hand, I have tried to use ADSL/ISDN, change my emacs version
to both 26.1 and 24.3.1, and upgrade NX to the nightly build. None of these
has any effect.

Thanks and regards,
Yan

-- 
Yan

---

From: Ulrich Sibiller <[email-masked]>
Date: Fri, 15 Mar 2019 23:53:45 +0100

On Thu, Mar 14, 2019 at 1:00 PM Yan Zhang <[email-masked]> wrote:

> I found a temporary solution. If I disable the transient mark mode, under which the selected region is highlighted, this issue goes away. So I guess the issue is related to events generated by rendering the highlighted region. And one thing I forgot to mention is that if I start emacs without GUI (i.e., emacs -nw), I do not have this issue.

So this indicates that it probalby is connected to drawing. If this
happens via images for some reason it might explain the problem.

Please perform this test for me: Edit /etc/x2go/agent.options on the
server and ensure that the following line is active (no leading '#'):

X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension GLX"

Then start a new session (with transient mark mode enabled) and retry.
Is that working better?

Uli

---

From: Yan Zhang <[email-masked]>
Date: Mon, 18 Mar 2019 10:16:42 +0800

Hi Uli,

Sorry for the slow reply. For my XFCE sessions, turning on "-extension GLX"
seems to solve the problem. But under "published applications" mode, the
issue is still there.

Thanks and regards,
Yan

On Sat, Mar 16, 2019 at 6:54 AM Ulrich Sibiller <[email-masked]> wrote:

> > I found a temporary solution. If I disable the transient mark mode,
> under which the selected region is highlighted, this issue goes away. So I
> guess the issue is related to events generated by rendering the highlighted

-- 
Yan