Image 01


Dylan Dylan Schrader
Dolphin Service Menus
Various KDE 1.-4. Improvements
Attach to Email Service Menu

Dolphin Service Menus 110 comments

Score 64%
36 Dislikes
Oct 30 2006
Thanks for your contribution. Could you also translate the other messages in the file?

A file is attached.
Some files are attached. - Apr 28 2006
Try running the script directly from a command line:

$ attach-to-email "/absolute/path/1" "/absolute/path/2"

and see if it gives any useful information. - Sep 10 2005
It works for me. What email client are you using? - Sep 09 2005
Thanks for pointing this out. I hope that version 0.6.13 works for you. - Sep 19 2004
What output do you get from the following:

ls -l $(kde-config --prefix)/bin/attach-to-email

cat $(kde-config --prefix)/share/apps/konqueror/servicemenus/attachToEmail.desktop | grep Exec - Aug 29 2004
Are you doing a global or local install? - Aug 29 2004
Try using version 0.6.12. If it still doesn't work, let us know! Thanks. - Aug 29 2004
Just change the line (line 113 in version 0.6.11) that reads:

body+="\n\t%s" % (path)


body+="\n\t%s" % (os.path.basename(path)) - Aug 26 2004
I'm assuming that you're using kmail based on your suggestion to use dcop. I use kmail, too, and I can't duplicate the same behavior. The script makes no assumptions about whether kmail is running. Kmail itself has code to make sure that only one instance of itself is running, but I can't see why it would close after you click send. What version of kde/kmail are you running? - Aug 25 2004
I think I see the reason for this; the script takes it for granted that you only have one language configured. If you have more than one, then it will not be able to parse it correctly and will fall back on English. I should have this fixed shortly. Thanks. - Jun 05 2004
It is on However, holds the servicemenu section in common with it. - Jun 05 2004
Check out
for more information. - May 31 2004
Thanks for pointing this out. I think I fixed it in this next release. - May 30 2004
Thanks for the translation; I added it.

I prefer full path names because it shows the directory structure, but I can see how that might be a security issue for some. It's a really simple change to make, though. - May 27 2004
Forgot to mention earlier, by the way, whether or not konqueror executes scripts on double click is irrelevant to the problem since the service menu should just execute the script, and if the script works, then... - Apr 02 2004
That's really strange. I'm not sure exactly what the cause of that could be. - Apr 02 2004
[Desktop Entry]

[Desktop Action attachToKmail]
Name=Attach to Kmail
Exec=kmail --attach %U

That's fine if you always want to use kmail, don't select directories, and don't select filenames like "/home/user/file%20name" that kmail will interpret as http encoding even though it's local. - Apr 01 2004
So, you can type:

/usr/local/bin/multiple-attachments-servicemenu /path/to/file

but not right-click on /path/to/file and select Attach to Email?

That's very odd considering that the servicemenu just calls the script outright. The only thing that I could think of would be that the servicemenu didn't end up in the right directory (i.e. $KDEDIR/share/apps/konqueror/servicemenus/). - Mar 31 2004
Globally, the files that control these are in

For each user, they are in
~/.kde/share/apps/konqueror/servicemenus - Mar 27 2004
For me, I never set an email client apart from kmail and didn't even have an EmailClient entry in my emaildefaults. If I change it and then set it back to kmail(default) in the KDE Component Chooser, then emaildefaults has EmailClient= but it's just blank. - Mar 27 2004
Okay, I'm going to go ahead and incorporate your fix as it seems like a good idea. Thanks again. - Mar 26 2004
It's an interesting point, though. Is it safe for the script to assume the user's intent or should it be up to the user to make a complete entry? I guess I could always change it to:

if ec=="" or os.path.split(ec)[1]=="kmail":

and then people could always change it if they wanted to.

Thanks for your fix by the way. I hadn't considered that people might enter "kmail" in the config file until you mentioned it. - Mar 26 2004
My original assumption when having it parse the config file to check for the email client to use was that the string after "EmailClient=" is set up exactly as intended.

Now, you raise a good point. If someone wants to use kmail and also have it entered in the config file, then if they enter "EmailClient=kmail" they probably intended for it to be KDE's kmail with all the options like -s -B --attach and stuff like that.

Your fix is good assuming that kmail is entered as if it is in the path. A stronger solution might be:

if ec=="" or os.path.split(ec)[1]=="kmail":

Granted that this is great for most if not all people, I still don't really want the script to be guessing what people intended to enter. I think the script should just trust the user and stick to what is entered. After all, someone could enter "kmail --attach %A" and this could be because the person wants there to be attachments but not the default subject/body stuff. - Mar 26 2004
It came as a default for KDE for me. I think it comes in kdeutils. - Mar 19 2004
Yeah, I don't know how to attach files from the command line in evolution. I've looked (and probably missed something obvious), but don't see it. As usual, if someone does know, I wish he would tell me. - Mar 12 2004
Yeah, I'm pretty sure that mozilla's syntax for attaching files from the command line will only allow there to be one (if anyone knows otherwise, please tell us). For mozilla mail as the default client, really the string should be something like:

/usr/bin/mozilla -compose "to=%t,subject=%s,body=%B,attachment=%A"

set in Control Center > KDE Components > Component Chooser > Email Client.

Thanks for the feedback, by the way. - Mar 12 2004
Thanks for pointing this out.

What is the command that you have set in KDE preferences to do this? I've tried:

mozilla -compose "attachment=%A"

and that works for one file selected, but no more than one. I haven't done much with mozilla at all, but as far as I can tell right now, mozilla will accept one attachment given on the command line as an argument, but not more than one. I tried things like:

mozilla -compose "attachment='/dir/dir/file',attachment='/dir/dir/file'"

mozilla -compose "attachment='/dir/dir/file' '/dir/dir/file'"

If anyone has an understanding of how to set multiple attachments on mozilla's mail client with command line arguments, please tell us. - Mar 09 2004
That would be useful. - Mar 09 2004
True. I could get settings for the most common email clients, and that might be a good enough solution for most people. - Mar 08 2004
The difference between my implementation as a service menu and Location > Send as File is that with a service menu, I can right click on a link in a web page for example and send the referent of that link as an attachment more easily than having actually to open the link.

As for adding options to gzip, bzip2, or zip, that's a good idea. Now, the ways to go about doing this might be: the service menu has a sub-menu that lists the different options each of which calls the python script with different arguments depending on what to do (this would be pretty easy, but as far as I know, KDE < 3.2 doesn't allow sub-menus in service menus), or to offer the menu within the python script itself either using kde-bindings (which would require it to be installed), or kdialog. I would much rather go the sub-menu route, but for people without KDE 3.2, it could be very crowded. I'll think more about a good way to do this, though. - Mar 08 2004
That's a good idea, but I can't think of a way for the program to know how to add attachments to arbitrary email clients. For instance, in kmail the argument is --attach, but in other clients it could be anything, and I can't think of a way to tell what that might be in each case. If anyone has any ideas concerning how to do this, please let me know! - Mar 08 2004
There's now an install script that should take care of this automatically. - Mar 07 2004

System Software 134 comments

by yogin
Score 78%
22 Dislikes
Jun 30 2010
This is great and handles searching for the different types of unnecessary files well. Thanks a lot! - Mar 18 2006
Improving KDE

Various KDE 1.-4. Improvements 313 comments

Score 78%
22 Dislikes
Nov 28 2004
Excellent work! This looks very nice and has no bad effects for me. Thank you. - Oct 14 2004
Konqueror New Tabs Patch

Various KDE 1.-4. Improvements 19 comments

Score 58%
42 Dislikes
Aug 24 2004
Don't worry, I'm not going to bash you personally. I apologize if my response was impolite at all.

Perhaps the reason I prefer only my home page is that it's set to google, so I open a new tab very often to search for something. - Aug 25 2004
Yes, that is something that people have mentioned to me. It would be pretty easy to add that functionality (just change it from a boolean value to a url value), but since users can already configure their start page tabs (per profile) and their home page, adding the option to configure and store yet another url seems excessive to me. Of course, it appears that a number of people consider adding even this patch to be excessive.

If people really want that option, I'll add it. - Aug 24 2004
How is that the same effect? - Jul 24 2004
You're right. It is now an option in 0.2. - Jul 22 2004
Oh yeah, and I think the double-clicking thing is planned for KDE 3.3. - Jul 22 2004
I'm using the Sparkling icon set which I found on - Jul 22 2004

Utilities 139 comments

by oisch
Score 82%
18 Dislikes
Jul 22 2005
This is an awesome idea, and the project seems like it's off to a great start. - Jul 22 2004
Clean Backup Files

Dolphin Service Menus 8 comments

Score 50%
50 Dislikes
Jun 22 2004
What about something like:

for each in `ls -1 %u/*~`; do mv $each ~/Desktop/Trash/; done - Jun 22 2004
Attach MULTIPLE Files - Evolution

Dolphin Service Menus 8 comments

by Matti
Score 40%
60 Dislikes
Jun 13 2004
If you want to get technical, all those translations from that .desktop came from people who sent them in for where they are all acknowledged. - Jun 14 2004
Oops, didn't notice in your changelog that it is supposed to handle whitespace now. Disregard previous comment. - Jun 13 2004
Thanks for doing this. I wasn't aware of evolution's syntax for attaching multiple files. I'm going to add this functionality to attach-to-email servicemenu (, now that I know how.

Also, your readme explains that it can't handle files with spaces in the filename, but it works for me! - Jun 13 2004
Attachment service menu for EVOLUTION

Dolphin Service Menus 2 comments

Score 45%
55 Dislikes
Jun 12 2004
Why even have the shell script, why not just use only the .desktop file? - Jun 14 2004

Individual Icons/-sets 217 comments

by flow
Score 75%
25 Dislikes
Sep 01 2004
This is really excellent work. Thanks so much for giving this to the community! - Apr 01 2004