home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / doc / libkonq4 / SERVICEMENUS < prev   
Encoding:
Text File  |  2005-09-10  |  2.0 KB  |  53 lines

  1. This file explains how to add an item in the popupmenu (for both
  2. konqueror and kdesktop), without using the file associations.
  3.  
  4. Why
  5. ===
  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.
  12.  
  13. How
  14. ===
  15. Create a file ~/.kde/share/apps/konqueror/servicemenus/something.desktop
  16. and write into it something like (without the comments) :
  17.  
  18. [Desktop Entry]
  19. ServiceTypes=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
  23.                                   # image mimetypes
  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
  34.  
  35.  
  36. [Desktop Action gzip]            # One "Desktop Action <name>" group per Action
  37. Name=GZip this file
  38. Name[fr]=...
  39. Icon=tgz
  40. Exec=gzip %f
  41.  
  42. [Desktop Action mail]
  43. Name=Mail this file
  44. Name[fr]=...
  45. Icon=kmail
  46. Exec=kmail --there-is-no-such-option-yet %f
  47.  
  48.  
  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,
  51. etc.)
  52.  
  53.