You are not logged in.

#1 2012-12-27 15:05:28

GNRS
Member
Registered: 2012-12-27
Posts: 3

User picture script & GDM 3.X

Hey!

I'm trying to make a script that replaces my user picture with my Facebook profile picture (it will be executed periodically).

I tried with the following:

#!/bin/sh
rm ~/.face
wget https://graph.facebook.com/FB_USER_NAME/picture\?width\=200\&height\=200
mv picture\?width\=200\&height\=200 ~/.face.jpg
convert ~/.face.jpg -resize 96x96 ~/.face.png
rm ~/.face.jpg
mv ~/.face.png ~/.face

And I have changed /var/lib/AccountsService/users/USER:

[user]
Language=en_US.utf8
XSession=gnome
Icon=/home/USER/.face

This seems to work well except for GDM, which doesn't show an image for my user now. I think the problem is that GDM can't read from my home directory.

I don't know how to make this work. Any ideas?

Last edited by GNRS (2012-12-27 15:07:14)

Offline

#2 2012-12-27 16:59:29

fschiff
Member
Registered: 2011-10-06
Posts: 71

Re: User picture script & GDM 3.X

GNRS wrote:

And I have changed /var/lib/AccountsService/users/USER:

Why?
Doc says that it will look for a .png or .jpg called .face in your home directory.  Permissions shouldn't be a problem.

Snarky
    RTFM
    Get off my lawn.
/Snark

Offline

#3 2012-12-27 18:17:16

GNRS
Member
Registered: 2012-12-27
Posts: 3

Re: User picture script & GDM 3.X

Oh, I did that because there was a line there pointing to /var/lib/AccountsService/icons/USER. Deleting it has the same effect.

I have tried changing the group of ~/.face to a group that gdm and my user are in, but still doesn't work. Does this mean that GDM looks for the picture somewhere else (although GNOME is fine with ~/.face)? That doesn't make much sense either since when that line pointed to /var/lib/AccountsService/icons/USER it did show that picture, it disappeared when I changed that line.

Offline

Board footer

Powered by FluxBB