KDE 4 Service Menu Editor

You would have thought that it would be possible to edit the KDE Service Menu (the menu that you see when you right-click on an entry in a Dolphin or Konqueror window) or add your own commands to it. However, this is not a feature of KDE 4 to date (June 2011). Fortunately, KDE developer David Edmundson produced a handy GUI utility to do just this. His blog post KDE Service Menu Editor and KDE-Apps.org entry give the details.

I hope this utility will become part of KDE in a future release, but, until it does, below I explain how I installed it in KDE 4.6.2 for Sabayon Linux. The same procedure should apply in the case of Gentoo Linux.

1. Download kservicemenueditor-0.2a.tar.gz and extract it to ~/kservicemenueditor-0.2a/

2. N.B. This step is distribution-dependent, and may not be necessary for your distribution. Use the following command to determine whether or not you need to perform this edit:

$ kde4-config --path data

If the above command returns the following paths:


then edit setup.py and change the line:

    ('share/kde4/apps/servicemenueditor', glob.glob("*.ui")),


    ('share/apps/servicemenueditor', glob.glob("*.ui")),

3. To install KDE Service Menu Editor:

$ cd ~/kservicemenueditor-0.2a/
$ su
# ./setup.py install
# exit

4. To launch the utility, either run it on the command line from your normal user account:

$ servicemenueditor

or double-click the Desktop Configuration File servicemenueditor.desktop (which you can place on your Desktop or in any other directory).

5. Usage example:

Let’s assume you want to make a right-click menu for compressing a file with GZip. In that case you would carry out the steps listed below.

  1. Launch servicemenueditor.
  2. Click ‘Add’.
  3. In the box type the name “compress” (without the quotes) and click ‘OK’.
  4. Click on the ‘Conditions’ tab and select ‘All Files’ as you want to be able to work on all files.
  5. Click the ‘Action’ tab and enter “Compress Files” (without the quotes) in the ‘Label’ box. This is what will appear in the ‘Actions’ Menu.
  6. Click on the blank icon and select an icon of your choice.
  7. In the ‘Exec’ box, type the command needed. For this example “gzip %u” would be the command.

About Fitzcarraldo
A Linux user with an interest in all things technical.

5 Responses to KDE 4 Service Menu Editor

  1. Pingback: Secure Deletion of a file via the KDE GUI « Fitzcarraldo's Blog

  2. leon says:

    I am getting runnint fedora16

    sudo ./setup.py install
    Traceback (most recent call last):
    File “./setup.py”, line 7, in
    from DistUtilsExtra.command import *
    ImportError: No module named DistUtilsExtra.command

    [leonc16@localhost ~]$ kde4-config –path data

    • Fitzcarraldo says:

      Well, you’re obviously missing a Python module named DistUtilsExtra.command! No idea what package that would be in in the case of Fedora, but googling your error message tells me that Fedora has a package named python-distutils-extra which looks a likely candidate, so install that package and see if it helps.

    • wmca says:

      install python-distutils-extra and python-setuptools

  3. Pingback: Installing PeaZip in Gentoo Linux | Fitzcarraldo's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: