You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Antoine Besnier via user <us...@guacamole.apache.org> on 2026/06/12 07:36:35 UTC
Terminal - screen goes back to bottom line when clicking after scrolling up
Hi All,
Using guacamole client and server built from Github, I noticed since a few weeks ago an undesirable behaviour during SSH sessions. I don't think I saw a similar report in the user mailing list, nor in JIRA.
As English is not my first language, I hope I'll be clear in my explanation.
Let's say I cat a long file, or ls a directory with many files (more than one screen worth of lines), if I scroll up to select some of the text (click/drag to select, right click to copy), the screen immediately goes back to the current cursor positon / user prompt, at the bottom of the screen.
This prevents me from selecting anything that is above one screen worth of lines.
Attached are two video captures, one with 1.6.0, one with a build from Github showing this behaviour.
Note that selecting anything within the current terminal lines works fine.
Here's what is recorded in the logs (yes, it logs twice for each click) :
guacd[299]: DEBUG: Ignoring unknown keysym: 0xFF7F
guacd[299]: DEBUG: Ignoring unknown keysym: 0xFF7F
Which makes no sense as 0xFF7F is supposed to be NumLock (which is indeed not handled by terminal.c, and actually pressing NumLock will be logged the same way)
The issue exists regardless of the browser (normal, it comes form guacd), and is not reproducible with guacd built from source downloaded from the official website.
I tried to diff the files in src/terminal/ between Github and the official tar file, but there are too many changes, and I am not versed enough in C to find what I was looking for.
I use Guacamole in a docker container, behind nginx reverse proxy (I don't think it's relevant), and it used to work perfectly fine up until a few weeks ago, as mentioned. Unfortunately, I did not notice when exactly, as I thought it was a temporary quirk.
The build part in my Dockerfile is like so, if that makes any difference:
# Install guacamole-server
&& cd /git && git clone https://github.com/apache/guacamole-server.git --depth=1 -b main \
&& cd guacamole-server \
&& autoreconf -fi \
&& ./configure --enable-allow-freerdp-snapshots \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd .. \
&& rm -rf guacamole-server-${GUAC_VER}.tar.gz guacamole-server-${GUAC_VER} \
&& ldconfig \
So, as a conclusion, I believe there are two things here:- why is left click registered as 0xFF7F / NumLock, only when clicking after scrolling up?- why is the terminal reset to the bottom line when an unhandled keypress is registered?
I hope I was as clear as possible, and I wish I knew more of C to be more helpful...
Cheers
Antoine
Re: Terminal - screen goes back to bottom line when clicking after scrolling up
Posted by Antoine Besnier via user <us...@guacamole.apache.org>.
Ouf! I'm not crazy then!
Side note that I had forgotten to test: this happens only when scrolling
up with the mouse, and not when using the scroll bar. Which is
consistent with what you pointed out in the Jira issue (it's an issue
with mouse events/state).
I did not think about turning on and off NumLock, as you obviously did.
It works fine when NumLock is off, so this will be my fix for the time
being.
And so, I was way off trying to understand terminal.c (and buffer.c, and
select.c, in guacamole-server) ! Well, at least, I got to brush up on my
C understanding!
Cheers
Antoine
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Terminal - screen goes back to bottom line when clicking after scrolling up
Posted by Corentin SORIANO <cs...@apache.org>.
Indeed, I too can reproduce these two behaviors and they are certainly
linked to each other.
I opened this ticket: GUACAMOLE-2289 [1]
Thank you for this report.
Best regards,
Corentin Soriano
On 2026-06-12 09:36, Antoine Besnier via user wrote:
> Hi All,
>
> Using guacamole client and server built from Github, I noticed since a
> few weeks ago an undesirable behaviour during SSH sessions. I don't
> think I saw a similar report in the user mailing list, nor in JIRA.
>
> As English is not my first language, I hope I'll be clear in my
> explanation.
>
> Let's say I cat a long file, or ls a directory with many files (more
> than one screen worth of lines), if I scroll up to select some of the
> text (click/drag to select, right click to copy), the screen
> immediately goes back to the current cursor positon / user prompt, at
> the bottom of the screen.
>
> This prevents me from selecting anything that is above one screen worth
> of lines.
>
> Attached are two video captures, one with 1.6.0, one with a build from
> Github showing this behaviour.
>
> Note that selecting anything within the current terminal lines works
> fine.
>
> Here's what is recorded in the logs (yes, it logs twice for each click)
> :
>
> guacd[299]: DEBUG: Ignoring unknown keysym: 0xFF7F
> guacd[299]: DEBUG: Ignoring unknown keysym: 0xFF7F
>
> Which makes no sense as 0xFF7F is supposed to be NumLock (which is
> indeed not handled by terminal.c, and actually pressing NumLock will be
> logged the same way)
>
> The issue exists regardless of the browser (normal, it comes form
> guacd), and is not reproducible with guacd built from source downloaded
> from the official website.
>
> I tried to diff the files in _src/terminal/_ between Github and the
> official tar file, but there are too many changes, and I am not versed
> enough in C to find what I was looking for.
>
> I use Guacamole in a docker container, behind nginx reverse proxy (I
> don't think it's relevant), and it used to work perfectly fine up until
> a few weeks ago, as mentioned. Unfortunately, I did not notice when
> exactly, as I thought it was a temporary quirk.
>
> The build part in my Dockerfile is like so, if that makes any
> difference:
>
> # Install guacamole-server
> && cd /git && git clone https://github.com/apache/guacamole-server.git
> --depth=1 -b main \
> && cd guacamole-server \
> && autoreconf -fi \
> && ./configure --enable-allow-freerdp-snapshots \
> && make -j$(getconf _NPROCESSORS_ONLN) \
> && make install \
> && cd .. \
> && rm -rf guacamole-server-${GUAC_VER}.tar.gz
> guacamole-server-${GUAC_VER} \
> && ldconfig \
>
> So, as a conclusion, I believe there are two things here:
> - why is left click registered as 0xFF7F / NumLock, only when clicking
> after scrolling up?
> - why is the terminal reset to the bottom line when an unhandled
> keypress is registered?
>
> I hope I was as clear as possible, and I wish I knew more of C to be
> more helpful...
>
> Cheers
>
> Antoine
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
Links:
------
[1] https://issues.apache.org/jira/browse/GUACAMOLE-2289