"start" or "open" command?

Thomas Leonard tal00r at ecs.soton.ac.uk
Sun Oct 12 19:39:25 EEST 2003


On Fri, Oct 10, 2003 at 03:45:50PM +0200, Jaap Karssenberg wrote:
> On Fri, 10 Oct 2003 08:30:58 -0500 Mike Perry wrote:
> : I poked around a bit for something like these and didn't find either.
> : Did I overlook something? Or is it in development already somewhere?
> 
> You can use rox(1) for this <http://rox.sf.net>, it uses the mime-info
> database and allows you to define handler scripts for each mime- or
> media-type. There is also a perl module called File::MimeInfo::Rox on
> CPAN <http://cpan.org> that mimics this behaviour.
> 
> Maybe this functionality could be made into a spec - Thomas ?

It's rather straight-forward: when you want to run something of type
MEDIA/SUBTYPE, it does:

	exec $CHOICESPATH/MIME-Types/MEDIA_SUBTYPE "$@"

or, if that doesn't exist:

	exec $CHOICESPATH/MIME-Types/MEDIA "$@"

CHOICESPATH path is very similar to XDG_CONFIG_DIRS.

Typically, the executable is a symlink to the actual application, although
it could also be a shell script, if the user typed a command to set the
run action instead of dragging an application.

In fact, it's usually a symlink to a ROX application (a directory with an
AppRun executable inside, plus an icon and some XML meta-data).
So, I guess that would rule it out for other desktops. Linking to a
.desktop file is probably the GNOME/KDE equivalent, though that's not so
friendly to shell scripts.

We also have an entirely separate system for 'other' (non-default, but
still user-selected) handlers: $CHOICESPATH/SendTo/.MEDIA_SUBTYPE is a
directory of applications to offer for the given type. So you'd probably
want that rationalised into the main scheme somehow.

It depends, too, on what Havoc's planning for the new configuration
system. Is it just going to hold a fixed set of values (set when an
application is installed) or will it allow things like this? We should try
to avoid creating specifications that we intend to overturn soon
afterwards.


-- 
Thomas Leonard			http://rox.sourceforge.net
tal00r at ecs.soton.ac.uk	tal197 at users.sourceforge.net
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1



More information about the xdg mailing list