Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
user-manager in plasma desktop not populating users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 296
Location: Caucasia

PostPosted: Thu Jul 27, 2017 11:21 pm    Post subject: user-manager in plasma desktop not populating users Reply with quote

As the topic states, when the user manager in Plasma desktop is launched, it does not list the users on the machine.

There were some bug reports for fedora, but they were listed as fixed. I'll report as a bug if others can confirm, unless someone has a workaround.
_________________
Open-mindedness is painful...
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Fri Jul 28, 2017 12:16 am    Post subject: Reply with quote

I experienced something similar earlier this year. It is a bug in KDE Plasma 5, similar to -- or the same as -- the bug https://bugs.kde.org/show_bug.cgi?id=336994

I tried the work-around given in Comment 9 of that bug report:
Code:
$ qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.CacheUser fitzcarraldo
[ObjectPath: /org/freedesktop/Accounts/User1000]

That resulted in my user account being visible again in 'System Settings' > 'Account Details'. If I log out or reboot, the user is still visible in 'System Settings' > 'Account Details'.

Is that what you are experiencing?
_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 296
Location: Caucasia

PostPosted: Tue Aug 01, 2017 6:34 pm    Post subject: Reply with quote

Yes. This works, HOWEVER, if I try to make a change, it seems to clear the cache.

Example:

Pick a new avatar, click apply.

I get two dialogs asking for root privileges. One to make the change, the other to add the change to sddm. If I do this, my user name is wiped from the user manager again.

Also, the last portion of the command you provided:

Code:
[ObjectPath: /org/freedesktop/Accounts/User1000]


resulted in
Quote:
Invalid number of parameters
. I pasted the whole line replacing your user name with mine. It worked fine when I did not use the portion after the user name.

Thank you!
_________________
Open-mindedness is painful...
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Tue Aug 01, 2017 10:55 pm    Post subject: Reply with quote

You're welcome.

The second line I posted:
Code:
[ObjectPath: /org/freedesktop/Accounts/User1000]

is not part of the command, it is the output resulting from the command on the first line (there is a carriage return after the username). I suppose I should have made that clear, but I posted the output so that you could see what the command would generate in the terminal. Anyway, glad that it (partially) solved your problem.
_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 296
Location: Caucasia

PostPosted: Thu Aug 03, 2017 5:52 pm    Post subject: Reply with quote

Can you confirm on your side that changing the avatar wipes the user info from user-manager?
_________________
Open-mindedness is painful...
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Fri Aug 04, 2017 4:21 pm    Post subject: Reply with quote

Yes. It's a bug in KDE (see link in previous post). Unfortunately we have to wait until the KDE developers fix it.


EDIT: If you run System Settings from the command line you can see that User Manager does not work properly:

First I log in under my user account (fitzcarraldo, UID 1000), launch System Settings and see that the main user (UID 1000) is not shown in the User Manager GUI:
Code:
fitzcarraldo@clevow230ss ~ $ systemsettings5
true
log_user_manager: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.freedesktop.login1 was not provided by any .service files"
fitzcarraldo@clevow230ss ~ $

So I list the users by using the following QDBus command in a Konsole window, and it indicates only the other user's account (brian, UID 1001):
Code:
fitzcarraldo@clevow230ss ~ $ qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.ListCachedUsers
[Argument: ao {[ObjectPath: /org/freedesktop/Accounts/User1001]}]
fitzcarraldo@clevow230ss ~ $

So I use another QDBus command to re-add the missing user (fitzcarraldo, UID 1000):
Code:
fitzcarraldo@clevow230ss ~ $ qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.CacheUser fitzcarraldo
[ObjectPath: /org/freedesktop/Accounts/User1000]
fitzcarraldo@clevow230ss ~ $

Then I use the QDBus command to list the users, and it now lists both users:
Code:
fitzcarraldo@clevow230ss ~ $ qdbus --system --literal org.freedesktop.Accounts /org/freedesktop/Accounts org.freedesktop.Accounts.ListCachedUsers
[Argument: ao {[ObjectPath: /org/freedesktop/Accounts/User1000], [ObjectPath: /org/freedesktop/Accounts/User1001]}]
fitzcarraldo@clevow230ss ~ $

So I launch System Settings again and try to add an avatar to user fitzcarraldo (UID 1000) via the User Manager GUI:
Code:
fitzcarraldo@clevow230ss ~ $ systemsettings5
true
log_user_manager: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.freedesktop.login1 was not provided by any .service files"
No file found for ".xml" , even though update-mime-info said it would exist.
Either it was just removed, or the directory doesn't have executable permission... ("/home/fitzcarraldo/.local/share/mime", "/usr/share/mime")
log_user_manager: Starting:  QUrl("file:///home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png")
log_user_manager: From:  QUrl("file:///home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png") to:  "/tmp/systemsettings.FW8131"
log_user_manager: Avatar created
log_user_manager: Saving on Index:  0
log_user_manager: "org.freedesktop.DBus.Error.UnknownMethod"
log_user_manager: "No such interface 'org.freedesktop.Accounts.User' on object at path /org/freedesktop/Accounts/User1000"
log_user_manager: "org.freedesktop.DBus.Error.UnknownMethod"
log_user_manager: "No such interface 'org.freedesktop.Accounts.User' on object at path /org/freedesktop/Accounts/User1000"
kf5.kauth: Tried to start an invalid action
fail "Tried to start an invalid action"
log_user_manager: "org.freedesktop.DBus.Error.UnknownMethod"
log_user_manager: "No such interface 'org.freedesktop.Accounts.User' on object at path /org/freedesktop/Accounts/User1000"
log_user_manager: Failed Roles:  (AccountModel::Email, AccountModel::Administrator, AccountModel::AutomaticLogin)
fitzcarraldo@clevow230ss ~ $

User fitzcarraldo has disappeared from User Manager in Systems Settings, and you can see from the error messages above that User Manager did not work correctly.
_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Sat Aug 05, 2017 4:59 pm    Post subject: Reply with quote

OK, I've been playing around with this KDE and freedesktop.org mess and have a work-around, at least in my situation (LightDM 1.18.3 with the patch in Gentoo Bug Report #605370 for non-systemd installations with the LightDM GTK Greeter, and KDE Plasma 5.9.5):

Code:
fitzcarraldo@clevow230ss ~ $ eix -I plasma-meta
[I] kde-plasma/plasma-meta
     Available versions:  (5) 5.9.5 ~5.10.4
       {bluetooth +display-manager grub gtk +handbook networkmanager pam plymouth pulseaudio +sddm sdk +wallpapers}
     Installed versions:  5.9.5(5)(02:21:09 06/07/17)(bluetooth display-manager gtk handbook networkmanager pam pulseaudio wallpapers -grub -plymouth -sddm -sdk)
     Homepage:            https://www.kde.org/workspaces/plasmadesktop/
     Description:         Merge this to pull in all Plasma 5 packages

fitzcarraldo@clevow230ss ~ $ eix -I accountsservice
[I] sys-apps/accountsservice
     Available versions:  0.6.43 0.6.43-r1 {doc elogind +introspection selinux systemd}
     Installed versions:  0.6.43-r1(16:42:02 05/08/17)(introspection -doc -elogind -selinux -systemd)
     Homepage:            https://www.freedesktop.org/wiki/Software/AccountsService/
     Description:         D-Bus interfaces for querying and manipulating user account information

fitzcarraldo@clevow230ss ~ $ eix -I lightdm
[I] x11-misc/lightdm
     Available versions:  1.18.3^t 1.18.3^t[1] ~1.21.5^t ~1.22.0^t {audit +gnome +gtk +introspection kde qt4 qt5}
     Installed versions:  1.18.3^t[1](13:25:05 02/07/17)(gtk introspection qt5 -audit -gnome -kde -qt4)
     Homepage:            https://www.freedesktop.org/wiki/Software/LightDM
     Description:         A lightweight display manager

[I] x11-misc/lightdm-gtk-greeter
     Available versions:  2.0.1-r1 ~2.0.2 ~2.0.2-r1 {ayatana branding}
     Installed versions:  2.0.1-r1(13:25:15 02/07/17)(-ayatana -branding)
     Homepage:            https://launchpad.net/lightdm-gtk-greeter
     Description:         LightDM GTK+ Greeter

[1] "local_overlay" /usr/local/portage

Found 2 matches


My patch for LightDM 1.18.3 is probably irrelevant as far as this KDE Plasma 5 User Manager mess is concerned, but I mention it just in case.

Although I use LightDM, included in the steps below are addtional steps I think are necessary for SDDM, although I believe they are irrelevant in my case.

1. I created a 96x96 PNG avatar /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png

2. I edited the file /var/lib/AccountsService/users/fitzcarraldo to contain the following (replace 'en_GB.utf8' with your language)
Code:
[User]
Language=en_GB.utf8
XSession=plasma
SystemAccount=false
Icon=/var/lib/AccountsService/icons/fitzcarraldo

3. I made sure that file has 644 permissions
Code:
clevow230ss fitzcarraldo # ls -la /var/lib/AccountsService/users/fitzcarraldo
-rw-r--r-- 1 root root 104 Aug  5 16:43 /var/lib/AccountsService/users/fitzcarraldo

4. I copied the avatar to the relevant directory and made sure it has 644 permissions
Code:
clevow230ss fitzcarraldo # cp /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png /var/lib/AccountsService/icons/fitzcarraldo
clevow230ss fitzcarraldo # ls -la /var/lib/AccountsService/icons/fitzcarraldo
-rw-r--r-- 1 root root 12667 Aug  5 16:23 /var/lib/AccountsService/icons/fitzcarraldo

5. I also copied the avatar to ~/.face.icon (possible SDDM requirement, I believe)
Code:
fitzcarraldo@clevow230ss ~ $ cp ~/Pictures/Avatars/Fitzcarraldo.png ~/.face.icon

6. I edited /etc/sddm.conf and changed the path of FacesDir as shown below
Code:
# Face icon directory
# The files should be in username.face.icon format
#FacesDir=/usr/share/sddm/faces
FacesDir=/var/lib/AccountsService/icons/

7. I rebooted (logging out is not sufficient).

I now have the avatar Fitzcarraldo.png on LightDM's GTK Greeter screen, on the KDE Plasma 5 Lock screen, in 'System Settings' > 'Account Details' > 'User Manager', and at the top of the KDE Plasma 5 Application Launcher menu.

I recommend not using 'System Settings' > 'Account Details' > 'User Manager' again until the bug is squashed, but you can try copying the avatars of other users to /var/lib/AccountsService/icons/ and editing the other users' files in /var/lib/AccountsService/users/ as I explained above, to see if you have any success, but I would leave things alone.

EDIT1: I have always used app-admin/superadduser on the command line to add new users, and it's never failed me. I have just now used it to add a new user, and then I manually repeated the process I described above. The avatar of the new user is displayed correctly everywhere it should be, and my own account's avatar is still displayed everywhere it should be. So you can achieve what you want without touching 'System Settings' > 'Account Details' > 'User Manager'.

EDIT2: Regarding Step 6 above, I think the avatar used by SDDM in FacesDir has to be named fitzcarraldo.face.icon so, for SDDM users, I would add an addtional step:

6.5. Make a copy of the avatar for use by SDDM in $FacesDir
Code:
clevow230ss fitzcarraldo # cp /home/fitzcarraldo/Pictures/Avatars/Fitzcarraldo.png /var/lib/AccountsService/icons/fitzcarraldo.face.icon

_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Mon Aug 07, 2017 3:27 pm    Post subject: Reply with quote

My curiosity having been well and truely piqued, I've been investigating further. Another thing to try is to launch System Settings with the root user's permissions, i.e. using kdesu5:
Code:
$ kdesu5 systemsettings5

If I do that, a user who is not shown when System Settings is launched either via the KDE Application Launcher or via the systemsettings5 command alone does appear in the 'User Manager' GUI.
_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
undrwater
Apprentice
Apprentice


Joined: 28 Jan 2003
Posts: 296
Location: Caucasia

PostPosted: Fri Sep 15, 2017 10:18 pm    Post subject: Reply with quote

I tried the above before making the changes you suggested, and it did not work.

Your suggestions are a workaround for the bug currently, so thank you for that!
_________________
Open-mindedness is painful...
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1432
Location: United Kingdom

PostPosted: Sun May 13, 2018 1:40 am    Post subject: Reply with quote

Latest update on KDE bug report 336994. Comment 27 states:

Valeriy Malov wrote:
There seem to be multiple separate issues

On Gentoo in particular AccountsService seems to be broken because of /etc/passwd and /etc/shadow mismatch on "old" installs: portage user is sometimes missing from /etc/shadow but is present in /etc/passwd. This causes AccountsService to go haywire. This can be fixed (back up your stuff beforehand) by regenerating shadow with pwconv. I'm not sure if /etc/shadow can be considered malformed in this case or it is worth reporting to AccountsService bugtracker.

Another problem is that we accidentally overwrite first item in the model when polling AccountsService via dbus with currently logged in user. This causes some other user to disappear from the list. If anyone wants to review the patch: https://phabricator.kde.org/D12837

_________________
Clevo W230SS: amd64, OpenRC, nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64, OpenRC, xf86-video-ati, dual booting with Win 7 Pro 64-bit.
KDE on both laptops.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum