On Fri, Feb 13, 2026 at 7:12 AM Palaash Jain
<[email protected]> wrote:
>
> Hi,
> On the guacd level, I am detecting once a connection is closed or logged off 
> when we are towards the end of the thread.
> Basically, I have a custom daemon that creates a new thread for every 
> connection that has a single client and a single user for my use case,
> then that thread comes to end once it is done with 
> guac_user_handle_connection and then I conclude that the connection is 
> closing. // please refer below code
>
> But I want to perform extra activity here, once I know connection is closed, 
> I want to go and delete the redirected drive that the session had used
> that I passed in my connection args, but I am not able to do so using 
> (guac_rdp_settings*)(user->data) as guac_rdp_settings is visible only for rdp 
> connections, not anyone outside.
>
> How can I get the values of those connection params so that I can perform 
> some actions later on after logging out?
> I guess these are sensitive params, that's why they are rightly hidden by 
> this approach but I want those values to pass to other exe.
>

You'd have to either reference or store the protocol-level settings,
or at least copies of the ones you want access to, in such a way as to
allow you to access them after the protocol-level code has been
closed.

But, more basically, why do you need to do this? Why not use the
protocol-level code to accomplish this and just modify that to do what
you want. The current guacd code already has extensive user join and
leave handlers, and add and remove user functions, several of which
are designed to be called within the protocol handler and that can
probably do what you're trying to do at the time that a user leaves a
connection:

https://github.com/apache/guacamole-server/blob/4577484c9e8fc1fdbc20e55d02da4696b7d301b1/src/libguac/guacamole/user.h#L418-L435
https://github.com/apache/guacamole-server/blob/4577484c9e8fc1fdbc20e55d02da4696b7d301b1/src/libguac/guacamole/client.h#L224-L245
https://github.com/apache/guacamole-server/blob/4577484c9e8fc1fdbc20e55d02da4696b7d301b1/src/libguac/guacamole/client.h#L263-L279
https://github.com/apache/guacamole-server/blob/4577484c9e8fc1fdbc20e55d02da4696b7d301b1/src/libguac/guacamole/client.h#L457-L478
https://github.com/apache/guacamole-server/blob/4577484c9e8fc1fdbc20e55d02da4696b7d301b1/src/protocols/rdp/user.c#L151-L166

Why not just work with those - or, if you're determined to write your
own version of guacd, look at the way those are implemented in the
official version of guacd and do something similar?

-Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to