2

This question already has an answer here:

While playing around with a fresh installation of 18.04, I've accidentally selected a photo for my user. I couldn't find an undo or cancel or remove option, so now I'm stuck with a photo on the login screen. Is there any way to return to the default faceless gray avatar?

My workaround would be to create a new user, grab a screenshot, cut the default image and use that as my new "photo" but if there's a real removal option I'd love to know about it.

Update: I did not take a photo with the webcam, just selected one of the provided images, so there is no .face file in my home directory.

marked as duplicate by Rinzwind, Amith KK, Thomas, David Foerster, Eric Carvalho Jul 15 '18 at 13:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    See Using CLI, how do I change the user's profile picture? It is in /var/lib/AccountsService/users/$USER – Rinzwind Jul 15 '18 at 6:37
  • @Rinzwind Now that Amit KK updated the answer you pointed to, it covers my question as well. Does this mean you can close this question as a duplicate? I'm a bit of a newbie here. Also, should I mark vanadium's answer (detailed and correct) or sudodus' (points to the older answer which is now also correct)? Thanks. – Alex Jul 15 '18 at 9:54
1

There is no possibility to reset/remove you user photo from the "Users" panel in settings. You need to resort to the terminal and change some configuration settings as root. How to do that is already indicated in this answer (step 1 below), but to fully tidy things up in case you selected your own picture, or took one with your webcam, you should also remove the picture itself (step 2).

Thus, the actions are:

1) Edit the configuration file /var/lib/AccountsService/users/$USER as root user (change $USER to your login name if the variable $USER is not set to your login), and delete the line Icon=/var/lib/AccountsService/icons/<your_username>

2) Remove your custom picture /var/lib/AccountsService/icons/<your_username> if it exists. It won't exist if you took one of the provided images.

  • 1
    I had to restart for the change to take effect. Logging out wasn't enough. – Alex Jul 15 '18 at 14:02
0

I think your user photo is stored in the hidden file .face in your home directory

If you remove it

rm ~/.face

you should get the default faceless gray avatar.

Otherwise you are probably storing your user picture according to this link (the accepted answer by @Rinzwind),

Using CLI, how do I change the user's profile picture?

  • 1
    @Alex, Do you mean the user photo in Ubuntu Desktop 18.04 LTS, or do you mean some other user ID, for example your user ID at AskUbuntu? Anyway, my user photo in Ubuntu and Ubuntu community flavours, that is shown at the login screen is stored as .face in my home directory. – sudodus Jul 15 '18 at 6:49
  • 1
    Thanks @sudodus but Rinzwind is correct, I did not take a photo, just selected one of the available images in the user edit screen. So there's no .face file. – Alex Jul 15 '18 at 6:55
  • 1
    See the link I posted at the answer. The picture you pick yourself for a user is in /var/lib/AccountsService/users/$USER . You need to remove the part behind the = – Rinzwind Jul 15 '18 at 7:12
  • 1
    @Alex I've updated the answer linked to by Rinzwind to also add a case where you want to remove the profile picture altogether – Amith KK Jul 15 '18 at 8:12
  • 1
    @AmithKK Thanks, that answer is now complete and covers my question as well. – Alex Jul 15 '18 at 9:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.