Thunderbird Service Menu

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

2
Score 50.0%
Description:

This service menu will allow you to right click on one or more files and attach it to a new E-mail with Thunderbird.

+ A "Read Me" file is included for install instructions
+ Will attach more than one file to your e-mail
Last changelog:

9 years ago

3.0
Updated to work with KDE4 & Dolphin

2.1 Now has a service menus for both Konqueror and Dolphin. Also now displays a Thunderbird icon next to the service menu item.

2.0 Thanks to "ptitpoul" it will now attach more than one file.

1.0 Worked with one file

C

ljogerst

9 years ago

Can someone verify this?
Thanks - ljogerst

First, the automatic installation fails (on Kubuntu 10.04) as the target
path does not exist, I think. On my installation, I had to put the
attach_thunderbird.desktop file in

~/.kde/share/kde4/services/ServiceMenus

(but this may be an (K)Ubuntu-specific problem).

However, I think the following really is a system-independant bug: When
I'm right, Thunderbird wants to have a file /foo/bar passed as

file:///foo/bar

instead of

file://foo/bar

(at least what I've tested here...), so I assume the "Exec" line have to
be changed from

Exec=thunderbird -compose "attachment='file:/`echo %F | sed 's/\\
\\//,file:\\/\\//g'`'"

to

Exec=thunderbird -compose "attachment='file://`echo %F | sed 's/\\
\\//,file:\\/\\/\\//g'`'"


Hope I'm right and could help...

Regards,
Felix Günther

Report

janet

7 years ago

Verified. Works with the changes with Kubuntu 12.04/KDE SC 4.8.3. The servicemenu definitely needs this update...

Report

ferbrok

9 years ago

Hi ljogerst,

After trying some time on kubuntu reciving the "check your 'temporary directory' setting" message, I found this http://www.pclinuxos.com/forum/index.php?topic=67956.0;wap2 and realized some changes for the service folder and icon location:

:::::::::::::::::::::::::::::::::::

Place a shell script called attach_mail_service, make sure it's executable,
in your home directory bin ie: ~/bin. The contents are as follows:

Code:

#! /bin/bash
#
# Script created by ASID
# Attach files to thunderbird

temp=""
#temp2=""
#subject="mailing files: "
count=0
for i in $*
do
count=$(( $count + 1 ))
if [ $count -eq $# ]
then
temp=${temp}file://${i}
#temp2=${temp2}file://${i}
else
temp=${temp}file://${i},
#temp2=${temp2}file://${i},
fi
done

#subject=${subject}${temp2}
if mozilla-thunderbird -remote "ping()" 2> /dev/null ;
then
mozilla-thunderbird -remote "xfeDoCommand(composeMessage,attachment='$temp')"
#,subject='$subject')"
else
mozilla-thunderbird --compose "attachment='$temp'"
fi




Now place a file named AttachToThunderbirdMail.desktop in your /usr/share/kde4/services/ServiceMenus directory.
The contents are as follows:

Code:

[Desktop Entry]
Encoding=UTF-8
ServiceTypes=all/allfiles,KonqPopupMenu/Plugin
Actions=attachToEmail
Type=Service

[Desktop Action attachToEmail]
Name=Attach to Email
Icon=/usr/share/thunderbird/icons/mozicon16.xpm
Exec=~/bin/attach_mail_service %F



Hope this helps
Greetings

Report

sloopy

9 years ago

I tryed your servicemenue on a Kubuntu 9.10, all I got was nothing.
I changed the Icon suffix from .png to .xpm
nix
Then I combined a service menue for k.mail with your service menue.

[Desktop Entry]
ServiceTypes=all/allfiles
Actions=emailAsAttachment
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin

[Desktop Action emailAsAttachment]
Nane=email_as_attachement
Name[de]=Per e-Mail versenden
Icon=email
Exec=thunderbird -compose `echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`


I have a thunderbird-window that openes but no attachement.
Not very interesting.
So could you please tell me how you make it run ?

Thank you

Report

wlos

9 years ago


Maybe usage of backtick operator depends on default shell? I'm using bash and this

http://devel.pc-serwis.com/2010/02/how-to-add-service-menu-entry-in-dolphin/

works for me.

Report

sloopy

9 years ago

Thank you for your link. I first tryed to copy and paste the code from the website, but - as they say - it did'nt work. So I downloaded the email.desktop file from the link and changed the name to
<name[de]Versenden mit Thunderbird>
and now it works. I do not exactly know where is the difference between the copied and the downloaded version but it works and that's the most important.
Greetings
Sloopy

Report

C

ljogerst

9 years ago

Everything should work now.
Thanks

Report

EstebanTristan

10 years ago

I have Kubuntu 8.10 with KDE4. I modified this to have this service menu under KDE4 like this :
[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=all/allfiles,KonqPopupMenu/Plugin
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory
Type=Service

[Desktop Action attachToEmail]
Exec=thunderbird -remote "xfeDoCommand(composeMessage,attachment='file://%f')"
Name=Attach to Thunderbird Mail
Name[fr]=Envoyer avec Thunderbird
Icon=/usr/share/thunderbird/icons/mozicon16.xpm

and place it in the /usr/share/kde4/services/ServiceMenus/ folder. I have the service menu in dolphin but it doesn't attach the file. I have the same problem if I replace the Exec line with Exec=thunderbird -compose `echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'` or with the solution with the quotes also. Anyone has an idea why it doesn't xork?

Report

Loriant

9 years ago

This worked for me (kde 4.3.3, Ubuntu and Dolphin) :
[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory
Type=Service

[Desktop Action attachToEmail]
Name=Attach to Thunderbird Mail
Name[fr]=Envoyer avec Thunderbird
Icon=/usr/share/thunderbird/icons/mozicon16.xpm
Exec=thunderbird -compose `echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`

Report

maidis

9 years ago

For Pardus 2009 + Dolphin 1.3 + Thunderbird 3.0:

Name[tr]=Thunderbird ile Gönder
Icon=/usr/share/pixmaps/thunderbird.png
Exec=thunderbird -compose attachment="%F"

Report

Okanda

11 years ago

Thanks, useful servicemenu.

But for Debian users, Icedove replace Thunderbird.
So, edit the two files *.desktop and change thunderbird with icedove on the Exec line.
For the icon, the location is :
/usr/share/icedove/icons/mozicon16.png

Report

ptitpoul

12 years ago

for Thunderbird 2 (Gutsy), this Exec key allow to attach more than one file:

Exec=thunderbird -compose `echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`

Report

ptitpoul

11 years ago

Better, add quotes : Exec=thunderbird -compose "`echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`"
This allows to take filenames which comprise " -" (a space followed by a dash). However it can't attach filename comprising a comma.

Report

XMasitel

12 years ago

Hi,
This service menu doesn't work with Dolphin, here the Dolphin script (with italian translation ;-)):

[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=all/allfiles
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory

[Desktop Action attachToEmail]
Exec=/home/bruno/thunderbird/thunderbird -remote "xfeDoCommand(composeMessage,attachment='file://%f')"
Name=Attach to Thunderbird Mail
Name[it]=Invia E-mail con Thunderbird
Icon=attach

Report

danux

9 years ago

Hi:

Just found an error. It doesn't work if Thunderbird isn't opened. So I wrote it again but I put it in a new thread, 'cause it has other commands and so!

Report

danux

9 years ago

Thanks a lot... now it works fine. Added spanish and german translation:
Name[es]=Enviar adjunto con Thunderbird
Name[de]=Verschicken als Anhang

Report

C

ljogerst

11 years ago

It works now on dolphin, thanks for getting me to investigate it.

Report

stonewolf

13 years ago

After hours and hours of configuration, my FC4 runs without any problems...even file-attachment!!! Almost nothing satisfies like that ;-)

Report

mfriedrichs

14 years ago

Really nice, -esepecially with shivas "workaround".
thanks a lot.

Report

Makub3X

14 years ago

Great Service Menu
heres the portuguese [pt-PT] translation

Name[pt]=Anexar Ficheiro no Thunderbird

Report

shiva

14 years ago

...you could maybe add:

*Service-Menü installieren ->

*Zu persönlichen Aktionen hinzufügen
*Zu systemweiten Aktionen hinzufügen
*Persönliches Web-Kürzel hinzufügen
*Systemweites Web-Kürzel hinzufügen


Works fine for me!

Report

BenNavis

14 years ago

Is it possible to get this working with an already running instance of thunderbird?

Report

linpete

14 years ago

hi folks,

to get the menu working with a running instance of thunderbird use this command for exec line in AttachToThunderbirdMail.desktop :
Exec=[PATH TO THUNDEBIRD/]thunderbird -remote "xfeDoCommand(composeMessage,attachment='file://%f')"
this is workin for me unter KDE 3.2.1

thnx for the menu-file
pete

Report

daveGoBlue

14 years ago

In order to cover both cases:

1. Thunderbird is already runnning
2. Thunderbird is not yet running

you can use the following Exec command:

Exec=mozilla-thunderbird -remote "xfeDoCommand(composeMessage,attachment='file://%f')" || mozilla-thunderbird --compose attachment=file://%f

Report

C

ljogerst

14 years ago

Thanks for the good code!
I used this for Mepis:

Exec=/usr/bin/mozilla-thunderbird -remote "xfeDoCommand(composeMessage,attachment='file://%f')"

and it attaches properly when Thunderbird is already open. I still prefer it without opening Thunderbird, but to each his own. Enjoy!

Report

9 years ago

3.0
Updated to work with KDE4 & Dolphin

2.1 Now has a service menus for both Konqueror and Dolphin. Also now displays a Thunderbird icon next to the service menu item.

2.0 Thanks to "ptitpoul" it will now attach more than one file.

1.0 Worked with one file

12345678910
product-maker Base: 4 x 5.0 Ratings
janet
May 05 2012
ngrocott
Dec 09 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs ocs-url or ocs-store to install things
Pling
0 Affiliates
Details
license
version
3.0
updated Apr 09 2010
added Jan 01 2005
downloads 24h
0
page views 24h 3
System Tags addon