This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Please help me disable multiple desktop sessions for a user

Tags: None
(comma "," separated)
dipakjha
Registered Member
Posts
1
Karma
0
Guys,

I've recently installed Linux Mint 18.3 KDE ( plasma version 5.8.8 ) on my home PC and am generally quite happy with its aesthetics, stability and performance. By and large I have been able to tweak a lot of things to my personal liking. But the one aspect of this DE that still beats me is the option to be able to start multiple desktop sessions per user which I would like to disable. On a family computer like mine, having as many as 3 user accounts, my kids and wife end up creating a huge number of sessions with no one remembering which applications are attached to which session. I have tried using limits.conf to restrict the number of sessions per user but have observed 2 problems with this approach:

1. This configuration / limit does not differentiate between desktop and non-desktop sessions. I would still like to have a single desktop session for a user and multiple CLI / SSH sessions.
2. When the limit is reached, the system simply hangs during an attempt to create the (N + 1) th session, N being the limit, instead of showing an error message and / or gracefully failing back to the login screen

Is there a way to manage this better by either removing the ability to create multiple desktop sessions for a given user OR by merging a fresh desktop session into an existing one at logon? A similar problem has been dealt with here https://forum.kde.org/viewtopic.php?f=14&t=102164#p222372 but plasma 5.8.8 seems to be quite different and I can't seem to co-relate the files mentioned in the solution with what I find on my system

Any pointers would be most appreciated.

Regards,

Dipak Jha
airdrik
Registered Member
Posts
1854
Karma
5
OS
I was thinking that there was already such an option - I know that some DMs have it (namely GDM?), but apparently SDDM doesn't have it yet, but they're working on it:
https://github.com/sddm/sddm/issues/447

I have a similar setup at home, but with a newer version of Plasma. In our case the lock screen provides functionality for switching users so there is no need for the DM to handle that for us (I have noticed that after starting a new session, some of the users' lock screens don't update to show the new session until those users unlock and re-lock their sessions).
I don't remember (and couldn't find anything definitive in the release announcements) which version of Plasma that was implemented, but it may have been after 5.8.

I do remember using versions of Plasma which didn't have that feature and we just kept track of which ctrl+alt+F# our session was in (usually by cycling through all of them until we found the one we were looking for).


airdrik, proud to be a member of KDE forums since 2008-Dec.
akay64
Registered Member
Posts
7
Karma
0
I fixed this issue by changing the SDDM config, this flag is actually undocumented but it works.

I am using KDE Neon (Ubuntu 18.04 base) with Plasma 5.17.3

Go to /etc/sddm.conf (Create it if it does not exist) and add to it the following and restart your computer

Code: Select all
[Users]
ReuseSession=true

This solved for me everything from these really annoying multi sessions and "Unused" sessions in the switcher.

To make sure this is indeed working, you can go to the terminal and type in

Code: Select all
$ who -H

It will list all active users on the system with an active session, if this works, not matter how many times you login as yourself or another person there should be only one instance of that username mentioned.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar