Tags: ,

Using thunderbird to sending images from picasa does not work per default. A little script is needed.

1. Create this file

  1. /opt/picasa/bin/picasa-hook-email.sh

2. paste this code into the file and store it

  1. #!/bin/bash
  2.  
  3. # Thunderbird may fail on some systems because of Picasa's
  4. $LD_LIBRARY_PATH
  5. unset LD_LIBRARY_PATH
  6.  
  7. # Find the Thunderbird executable
  8. THUNDERBIRD=$(which icedove 2> /dev/null)
  9. if [ -z "$THUNDERBIRD" ] ; then
  10.     THUNDERBIRD=$(which thunderbird 2> /dev/null)
  11. fi
  12. if [ -z "$THUNDERBIRD" ] ; then
  13.     exit 1
  14. fi
  15.  
  16. ARG=$(echo "$1" | sed 's/^mailto:?//' | sed 's/%/%25/g' | sed 's/,/%2C/g')
  17. CONTENT=$(echo "$ARG" | sed 's/\&attach=.*//' | sed 's/\&/,/g')
  18. ATTACH=$(echo "$1" | sed 's/\&attach=/\n\nfile:\/\//g' |awk '/^file:/ { printf "%s,",$0 }')
  19.  
  20. NEWARG="${CONTENT},attachment='${ATTACH}'"
  21.  
  22. echo "$ARG" > /tmp/xpicasa.tmp
  23.  
  24. "$THUNDERBIRD" -compose "$NEWARG"

3. give this script execution permission

  1. chmod 755 /opt/picasa/bin/picasa-hook-email.sh

4. and restart firefox