Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 623460 Details for
Bug 859347
It's impossible to switch user in KDE using LightDM
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch to fix the issue
kde-workspace-4.9.2-systemd-switch-user.patch (text/plain), 5.29 KB, created by
Martin Bříza
on 2012-10-08 13:57:58 UTC
(
hide
)
Description:
Proposed patch to fix the issue
Filename:
MIME Type:
Creator:
Martin Bříza
Created:
2012-10-08 13:57:58 UTC
Size:
5.29 KB
patch
obsolete
>--- kde-workspace-4.9.2/libs/kworkspace/kdisplaymanager.cpp.moje 2012-10-08 15:27:57.172066523 +0200 >+++ kde-workspace-4.9.1/libs/kworkspace/kdisplaymanager.cpp 2012-10-08 15:28:42.494886559 +0200 >@@ -112,6 +112,19 @@ public: > path.path(), > QLatin1String("org.freedesktop.login1.Seat"), > QDBusConnection::systemBus()) {} >+ /* HACK to be able to extract a(so) type from QDBus, property doesn't do the trick */ >+ QList<NamedDBusObjectPath> getSessions() { >+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), QLatin1String("org.freedesktop.DBus.Properties"), QLatin1String("Get")); >+ message << interface() << QLatin1String("Sessions"); >+ QDBusMessage reply = QDBusConnection::systemBus().call(message); >+ >+ QVariantList args = reply.arguments(); >+ if (!args.isEmpty()) { >+ QList<NamedDBusObjectPath> namedPathList = qdbus_cast< QList<NamedDBusObjectPath> >(args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>()); >+ return namedPathList; >+ } >+ return QList<NamedDBusObjectPath>(); >+ } > }; > > class SystemdSession : public QDBusInterface >@@ -123,6 +136,33 @@ public: > path.path(), > QLatin1String("org.freedesktop.login1.Session"), > QDBusConnection::systemBus()) {} >+ /* HACK to be able to extract (so) type from QDBus, property doesn't do the trick */ >+ NamedDBusObjectPath getSeat() { >+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), QLatin1String("org.freedesktop.DBus.Properties"), QLatin1String("Get")); >+ message << interface() << QLatin1String("Seat"); >+ QDBusMessage reply = QDBusConnection::systemBus().call(message); >+ >+ QVariantList args = reply.arguments(); >+ if (!args.isEmpty()) { >+ NamedDBusObjectPath namedPath; >+ args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> namedPath; >+ return namedPath; >+ } >+ return NamedDBusObjectPath(); >+ } >+ NumberedDBusObjectPath getUser() { >+ QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), QLatin1String("org.freedesktop.DBus.Properties"), QLatin1String("Get")); >+ message << interface() << QLatin1String("User"); >+ QDBusMessage reply = QDBusConnection::systemBus().call(message); >+ >+ QVariantList args = reply.arguments(); >+ if (!args.isEmpty()) { >+ NumberedDBusObjectPath numberedPath; >+ args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> numberedPath; >+ return numberedPath; >+ } >+ return NumberedDBusObjectPath(); >+ } > }; > #else > class CKManager : public QDBusInterface >@@ -339,14 +379,11 @@ static bool getCurrentSeat(QDBusObjectPa > if (r.isValid()) { > SystemdSession sess(r.value()); > if (sess.isValid()) { >- QVariant p = sess.property("Seat"); >- if (p.canConvert<NamedDBusObjectPath>()) { >- NamedDBusObjectPath namedPath = p.value<NamedDBusObjectPath>(); >- if (currentSession) >- *currentSession = r.value(); >- *currentSeat = namedPath.path; >- return true; >- } >+ NamedDBusObjectPath namedPath = sess.getSeat(); >+ if (currentSession) >+ *currentSession = r.value(); >+ *currentSeat = namedPath.path; >+ return true; > } > } > #else >@@ -373,17 +410,14 @@ static QList<QDBusObjectPath> getSession > #ifdef KWORKSPACE_USE_SYSTEMD > SystemdSeat seat(path); > if (seat.isValid()) { >- QVariant p = seat.property("Sessions"); >- if (p.canConvert<QList<NamedDBusObjectPath> >()) { >- QList<NamedDBusObjectPath> r = p.value<QList<NamedDBusObjectPath> >(); >- QList<QDBusObjectPath> result; >- foreach (const NamedDBusObjectPath &namedPath, r) >- result.append(namedPath.path); >- // This will contain only local sessions: >- // - this is only ever called when isSwitchable() is true => local seat >- // - remote logins into the machine are assigned to other seats >- return result; >- } >+ QList<NamedDBusObjectPath> r = seat.getSessions(); >+ QList<QDBusObjectPath> result; >+ foreach (const NamedDBusObjectPath &namedPath, r) >+ result.append(namedPath.path); >+ // This will contain only local sessions: >+ // - this is only ever called when isSwitchable() is true => local seat >+ // - remote logins into the machine are assigned to other seats >+ return result; > } > #else > CKSeat seat(path); >@@ -633,8 +667,7 @@ KDisplayManager::localSessions(SessList > SessEnt se; > getSessionLocation(lsess, se); > if (lsess.property("Class").toString() != QLatin1String("greeter")) { >- QVariant p = lsess.property("User"); >- NumberedDBusObjectPath numberedPath = p.value<NumberedDBusObjectPath>(); >+ NumberedDBusObjectPath numberedPath = lsess.getUser(); > se.user = KUser(K_UID(numberedPath.num)).loginName(); > se.session = "<unknown>"; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 859347
: 623460