Registered Member
|
Ever since I began using KDE, I found it slightly annoying that KDM would allow any user to have more than one graphical session running at the same time. On Windows, Mac, and other DEs on Linux, if a user tries logging in again and creating another session, he/she is usually redirected to his/her currently running session, and his/her account is unlocked. I wanted KDM to have the same behavior, but as far as I could find, there were no configuration directives for that. So I did some searching, and found that KDM executes a shell script called "Xstartup" (in my case, the script was located in /etc/kde4/kdm) before starting a graphical session. I finally got KDM working the way I wanted it to by editing this script. If anyone else would like to configure their installation of KDM this way, here's what to do:
Open up the file /etc/kde4/kdm/Xstartup (it might be located somewhere else on your system, depending on your distro) and do the following changes: Replace the statement in the first line of the file with this statement:
Then, remove the following line from the end of the file:
After that, add the following lines to the end of the file:
Then, save the file. These changes to the script make KDM behave in the following way: As normal, if you enter an incorrect password, it won't let you login. If you do enter a correct username/password combination and do not have an already-running graphical session under your username, KDM will login you in as normal. If you do enter a correct username/password combination and have an already-running graphical session under your username, KDM will terminate the currently running new session that you started, transfer you back to your already running session, and unlock your screen. Enjoy! samuelm1 P.S. You need the qdbus executable in order for screen unlocking to work. Also, screen unlocking will not work for non-KDE graphical sessions running under KDM. P.P.S. This script does not limit the number of simultaneous TTY sessions that a user can have; it only limits the user's graphical sessions (to one). Edit: I found out that the above code actually prevents the user from locking his screen again until he/she logs out and back in again. Sorry about that. I fixed that problem in the code above. |
Registered Member
|
How can that be done in Plasma 5? To have a unique graphical user session is default for all other OSes. It should be the same for KDE, cause its user intuitive, esp. for those who are not experts (like other family members)
Thanks for help in advance! |
Registered Member
|
In (recent versions of) Plasma 5, the lockscreen provides the ability to switch to other open sessions in addition to starting new sessions.
A couple of other notes: In Plasma 5, KDM was abandoned and replaced by SDDM (which is a 3rd party project). You might check SDDM's wiki to see if they have this feature and how to enable it or ensure the ticket is raised on their issue tracker. You can also use other Display Managers such as LightDM or GDM if any of them provide this feature.
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]