35

In Ubuntu 11.10, I can set my profile picture through the User Accounts settings panel. I can select an existing picture and it will help me crop that picture to look nice.

The final product is not stored in the same ~/.face file used in Gnome 2. In fact, I don't know where it is stored and I would love to know! Any ideas?

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
Dylan McCall
  • 4,149
  • 2
  • 28
  • 36
  • I believe one reason why it cannot be stored in the user's home is that encrypted home directories are becoming more and more common. – Enno Feb 24 '15 at 19:53

3 Answers3

42

Pictures are stored in the folder /var/lib/AccountsService/icons/[user name]

The [user name] is of type image/png format with a size of 96x96 pixels

Under the folder /var/lib/AccountsService/users you have a similar file [user name] that is a .desktop format - for example

[User]
Language=en_GB
XSession=ubuntu
Icon=/var/lib/AccountsService/icons/dad

The Icon= is not created unless you assign a picture in Users and Accounts

If you assign one of the stock pictures the file will contain - for example

[User]
Language=en_GB
XSession=ubuntu
Icon=/usr/share/pixmaps/faces/soccerball.png

Thus –as you can see– just create an Icon= entry in /var/lib/AccountsService/user/[user name] to point to your PNG file or overwrite the icon in the similarly named /var/lib/AccountsService/icons folder

Frank N
  • 1,280
  • 2
  • 21
  • 43
fossfreedom
  • 171,546
  • 47
  • 376
  • 404
  • :D That did it! I get the feeling I should go forth and learn about AccountsService, because I keep seeing that name and not paying any attention. Thank you for the information. – Dylan McCall Oct 05 '11 at 06:33
  • Thanks for the details. Works also for **Fedora 33** in April 2021. – erik Apr 07 '21 at 14:52
3

For anyone using Ubuntu 12.04 the webcam picture taken during install (if not changed) is simply stored here:

/home/[UserName]/.face

It is stored as a .png file. Go to your View > Show Hidden Files options to see it and access it.

A.B.
  • 89,123
  • 21
  • 245
  • 323
DaTaLoCuSt
  • 41
  • 2
3

If there is no global icon for the user, GDM will look in the user's $HOME directory for the image file. GDM will first look for the user's face image in ~/.face. If not found, it will try ~/.face.icon. If still not found, it will use the value defined for "face/picture=" in the ~/.gnome2/gdm file.

source http://library.gnome.org/admin/gdm/stable/overview.html.en#facebrowser

jflaflamme
  • 600
  • 2
  • 7
  • This question should be tagged with gdm also + title – jflaflamme Sep 28 '11 at 12:46
  • it shouldn't because the question mentions explicitly Ubuntu 11.10 that doesn't have gdm by default but gnome-screensaver and the control center still have acess, to the image, without it. – sergio91pt Sep 28 '11 at 18:02