Bug 950635
Summary: | (RFE) kcm_useraccount: support accountsservice interfaces | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gerald Cox <gbcox> |
Component: | kde-baseapps | Assignee: | Gregor Tätzner <gregor> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | christoph.wickert, dvratil, gregor, jreznik, kevin, ltinkl, rdieter, rnovacek, than |
Target Milestone: | --- | Keywords: | FutureFeature, Patch |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://git.reviewboard.kde.org/r/110875/ | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-10 18:59:39 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: | |
Embargoed: |
Description
Gerald Cox
2013-04-10 14:18:16 UTC
I upgraded to the following from the testing repository: lightdm-qt-1.4.1-3.fc18.x86_64 lightdm-kde-0.3.2.1-1.fc18.x86_64 lightdm-1.4.1-3.fc18.x86_64 lightdm-gobject-1.4.1-3.fc18.x86_64 Additionally I created the .face file in my home directory some google searches suggest as follows: ln -s .face.icon .face Same issue, doesn't work. Works for me, testing with those same versions, *if* you change default home directory permissions to allow other users' access to your $HOME : chmod o+x $HOME In particular, the 'lightdm' user, must have adequate permissions to read your $HOME/.face (or $HOME/.face.icon) is there some way to make this 'just works'? (besides running lightdm as root) ah I think we're supposed to utilize accountsservice. You can set an icon file using it's dbus interface. It puts the file in /var/lib/AccountsService/icons/ now lightdm-kde shows the proper icon file, even without read access to $HOME. surprised this works... Ah, we can consider modifying KDE Password & User Account Setting module: 1. add support to KDE Password & User Account Setting to use this accountsservice dbus interface and/or 2. adding code to the KDE Password & User Account Settings module to check-for and fix $HOME permissions when setting a custom $HOME/.face.icon (for legacy DM's that don't yet support accountsservice, like kdm) Triaging RFE to kde-baseapps (owner of kcm_useraccount) For example, qdbus --system org.freedesktop.Accounts /org/freedesktop/Accounts method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name) method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name) signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties) method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value) method QString org.freedesktop.DBus.Introspectable.Introspect() method QString org.freedesktop.DBus.Peer.GetMachineId() method void org.freedesktop.DBus.Peer.Ping() property read QString org.freedesktop.Accounts.DaemonVersion method QDBusObjectPath org.freedesktop.Accounts.CacheUser(QString name) method QDBusObjectPath org.freedesktop.Accounts.CreateUser(QString name, QString fullname, int accountType) method void org.freedesktop.Accounts.DeleteUser(qlonglong id, bool removeFiles) method QDBusObjectPath org.freedesktop.Accounts.FindUserById(qlonglong id) method QDBusObjectPath org.freedesktop.Accounts.FindUserByName(QString name) method QList<QDBusObjectPath> org.freedesktop.Accounts.ListCachedUsers() method void org.freedesktop.Accounts.UncacheUser(QString name) signal void org.freedesktop.Accounts.UserAdded(QDBusObjectPath user) signal void org.freedesktop.Accounts.UserDeleted(QDBusObjectPath user) [rdieter1@localhost services]$ qdbus --system org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name) method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name) signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties) method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value) method QString org.freedesktop.DBus.Introspectable.Introspect() method QString org.freedesktop.DBus.Peer.GetMachineId() method void org.freedesktop.DBus.Peer.Ping() property read int org.freedesktop.Accounts.User.AccountType property read bool org.freedesktop.Accounts.User.AutomaticLogin property read QString org.freedesktop.Accounts.User.Email property read QString org.freedesktop.Accounts.User.HomeDirectory property read QString org.freedesktop.Accounts.User.IconFile property read QString org.freedesktop.Accounts.User.Language property read bool org.freedesktop.Accounts.User.LocalAccount property read QString org.freedesktop.Accounts.User.Location property read bool org.freedesktop.Accounts.User.Locked property read qulonglong org.freedesktop.Accounts.User.LoginFrequency property read QString org.freedesktop.Accounts.User.PasswordHint property read int org.freedesktop.Accounts.User.PasswordMode property read QString org.freedesktop.Accounts.User.RealName property read QString org.freedesktop.Accounts.User.Shell property read bool org.freedesktop.Accounts.User.SystemAccount property read qulonglong org.freedesktop.Accounts.User.Uid property read QString org.freedesktop.Accounts.User.UserName property read QString org.freedesktop.Accounts.User.XSession signal void org.freedesktop.Accounts.User.Changed() method void org.freedesktop.Accounts.User.SetAccountType(int accountType) method void org.freedesktop.Accounts.User.SetAutomaticLogin(bool enabled) method void org.freedesktop.Accounts.User.SetEmail(QString email) method void org.freedesktop.Accounts.User.SetHomeDirectory(QString homedir) method void org.freedesktop.Accounts.User.SetIconFile(QString filename) method void org.freedesktop.Accounts.User.SetLanguage(QString language) method void org.freedesktop.Accounts.User.SetLocation(QString location) method void org.freedesktop.Accounts.User.SetLocked(bool locked) method void org.freedesktop.Accounts.User.SetPassword(QString password, QString hint) method void org.freedesktop.Accounts.User.SetPasswordMode(int mode) method void org.freedesktop.Accounts.User.SetRealName(QString name) method void org.freedesktop.Accounts.User.SetShell(QString shell) method void org.freedesktop.Accounts.User.SetUserName(QString name) method void org.freedesktop.Accounts.User.SetXSession(QString x_session) Thanks for the heads up. I didn't want to change my permissions, so I logged into Gnome, went to account settings, clicked on the default avatar, and assigned a photo. Then logged off, and lo and behold... there is my photo in lightdm. Amazing...LOL... At least we have two simple workarounds... Thanks! (In reply to comment #6) > 2. adding code to the KDE Password & User Account Settings module to > check-for and fix $HOME permissions when setting a custom $HOME/.face.icon > (for legacy DM's that don't yet support accountsservice, like kdm) Though that sound dangerous to me. User management tools shouldn't silently relax $HOME permissions... And it shouldn't be needed for KDM because KDM always runs as root. adjusting summary, I'll see if I can whip up some basic proof-of-concept code to support this today. any progress rex? Suppose I can finish this as well. Turns out to do this right was a wee bit more than trivial (but not *hard*), so no, nothing to report yet. @work has kept my free/play time at a minimum for the foreseeable future, so no eta either. sorry. allright I'm going to take it then yeah wasn't too hard. see here for a working solution: https://git.reviewboard.kde.org/r/110875/ Good work, thanks! Let's see what upstream thinks of the patch, but IMHO it's definitely good enough for us. Thanks, I tried building your submitted reviewboard patch on f19, and ran into a problem. Seems qdbusxml2cpp chokes on /usr/share/dbus-1/interfaces/org.freedesktop.Accounts.User.xml : Got unknown type `a(xxa{sv})' on f19, the problematic xml snippet looks like: <property name="LoginHistory" type="a(xxa{sv})" access="read"> <doc:doc> <doc:description> <doc:para> The login history for this user. Each entry in the array represents a login session. The first two members are the login time and logout time, as timestamps (seconds since the epoch). If the session is still running, the logout time is 0. </doc:para> ... which may indeed be a newer/complex type that qt4's dbus code doesn't handle (yet). (In reply to Rex Dieter from comment #18) > which may indeed be a newer/complex type that qt4's dbus code doesn't handle > (yet). And it never will be able to. But what we could do is annotate the xml and teach Qt about the custom array type [1]. Dunno if thats ok with the accountsservice guys. [1] http://techbase.kde.org/Development/Tutorials/D-Bus/CustomTypes#Edit_the_XML It's not only OK but required for Qt to work with such complex types; another side of the story is that you have to add custom marshall/demarshall[1] methods should you want to actually use the function in question. http://qt-project.org/doc/qt-4.8/qdbusargument.html I'd be happy to reach out to accountsservice maintainers and help apply fixes/patches to the xml as needed. Pulled this in awhile back, * Tue Jun 11 2013 Rex Dieter <rdieter> 4.10.4-2 - kcm_useraccount: support accountsservice (#950635) |