HowTo use Mozilla Thunderbird in Nautilus’ Send To… instead of Evolution (for Attachments)

Menu Screenshot Nautilus Script SendtoIf you want to send an E-Mail quickly per Mozilla Thunderbird in Nautilus like the Send To Feature you have to write a little script. (I found a .deb for replacing Evolution with Thunderbird, but it did not work. Instead it killed the whole feature. At the end you will get a menu like the one in the screenshot on the right.

  1. Because I do not need Evolution in Nautilus I removed the nautilus-sento app. To do this execute the following: sudo apt-get remove nautilus-sendto.
  2. Create a file in ~/.gnome2/nautilus-scripts named sendto.
  3. Make it executable with chmod a+x sendto
  4. Paste the following one-liner into the file and save it
    thunderbird -compose attachment="file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
    Note
    : If you have Thunderbird 1.5 (or minor?) you must replace “thunderbird” with “mozilla-thunderbird”.
  5. Restart Nautilus with killall nautilus

Now you can right click on a file and select Scripts -> sendto to send a file as an attachment in Thunderbird.

For more scripts you can goto Nautilus File Manager Scripts.

9 Responses to “HowTo use Mozilla Thunderbird in Nautilus’ Send To… instead of Evolution (for Attachments)”


  1. 1 Jim September 27, 2007 at 9:48 am

    Thanks, works great. Only problem was getting the full one line text string … it got truncated when I tried to copy it a couple of times … I’m viewing with thunderbird on ubuntu linux which might be the problem, might be better to include it as regular text rather than the html or whaterver it is?

    Thanks again.

    J

  2. 2 ataub2qf October 1, 2007 at 12:14 pm

    @Jim
    I don’t know how to get it in one line. I only used the code-tag to highlight it.

  3. 3 Alex October 3, 2007 at 4:51 am

    I am getting and error message when trying to send an attachment this way.

    Message reads:
    Sending of message failed.
    Unable to open the temporary file /home/myname/data/filename.txt
    Check your ‘Temporary Directory’ setting.

    The file shows up in the attachments box of the compose dialog and the path to the file is correct.

    Re-attaching the file using the GUI provisions allows it to work.

    Got a clue?

    Alex

  4. 4 ataub2qf October 3, 2007 at 8:40 am

    @Alex Seems to be a thunderbird-problem…
    For Windows this trick seems to work:
    Maybe it works for you if you empty /tmp and ~/.Trash ?

  5. 5 Alex October 4, 2007 at 3:08 am

    ataub2qf,
    I did not know that Nautilus ran on Windows?
    When was that release made? :o

    Can’t empty /tmp while the system is running.

  6. 6 Elad Tabak October 14, 2007 at 2:31 pm

    I’m having the same issue with the attachments (using Linux).
    Empty /tmp is not an option.
    Any idea?

  7. 7 tech January 3, 2008 at 4:59 pm

    I am having this same temp file problem. Is there a solution for this? This thread just seems to stop.

  8. 8 ataub2qf January 4, 2008 at 12:20 pm

    Hmm on Feisty it works with nautilus-sendto:
    Just click on the file you want to send with the right mouse button and select >Send to<, then choose Thunderbird as “Send as”

  9. 9 Gow May 10, 2008 at 4:48 pm

    To solve the temporary directory problem, simply get rid of the quotation mark.

    i.e. thunderbird -compose attachment=file://$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS

    It works for me :)