Version: unspecified (using KDE 4.6.4) OS: Linux "Switch User" -> "New Session" no longer works on a system with gdm as the desktop manager. The reason appears to be that the DM is detected as lightdm (based on some investigation in gdb). From libs/kworkspace/kdisplaymanager.cpp:KDisplayManager::KDisplayManager() if (DMType == Dunno) { ... else if (::getenv("GDMSESSION")) { //lightDM identifies itself as GDM at the moment. QDBusReply<bool> reply = QDBusConnection::systemBus().interface()->isServiceRegistered("org.lightdm.LightDisplayManager"); if (reply.isValid()) { DMType = LightDM; } else { DMType = GDMFactory().isValid() ? NewGDM : OldGDM; } } else DMType = NoDM; } AIUI reply.isValid() checks whether the dbus reply is error-free, reply.value() contains the real answer. I'm not a dbus expert, but would the simplest option be to check LightDMDBus().isValid() (as with GDMFactory)? Reproducible: Always Steps to Reproduce: See above. Expected Results: Switching to a new session should take me to the gdm user chooser. Packages installed: qt-4.7.3-6.fc15.x86_64 kdebase-workspace-4.6.5-2.fc15.x86_64 gdm-3.0.4-1.fc15.x86_64
Created attachment 62049 [details] simple test program based on lightdm/gdm dectection code. $ ./ldm isValid: true value: false GDMFactory isValid: true LightDMDBus isValid: false
Also minor nit in the lightdm code - line 93 of https://projects.kde.org/projects/kde/kdebase/kde-workspace/repository/revisions/b508e6e29274839b8c505b6c5a56f3feed6020f5/diff/libs/kworkspace/kdisplaymanager.cpp should probably be a QLatin1String, like all the others.
Created attachment 62060 [details] LightDm detection fix
Just to be sure, can you test the patch please? Thanks!
I tested this by rebuilding the fedora srpm with this patch on top and it solves the original user switching problem. Note that this is just with gdm, I don't have lightdm to test that that still works.
Good to go then, I will commit it asap and sorry for the mistake :/ I shouldn't backported it :(
Git commit 0f5ffd8ee7bd6ed47040d7bc1a85310c5e148109 by Alex Fiestas. Committed on 30/07/2011 at 23:59. Pushed by afiestas into branch 'master'. Test that the actual dbus path is valid, not the reply Thanks to Oliver Henshaw for the initial patch and bug report BUG: 278206 M +1 -2 libs/kworkspace/kdisplaymanager.cpp http://commits.kde.org/kde-workspace/0f5ffd8ee7bd6ed47040d7bc1a85310c5e148109
Git commit de17de196120ab48caa355bb2a3306b37ceb2691 by Alex Fiestas. Committed on 30/07/2011 at 23:59. Pushed by afiestas into branch 'KDE/4.7'. Test that the actual dbus path is valid, not the reply Thanks to Oliver Henshaw for the initial patch and bug report BUG: 278206 (cherry picked from commit 0f5ffd8ee7bd6ed47040d7bc1a85310c5e148109) M +1 -2 libs/kworkspace/kdisplaymanager.cpp http://commits.kde.org/kde-workspace/de17de196120ab48caa355bb2a3306b37ceb2691