Right-click context menu from applications installed on Wine

Questions about Wine on Linux
Locked
pemartins
Level 1
Level 1
Posts: 8
Joined: Fri Feb 17, 2017 2:55 am

Right-click context menu from applications installed on Wine

Post by pemartins »

One thing that I couldn't figure out how to get on Linux file managers is a right-click context menu from applications installed on Wine.

Let me name two Windows applications that work perfectly on Wine which have context menus, like Winrar and ExtraBits. Both of these applications have very useful right-click context menus options, which would be very useful in Linux file managers like Nemo, Nautilus, PCManFM and so on. Is there a way to have these working?
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Right-click context menu from applications installed on

Post by Bob Wya »

pemartins wrote:One thing that I couldn't figure out how to get on Linux file managers is a right-click context menu from applications installed on Wine.

Let me name two Windows applications that work perfectly on Wine which have context menus, like Winrar and ExtraBits. Both of these applications have very useful right-click context menus options, which would be very useful in Linux file managers like Nemo, Nautilus, PCManFM and so on. Is there a way to have these working?
I had a look at WinRAR. I think the best you could hope for is a service file that would allow you to open the WinRAR file browser at the current working directory - as a RHS click option for your (native) Linux file manager of choice. That wouldn't be hard to do. winrar.exe can only take a single parameter (file/directory path). The (native Windows) explorer integration doesn't work under Wine - and certainly isn't exposed outside the Wine environment anyway...

Otherwise you're going down a rabbit hole - messing about AutoIt / AutoHotKey scripts or trying to script rar.exe Windows command lines... :shock: :cry:

What about native Linux Archive Managers??!!

Ark (on Plasma 5) is unbelievably powerful now! The contents of archive file (including .iso images) can be dynamically decompressed (to temp storage) and the contents opened with their natively associated applications.

p7zip is a very nice native (Gtk-based) alternative - see Sourceforge / p7zip.
That will integrate tightly with a native Linux file manager. I've got service files for my Plasma 5 DE (used with Dolphin) - with a few common operations.

Bob
pemartins
Level 1
Level 1
Posts: 8
Joined: Fri Feb 17, 2017 2:55 am

Re: Right-click context menu from applications installed on

Post by pemartins »

@Bob Wya thank you very much for your help!

It's would be great if the right-click context menus from Windows apps worked in Linux file managers with Wine. Maybe in future, who knows.

I tried every archive applications for Linux and I couldn't get decent (or even any) right-click menus on my file managers but I was able to get the functions I wanted on Nemo, here's what I did.

So i went to /usr/local/share/nemo/actions (with root privileges) and created 3 files. The first:

- I named it compress.nemo_action
- I opened it in a text editor and entered:

Code: Select all

[Nemo Action]
Active=true
Name=Compress...
Comment=compress %N
Exec=file-roller -d %F
Icon-Name=gnome-mime-application-x-compress
Selection=any
Extensions=any;
Quote=double
and saved.

The second:
- I named it extract-here.nemo_action
- I opened it in a text editor and entered:

Code: Select all

[Nemo Action]
Active=true
Name=Extract here
Comment=Extract "%f" here
Exec=file-roller --extract-here %F
Icon-Name=gnome-mime-application-x-compress
Selection=notnone
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
EscapeSpaces=true
Quote=double
and saved.

The third:
- I named it extract-to.nemo_action
- I opened it in a text editor and entered:

Code: Select all

[Nemo Action]
Active=true
Name=Extract here
Comment=Extract "%f" here
Exec=file-roller --extract-here %F
Icon-Name=gnome-mime-application-x-compress
Selection=notnone
Extensions=zip;7z;ar;cbz;cpio;exe;iso;jar;tar;tar.Z;tar.bz2;tar.gz;tar.lz;tar.lzma;tar.xz;
EscapeSpaces=true
Quote=double
and saved.

After I typed on the terminal:

Code: Select all

nemo -q
I had all the compression options I needed and fully working. For some reason even with nemo-fileroller installed I could not get the right-click menus.

So the archiver part is solved. Nevertheless the ExtraBits right-click menus or something alike for bulk renaming would be more than welcome.

@Bob Wya once again thank you very much for your time and for your help.
Locked