3

I have a script that I want to be available for the "Open With..." context menu for Nautilus (or less helpfully, "Files") running in Gnome Shell.

I've created a .desktop file and registered it with the MIME type inode/directory, which works find for all dirs, but I can't find how to also make it work for all files.

The spec offers no help here.

I don't want to list every conceivable MIME time because someone will only go and conceive of a new one ;-)

I've tried inode/all and inode/* to no avail.

Aside: Why?

It's a helper for a heterogeneous network.

This script takes the filepath and, if it can be recognised as a path on one of our servers, it creates a Windows SMB filepath and puts it on the clipboard. This enables users to email eachother filepaths that are openable on Windows. When other Ubuntu users receive these filepaths I use another script to turn them back into suitable filepaths and open that up in Nautilus/Nemo/Thunar/... So Ubuntu users can right-click any file, and choose "Copy Windows Filepath" which will run this script. This is why it needs to be available for any MIME type.

artfulrobot
  • 8,733

2 Answers2

1

The Nemo file Manager has actions for a while now and you're going to be happy to hear this includes Selection=any and also Extensions=any!!!

Fabby
  • 35,017
0

Try mimetype application/octet-stream for all Files.

Found that on https://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus

and using it in .desktop files for Kde Servicemenus.

jTux
  • 1