You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Tushar Sheth <tu...@gmail.com> on 2022/03/14 18:38:13 UTC

source code changes to disable guac's auto-reconnect after vnc idle timeout?

Hey all- I've done some digging since my last post about this. Would be
grateful for your direction. Happy also to pay for anyone's time if that's
an option.

Apologies for this long post. We desperately need some help to get things
going for an early customer we just scored.

Problem:
-->We have an idle timeout (15 mins) working via tigervnc server. The
problem is, guacamole then automatically reconnects, which we want to
disable.

Setup:
-->Guac: ubuntu 20.04 (on GCP) + guac 1.4.0 & guac-client built from source
+ tomcat9 + nginx reverse proxy & ssl + mysql auth
-->VM: vnc connection using tigervnc server to Kali Linux (on GCP)

Some solution ideas/questions (with contextual info):

1. Here
<https://drive.google.com/file/d/1u7xJfJyG0gv5C_pv8vUpIpDNExjYjW87/view?usp=sharing>
is a screenshot of the auto reconnect dialogue box that pops up after the
VNC server does the idle timeout

2. The dialogue box language matches up with ERROR_CLIENT_203
<https://github.com/apache/guacamole-client/blob/ed7746e0612d569644277a2aa654c5eda4447c8e/guacamole/src/main/frontend/src/translations/en.json#L80>
in the guacamole-client source code

3. Client error code 203 is designated as one of the error codes that
triggers an auto reconnect in guacClientNotification.js
<https://github.com/apache/guacamole-client/blob/7e30b8682a28c50935874e6779281da4c548715e/guacamole/src/main/frontend/src/app/client/directives/guacClientNotification.js#L95>

4. Could I disable the reconnect simply by commenting out line 95 in
guacClientNotification.js? (I get that this is not a recommended way to do
it)

5. If I do that, can I activate the change simply by restarting guacd or do
I need to make the change in source and then reinstall guacamole-client?

6. If modifying guacClientNotification.js is not the way, then what do I
need to modify to accomplish my goal?

7. I've seen past listserv messages explaining that GUACAMOLE-208
<https://issues.apache.org/jira/browse/GUACAMOLE-208> might have intended
to address this, so perhaps that didn't fully work and guacamole is still
not categorizing idle timeout under the proper error code (or maybe it's
fixed for rdp but not vnc). However, that seems like a big lift to sort out
quickly- I would really welcome a quick hacky solution even if it isn't
ideal. Even a way to disable auto-reconnect across the board would be fine
for now.

7. Is your ideal rec to do this via an extension? If yes, any pointers to
get us started? I've read the documentation, but I don't understand how we
could use an extension to override the auto-reconnect trigger.

Thank you!!

Tushar

Re: source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by Tushar Sheth <tu...@gmail.com>.
An update- the temp change I tried, commenting out line 95 in
guacClientNotificatin.js worked (after rebuilding guac client)! Guac no
longer tries to auto-reconnect after the vnc idle timeout. Here
<https://drive.google.com/file/d/1DnOmEIW0cL3focmpKM4FDdjRwyHXeZe4/view?usp=sharing>
is a screenshot of the new dialogue box that appears.

Nick- I still look forward to the changes you're thinking about- will be
useful. But not as urgent now in case you're busy with other things (as I'm
sure you are).

Thanks everyone for the help!

Tushar

On Mon, Mar 14, 2022 at 5:41 PM Tushar Sheth <tu...@gmail.com> wrote:

> Wow. Thank you!
>
> Let me know if there is anything I can do to help. Unfortunately though,
> my skills are limited to being able to take code and manipulate it.
>
> Tushar
>
> On Mon, Mar 14, 2022 at 5:27 PM Nick Couchman <vn...@apache.org> wrote:
>
>> On Mon, Mar 14, 2022 at 4:50 PM Tushar Sheth <tu...@gmail.com>
>> wrote:
>>
>>> Thanks Jonathan- yes I have been looking at your various listserve posts
>>> and github issues related to this. Very helpful.
>>>
>>> I'm unfortunately not skilled enough to make the full fix in vnc.c that
>>> would mirror the changes to rdp.c that were made in response to your bug
>>> submission. At least not quickly.
>>>
>>> Perhaps there is a temporary modification I can make to vnc.c- although
>>> that seems a lot riskier than doing hacky things on the guac-client side :)
>>>
>>>
>> Hello, everyone,
>> As the reconnect is triggered on the client-side, I think it would be
>> possible to create a Connection Attribute (as opposed to a parameter) to
>> disable auto-reconnect and be able to set that per-connection, on any
>> supported protocol. If I have some time in the coming days I'll take a stab
>> at it.
>>
>> -Nick
>>
>>>

Re: source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by Tushar Sheth <tu...@gmail.com>.
Wow. Thank you!

Let me know if there is anything I can do to help. Unfortunately though, my
skills are limited to being able to take code and manipulate it.

Tushar

On Mon, Mar 14, 2022 at 5:27 PM Nick Couchman <vn...@apache.org> wrote:

> On Mon, Mar 14, 2022 at 4:50 PM Tushar Sheth <tu...@gmail.com>
> wrote:
>
>> Thanks Jonathan- yes I have been looking at your various listserve posts
>> and github issues related to this. Very helpful.
>>
>> I'm unfortunately not skilled enough to make the full fix in vnc.c that
>> would mirror the changes to rdp.c that were made in response to your bug
>> submission. At least not quickly.
>>
>> Perhaps there is a temporary modification I can make to vnc.c- although
>> that seems a lot riskier than doing hacky things on the guac-client side :)
>>
>>
> Hello, everyone,
> As the reconnect is triggered on the client-side, I think it would be
> possible to create a Connection Attribute (as opposed to a parameter) to
> disable auto-reconnect and be able to set that per-connection, on any
> supported protocol. If I have some time in the coming days I'll take a stab
> at it.
>
> -Nick
>
>>

Re: source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by Nick Couchman <vn...@apache.org>.
On Mon, Mar 14, 2022 at 4:50 PM Tushar Sheth <tu...@gmail.com> wrote:

> Thanks Jonathan- yes I have been looking at your various listserve posts
> and github issues related to this. Very helpful.
>
> I'm unfortunately not skilled enough to make the full fix in vnc.c that
> would mirror the changes to rdp.c that were made in response to your bug
> submission. At least not quickly.
>
> Perhaps there is a temporary modification I can make to vnc.c- although
> that seems a lot riskier than doing hacky things on the guac-client side :)
>
>
Hello, everyone,
As the reconnect is triggered on the client-side, I think it would be
possible to create a Connection Attribute (as opposed to a parameter) to
disable auto-reconnect and be able to set that per-connection, on any
supported protocol. If I have some time in the coming days I'll take a stab
at it.

-Nick

>

Re: source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by Tushar Sheth <tu...@gmail.com>.
Thanks Jonathan- yes I have been looking at your various listserve posts
and github issues related to this. Very helpful.

I'm unfortunately not skilled enough to make the full fix in vnc.c that
would mirror the changes to rdp.c that were made in response to your bug
submission. At least not quickly.

Perhaps there is a temporary modification I can make to vnc.c- although
that seems a lot riskier than doing hacky things on the guac-client side :)

Tushar


On Mon, Mar 14, 2022 at 3:57 PM Hankins, Jonathan <
jhankins@homewood.k12.al.us> wrote:

> Tushar,
>
> I had a bug filed for a similar issue with RDP session termination code:
> https://issues.apache.org/jira/browse/GUACAMOLE-484. Not sure if that
> gives you any insight.
>
> As far as your question 5, if you change part of guacd you'd need to
> recompile and restart guacd. If the change is in the Guacamole client,
> you'd need to rebuild and replace guacamole.war and restart your
> servelet (tomcat or whatever). The changes in the pull request where they
> addressed by bug were all in guacd from what I can tell.
>
>
>
> On Mon, Mar 14, 2022 at 1:38 PM Tushar Sheth <tu...@gmail.com>
> wrote:
>
>> Hey all- I've done some digging since my last post about this. Would be
>> grateful for your direction. Happy also to pay for anyone's time if that's
>> an option.
>>
>> Apologies for this long post. We desperately need some help to get things
>> going for an early customer we just scored.
>>
>> Problem:
>> -->We have an idle timeout (15 mins) working via tigervnc server. The
>> problem is, guacamole then automatically reconnects, which we want to
>> disable.
>>
>> Setup:
>> -->Guac: ubuntu 20.04 (on GCP) + guac 1.4.0 & guac-client built from
>> source + tomcat9 + nginx reverse proxy & ssl + mysql auth
>> -->VM: vnc connection using tigervnc server to Kali Linux (on GCP)
>>
>> Some solution ideas/questions (with contextual info):
>>
>> 1. Here
>> <https://drive.google.com/file/d/1u7xJfJyG0gv5C_pv8vUpIpDNExjYjW87/view?usp=sharing>
>> is a screenshot of the auto reconnect dialogue box that pops up after the
>> VNC server does the idle timeout
>>
>> 2. The dialogue box language matches up with ERROR_CLIENT_203
>> <https://github.com/apache/guacamole-client/blob/ed7746e0612d569644277a2aa654c5eda4447c8e/guacamole/src/main/frontend/src/translations/en.json#L80>
>> in the guacamole-client source code
>>
>> 3. Client error code 203 is designated as one of the error codes that
>> triggers an auto reconnect in guacClientNotification.js
>> <https://github.com/apache/guacamole-client/blob/7e30b8682a28c50935874e6779281da4c548715e/guacamole/src/main/frontend/src/app/client/directives/guacClientNotification.js#L95>
>>
>> 4. Could I disable the reconnect simply by commenting out line 95 in
>> guacClientNotification.js? (I get that this is not a recommended way to do
>> it)
>>
>> 5. If I do that, can I activate the change simply by restarting guacd or
>> do I need to make the change in source and then reinstall guacamole-client?
>>
>> 6. If modifying guacClientNotification.js is not the way, then what do I
>> need to modify to accomplish my goal?
>>
>> 7. I've seen past listserv messages explaining that GUACAMOLE-208
>> <https://issues.apache.org/jira/browse/GUACAMOLE-208> might have
>> intended to address this, so perhaps that didn't fully work and guacamole
>> is still not categorizing idle timeout under the proper error code (or
>> maybe it's fixed for rdp but not vnc). However, that seems like a big lift
>> to sort out quickly- I would really welcome a quick hacky solution even if
>> it isn't ideal. Even a way to disable auto-reconnect across the board would
>> be fine for now.
>>
>> 7. Is your ideal rec to do this via an extension? If yes, any pointers to
>> get us started? I've read the documentation, but I don't understand how we
>> could use an extension to override the auto-reconnect trigger.
>>
>> Thank you!!
>>
>> Tushar
>>
>
>
> --
> Jonathan Hankins
>
> Homewood City Schools
>
> W: 205-877-4548
>
> This e-mail is intended only for the recipient and may contain
> confidential or proprietary information. If you are not the intended
> recipient, the review, distribution, duplication or retention of this
> message and its attachments are prohibited. Please notify the sender of
> this error immediately by reply e-mail, and permanently delete this message
> and its attachments in any form in which they may have been preserved.

Re: source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by "Hankins, Jonathan" <jh...@homewood.k12.al.us>.
Tushar,

I had a bug filed for a similar issue with RDP session termination code:
https://issues.apache.org/jira/browse/GUACAMOLE-484. Not sure if that gives
you any insight.

As far as your question 5, if you change part of guacd you'd need to
recompile and restart guacd. If the change is in the Guacamole client,
you'd need to rebuild and replace guacamole.war and restart your
servelet (tomcat or whatever). The changes in the pull request where they
addressed by bug were all in guacd from what I can tell.



On Mon, Mar 14, 2022 at 1:38 PM Tushar Sheth <tu...@gmail.com> wrote:

> Hey all- I've done some digging since my last post about this. Would be
> grateful for your direction. Happy also to pay for anyone's time if that's
> an option.
>
> Apologies for this long post. We desperately need some help to get things
> going for an early customer we just scored.
>
> Problem:
> -->We have an idle timeout (15 mins) working via tigervnc server. The
> problem is, guacamole then automatically reconnects, which we want to
> disable.
>
> Setup:
> -->Guac: ubuntu 20.04 (on GCP) + guac 1.4.0 & guac-client built from
> source + tomcat9 + nginx reverse proxy & ssl + mysql auth
> -->VM: vnc connection using tigervnc server to Kali Linux (on GCP)
>
> Some solution ideas/questions (with contextual info):
>
> 1. Here
> <https://drive.google.com/file/d/1u7xJfJyG0gv5C_pv8vUpIpDNExjYjW87/view?usp=sharing>
> is a screenshot of the auto reconnect dialogue box that pops up after the
> VNC server does the idle timeout
>
> 2. The dialogue box language matches up with ERROR_CLIENT_203
> <https://github.com/apache/guacamole-client/blob/ed7746e0612d569644277a2aa654c5eda4447c8e/guacamole/src/main/frontend/src/translations/en.json#L80>
> in the guacamole-client source code
>
> 3. Client error code 203 is designated as one of the error codes that
> triggers an auto reconnect in guacClientNotification.js
> <https://github.com/apache/guacamole-client/blob/7e30b8682a28c50935874e6779281da4c548715e/guacamole/src/main/frontend/src/app/client/directives/guacClientNotification.js#L95>
>
> 4. Could I disable the reconnect simply by commenting out line 95 in
> guacClientNotification.js? (I get that this is not a recommended way to do
> it)
>
> 5. If I do that, can I activate the change simply by restarting guacd or
> do I need to make the change in source and then reinstall guacamole-client?
>
> 6. If modifying guacClientNotification.js is not the way, then what do I
> need to modify to accomplish my goal?
>
> 7. I've seen past listserv messages explaining that GUACAMOLE-208
> <https://issues.apache.org/jira/browse/GUACAMOLE-208> might have intended
> to address this, so perhaps that didn't fully work and guacamole is still
> not categorizing idle timeout under the proper error code (or maybe it's
> fixed for rdp but not vnc). However, that seems like a big lift to sort out
> quickly- I would really welcome a quick hacky solution even if it isn't
> ideal. Even a way to disable auto-reconnect across the board would be fine
> for now.
>
> 7. Is your ideal rec to do this via an extension? If yes, any pointers to
> get us started? I've read the documentation, but I don't understand how we
> could use an extension to override the auto-reconnect trigger.
>
> Thank you!!
>
> Tushar
>


-- 
Jonathan Hankins

Homewood City Schools

W: 205-877-4548

-- 
This e-mail is intended only for the recipient and may contain confidential 
or proprietary information. If you are not the intended recipient, the 
review, distribution, duplication or retention of this message and its 
attachments are prohibited. Please notify the sender of this error 
immediately by reply e-mail, and permanently delete this message and its 
attachments in any form in which they may have been preserved.

RE: [External] source code changes to disable guac's auto-reconnect after vnc idle timeout?

Posted by Daniel McCarty <da...@whleary.com>.
This is probably not the answer you’re looking for, but perhaps it’s an option to trigger a host-OS-logoff instead of a VNC timeout?  In that case, guac doesn’t try reconnect.  Our setup currently works this way through RDP and a windows group policy auto-logoff, ymmv.




Daniel McCarty
Director of Engineering
W. H. Leary Co.
P. +1 708.444.4900
E. danielm@whleary.com | W. whleary.com<http://www.whleary.com>

From: Tushar Sheth <tu...@gmail.com>
Sent: Monday, March 14, 2022 1:38 PM
To: user@guacamole.apache.org
Subject: [External] source code changes to disable guac's auto-reconnect after vnc idle timeout?

Hey all- I've done some digging since my last post about this. Would be grateful for your direction. Happy also to pay for anyone's time if that's an option.

Apologies for this long post. We desperately need some help to get things going for an early customer we just scored.

Problem:
-->We have an idle timeout (15 mins) working via tigervnc server. The problem is, guacamole then automatically reconnects, which we want to disable.

Setup:
-->Guac: ubuntu 20.04 (on GCP) + guac 1.4.0 & guac-client built from source + tomcat9 + nginx reverse proxy & ssl + mysql auth
-->VM: vnc connection using tigervnc server to Kali Linux (on GCP)

Some solution ideas/questions (with contextual info):

1. Here<https://urldefense.proofpoint.com/v2/url?u=https-3A__drive.google.com_file_d_1u7xJfJyG0gv5C-5Fpv8vUpIpDNExjYjW87_view-3Fusp-3Dsharing&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=KfJK_i8bAAiKEOAyAm9y9vt5kSwc8dkKCDiCjPA9mhw&m=qQM1Az1JyHlxPiDHO_EM80TNZpgWjKbBHTP6ujMCObI&s=sIYrKrVJhxOJBsWyaM47okMD3oxUKuvj76-3VDUMfjc&e=> is a screenshot of the auto reconnect dialogue box that pops up after the VNC server does the idle timeout

2. The dialogue box language matches up with ERROR_CLIENT_203<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_guacamole-2Dclient_blob_ed7746e0612d569644277a2aa654c5eda4447c8e_guacamole_src_main_frontend_src_translations_en.json-23L80&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=KfJK_i8bAAiKEOAyAm9y9vt5kSwc8dkKCDiCjPA9mhw&m=qQM1Az1JyHlxPiDHO_EM80TNZpgWjKbBHTP6ujMCObI&s=bqScqGOaYPRBABiCErWGdCY6zzMUfSxxDqV5aONCXFk&e=> in the guacamole-client source code

3. Client error code 203 is designated as one of the error codes that triggers an auto reconnect in guacClientNotification.js<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_guacamole-2Dclient_blob_7e30b8682a28c50935874e6779281da4c548715e_guacamole_src_main_frontend_src_app_client_directives_guacClientNotification.js-23L95&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=KfJK_i8bAAiKEOAyAm9y9vt5kSwc8dkKCDiCjPA9mhw&m=qQM1Az1JyHlxPiDHO_EM80TNZpgWjKbBHTP6ujMCObI&s=par5TiQVuNa_ly9L7NApQvRnsmg2A6218_HgEWz2yu4&e=>

4. Could I disable the reconnect simply by commenting out line 95 in guacClientNotification.js? (I get that this is not a recommended way to do it)

5. If I do that, can I activate the change simply by restarting guacd or do I need to make the change in source and then reinstall guacamole-client?

6. If modifying guacClientNotification.js is not the way, then what do I need to modify to accomplish my goal?

7. I've seen past listserv messages explaining that GUACAMOLE-208<https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_GUACAMOLE-2D208&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=KfJK_i8bAAiKEOAyAm9y9vt5kSwc8dkKCDiCjPA9mhw&m=qQM1Az1JyHlxPiDHO_EM80TNZpgWjKbBHTP6ujMCObI&s=ZLy8o2tYo_Y0s6_C_MSufaNmrdqmrX_BaX_jeR-TaQk&e=> might have intended to address this, so perhaps that didn't fully work and guacamole is still not categorizing idle timeout under the proper error code (or maybe it's fixed for rdp but not vnc). However, that seems like a big lift to sort out quickly- I would really welcome a quick hacky solution even if it isn't ideal. Even a way to disable auto-reconnect across the board would be fine for now.

7. Is your ideal rec to do this via an extension? If yes, any pointers to get us started? I've read the documentation, but I don't understand how we could use an extension to override the auto-reconnect trigger.

Thank you!!

Tushar