I have followed this answer https://askubuntu.com/a/1409120/376806 here, but I am having this issue.
Sometimes When I log in again using the same user. It creates multiple sessions. loginctl list-sessions, and at some point, a user is unable to log in unless I kill all sessions of that user, using sudo loginctl kill-user <username> or sudo loginctl kill-session <session-id>
Also, is there a way to connect to the same session every time a user reconnects? Multiple people use this computer at the same time and connect via Windows remote desktop utility.
Edit:
Output of loginctl list-sessions
SESSION UID USER SEAT TTY
523 1001 ctar pts/0
c17 1009 user1
c30 1012 user2
c64 1004 user3
c71 1003 user4
c76 1000 user5
c77 1002 user6
c78 1002 user6
c8 127 gdm seat0 tty1
9 sessions listed.
You can see here that there are two sessions open for user user6 it keeps increasing and after some time I get forced disconnection when I try to connect again, the only solution is to terminate all sessions of the user then.
Host OS: ubuntu 22.04
Client: Windows Builtin and Remmina