Jump to content
Welcome to our new Citrix community!
  • 0

Idle time disconnect based on clientname


Question

Hallo

 

Tried finding a solution to this via google and experimented a lot myself, so far not so much luck :(
 

 

So the scenario is as followes:

We have the following setup:
Citrix xenApp 1912 LTSR on Windows servers 2012R2

Citrix workspace environment manager 1912 LTSR

Users are connecting to the XenApp system using a full desktop solution and starting programs from there.

We have a session timeout of 15min for idle sessions. Aka users are disconnected after being idle for 15min. This is default and set via the GPO for Microsoft RDS idle time settings

 

However since all this is setup on a hospital we have some clients (Not users, but clients) that is being used in a operation room.
Now we don't want those sessions to be terminated after 15min of idle time.

Since its the same users logging on to those clients i am unable to set a idle time based on the users. And they are connecting to the same farm as all other users. So cant set a timeout based on the server either.

 

So we can have the following scenario
A user, lets call him Andy for fun.

Andy is logging on to his normal client and prepares for the upcoming operation - A default idle timeout of 15min is set for his session.
Andy opens a few programs, and prepares a few images.
Now Andy disconnects from his session (He does NOT logoff, just disconnect)

Now Andy logs on to the operation PC and gets his desktops. And he begins to operate and looks at he screen when needed, but does not interact with it as in moving mouse or similar.

This is where we have the issue - because the idle time is still 15 min and i have not found a way to either reset this idle time using w/e script / program anything
Or set a new via a Registry edit.

 

Hope someone has a viable solution for me.

 

Thanks in return

//Martin

Link to comment

4 answers to this question

Recommended Posts

  • 0

Hi,

 

Running Get-BrokerSession inside a session will give you a hard time, since a) A normal user account won't be allowed to run the command, b) The cmdlets are not available by default on a VDA c) You need to execute it at least by using -AdminAddress <Adress of DDC> so you have to take care of fault tolerance if that one DDC goes down. d) there are probably a few thousand lines of code abstraction layered on top of the information that you actually require.

 

WTSQuerySessionInformation is part of the core Terminal Service API (written in C) exposed by Microsoft, probably written by Citrix again a looong time ago. As evident by the screenshot, IdleDuration in Get-BrokerSession also doesn't report any idle times below a few minutes (Note that the Get-TerminalServicesSession which is using the API is custom and not publicly available).

 

1874539903_GreenshotRDS.thumb.png.0a6e64f8f763f7905720b4761f025a0e.png

 

There is also no possibility to set the timeout once inside the session. The original idea was (and I can't think of any other way), that you either run an application which executes in the background in every users session or as a service on VDA level. This program replaces the built-in Idle Time handling. Basically you disable Idle Timeouts and let your routine handle it.

 

Regards

  • Like 1
Link to comment
  • 0

Hi,

 

Nothing out of the box provided by Citrix is able to do this (also not WEM). First check if the Clientname is indeed getting updated on reconnect, as that has been an issue in the past. The rest is just scripting or programming without any complicated code. It may either be a service or an app launching in a users session which will do the IdleTime for you based on whatever you like. Please take note that you'll have to use WTSQuerySessionInformation WinAPI to get the correct idle time (I haven't checked 1912 to be honest), but in Version 7.15 XA fails to populate the idle time returned by Get-BrokerSession with values for non Desktop OS VDA sessions - which is a known issue.

 

Regards

Link to comment
  • 0
On 10/26/2020 at 11:03 AM, Christoph Sinabell said:

Hi,

 

Nothing out of the box provided by Citrix is able to do this (also not WEM). First check if the Clientname is indeed getting updated on reconnect, as that has been an issue in the past. The rest is just scripting or programming without any complicated code. It may either be a service or an app launching in a users session which will do the IdleTime for you based on whatever you like. Please take note that you'll have to use WTSQuerySessionInformation WinAPI to get the correct idle time (I haven't checked 1912 to be honest), but in Version 7.15 XA fails to populate the idle time returned by Get-BrokerSession with values for non Desktop OS VDA sessions - which is a known issue.

 

Regards

 

Hallo

 

Thanks for the quick respons :)

Now i am no expert in scripting , so I'm not to sure on what you mean by using WTSQuerySessionInformation WinAPI - Sry

 

I can see that "Get-brokersession" is definitely useable, and returns the correct idle time.

Now If I could just do something that resets that time using whatever, then that would be perfect :) 

Got any input to that? 

Tried Set-brokersession , unless im doing it wrong that didn't really work :) 

//Martin

Link to comment
  • 0
15 hours ago, Christoph Sinabell said:

Hi,

 

Running Get-BrokerSession inside a session will give you a hard time, since a) A normal user account won't be allowed to run the command, b) The cmdlets are not available by default on a VDA c) You need to execute it at least by using -AdminAddress <Adress of DDC> so you have to take care of fault tolerance if that one DDC goes down. d) there are probably a few thousand lines of code abstraction layered on top of the information that you actually require.

 

WTSQuerySessionInformation is part of the core Terminal Service API (written in C) exposed by Microsoft, probably written by Citrix again a looong time ago. As evident by the screenshot, IdleDuration in Get-BrokerSession also doesn't report any idle times below a few minutes (Note that the Get-TerminalServicesSession which is using the API is custom and not publicly available).

 

1874539903_GreenshotRDS.thumb.png.0a6e64f8f763f7905720b4761f025a0e.png

 

There is also no possibility to set the timeout once inside the session. The original idea was (and I can't think of any other way), that you either run an application which executes in the background in every users session or as a service on VDA level. This program replaces the built-in Idle Time handling. Basically you disable Idle Timeouts and let your routine handle it.

 

Regards

Ahh ok :)
Point taken , i understand.

 

We did however found a viable solution. Not using Citrix or WEM :)
We also have imprivata runing on all the PCs including the operation PC's and turns out that it can handle idle time just as well  :)
And imprivata can handle it on a pr client basis :)

So we will be using that insted

 

Thanks for the help though :)

//Martin

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...