The ability to select mimetype-specific actions from Konqueror's context menu is an oft-requested feature. The pleasant surprise is that this is already possible. The even more pleasant surprise is that you don't need to be a software developer to do it. This article, the fourth in the dot tutorial series, details step-by-step how to quickly and easily add new actions to Konqueror's context menu.

but he's so damn cute as a penguin! i'm hoping that suit will fit him again this year, though i'm doubtful. hrm.. time to start thinking of something equally strange for this October .......

as for the article, i've added two tips to it in response to emails i've received: one for how to make a servicemenu appear for directories (inode/directory as the mimetype) and what to do when you have multiple commands to run (exec a shell! Exec=/bin/sh -c "whatever; whatever && whatever")

well, then it starts becoming a tutorial on scripting KDE using dcop rather than a tutorial on making servicemenus. i dipped very briefly into kdcop only to demystify how i got the Exec line in the example.

a general "how to script kde" would make for a great tutorial, though. the topic is large enough to deffinitely warrant its own coverage. i polled people on irc the other evening for tutorial topics that they would like to see, and dcop scripitng was the first one they asked for nearly every time. =)

sort of. but a little less terse, a little more end-user oriented and updated to reflect the newer capabilities of the dcop command line app as well as the newer ones (e.g. dcopfind, dcopref) ... maybe some screenshots of kdcop in action, walking through writing a script step by step ... olaf's paper is great, its just not very accessable to end users and it's a little dated.

>but he's so damn cute as a penguin! i'm hoping that suit will fit him again this year, though i'm doubtful. hrm.. time to start thinking of something equally strange for this October .......
Will Konqui do? :-) or some BSD demon?

> The fact that you dressed your two year old son up as a penguin for halloween almost scares me. :)

You should've seen me in one, I gotta admit I don't look as cute, but hell, I turn some heads on the streets in it.
Aaron, don't know your wife, but tell her another vegan says hi :)
How do you find the time to do everything you do? KC-KDE, tutorials and huge amounts of super high quality code. Mad props to you for what you do!

This was one of the most interesting bits of information I've read about KDE for a while. I thought I was going to be thinking up stranger and stranger things to do with servicemenus but found myself absorbed by the dcop scripting possibilities instead.

Now I've tried using this dcop thing, it seems to me like it's the KDE killer app. People need to know about this stuff!

Yeah, dcop is amazing. I've been using it in combination with lineak (http://lineak.sourceforge.net/) to enable me to use the "internet keys" on my logitech wireless keyboard. For instance, I can make the "Media" button popup my noatun playlist, and then when I press it again it hides itself! Dcop scripting sets KDE apart, IMHO. Do any other desktops have something like this?

Not only for this helpful reply, but for all the great work you and
the other kde folks are doing. I absolutely LOVE kde. I think kde
lives up to the promise of the original mac. I haven't been so excited
about computers in a long time.

It's funny, but one of my favorite things about KDE is the file open/save dialog.
Absolutely head and shoulders above anyone else's and it really makes a huge
difference is eas of use.

Hi,
After seeing this article I started to play around with Konqueror a
small bit and even though my javascript knowledge is next to non-existant
I was able to do a few things ( obviously you need to fill in XXXX and YYYY ):
#change the status bar
dcop konqueror-XXXXX html-widgetYYYY evalJS 'window.status="xxxx"'

#set the value of the email field in the form when you are
#in the "Post Reply" e.g. http://dot.kde.org/1027447529/addPostingForm
dcop konqueror-XXXXX html-widgetYYYY evalJS "document.forms[0].email.value=\"cph\""
With the above you could easily have a small piece of javascript to set
the username and password on those sites where they do not use cookies
(or where you do not trust them with cookies).

To find out which konqueror html-widgetYYYY you should be using use:
dcop konqueror-XXXXX html-widgetYYYY evalJS "document.title"

But I am wondering if there is something like this for Gnome.
It would be a good thing to make DCOP an independent thing (unless it is already and I am missing out on stuff) and make it work anywhere, KDE, Gnome, or a non-GUI environment.
And it would be a good thing, arguably, to make DCOP interface less binary-dependent, maybe?

looking over that page, however, i see some interesting things about Nautilus that i wasn't aware of, such as:

you need scripts to open files in a given editor? (Konqi just uses mimtypes and offers an Open With-> menu)

showing special file info is done with scripts? (Konqi provide kfilemetainfo, which are actual coded plugins, have their UI integrated w/Konqi and are available to all KDE apps ... hmmmm... perhaps that could be the another article: writing KFMI plugins?)

how do you ensure a script is only available for a given mimetype (e.g. is hidden when it doesn't apply)?

p.s. this isn't meant to bash nautilus at all, these are honest questions i have after reading that page.

My point is that advanced IPC like DCOP should be separate from a particular desktop suite. Then, competition and natural selection is much more focused - I'd like to be able to pick best parts of all OSS offerings instead of having my choice limited to the two camps.

the dcop library has bindings to several languages and has very few dependencies itself. AFAIK the only thing it requires is X11 and it's ICE auth mechanism. so pretty much anyone could use it if they were so inclined.

Disable it because it is bothersome? You almost always want to =move= files. A modifier that allows to copy instead for the very rare cases where you want just that would suffice. As it is now, it looks like newbie stuff that bothers experienced users. And, yes, I know that I can control the behavior by modifiers now.

http://developer.kde.org/source for how to get the latest sources and compile them.
kdebase/libkonq/konq_operations.cc for where the symlink operation is called. You would have to special case local files and avoid calling KIO::symlink for them, and call link(2) instead. KIO has no support for hardlinks.
Also note that the operation will fail across filesystems...

Hello
I found a comment of yours which leads me to beleive that you know how to add functions to the right mouse click in konqueror. PLEASE tell me how. Specifically i want to add the funcions: add to zip, create zip and the same for tgz.
thanks a million for your help.
Ayudame

I followed the steps. I've got RH7.3 unofficial install of v3.0.2-0unl. It has the ark desktop definition in /usr/share. But the directory didn't even exist in ~/.kde/. Is there some funky permission thing going on?

is it possible to use this function together with RCS.
For example when i have worked with a file I only hace to
right click on the file and press "New version" or something like that,
write a description of the file and so on.

ci -u %u

would be the command that I want to run I guess but I also want
to add a comment for the change in the file. Is there any solution for
this?