How-to : Add custom context menu entry in KDE 4



This post will show you the very easy way to add a custom entry in your kde context menu. We set as an example a new entry to send as an attachment (from you desktop) any piece of data.


1 Add a context menu entry : “send as attachment with thunderbird

  1. Find out what path KDE  is for servicescommands
    kde4-config --path services
  2. Path where you should put your .desktop files, in my case it was:
  3. Create your own .desktop file (as shown below), and paste it in the previously found dir
    [Desktop Entry]
    MimeType=application/octet-stream   # this line defines what types of file will be affected
    [Desktop Action !SendAttach]
    Name=Send as attachment # the name within context menu
    Exec=thunderbird -compose attachment='file:///%U' # the command to be executed
Tagged on: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site supports SyntaxHighlighter via WP SyntaxHighlighter. It can highlight your code.
How to highlight your code: Paste your code in the comment form, select it and then click the language link button below. This will wrap your code in a <pre> tag and format it when submitted.