On Nov 24, 5:01 pm, fredv78 <
fred...@gmail.com> wrote:
> I have Ubuntu 7.10 and have a trouble with sending images in emails
> with Thunderbird. The images are not attached in the message...
>
> Will that bug be fixed for the final release ?
>
> Fred
>
I'm running the new 2.7 beta on Ubuntu 7.04 and finally got
Thunderbird and Picasa working together wonderfully (for me, anyhow).
A bit of background on this right quick:
The old 2.2 Picasa for linux can't pass more than one attachment to
your mailer or to your picasa-hook-email.sh script (easily provable by
having picasa-hook-email.sh output what is passed to it into a
file... attach one image, you'll see a correct mailto URI. Attach
more than one, Picasa never sends anything at all to your script).
Thankfully, the new 2.7 beta has fixed this bug.
The other problem I've always had with Picasa 2.2 for linux is what
you're running into; when you do try to attach an image to a
Thunderbird email, Picasa is able to correctly trigger the opening of
a new email message, and the subject and body are filled in correctly
but no image is actually attached. This same problem exists in the
2.7 beta, but is very easily solved. Here's how...
1) Install the Picasa 2.7 beta. Since I'm on Ubuntu, I downloaded
the .deb to my desktop, double-clicked it, and let the installer
replace my older Picasa version. Note that you'll lose your
application menu shortcut for Picasa (the new install doesn't create
one), so you'll want to manually create a shortcut after installing,
or else just right-click the existing Picasa shortcut in your
applications menu *before* running the installer and select "Add this
launcher to panel" or "Add this launcher to desktop".
2) Open your favorite text editor and paste this text, saving the file
as /tmp/picasa-hook-email.sh
---------8< snip --------------
#!/bin/bash
# Take the mailto: URI that Picasa sends and break off the
attachments, discarding the rest. We'll
# supply our own subject and body in the thunderbird command-line
below. We end up with a variable
# $ATTACH that contains a comma-separated list of images to attach.
ATTACH=\'`echo $* | sed -e 's/\&attach=/\n\nfile:\/\//g' | awk '/
^file:/ { printf "%s,",$0 }'`\'
# Launch thunderbird with our new custom command-line. Edit the
subject and body as you wish, but
# be certain to leave the single-quotes around the subject and body
text. Of course, the end-user can
# change the subject and body of the email before sending. The
thunderbird executable 'mozilla-thunderbird'
# is in my path (and should be in yours, but make sure it is if you
have problems), so I don't give a full path
# here.
mozilla-thunderbird --compose "subject='EMAILING: Pictures from
Picasa',body='Attached are some photos for your enjoyment.',attachment=
${ATTACH}"
exit 0
-------- 8< snip -------------
3) Open a terminal (Applications > Accessories > Terminal) and do
(command should be all on one line):
sudo bash -c "mv /tmp/picasa-hook-email.sh /opt/picasa/bin/ ; chown
root:root /opt/picasa/bin/picasa-hook-email.sh ; chmod 755 /opt/picasa/
bin/picasa-hook-email.sh"
That's it, fire up Picasa, right-click 3 or 4 images, and select "File
> Email...". Click "Native Linux email client" when prompted
(assuming Thunderbird is registered as your default mail client), and
in a few seconds, the new email message should pop up with your
correctly attached multiple images.
BIG NOTE: If you have commas or percent signs in your image
filenames, you're going to need to tweak on the script above to get
rid of those characters. Spaces and apostrophes aren't a problem (eg
I can send image "/home/mark/Documents/My Pictures/Dad & Adam at
Mom's.jpg" with no problem, but an image I saved back in the Internet
Explorer days "/home/mark/Documents/My Pictures/Blue%20Desktop.jpg"
won't send, nor will "New car, old dog.jpg"). Simple solution is
don't have "%" or "," in your filenames in the first place. I didn't
mess with it because I only had two old .jpgs saved in IE, and one
file with a comma in its name.
Hope that helps someone else out there, I looked and looked for a
working picasa-hook-email.sh for Thunderbird but struck out
previously. Finally broke down and put some time into this because I
have my folks running linux, but my step-mom was pushing for going
back to Windows simply because Picasa wasn't doing this and she was
used to the windows version handling it no problem.
Regards,
Mark