Bug 7184

Summary: Support separate file "actions" via MIME-type
Product: Specifications Reporter: Alexander Jones <alex>
Component: desktop-entryAssignee: Owen Taylor <otaylor>
Status: RESOLVED INVALID QA Contact:
Severity: enhancement    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Alexander Jones 2006-06-11 06:14:27 UTC
Disclaimer: I don't fully understand the spec, yet.

Currently, file actions are linked to .desktop files on a one-to-one basis. For
example, AbiWord has a file, "abiword.desktop", which describes its Launcher
behaviour, including name, generic name, comment, categories (for application
organisation) and the command used to start the application.

If, for example, you wanted several actions for a particular file, you would
have to create separate .desktop files. You might want three actions for audio
files in Rhythmbox - "Play now in Rhythmbox", "Add to Rhythmbox library", "Queue
in Rhythmbox". I see no way you can do this without creating separate .desktop
files.

Can we alter the spec to allow for actions? Perhaps we can get rid of the
"MimeType" field in the .desktop files - I can't help but feel that it perhaps
doesn't belong there anyway. (You can create .desktop files on your Desktop on
GNOME and MimeType would bear no relevance, there.)

We could replace this functionality with .action files, for example (to
compliment fooplayer.desktop):

fooplayer-play-now.action:

[Desktop Entry]
Application=fooplayer
Name=Play now in Fooplayer
Name=[bla]=Bla bla bla Fooplayer
Comment=Plays the file immediately without adding it to your library
Exec=fooplayer --play-now %s
Icon=fooplayer-play-now
Terminal=false
MimeType=list/of;types/here

The "Application" field could correspond to a .desktop file ID (do they have a
formal name?) so that if you need to, you can reference more information about
the application. Perhaps this is actually unnecessary, I'm not 100% sure.

We could replace the concept of "Open With..." with "Other Actions..." where all
available file actions for all MIME types could be listed as candidates for the
current file.

I think it's important that each action can define its own list of MIME types -
applications may be able to do one thing with one set of types and other things
with others.

To maintain backwards compatibility, one potential solution would be to consider
all .desktop files with a MimeType field set to implicitly define a default
action, "Open with $APPNAME".

Thanks for reading!
Comment 1 Owen Taylor 2006-06-12 04:49:10 UTC
If you want someone to read this, you need to post to xdg-list; this bugzilla
component is pretty much a black hole.
Comment 2 Alexander Jones 2006-07-07 08:07:45 UTC
Apparently, we already have a file actions implementation, it's just not
supported by GNOME yet. :D

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.