Created
March 11, 2013 14:33
-
-
Save kdauzickas/5134656 to your computer and use it in GitHub Desktop.
Use gravatar image as user image. Works with Fedora 18, not tested with any other distro/version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
me=$(logname) | |
echo "Type in the email you use with gravatar: " | |
read email | |
md5=$(echo -n $email | md5sum | cut -f1 -d' ') | |
echo "Fetching image to /var/lib/AccountsService/icons/$me..." | |
wget --quiet http://www.gravatar.com/avatar/$md5?s=128 --output-document="/var/lib/AccountsService/icons/$me" | |
echo "Setting image..." | |
echo Icon=/var/lib/AccountsService/icons/$me >> /var/lib/AccountsService/users/$me | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment