Sunday, January 31, 2016

KDE Dolphin Add Context Menu

Following are the instructions to a create context menu "Open with GVim" entry in KDE Dolphin file manager.

Create a service menu file with the following contents. Give the file any meaningful name. I named it "open_with_gvim.desktop".

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Actions=OpenWithGVim
X-KDE-Priority=TopLevel

[Desktop Action OpenWithGVim]
Name=Open with GVim
Icon=gvim
Exec=gvim %u

To install this service menu for all users copy the file to the following location.

Fedora 23 (KDE 5)

# cp open_with_gvim.desktop /usr/share/kservices5/ServiceMenus/

Fedora 20 (KDE 4)

# cp open_with_gvim.desktop /usr/share/kde4/services/ServiceMenus/

Restart Dolphin and when you right click on any file "Open with GVim" context menu will be displayed.

No comments: