Fixing attachment issue with nautilus-sendto via Thunderbird »

Saturday, 8 March 2008 | Linux | Dawid Lorenz

Right-click file in Nautilus & send via Thunderbird feature never worked correctly for me. Well, compose window was always popping up, but instead of file attached, I could only see recipient (To: field) as attachment=/home/evad/somefile.txt. Lovely. But when I’ve once spotted colleague at work, an Ubuntu user, who had that feature working properly I’ve decided to put some work on Google.

It turned out that feature of adding attachments from Nautilus context menu works fine only when Thunderbird is NOT yet running. After some googling I’ve found the problem lies in /usr/bin/thunderbird script file, that executes Thunderbird, and detects already running instance of it. So, somewhere around line 79, where -compose) case handling begins, script should look like this:

-compose)
    shift
    rm_shit
    ARGS="`echo $@ | sed 's_file:///file:///_file:///_'`"
    exec $MOZ_PROGRAM $MOZARGS -compose "$ARGS"
    ;;

And from now on, adding attachment should work also while Thunderbird is already running. Finally. WARNING! Modification above must be re-applied after each upgrade of Thunderbird from Fedora updates respository, as upgrade process overwrites it with default (buggy) values.

Related:
https://bugzilla.redhat.com/show_bug.cgi?id=426331
https://bugzilla.redhat.com/show_bug.cgi?id=430973

Anything to say?