Bug 385151 - Local files and avatars from the gallery are not applied (~/.face.icon symlink created pointing to ~/.face, but that file was not created and does not exist)
Summary: Local files and avatars from the gallery are not applied (~/.face.icon symlin...
Status: RESOLVED FIXED
Alias: None
Product: user-manager
Classification: Unmaintained
Component: kcontrol module (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
: 372687 386359 387329 388882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-27 20:10 UTC by Patrick Silva
Modified: 2018-11-22 14:29 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.12
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2017-09-27 20:10:03 UTC
I can set my avatar using a file from my hd, but avatars from "Choose from gallery..." are not applied.

Tested on neon dev unstable and opensuse krypton.
Comment 1 Patrick Silva 2017-10-14 22:13:34 UTC
same bug on Arch, plasma 5.11.
Comment 2 Rog131 2017-10-30 19:16:00 UTC
(In reply to Dr. Chapatin from comment #1)
> same bug on Arch, plasma 5.11.

Working at here with the Arch, plasma 5.11.2.

User manager > Choose from gallery.
The avatar is saved to the $HOME/.face, $HOME/.face.icon and /var/lib/AccountsService/icons/<username>.

Used by the Kickoff, Lock screen and sddm greeter. The sddm greeter needs symlink from the /var/lib/AccountsService/icons/<username> to the /var/lib/AccountsService/icons/<username.face.icon>. More: https://forum.kde.org/viewtopic.php?f=17&t=13166&start=15
Comment 3 Rog131 2017-10-30 19:29:17 UTC
(In reply to Rog131 from comment #2)


> The avatar is saved to the $HOME/.face, $HOME/.face.icon and
> /var/lib/AccountsService/icons/<username>.
> 

Should be:

The avatar is saved to the $HOME/.face, symlinked to $HOME/.face.icon and saved to /var/lib/AccountsService/icons/<username>.
Comment 4 Patrick Silva 2017-10-30 20:06:49 UTC
Thank you, Rog131.
I just tested my Arch and neon user edition, both running plasma 5.11.2 and both have the problem described here.
End users need a definitive solution for bugs with avatar configuration. Without "workarounds".
Comment 5 Patrick Silva 2017-10-30 22:08:07 UTC
I just updated GeckoLinux (based on opensuse tumbleweed) on virtualbox.
With plasma 5.10.5 avatar configuration was working as expected.
After update to plasma 5.11.2 I got the same problem described here.
This report is about a regression.
Comment 6 Luís Carneiro 2017-11-11 17:51:50 UTC
(In reply to Rog131 from comment #3)
> (In reply to Rog131 from comment #2)
> 
> 
> > The avatar is saved to the $HOME/.face, $HOME/.face.icon and
> > /var/lib/AccountsService/icons/<username>.
> > 
> 
> Should be:
> 
> The avatar is saved to the $HOME/.face, symlinked to $HOME/.face.icon and
> saved to /var/lib/AccountsService/icons/<username>.

Hello Rog131, 
 
On neon user edition, the file $HOME/.face is not created, breaking the symbolic link $HOME/.face.icon and the directory /var/lib/AccountsService/icons/ is empty.
Comment 7 Rog131 2017-11-11 20:59:44 UTC
(In reply to Luís Carneiro from comment #6)
> (In reply to Rog131 from comment #3)
> > (In reply to Rog131 from comment #2)
> 
> Hello Rog131, 
>  
> On neon user edition, the file $HOME/.face is not created, breaking the
> symbolic link $HOME/.face.icon and the directory
> /var/lib/AccountsService/icons/ is empty.


Testing with the KDE neon 5.11 & VBox
Plasma 5.11.3
KF 5.40.0
Qt 5.9.1


Launching User manager from the terminal and trying to use the Avatars from the gallery - not working:

$ kcmshell5 user_manager
log_user_manager: 1000
log_user_manager: Saving on Index:  0
log_user_manager: "org.freedesktop.Accounts.Error.Failed"
log_user_manager: "file '/home/rog131/.face' is not a regular file"


Launching User manager from the terminal and browsing directly to the /usr/share/user-manager/avatars/classic/:

$ kcmshell5 user_manager
log_user_manager: 1000
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... ("/usr/share/mime")
kf5.kio.core: KSambaShare: Could not find smb.conf!
log_user_manager: Starting:  QUrl("file:///usr/share/user-manager/avatars/classic/Blackbox.png")
log_user_manager: From:  QUrl("file:///usr/share/user-manager/avatars/classic/Blackbox.png") to:  "/tmp/kcmshell5.TT2487"
log_user_manager: Avatar created
log_user_manager: Saving on Index:  0

The Avatar image is saved to the $HOME/.face, symlinked to $HOME/.face.icon and saved to /var/lib/AccountsService/icons/<username> : https://imgur.com/c7Lpmr9
Comment 8 Nate Graham 2017-11-13 15:29:07 UTC
Patch available at https://phabricator.kde.org/D8793
Comment 9 Nate Graham 2017-11-13 15:29:23 UTC
*** Bug 386359 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2017-11-16 02:53:29 UTC
Git commit 472f9a7446dae812576df0dcac8d42d641217b5e by Nathaniel Graham.
Committed on 16/11/2017 at 02:53.
Pushed by ngraham into branch 'master'.

Fix using avatars from the gallery and from local files

Summary:

Use a KIO::copy job to ensure that ~/.face gets created correctly, and delete any temp files once they're no longer needed.

Test Plan: Tested in KDE Neon. With this change, ~/.face gets created properly, both when it did not previously exist (i.e. when the user is setting a picture for the first time), and also when it did previously exist (i.e. when the user is changing their picture). Tested for gallery avatars as well as several local files (.png, .jpg, .webp).

Reviewers: apol, #plasma, mlaurent, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D8793

M  +9    -5    src/accountinfo.cpp

https://commits.kde.org/user-manager/472f9a7446dae812576df0dcac8d42d641217b5e
Comment 11 Patrick Silva 2017-11-28 10:20:07 UTC
*** Bug 387329 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2018-01-12 20:23:31 UTC
*** Bug 388882 has been marked as a duplicate of this bug. ***
Comment 13 Patrick Silva 2018-11-22 14:29:19 UTC
*** Bug 372687 has been marked as a duplicate of this bug. ***