![]() Registered Member ![]()
|
Hi,
How is it possible to configure KDM so that it does not allow any user to have more than one session? On GDM for example, if you're already logged in, and you go to the login screen and try to login again, GDM will automatically redirect you to your current session and unlock your screen. KDM, instead of doing the same, will actually start a second session. How can I configure KDM to behave like GDM in this respect? Thanks, samuelm1 |
![]() Manager ![]()
|
I'd look @ PAM http://www.kernel.org/pub/linux/libs/pa ... imits.html
note: limits.conf is the configuration file for the pam_limits module, just run: man limits.conf" |
![]() Registered Member ![]()
|
Thank you for your answer. That works, almost. Is there any way to limit just the graphical sessions? Also, is there a bash command or a dbus call to kdm with which I can switch X displays to the correct session (i.e. the session of the user that tried to login again)?
|
![]() Manager ![]()
|
different questions - should probably create new threads
easy answer - use gdm instead of kdm |
![]() Registered Member ![]()
|
Hi. KDM should have a pam config file of it own (on my system it is /etc/pam.d/kdm). Using pam_limits with option conf=/path/to/gui-users-limits.conf should do what you want.
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
![]() Registered Member ![]()
|
Hello dpalacio,
This is probably a dumb question, but do you mean that I could just add conf=/path/to/gui-users-limits.conf to the kdm file in /etc/pam.d/kdm? Or do I need to make changes to conf=/path/to/gui-users-limits.conf, if so can you give an example. thanks |
![]() Registered Member ![]()
|
|
![]() Registered Member ![]()
|
I know it's been almost six months since the last post, but for those interested I have found a solution. I did some investigating into the inner workings of KDM, and found out that KDM executes a script called "Xstartup" (in my case, it was in /etc/kde4/kdm) before starting a session. Editing the script allowed me to achieve what I wanted. Here's how to do it:
Remove the following line from the end of /etc/kde4/kdm/Xstartup:
Then, append the following lines to the end of the file:
This addition to the script makes 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. |
![]() Administrator ![]()
|
You may wish to post this in Tutorials & Tips.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I think there is an updated version: viewtopic.php?f=14&t=102164
In our office we use Gnome and KDE and need a DM that can display a long userlist and has the option to type in usernames, which currently only leaves KDM. GDM and LightDM show lists, but there are no scrollbars, the lists can get longer than the screen and so on. But there are problems with KDM as well: I used the fix mentioned above, but when I log in (KDE), use "swicth user", then someone else logs in (Gnome), then uses "switch user" again and then I log in again, my KDE-session gets unlocked, but it shows the (locked) Gnome-Session. I have to manually select my KDE-Session with Ctrl+Alt+F$n. I wonder what happend to Linux... 10 years ago I had the impression it was a multi-user-system. It doesn't really feel the same way today... |
![]() Administrator ![]()
|
Unlocking your session should not cause the active virtual terminal to change.
If two users are logged on using KDE, does this same behaviour occur? Also, are you sure that only a KDE session is running under your user? (and that no user home directory is shared between the two users)
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Yes, It also happens when both users are running KDE.
One of the useraccounts I used for this test has /home/$username1 as his homedirectory (/home is mounted via NFS), the other user uses /$username2. Switching from one VT to the other after locking the screen works, but we want the users to use "switch user" or "lock screen; start new session", so anyone accessing the computer is greeted by the DM. The DM should be able to unlock and activate the running session if the user is already logged in. |
![]() Administrator ![]()
|
Ok to clarify this, the issue is after logging in you are placed on the incorrect TTY if you have already logged in. Namely, you are placed on the TTY of the last user to login.
If this is the case, the bug is probably in the script you got from viewtopic.php?f=14&t=102164#p222372 It is activating the wrong TTY.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]