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

"Switch user" button in kscreenlocker when not in Plasma

Tags: None
(comma "," separated)
alexdd
Registered Member
Posts
4
Karma
0
Hi,

On my PC, we have multiple users, all running KDE Plasma, except myself using openbox. To integrate well with other users, I use kscreenlocker as a screen locker. To run the screenlocker, I call /usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet --immediateLock and it successfully locks my screen as wanted.

However, when I call manually kscreenlocker this way from my openbox session, the "switch user" button does not work. When pressed, it does nothing. The weird thing is that if I manually call qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter, then it successfully switches to sddm greeter to switch users.

Is this a bug in kscreenlocker ? Is something missing in my environment ?

I am using Debian Bullseye. I upgraded to Sid, but it does not fix the issue. My kscreenlocker version is 5.24.4, and sddm 0.19.0.

Thanks
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

Reading what the plasmoid does, lock/logout depends on the plasma session, so you probably missing a part. Does kscreenlocker get active if you use
Code: Select all
qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.Lock
?

Next I would check is the ksmserver:
Code: Select all
qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.openSwitchUserDialog

This should switch to the loginmanager you use (sddm, gdm,…)
alexdd
Registered Member
Posts
4
Karma
0
Hi,

Sorry for the delay.
For both commands, I get :
Service 'org.freedesktop.ScreenSaver' does not exist.
and :
Service 'org.kde.ksmserver' does not exist.

However, locking does not seem to depend on a plasma session, since I can lock succesfully from a non-plasma session if I call
/usr/lib/x86_64-linux-gnu/libexec/kscreenlocker_greet --immediateLock

If there is no solution because sddm assumes all users on the machine are using Plasma, then I will have to switch to lightdm.
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

I've looked into SDDM and there seems to be an open bug wich could affect you too: Issue 579.
On systemd you should be able to use DBus interfaces of org.freedesktop.login1. Use `loginctl` to get informations about users, seats, etc.

The easiest would be to switch to gdm as this works with multiple sessions. As I tried to use sddm it was simply stuck on trying to manually switch (using Sway, Plasma and Gnome here).
alexdd
Registered Member
Posts
4
Karma
0
koffeinfriedhof wrote:Hi!

I've looked into SDDM and there seems to be an open bug wich could affect you too: Issue 579.
On systemd you should be able to use DBus interfaces of org.freedesktop.login1. Use `loginctl` to get informations about users, seats, etc.

Well, if I manually call
Code: Select all
qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter

it works. But sddm doesn't seem to be able to make this call.

koffeinfriedhof wrote:The easiest would be to switch to gdm as this works with multiple sessions. As I tried to use sddm it was simply stuck on trying to manually switch (using Sway, Plasma and Gnome here).


Thank you. The culprit doesn't seem to be sddm but kscreenlocker. I juste did a quick test with xfce4-screensaver, and its "switch user" button works correctly.

I thought using kscreenlocker would be a good idea to integrate well with other users using Plasma, but it doesn't work. I will have to find a new screen locker.
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Can you try running
Code: Select all
/usr/lib/kscreenlocker_greet --testing --switchuser


This should directly switch to the display manager. Perhaps you get some more information. I'll have a look in the user switching plasmoid. Could be missing something as you are not in a plasma environment. Would take some time.

/edit:
I tried using kscreenlocker_greet in sway and it works out of the box.
Do you use a separate openbox-session or one of the defaults? (openbox.desktop or openbox-kde.desktop in /usr/share/xsessions). Are the other users on X or Wayland?
alexdd
Registered Member
Posts
4
Karma
0
koffeinfriedhof wrote:Can you try running
Code: Select all
/usr/lib/kscreenlocker_greet --testing --switchuser


This should directly switch to the display manager. Perhaps you get some more information. I'll have a look in the user switching plasmoid. Could be missing something as you are not in a plasma environment. Would take some time.


With this command, it switches to the switch user screen, and I can succesfully switch between users if multiple users are logged in. But the "new session" button doesn't do anything.

koffeinfriedhof wrote:/edit:
I tried using kscreenlocker_greet in sway and it works out of the box.
Do you use a separate openbox-session or one of the defaults? (openbox.desktop or openbox-kde.desktop in /usr/share/xsessions). Are the other users on X or Wayland?


I am running an openbox session selected through sddm menu. I guess it uses openbox.desktop.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell