1 This file explains how to add an item in the popupmenu (for both
2 konqueror and kdesktop), without using the file associations.
6 One reason for doing this is being able to associate
7 some action with all files without this action becoming a default handler
8 (called on left click).
9 Another is that for text-based programs and tools (e.g. gzip) it's faster
10 than defining a desktop file for the application, making it hidden, and
11 associate it with the relevant file types.
15 Create a file ~/.kde/share/kde4/services/ServiceMenus/something.desktop
16 and write into it something like (without the comments) :
19 ServiceTypes=KonqPopupMenu/Plugin,text/html,text/plain # use all/all for all entries
20 # all/allfiles for files only
21 # and use inode/directory for dirs only
22 # you can also do things like image/* for all
24 Actions=gzip;mail # those are ';' separated, per the standard !
25 X-KDE-Submenu=Menuname # this optional entry allows grouping the
26 # entries in this servicemenu file into a
27 # common submenu, in this case "Menuname"
28 TryExec=gzip # Find if executable exist, if it doesn't exist
29 # menu entry is not displaying
30 ExcludeServiceTypes=application/x-zip # This entry is used to avoid to display menu
31 # when it's a specific servicetype
32 # for exemple when we use all/allfiles and zip
33 # them, we don't want to zip a zip file
36 [Desktop Action gzip] # One "Desktop Action <name>" group per Action
39 Icon=application-x-tarz
46 Exec=kmail --there-is-no-such-option-yet %f
49 See also the "desktop entry standard", which defines more formally the same
50 concept of actions but for desktop files (e.g. eject on a device desktop file,