Create a entry in the Konqueror right click menu

Posted on January 24, 2008. Filed under: emacs, kde, linux, open source | Tags: , , , , |

I just couldn’t believe this was easy as following this recipe: Konqueror Services Menus
I wanted to be able to edit any file without having an editor associated to that all kind of files. So here’s the result:

File: editallfiles.desktop

[Desktop Entry]
ServiceTypes=all/allfiles
Actions=editAllFiles
Encoding=UTF-8
X-KDE-Priority=TopLevel

[Desktop Action editAllFiles]
Name=Edit with emacs
Icon=emacs
Exec=emacs %u

konqueror service menu with editallfiles entry
I’ve placed this file inside ~/.kde/share/apps/konqueror/servicesmenus/
and konqueror immediately used it. Now every time i right click on a file there is a entry called “Edit with emacs” after the emacs icon.
Now i can open any file even if there isn’t a application associated to it or if it already has one, the file is run by that application.

Note: the X-KDE-Priority=TopLevel is to put the entry right on the first menu, otherwise it appears as subsection of the main entry “Actions”.

I just can’t believe how easy this is and how i’ve been delaying this for ages! Isn’t KDE great? :D

Make a Comment

Make a Comment: ( 2 so far )

blockquote and a tags work here.

2 Responses to “Create a entry in the Konqueror right click menu”

RSS Feed for The GNU of Life, the Universe and Everything Comments RSS Feed

Exactly what i searched for, though I use Kwrite, thanks. “I just can’t believe how easy this is and how i’ve been delaying this for ages!” <- exactly what I think about it, can’t remember how often I entered kwrite in the openwith dialog.

glad you found it useful ;)


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...