0

The GUI

I’m using simple desktop display manager (SDDM) & KDE Plasma 5. How do I configure the avatar picture of a non-root user, through commands (so that I can automate it)? How do I do the above in a terminal?

I can’t even find the configuration file, .ini, .conf, *rc, be it whatever. I have done kfind throughout the whole system and found nothing but the locations of those icon image files, which are of no use.

1 Answer 1

0

If using sudo is an option, try this:

(
  username=test
  avatar_src=avatar.png
  avatar_dest=/var/lib/AccountsService/icons/$username

  sudo cp "$avatar_src" "$avatar_dest"
  echo "[User]" | sudo tee /var/lib/AccountsService/users/$username
  echo "Icon=$avatar_dest" | sudo tee -a /var/lib/AccountsService/users/$username
)

Also, here's where SDDM looks for avatars: https://github.com/roberthoffmann/sddm/blob/develop/src/greeter/UserModel.cpp#L116

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .