Tags: ,

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

1. Create this file

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

2. paste this code into the file and store it

CODE:
  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. # Find the Thunderbird executable
  7. THUNDERBIRD=$(which icedove 2> /dev/null)
  8. if [ -z "$THUNDERBIRD" ] ; then
  9.     THUNDERBIRD=$(which thunderbird 2> /dev/null)
  10. fi
  11. if [ -z "$THUNDERBIRD" ] ; then
  12.     exit 1
  13. fi
  14. ARG=$(echo "$1" | sed 's/^mailto:?//' | sed 's/%/%25/g' | sed 's/,/%2C/g')
  15. CONTENT=$(echo "$ARG" | sed 's/\&attach=.*//' | sed 's/\&/,/g')
  16. ATTACH=$(echo "$1" | sed 's/\&attach=/\n\nfile:\/\//g' |awk '/^file:/ { printf "%s,",$0 }')
  17.  
  18. NEWARG="${CONTENT},attachment='${ATTACH}'"
  19.  
  20. echo "$ARG"> /tmp/xpicasa.tmp
  21.  
  22. "$THUNDERBIRD" -compose "$NEWARG"

3. give this script execution permission

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

4. and restart firefox


Sponsored Links

4 Responses to “sending images from picasa with thunderbird”

  1. Allen Says:

    I have applied this to my system as indicated and it still doesn’t work. It works OK with Gmail but not Thunderbird.

    Any suggestions?

    Thanks

    Allen

  2. moro Says:

    Hi Allen.

    I justed fixed an error in the script shown on this page. Please try again with the new version and let me know if the error persists.

  3. alleyoopster Says:

    thanks this it works great in Debian lenny

  4. moro Says:

    And in squeeze as this is the release I am using :)

Leave a Reply