LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   SDDM vs KDM and fast user switching within KDE not working? (https://www.linuxquestions.org/questions/slackware-14/sddm-vs-kdm-and-fast-user-switching-within-kde-not-working-4175630606/)

bamunds 05-27-2018 10:28 PM

SDDM vs KDM and fast user switching within KDE not working?
 
Using init 4 with KDM will show "Switch User" as a "Leave" menu option under KDE and also on the GUI login screen. If I switch KDM to SDDM-0.17.0-SBo there is no "Switch User". When trying to DDG the question, or look at the man sddm.conf there isn't any config setting. So I'm guessing this is a xsession issue? Can someone provide a tutorial to understand why KDM allows "Switch user" and SDDM doesn't under Slackware64 14.2 multilib? After that maybe a tutorial on how to implement fast user switching for FVWM, yes I can CNTL+F2, but my wife is not a CLI user. Cheers

Alien Bob 05-28-2018 01:15 AM

For my Plasma5 desktop I stuck with version 0.15 of SDDM for good reasons. The versions after that gave me headaches.
Try going back to 0.15. I do have all the choices in my SDDM.

bamunds 06-04-2018 10:42 AM

Going back to SDDM-0.15 indeed did resolve the ability to switch users from the KDE "Leave" menu.
Thanks again for the excellent help.

bamunds 02-25-2019 10:33 AM

I've been interested in going to XFCE for my DE but have struggled to get XFCE's Switch User to work with SDDM. Any idea why KDE Switch user is working and XFCE's would not?

I opened the actions button config and ticked on "Switch User". Do I now create a fake gdmflexiserver in /usr/local/bin with a command like dm-tool switch-to-greeter (Which is NOT the correct command)?

enorbet 02-26-2019 12:15 PM

I know this thread is now "Solved" but I'd like to ask why not just use "Logout" which brings one back to the Chooser menu where one can enter in any valid username and password as well as select various WM/DEs? What exactly is the value of "Change User"?

bamunds 02-26-2019 03:48 PM

Quote:

Originally Posted by enorbet (Post 5967215)
I know this thread is now "Solved" but I'd like to ask why not just use "Logout" which brings one back to the Chooser menu where one can enter in any valid username and password as well as select various WM/DEs? What exactly is the value of "Change User"?

Closing your session might mean that you loose the place you are at with reading an article or doing some accounting work. My wife interrupts me to check her eBay business at times, when her Win10 decides to update in the middle of the day..:-(.

I've found a solution to the XFCE Switch User function from clues in the following two separate articles and changing from xscreensaver to simply xlock.
https://askubuntu.com/questions/7901...om-cli-on-sddm
https://forum.xfce.org/viewtopic.php?id=8686

I've created a dummy /usr/local/bin/gdmflexiserver file as follows

Code:


#!/bin/sh
#pretend to be gdmflexiserver so the XFCE action plugin's Switch User function works

#lock the current session
#xscreensaver-command -lock
xlock +allowroot -mode matrix & sleep 1

#then pass on the request to sddm
qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter

This locks the first XFCE session and starts a new SDDM login on the next available vt.

WARNING: This does leave an issue though. It seems that multiple additional SDDM session are being created after login/logouts for the next available vt. Is there an expert observation of the code that maybe I should add something to actually kill the second session if a logout occurs? So remember to still use CTRL-ALT-F7 or F8.

In the end this is a solution that works for XFCE (dummy gdmflexiserver) and one that can be adapted for WindowmMaker and FVWM as launching desktop file and installing of yad from SBo. This one is /usr/local/bin/usrchg, which I combine with a switchuser.desktop file in my ~/.local/share/applications folder. All files are made executable. This is similar to what I did last year to install Symantec VIP token code generator, which we use with PayPal and banking account. (search for VIPACCESS 2FA in the Slackware forum)https://www.linuxquestions.org/quest...tp-4175622121/
Code:

#!/bin/bash

yad --question --title="User Switching" \
 --text="This tool allows you to switch to a different user without closing down your current session.

To return to the original user, simply press Ctrl-Alt-F7 or F8. Go back again with Ctrl-Alt-F8 or F7.

Do you want to switch to another user?"

if [ $? -eq 0 ] ; then
    xlock +allowroot -mode matrix & sleep 2 & \
    qdbus --system org.freedesktop.DisplayManager /org/freedesktop/DisplayManager/Seat0 org.freedesktop.DisplayManager.Seat.SwitchToGreeter

else
 exit 0

fi

Comments about the solution, what to do about multiple session in the background, or improving the code to be more slackware aware for a basic installed system are appreciated!
Cheers!

bassmadrigal 02-27-2019 10:22 AM

Quote:

Originally Posted by enorbet (Post 5967215)
I know this thread is now "Solved" but I'd like to ask why not just use "Logout" which brings one back to the Chooser menu where one can enter in any valid username and password as well as select various WM/DEs? What exactly is the value of "Change User"?

Simply put, it allows two users to be logged in at one time. So User A doesn't have to close everything they're working on just so User B can sign on. It definitely does use more resources, but depending on the situation, it can be very handy.

enorbet 02-27-2019 10:41 PM

Thanks guys. I have no need of it but I did want to know it's raison d'etre.

bassmadrigal 02-28-2019 02:38 AM

I don't use it at all in my home computers, but it can be handy at work sometimes so I can log into other machines quickly to make any changes needed and keep the current user logged in. Once I log out, theoretically, all resources used should be freed up (but I'm running Windows at work, so it is probably only "theory" and wouldn't be complete in practice).

GazL 02-28-2019 04:25 AM

Alternatively, you can just run a second X display on another VT and ctrl-alt-Fn as required.
/etc/X11/xdm/Xservers:
Code:

:7 local /usr/bin/X :7 vt7
:8 local /usr/bin/X :8 vt8

... which gives you two independent Xservers running xdm greeters.

Or, if you don't want to leave a second display server running and using system resources, create a new one as needed after logging in on a tty with:
startx -- :8 vt8

If I wanted to I could even login as the same user on each -- assuming whichever desktop environment used supports multiple logins of the same user -- and that leads to all sorts of interesting possibilities.


Fast user switching is a Microsoft aberration invented to workaround the fact that their OS only has a single console/framebuffer. Xorg on Linux doesn't have that limitation.

bamunds 02-28-2019 08:27 AM

Current Xserver says
Code:

0:local /usr/bin/X :0
Are you suggesting replacing all of that with the alternate code?

I'm trying to simplify the process for my wife (a Win10 user) for when I'm out of the house and her PC decides to freeze, blue screen or do an untimely update. She runs a program called Fidelity Active Trader Pro, which is written with a dependency on NetFramework 6.52. I've not been able to get those programs to install under WINE or QEMU. Otherwise I'd convert her PC to Slackware running XFCE. So the alternative is that I've taught her where to use simple "Switch User" (yes also available in Win10) if my computer is running some programs and she "desperately" needs to get on eBay for shipping or the Web to check a stock order. Your solution to run two X servers may actually fit the bill and work under XDM rather than having to use SDDM. Thanks for the suggestion. Cheers

GazL 02-28-2019 10:13 AM

I'm not suggesting anything, just pointing out an alternative to "fast user switching"

I like to number my displays after the virtual console they are on, so I have :7 and :8, but there's no reason you can't use :0 and :1 if that feels more natural to you.

bamunds 02-28-2019 11:39 AM

@gazl Thanks for the alternative method. I've made the change and yes two servers start with a simple login screen on both vt7 and vt8. I had to use :0 and :1 so that the slackware-xdm-theme would work on :0. Display :1 isn't taking on the slackware-xdm-theme for some reason. One of the downsides to the dual servers is keepassxc again is confused about which database connection to use. So this might not work.

UPDATE: I've received an updated instruction set from phenixia2003 which has this all working correctly now. The thread reference is here https://www.linuxquestions.org/questions/slackware-14/xdm-slackware-theme-multimonitor-can't-see-button_bar-4175643432/ So may again abandon SDDM. I am using an older release 0.15 and I think they've moved on to 0.17.2, but Eric doesn't recommend it due to issues with Plasma5. Looks like I again have a solution and I can undo all those odd files in /usr/local/bin. Cheers


All times are GMT -5. The time now is 09:01 PM.