# Terminate a session

**URL:** <https://community.thinlinc.com/t/terminate-a-session/1922>\
**Category:** Community Support\
**Created:** [25 February 2026 12:59 UTC](https://community.thinlinc.com/t/terminate-a-session/1922 "2026-02-25T12:59:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jean](https://community.thinlinc.com/u/jean)\
**Post date:** [25 February 2026 12:59 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/1 "2026-02-25T12:59:38Z")

</div>

I connect to a thinlinc server which forwards me to an agent(only in in this test case). Everything works as expected (this is a single-app connection). I can terminate the session an start a new one - everything as expected. But when I turn of the terminal (a harsh but possible scenario) a new connection fails with - you’re not allowed to create any more sessions. Even though I have -f terminate. And yes I have max\_session\_per\_usr set to 1.

What to do in this situation? I can’t terminate the session with tlctl, because it should be done automatically

Any ideas?

---

<div class="post-metadata">

**Author:** ![aaron](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/aaron/32/13_2.png) [@aaron](https://community.thinlinc.com/u/aaron)\
**Post date:** [25 February 2026 22:33 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/2 "2026-02-25T22:33:39Z")

</div>

Hi @jean,

From a ThinLinc perspective, turning off the terminal should have essentially the same effect as disconnecting. So I’m surprised you’re not able to reconnect to the existing session.

After turning off the terminal, does `tlctl session list` still show your session?

You can also check `/var/log/vsmagent.log` on the agent server. If there are any error messages, please feel free to post them here.

---

<div class="post-metadata">

**Author:** ![jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jean](https://community.thinlinc.com/u/jean)\
**Post date:** [26 February 2026 08:26 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/3 "2026-02-26T08:26:08Z")

</div>

Thank you for your reply.

I’ll describe the setup in a bit more detail; perhaps I’ve made a mistake.

I’m connecting from an IGEL terminal using ThinLINC 4.16 to a ThinLINC server 4.19, which then forwards to a 4.19 agent.

I start the connection with:

10.0.29.225 -f terminate -s “tl-single-app /opt/kiosk/kio-open.sh”

userid is the terminal name; the password is provided by the setup.

kio-open.sh is a script that ultimately starts Chromium for a Moodle session (for exams).

If the session is terminated normally (window or tab close), then

the output of `tlctl session list` is “connected.” Reconnecting works without any problems.

After shutting down the terminal and after rebooting and reconnecting, `tlctl session list` shows “disconnected” and the error “(You’re not allowed to create any more sessions)” appears.

In the master’s log file:

```auto
2026-02-26 09:21:55 DEBUG vsmserver: Handling method ‘create_user_socket’ from (‘127.0.0.1’, 41830)
2026-02-26 09:21:55 DEBUG vsmserver.session: User with uid 3005292 requested a socket
2026-02-26 09:21:55 DEBUG vsmserver: Handling method ‘create_user_socket’ from (‘127.0.0.1’, 41844)
2026-02-26 09:21:55 DEBUG vsmserver.session: User with uid 3005292 requested a socket
2026-02-26 09:21:55 DEBUG vsmserver: Handling method ‘get_capabilities’ on socket owned by uid 3005292
2026-02-26 09:21:55 DEBUG vsmserver: Handling method ‘create_user_socket’ from (‘127.0.0.1’, 41848)
2026-02-26 09:21:55 DEBUG vsmserver.session: User with uid 3005292 requested a socket
2026-02-26 09:21:55 DEBUG vsmserver: Handling method ‘get_user_sessions’ on socket owned by uid 3005292
2026-02-26 09:21:55 DEBUG vsmserver.session: User with uid 3005292 requested a list of his/her sessions

2026-02-26 09:21:55 DEBUG vsmserver: GetUserSessionHandler: List of groups: [3005214]

```

I then have to kill the sessions with tlctl.

Any idea what I’m doing wrong?

---

<div class="post-metadata">

**Author:** ![wilsj](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/wilsj/32/554_2.png) [@wilsj](https://community.thinlinc.com/u/wilsj)\
**Post date:** [26 February 2026 13:32 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/4 "2026-02-26T13:32:22Z")

</div>

When ThinLinc fails to reconnect, are you still launching it with the `-s "tl-single-app ..."` option, or are you trying to create a “normal” session then?

In case you have a session running a specific program (through the `-s` option), you will not be reconnected to that same session unless you specify the same `-s` option as the existing session was started with. If another (or no `-s` option) is specified, ThinLinc will try to create a new session instead. This will result in the error you are describing with the default configuration of allowing at most one session per user.

Does reconnecting to the session work if done with the same `-s` option specified as when the session was initially started?

---

<div class="post-metadata">

**Author:** ![jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jean](https://community.thinlinc.com/u/jean)\
**Post date:** [27 February 2026 07:46 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/5 "2026-02-27T07:46:30Z")

</div>

thank you for your answer.

yes, i always use the same parameters because its associated with an icon (the only one) on the desktop.

when i terminate the session “regulary” (close the tab oder window) the session is in status (tlctl ) connected but not a single process of that session is running on the agent server!

when i shutdown or reboot the terminal the processes of that session are still running on the agent and the connection fails with “not allowed anymore sessions”. the staus before the reconnection is on conected and after the error it changes to diconnected.

isn’t a little bit strange?

regards j.

---

<div class="post-metadata">

**Author:** ![samuel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/samuel/32/335_2.png) [@samuel](https://community.thinlinc.com/u/samuel)\
**Post date:** [6 March 2026 09:55 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/6 "2026-03-06T09:55:37Z")

</div>

Do you want different setups from different IGEL terminals? If it’s the same for all clients, I wonder if you would be able to set up this application through a ThinLinc profile rather than using `-s "tl-single-app ...`?

I suspect that would rid you of the “You’re not allowed to create any more sessions” problems.

* * *

You could create a profile in `/opt/thinlinc/etc/conf.d/profiles.hconf` (on the agent) like this:

```auto
[/profiles/moodle]
xdg_session=
name=Moodle
description=Moodle session for exams
icon=terminal.svg
screenshot=terminal-ss.png
cmdline=tl-single-app /opt/kiosk/kio-open.sh
testcmd=type /opt/kiosk/kio-open.sh
description_from_testcmd=false

```

By making sure only a single profile is listed in `order` your users won’t get a choice:

```auto
order=moodle

```

If you wish to disable the profile chooser intro, it can be done with:

```auto
show_intro=false

```

The `-f terminate` option could be approached differently by, for example, limiting how long a disconnected session is allowed to live. In `/opt/thinlinc/etc/conf.d/vsmagent.hconf` (on the agent) you can add `-MaxDisconnectionTime` to `xserver_args`:

```auto
xserver_args=-br -localhost -verbose 3 -MaxDisconnectionTime 60

```

* * *

See the following parts of our admin documentation:

> **[ThinLinc profiles — ThinLinc Administrator's Guide](https://www.cendio.com/resources/docs/tag-devel/html/profiles.html)**
>
> Overview of what ThinLinc profiles are, how they are configured, and how to use them.

> **[Limiting lifetime of ThinLinc sessions — ThinLinc Administrator's Guide](https://www.cendio.com/resources/docs/tag-devel/html/config_lifetime.html)**
>
> Learn how to control and limit the lifetime of ThinLinc sessions using Xserver options such as MaxDisconnectionTime, MaxConnectionTime, and MaxIdleTime to manage session duration and idle behavior.

---

<div class="post-metadata">

**Author:** ![jean](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@jean](https://community.thinlinc.com/u/jean)\
**Post date:** [6 March 2026 11:26 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/7 "2026-03-06T11:26:09Z")

</div>

Thank you so much for looking into this, but I don’t want to take up too much of your time. The reason for my approach is that I have to accommodate many requirements: Moodle in kiosk mode, Moodle with additional websites, and a Jupyter server with varying requirements (I’m a victim of AI; exams are being monitored more closely ;-)).

The scripts I’m calling adjust the policy.json for Chromium (URLallowlist, etc.) and then finally run Chromium with the corresponding URL.

So, I only have one ThinlincServer (with multiple agents) with different options. Having the student choose a profile isn’t an option either.

There are several ways to exit the terminal and its application: closing the tab, closing the window, using the menu from “openbox(?) - minimize session, quit/logoff session”.

And, of course, shutting down the terminal. These exits are obviously handled differently and therefore don’t always respond to “-f terminate”—I can’t say whether this is a bug.

I’m currently working around it by allowing multiple sessions and also setting MaxDisconnectionTime. Fortunately, I have the resources.

In any case, thank you very much; without Thinlinc, administration would be much more difficult. Thanks for the great work!

---

<div class="post-metadata">

**Author:** ![samuel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.thinlinc.com/samuel/32/335_2.png) [@samuel](https://community.thinlinc.com/u/samuel)\
**Post date:** [13 March 2026 16:54 UTC](https://community.thinlinc.com/t/terminate-a-session/1922/8 "2026-03-13T16:54:01Z")

</div>

I see; thanks for explaining your use case. In your case, perhaps a start command is the most convenient solution.

As William mentioned, ThinLinc will display that error when attempting to start a new session with a different start command than what an existing session has. You should be able to check what command line the session is running with using tools like `ps` or `tl-session-param`.

PS, you are correct that the menu used for tl-single-app comes from Openbox.
