Is there a GUI way to make context menu items in Plasma/Dolphin?

I’m trying to add some context menu items for when you right-click files on the desktop or in Dolphin, just like I had on XFCE and which I was able to set up in a GUI setting there.

But I’m now fearing that there is no GUI way to do this, or even a simple config file in this case, and that you must follow this confusing and involved guide (which keeps mentioning how “simple” it is!): Creating Dolphin Service Menus | Developer

Is there really no GUI way to add your own “actions” to context menus? Is the only way doing what that webpage says? Or is “Service Menu” something different entirely?

1 Like

There are some like Menu creator, but other than that it’s mainly manual. If that one’s too complicated I suggest you look up some on the kde store. Some you can install through the “get new service menus” in dolphin, some require a manual install.

1 Like

I’ve never tried Dolphin service menus creator but it may be what you want.
With elementary scripting skills I have made dozens of custom context menu items for myself manually - it is simple and easy indeed.
Also, you can start with the many Service Menu add-ons easily installable from Dolphin menu: Settings > Configure Dolphin… > Context Menu > Download New Services…

Installed the thing for the sake of the topic. Works just fine.

1 Like

They say it doesn’t support multiple actions. It seems this is the only weak point at the moment.

What do you mean by multiple actions? It supports submenus and scripts so I don’t really see an issue here.
Anywho. It isn’t part of default kde, not a base ( whatever) app so some users might be afraid of it.
In terms of kde purists, so to speak, this thing doesn’t exist. Forget I mentioned it.

I was referring to this line at its kde store web page:
Note: this program does not support multi-actions for a single .desktop file
Maybe this is outdated?

Maybe. But those seem to be the same lines as the first edition. Which, btw, isn’t updated in the dolphin “get new…”. One user commented about it on the page.

Doesn’t matter really. If someone would dare to venture this Dante’s inferno it would have to be manual anyway.

1 Like

For example, I have created this file: ~/.local/share/kio/servicemenus/image-jpg-actions_servicemenu.desktop

[Desktop Entry]
X-KDE-Submenu=Image Actions

[Desktop Action combine-horizontal]
Name=Combine horizontally
Exec=/usr/bin/env zsh -c ‘convert +append “${@}” combined-image_$(date +%s).jpg’ zsh %F

[Desktop Action combine-vertical]
Name=Combine vertically
Exec=/usr/bin/env zsh -c ‘convert -append “${@}” combined-image_$(date +%s).jpg’ zsh %F

[Desktop Action merge-jpg2gif]
Name=Merge to GIF
Exec=“~/.local/share/kio/servicemenus/image/merge-jpg2gif.zsh” %F

Nah. Tried to create some subs in it. No go ( at least…dunno how). Aaaand, you need to export the file after which it requires a bash install. Waaaay too complicated. The user will not like it.

Maybe this promising tool can be improved with more people contributing to its development in time…

You Never know. Could be handy.

Is there any update to this? I cannot believe how difficult this is. I use a different Office suite than LO on Ubuntu and want to add it to the Context Menus

i used to be on Gnome and there I could just add empty documents to a Templates folder

From what I remember reading about this (longstanding) issue, some time ago when this was first reported there were no easy libraries to achieve the “just drop a file in the Templates folder” method, but it has changed since then. It should be much simpler to implement now.

All we need is a contributor interested in working on this.

1 Like

Shouldn’t be too hard to make a servicemenu, regardless the office suite you use.

1 Like

hi John,
So far, I have not been able to. Atm I cannot even find where the templates are stored. Is there a good guideline available for how to do this, which is understandable for a not very tech savvy person like myself?

If all you want is to have templates for your Office suite…

In your home folder ( ~/ or /home/yourusername ) you should see a Templates folder. That’s where you’d create new templates usually that appear in the right-click context menu under New File.

On Plasma, there are two requirements to make it show up in the context menu: a file with the format you want the template in, and a .desktop file. You’re right that on other environments you can just dump a file there.

So for example if you need a template for LibreOffice Writer files, you can just create an .odt file inside ~/Templates/, say ~/Templates/writer.odt, then create a minimal desktop file ~/Templates/writer.desktop with the following contents:

[Desktop Entry]
Name=LibreOffice Writer Template

That should do and isn’t very technical.

Now the thing that’s actually being discussed in this thread would be to create a service menu, a more elaborate context menu option. We have a tutorial for that, but it’s way more technical: Creating Dolphin Service Menus | Developer

I think it’s overkill for what you want to do.

1 Like

A regular “open with” should be available as long as the office suite you use is set in terms of templates. If it’s a servicemenu you want, you’d need to create one in ~/.local/share/kservices5/ServiceMenus ( that is, if you’re using plasma 5).

It would have to be something like this ( as an example)

[Desktop Entry]

[Desktop Action Quickvlc]
Exec=timeout 10s smplayer %f

A simple one like this ( without submenus) needs the mimetypes ( to show the entry on types of files you want it to show) and the exec ( what it needs to do). I don’t know what office suite it is you’re using, but running it in a terminal with the help option can give you the exact command.

So, the example, since it’s set to video would get you…

1 Like

Thanks so much for this! I did not know it was possible in such an easy way, I could not find this info anywhere.

1 Like