Create a entry in the Konqueror right click menu

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

Advertisements

3 thoughts on “Create a entry in the Konqueror right click menu

  1. 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.

  2. Any thoughts about how to add this functionality to kde4 konqueror or dolphin file manager?!
    Having used it for a while on kde3, I really miss it on kde4.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s