Even after “unlocking” the user settings, the buttons to edit the avatar image for a user is greyed out.
However, the following command works for changing the image manually:
busctl call org.freedesktop.Accounts /org/freedesktop/Accounts/User${UID} org.freedesktop.Accounts.User SetIconFile s <path_to_image>
Is this expected when using systemd-homed/homectl?
Copy the image to user home folder and change file name to .face
For example – cp /path/to/avatar.png ~/.face
That still doesn’t resolve the issue, the buttons in GNOME settings are still greyed out.
Also, as I pointed out in the post, I was able to find an alternative method of changing the avatar image, my point was that GNOME Settings does not allow the image to be changed.
As I recall - with systemd-homed - your home is a luks encrypted container paired with a json data file - allowing the home to be portable by means of a removable device.
The homectl utility is expected to be writing to the json configuraiton file matching your account as the integrity and security of the file must be strictly maintained - never edit the json data manually.
Valuable info is linked at the begining of this document
→ Converting Existing Users to systemd-homed
Likewise the Arch wiki has good information
→ systemd-homed - ArchWiki
Right now, it appears that GNOME is following the settings declared in the file /var/lib/AccountsService/users/$USER, in which there is a config line for Icon=, that defines a path for an avatar image.
I considered the main issue was in the title: “Unable to change user avatar”
Critically
Unable to change user avatar using GNOME Settings when using homectl
Keyword, “using GNOME settings”
The inability to do so is expected. The home directory is not accessible at all times, thus, no files in home might be used without the user session and it is by design of systemd-homed. Anyways, the other design choice that breaks conventional settings is the fact that homed accounts do not exist in the system as a local user. There’s just nothing to stick to when applying those settings, because outside of the user session that user is vanished. This provides greater security, but makes traditional ways of setting avatars useless.
However, there’s one solution homed provided. The homectl update –avatar command may be used to import avatars. It will be accessible in .identity-blob, and in /var/cache/systemd/home under your user name (notice that the directory, like the file itself, are public).
So you may symlink them or put them in configuration files from those directories. I am personally using symlinks to .face and .face.icon to my avatar.