You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Sunday, January 1st 2006, 10:18am

How-To add "Send Email" to right click "Actions" menu

Ever wondered how to right-click on a file or two and have the option to "Send with Kmail"? (I know it sounds kinda Windows-ish, but it is useful.)


It is as simple as:

open konsole

su (or kdesu for kubuntu users)

pico /usr/share/apps/konqueror/servicemenus/email.desktop (KDE-3.4)

or

pico /opt/kde/share/apps/konqueror/servicemenus/email.desktop (KDE-3.5)


Insert the following:

Source code

1
2
3
4
5
6
7
8
9
10
11
[Desktop Entry]
Actions=Email
Encoding=UTF-8
ServiceTypes=all/all



[Desktop Action Email]
Name=Send file(s) with Kmail
Exec=kmail --attach %F
Icon=kmail


Save and exit pico

Then reload all konqueror windows and right-click on any file(s) and you should see "Send with Kmail"
Choosing this option (assuming that you have Kmail setup already) will pop open a Kmail "New Message" window with the file(s) already attached. Enter your To: address(es), Subject, and message and hit "Send".

Pretty easy, eh? :)

Edit: (20 May 06) Changed ServiceTypes=allfiles to ServiceTypes=all/all
Life is better with the Penguin!

This post has been edited 2 times, last edit by "barcode_linux" (May 21st 2006, 3:11am)


damianus

Beginner

Posts: 6

Location: Egham, Surrey

Occupation: Yet Another IT Sales Guy

  • Send private message

2

Monday, March 6th 2006, 7:38pm

RE: How-To add "Send Email" to right click "Actions" menu

I could not find these desktop files.
I was using KDE 3.3 until upgrading using apt yesterday.

Aside from that, I wonder if it's possible to do the same with other kde apps. I want to write a few extra emailing options ( a 'send email' button for sending from a specific email template.

Windowsesque is exactly what I want, my application has to compete directly with Windows for ease of use. I want to beat it by integrating the set of apps I use really, really well. Using dcop, perl, python and whatever other glue I can find.
There is only one path and one path only.
That is the path on relentless struggle.

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

3

Monday, March 6th 2006, 11:03pm

RE: How-To add "Send Email" to right click "Actions" menu

Quoted

Originally posted by damianus
I could not find these desktop files.
I was using KDE 3.3 until upgrading using apt yesterday.

The files are likely new additions by the thread starter.

The directories you can place konqueror service menu files can be found using kde-config

#> kde-config --path data

will print a colon separated list of directories where KDE will look for data files.
Konqueror service menus are in relative subdirectories named konqueror/servicemenus

Quoted


Aside from that, I wonder if it's possible to do the same with other kde apps. I want to write a few extra emailing options ( a 'send email' button for sending from a specific email template.

That depends on the application, which ones do you have in mind?

Cheers,
_
Qt/KDE Developer
Debian User

damianus

Beginner

Posts: 6

Location: Egham, Surrey

Occupation: Yet Another IT Sales Guy

  • Send private message

4

Tuesday, March 7th 2006, 1:15am

How-To add "Send Email" to right click "Actions" menu

Quoted

Originally posted by anda_skoa



That depends on the application, which ones do you have in mind?

Cheers,
_


I spent ages posting here then realised I was writing a reply to the wrong thread, I have posted a question realted to the same project here, which was replied to by the same person. Duh.

anyway, thinking of all the KOffice main apps ( wp, sp, presentation ) and then also firefox.

I was thinking of a feature where you can higlight a word in text, right click and select something like 'define in google', causing the open session of firefox to retrieve a definition from the web and send it back to KWord which would then disply the definition in the right click menu in a defined part of it. Imagine as you read this text now, you come across the new word "idiot". Maybe you have on your desktop or on your browser a quick reference dictionary, but I bet you still have to cut and paste or type the word. Imagine if you could just click once to highlight "idiot", the menu would expand to reveal the definition right after you click it. After ages using the old method you'd feel like an idiot.

I know some firefox plugin can probably do this but I want to write this myself so I know it is the leanest and best way and is configured perfectly for the intended user.
There is only one path and one path only.
That is the path on relentless struggle.

This post has been edited 1 times, last edit by "damianus" (Mar 7th 2006, 1:30am)


anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

5

Tuesday, March 7th 2006, 8:07pm

I think the KOffice framework is ready for this, if I remember correctly they call that kind of extensions "datatools"

You better ask on the koffice or koffice-devel mailinglist hosted on KDE's mailinglist server.

However, in the case of a web search, it might be easier for such a tool to directly access the website through KDE's IO architecture instead of delegating it to a browser.

Cheers,
_
Qt/KDE Developer
Debian User

6

Sunday, May 21st 2006, 3:19am

Paths

Sorry I haven't responded in awhile but I have been away.

This link ought to be helpful:
http://developer.kde.org/documentation/t…rvicemenus.html

The path to the service menus should be one of these:

Source code

1
2
3
/opt/kde3/share/apps/konqueror/servicemenus/
/usr/share/apps/konqueror/servicemenus/
/home/user/.kde3/share/apps/konqueror/servicemenus/


or where ever your distro put the main kde configuration. You can check this by:

Source code

1
kde-config --path data


This will show you first where your /home/user config directory is, and the last one should be the global kde config directories.

cheers
barc
Life is better with the Penguin!

7

Saturday, March 10th 2007, 6:57am

Any ideas how I could modify for thunderbird?

bram85

Professional

Posts: 948

Location: Eindhoven

Occupation: Software Engineer

  • Send private message

8

Sunday, March 11th 2007, 11:34am

Simply modify the line with 'Exec='
Bram Schoenmakers
KDE Netherlands (www.kde.nl)

9

Sunday, March 11th 2007, 8:18pm

This works for Thunderbird users:

Exec=thunderbird -compose attachment='file://%F'

damianus

Beginner

Posts: 6

Location: Egham, Surrey

Occupation: Yet Another IT Sales Guy

  • Send private message

10

Monday, March 12th 2007, 9:29am

thanks

made some good progress. Now I can right click and choose a pre-defined email template and then go one menu deeper to select a contact OR a group of contacts. All I have to do is check the email, amend and send.

I had worried about using Firefox/Thunderbird but lots of corporate users seem to find it OK.

Thanks for your help people.
There is only one path and one path only.
That is the path on relentless struggle.

11

Tuesday, September 4th 2007, 7:01pm

Don't know if this has always been the case but if I highlight multiple files, only the last one highlighted is included as an attachment.

FC7 (2.6.22.4-65.fc7) / KDE 3.5.7-21 / TB 2.0.0.5

12

Friday, September 7th 2007, 7:40pm

This is what the solution looks like:

Source code

1
2
3
4
5
6
7
8
9
10
[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


Source code

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

13

Wednesday, July 30th 2008, 11:25am

There is a way of calling Thunderbird without using a shell script. It is reported here

http://www.kde-apps.org/content/show.php…u?content=19328

and goes as follows

Source code

1
2
3
4
5
6
7
8
9
[Desktop Entry]
Actions=Email
Encoding=UTF-8
ServiceTypes=all/allfiles

[Desktop Action Email]
Name=Email file(s)
Exec=thunderbird -compose "`echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`"
Icon=thunderbird

This post has been edited 1 times, last edit by "jmfv" (Jul 30th 2008, 8:36pm)