Is it possible to limit the lifetime of a ThinLinc session?

One benefit of terminal server solutions like ThinLinc is the ability to have persistent sessions. Users can log in, start a job, disconnect at any time, and come back later to pick up where they left off. This is especially useful for long-running, non-interactive jobs which don’t require constant supervision.

However, session persistence is not always desirable. Sometimes users might finish their job, but rather than logging out afterwards, they simply disconnect from their ThinLinc session. This leaves the session running on the server, unnecessarily consuming ThinLinc licenses and potentially system resources as well. While it may be convenient to keep the session alive for short periods of time - for example, to allow users to move locations or stop work for the weekend - leaving unused sessions running for weeks or months can be wasteful.

Administrators can configure ThinLinc to terminate sessions automatically when certain conditions are met, such as no client being connected for a certain period of time. You can find a list of available options and how to set them in the ThinLinc Administrator’s Guide here:

https://www.cendio.com/resources/docs/tag/config_lifetime.html#configuration-limiting-lifetime

When setting these options make sure to put user experience first; nobody wants to have their session terminated halfway through a job. But setting them appropriately for your specific use-case can make your systems more efficient and maximise resource usage within your organisation.

2 Likes

Hi,

Does the lifetime parameters apply to the Web Accesss solution?
I failed to close user session when using Web Access in combination with -MaxDisconnectionTime.
Any suggestions?

I need to close the user session when the client disconnects without logout from Desktop.
We use tablets (therefor using Web Access) and the user disconnect/lose the network connection without further notice.

Hi @CHerman,

I’ve just tested MaxDissconnectionTime using both the native and browser-based clients, and it seems to work for me in both cases. When using web access, I closed the tab with the ThinLinc session in it.

If your users are just switching away from the browser app on their tablets, it may not register a disconnect. The MaxIdleTime switch may be useful if this is the case:

Hope that helps.

Note that changing options like /vsmagent/xserver_args to add MaxDisconnectionTime or MaxIdleTime both require a restart of vsmagent and only affect new sessions, not existing ones.

They disconnect the tablet without closing the browser :slight_smile:
I hoped there were some sort of heartbeat/keepalive that would detect this faulty handling.

Thanks for your response.