Bug 859347

Summary: It's impossible to switch user in KDE using LightDM
Product: [Fedora] Fedora Reporter: Martin Bříza <mbriza>
Component: kde-workspaceAssignee: Martin Bříza <mbriza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cwickert, gregor, jgrulich, jreznik, kevin, ltinkl, rdieter, rnovacek, than
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 16:01:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 867924    
Bug Blocks:    
Description Flags
Proposed patch to fix the issue none

Description Martin Bříza 2012-09-21 09:14:52 UTC
Description of problem:
Switching user using the KDE way is not possible when LightDM is used as login manager.

Version-Release number of selected component (if applicable):
kde-workspace-4.8.5-3.fc17.x86_64 (with the fix for #849334)

How reproducible:

Steps to Reproduce:
1. Kickoff -> Leave -> Switch User -> Continue
Actual results:
Screen flickers, returns to the current session

Expected results:
Creating a new session

Additional info:
The session was locked afterwards as I have locking set up on user switch.

Comment 1 Martin Bříza 2012-09-25 10:12:41 UTC
With kde-workspace-4.9.1-6.fc18.x86_64, the "Switch User" button is not present in the menu when LightDM is used. When KDM is used, the button is back though.

Comment 2 Martin Bříza 2012-09-27 10:54:21 UTC
So, as I found out, the button is missing because the environment asks the system (via SystemD or ConsoleKit) if the DM supports switching users.
LightDM may not present itself to the system as being capable of this feature but there is definitely a way of doing it - manually, using command "dm-tool switch-to-greeter", a new session is created, making it possible to log in for more users.

Comment 3 Christoph Wickert 2012-10-03 10:38:17 UTC
lightdm supports switching users. Just like gdm it comes with a gdmflexiserver binary which is exposed over dbus and can be called by dm-tool. Works fine here with lightdm-1.3.3-2 and lightdm-gtk-1.3.1-1, so the problem must either be in kdeworkspace or lightdm-kde.

I guess kdm does things differently and kdebase only supports kdm's way.

Comment 4 Martin Bříza 2012-10-03 11:18:27 UTC
Yes, I'm investigating this and it seems it's in our patch for systemd support in kde-workspace but I'm not 100% sure, testing it right now.

Comment 5 Martin Bříza 2012-10-08 13:57:58 UTC
Created attachment 623460 [details]
Proposed patch to fix the issue

QDBus refuses to return any of the types returned by SystemD as they are not registered according to its error messages. This patch works around this issue and makes it possible to correctly switch users in KDE using LightDM.

Comment 6 Kevin Kofler 2012-10-08 15:26:53 UTC
FWIW, this looks like a QDBus (or even QMetaObject) bug.

Comment 7 Martin Bříza 2012-10-08 15:33:00 UTC
Yes, it seems so. But what's strange - I looked this up on the Qt bugtracker and there was no report regarding this.... But to me it seems like something that should affect many more projects than just us.

And to this bugreport - there are still some issues left - from what I have found out, logging out still works really strange. After creating two sessions and logging from both of them, KDE reports (in a new session) that there are these two open (and lists them as "other" sessions, regardless the fact one of them is on the same VT as the present one).

Comment 8 Martin Bříza 2012-10-15 10:18:24 UTC
Also reported here: https://bugs.launchpad.net/lightdm/+bug/851612

Comment 9 Martin Bříza 2012-10-18 15:13:50 UTC
I found out today these issues belong under LightDM, reporting a new bug 867924 .
Regarding this issue, there is only one more minor problem I know of: the "Switch User" dialog lists sessions that are marked as closing.
Also removing the Launchpad tracker as I think the problem is in systemd support. I'll see when I fix it.

Comment 10 Kevin Kofler 2012-10-18 16:24:44 UTC
Martin, why did you invert the dependency order of the bugs? I think this one really depends on bug #867924 rather than blocking it.

Comment 11 Martin Bříza 2012-10-22 09:28:38 UTC
Sorry, Kevin, I did that by accident. Fixed now.

Comment 12 Fedora Update System 2012-10-23 12:38:50 UTC
kde-workspace-4.9.2-6.fc18 has been submitted as an update for Fedora 18.

Comment 13 Fedora Update System 2012-10-23 19:45:18 UTC
Package kde-workspace-4.9.2-6.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kde-workspace-4.9.2-6.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-10-30 20:11:34 UTC
Package kde-workspace-4.9.2-7.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kde-workspace-4.9.2-7.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 15 Fedora Update System 2012-12-20 16:01:28 UTC
kde-workspace-4.9.2-7.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.