Unable to set profile picture via gnome control center, because /tmp is marked private in accountsservice service file
Hi. While I'm trying to set a profile picture graphically I hit a conflict in between accountsservice security and gnome-control-center(g-c-c) way to setup the profile picture. The g-c-c sends a copy of the (possibly cropped) profile picture to /tmp and calls dbus to set the picture. Here it fails with
(gnome-control-center:7861): accountsservice-WARNING **: 15:32:07.674: SetIconFile call failed: GDBus.Error:org.freedesktop.Accounts.Error.Failed: file '/tmp/gnome-control-center-user-icon-LR33G1' is not a regular file
A manual test confirms this: Copy pic.png to /tmp/pic.png and run
file /tmp/pic.png
/tmp/pic.png: PNG image data, 660 x 660, 8-bit/color RGBA, non-interlaced
busctl call org.freedesktop.Accounts /org/freedesktop/Accounts/User${UID} org.freedesktop.Accounts.User SetIconFile s /tmp/pic.png
It fails with
Call failed: file '/tmp/pic.png' is not a regular file
This seemns to be because in https://gitlab.freedesktop.org/accountsservice/accountsservice/-/blob/main/data/accounts-daemon.service.in#L28
PrivateTmp=true
So the file in /tmp is not reachable to be set by accountsservice.
Now I don't know if this is something that should be changed on the GNOME side, or here in the systemd service file.
- accountsservice 22.04.62-2
- dbus 1.12.20-1
- Arch Linux
Bugreport on GNOME bugtracker: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1629