Adding "Extract here" back to the right click menu?

So, today I finally uninstalled Ark since I decided to use Engrampa, and I was wondering if the "Extract here" option could be manually added somehow to the right click context menu. I already found a tutorial for Thunar:

In order to fix this, you will need to create a file in /usr/lib/x86_64-linux-gnu/thunar-archive-plugin called "engrampa.tap" and paste the following code into it.

# engrampa.tap - Wrapper script to create and extract archive files
#                   in Thunar, via the thunar-archive-plugin, using the
#                   engrampa archive manager.

# determine the action and the folder, $@ then contains only the files
action=$1; shift;
folder=$1; shift;

# check the action
case $action in
	exec engrampa "--default-dir=$folder" --add "$@"

	exec engrampa "--extract-to=$(pwd)" --extract-here --force "$@"

	exec engrampa "--default-dir=$folder" --extract "$@"

	echo "Unsupported action '$action'" >&2
	exit 1

After you save it, all you need to do is make it executable with a "chmod +x" and then restart Thunar and you should be good to go.

...but I am using Dolphin. Is this possible? Thank you very much in advance.

Yes, is possible. You can play around more if you want too, but i'm not impressed by what it performs in KDE Plasma Dolphin (totally different than Thunar or Caja in a GTK environment) ...
Create ~/.local/share/kservices5/ServiceMenus/extracthere_engrampa.desktop folders/file and paste this code in it:

[Desktop Entry]
Name=Engranpa Archiver

[Desktop Action extractHere]
Exec=engrampa "--extract-to=$(pwd)" --extract-here --force "$@"
Name=Extract Here

[Desktop Action extractTo]
Exec=engrampa "--default-dir=$folder" --extract "$@"
Name=Extract to ...

[Desktop Action compress]
Exec=engrampa "--default-dir=$folder" --add "$@"
Name=Create Archive

Open Dolphin > Configure > Services and activate the 3 that have then Engranpa icon.
The problem with this approach is that all files/folders/archive will display those options ALWAYS.

The smart way is to define, for the extract part what filetype of archives to handle, so they display only for those particular files/archives. That is why, for instance if you compare with the 7z actions menu that you can download, you will see that each has a long and different list of ServiceTypes for extract ... and only the compress has the ServiceTypes i used above in my generic example. So, that means you will have to create at least two desktop files, one for extract and one for compress aka create archive, but i honestly will not continue with examples as it takes way too much time to explain.
Here is a list for the ServiceTypes extract part:


In order for those options to be seen without subMenu (Ark and 7z has that submenu), the X-KDE-Submenu entry has to not exist in the desktop file (the way i have it in my example if it happens that you will look at the 7z menu actions).



It is working like a charm now. Thank you very much!

1 Like

Took a while to find, so here's a link:

Just what I wanted, but I didn't know such a thing existed, and until I went looking for it, I didn't know there are Service Menus in the KDE store.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by