Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use gravatar image as user image. Works with Fedora 18, not tested with any other distro/version
#! /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
You can’t perform that action at this time.