
Thunderbird Service Menu
Source (link to git-repo or to original if based on someone elses unmodified work):
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:
+ A "Read Me" file is included for install instructions
+ Will attach more than one file to your e-mail
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
Ratings & Comments
30 Comments
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
Verified. Works with the changes with Kubuntu 12.04/KDE SC 4.8.3. The servicemenu definitely needs this update...
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
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
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.
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
Everything should work now. Thanks
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?
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'`
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"
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
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'`
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.
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
It works now on dolphin, thanks for getting me to investigate it.
Thanks a lot... now it works fine. Added spanish and german translation: Name[es]=Enviar adjunto con Thunderbird Name[de]=Verschicken als Anhang
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!
After hours and hours of configuration, my FC4 runs without any problems...even file-attachment!!! Almost nothing satisfies like that ;-)
Really nice, -esepecially with shivas "workaround". thanks a lot.
Great Service Menu heres the portuguese [pt-PT] translation Name[pt]=Anexar Ficheiro no Thunderbird
...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!
Is it possible to get this working with an already running instance of thunderbird?
Hi, same problem, even 'thunderbird -P "default" --compose' doesn't work for me.
I'm not sure how to make it work on when Thunderbird is running. I think then it would be easier to use the "attach" button inside Thunderbird. If anyone knows, please post it.
Try mozilla-thunderbird --remote "xfeDoCommand(composeMessage,attachment='file://%1')" instead. 1) But you have to take care that will connect to any running mozilla based mail clients and not only to thunderbird. Same line will also contact mozilla itself and netscape.
2) There is a bug introduced with thunderbird 0.8, that makes the line above fail. It is fixed for SuSE 9.2 if you use their packages, but i don't know if it is fixed for other distributions too. Hope it helps Oliver