Page MenuHomeLubuntu Development

Fix the "New Login" button on screensaver window
Open, NormalPublic


The thing is, we have a "new login" button on screensaver. It is hardcoded to use gdmflexiserver. We can create and push our own gdmflexiserver executable which will point to a sddm command to show greeter to login into another user.

Best place to put the executable is /use/share/bin
Contents of the gdmflexiserver would be:

dbus-send --print-reply --system --dest=org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter

Now the problem is on executing the above commands, we do get to greeter and can login into users. If we login to the same user which was locked, We get to a different session and apps running from the session before locking remain as it is. we DONOT get to the original session. Also we have only panel loaded and a blank desktop. Some gui apps like file manager don't show up even after launching them from app menu. shortcuts don't work either. you can see previous session apps would still be running if you do a quick ps -aux | grep -a //processname//
I will test if launching different user works correctly and update this description as required.

Need to find a way to log back into original session from the greeter. Also, someone check if the above mentioned dbus command is correct. I had just dug through sddm's cpp manual a lil bit and got this.

If we don't find a way to do this correctly then we should remove the "new login" button entirely as focal is a LTS release.

Event Timeline

The_LoudSpeaker created this task.
The_LoudSpeaker changed the edit policy from "Custom Policy" to "All Users".

What is the use case for the "new login" button? I mean, if a user locks the screen, the user normally wants to unlock the existing session again.

And if we plan to use Wayland, the whole xscreensaver will be obsolete sooner or later.

To switch the login, maybe it would be easier to have a "Switch user" option, where the "Leave", "Shutdown", "Reboot"... options are. At least, I expect to find this option there, not hidden in the screensaver.

@apt-ghetto The new login button actually helps in switching users
Useful in our case as we don't have anything like gdm or kde's lock screen. Sddm currently lacks the ability to switch users.

Also, true an option should be there in applications menu near "leave" group. I will also try to dig into it.

I'm affected by this and would really appreciate if user-switching can be made possible. This is a required feature for my use-case.

@apt-ghetto it would be really nice if we can have 'Switch User' option in the session management menu. However, a 'Switch User' (or 'New Login' as it is labeled in xscreensaver), is still required in a screensaver/locker. E.g., as it is in MATE screensaver.

@The_LoudSpeaker I tried your command by placing the 'gdmflexiserver' under /usr/bin (I could not see /usr/share/bin). The command works in that we can go to SDDM screen and choose a different user but then, cannot return back. i.e., user1->user2 works but if I lock user2 and try to get back to user1, the screen flashes for a sec and comes back to lockscreen of user2 with no choice but to log into user2. If I then exit user2 session and choose user1 back, a new session is started rather than previously logged-in session (I had few applications open to test).

I added following to /etc/sddm.conf,


but unfortunately it doesn't help.

There is an open ticket in SDDM asking if there is any command-line option for user-switching. If we have, then as per xscreensaver manual we can add to configuration like, newLoginCommand: <displayserver's user-switcher command>