PDA

View Full Version : Konqueror and Thunderbird



Jongi
5th September 2007, 08:31 PM
I have setup /usr/share/apps/konqueror/servicemenus/email.desktop as follows:



[Desktop Entry]
Actions=Email
Encoding=UTF-8
ServiceTypes=all/all

[Desktop Action Email]
Name=Send file(s) with Thunderbird
Exec=thunderbird -compose attachment='file://%F'
Icon=kmail

When (in Konqueror) I select multiple files, right click and choose Actions --> Send files(s) with Thunderbird, when the compose window appears only the last file I selected appears under the attachments section. I now can't remember if this worked properly before the upgrade to TB 2.0.0.5.

savage
5th September 2007, 09:13 PM
I haven't tried this myself, but I would try it as follows:

[Desktop Entry]
Actions=Email
Encoding=UTF-8
ServiceTypes=all/all

[Desktop Action Email]
Name=Send file(s) with Thunderbird
Exec=thunderbird -compose attachment=%F
Icon=kmailAlso, should 'attachment' have a leading hyphen? '-attachment'

Just guess work, but hope it helps.

Savage

Jongi
6th September 2007, 05:17 PM
no attachment has no hyphen and removing the apostrophe's and file:// make no difference to the behaviour.

savage
7th September 2007, 12:16 AM
Well when I try your code above my Thunderbird decides I want the filenames in the To field, however I do believe your code is right and this is a limitation of Thunderbird, upon further investigating, I found a possible solution on KDE-Apps, it's a servicemenu and shell script to pass multiple files. Find it here (http://www.kde-apps.org/content/show.php/Thunderbird+send+as+attachment(s)+service+menu?con tent=43062&PHPSESSID=e2040dfd28fd2ac3621c08103effa4ae).

It needs a little bit of tweaking to fix it, (although on mine it still placed it in the To field). You must point email.desktop to the full path of the shell script, and in the sendWithTB.sh file, fix the 'mozilla-thunderbird' command (it should just be thunderbird).

It does pass all filenames into the To field on mine, so hopefully, will pass all the filenames to the attachment on yours.

Before trying that, it might be worth replacing your %F with %U, I noticed the script uses %U instead of %F, though I don't know what the differences are.

Savage

Jongi
7th September 2007, 07:32 PM
savage did you have an instance of TB running already? I found that caused the attach part to appear in the To field when using the script.

EDIT: This is how the solution looks like:



[root@localhost ~]# cat /usr/share/apps/konqueror/servicemenus/email.desktop
[Desktop Entry]
Actions=Email
Encoding=UTF-8
ServiceTypes=all/all

[Desktop Action Email]
Name=Send file(s) with Thunderbird
Exec=/home/user/sendWithTB.sh %U
Icon=kmail




[root@localhost ~]# cat /home/user/sendWithTB.sh
#!/bin/bash
stringa=""
while [ "$1" != "" ]; do
stringa="${stringa}file://$1,"
shift
done
thunderbird -compose "attachment='$stringa'"

savage
7th September 2007, 08:38 PM
Your absolutely right, it works provided thunderbird isn't already running.

I'd never thought about the right-click > send via thunderbird menu until I saw your post, I'd always been dragging them into new message.

Glad I have that now, if your like me and on a network (with shared home dir) and want it on all PC's you can drop it into /home/username/.kde/share... etc.

Savage