[Portland] xdg-open generic_open() functionality

Fernando ferkiwi at gmail.com
Thu Jul 31 05:57:11 PDT 2008


Nobody has given a reply to this subject.
So.. for my own convenience I've implemented some functionality in xdg-open
by myself.

Instead of automatically falling to $BROWSER for any given argument, this
branch version will first check if the given argument is a file (or a file:
url), it will then search for an associated application for it's mimetype in
the data dirs (like xdg-mime) and execute it.

http://www.uco.es/~q22cavaf/dev/xdg-open-1.0.2generic<http://www.uco.es/%7Eq22cavaf/dev/xdg-open-1.0.2generic>

It does parse the Exec line in most Desktop Entries successfully, but there
still may be some cases that won't work perfectly, because I'm not very sure
about the spec, and how to do it efficiently in shell-script.

However, now it should be possible to assign associations using xdg-mime and
be able to use them by xdg-open.

I think this was necessary, because not all of us use the popular desktop
environments and some applications rely on this.
I would love it if this changes were submitted to the trunk, and maybe
improved.

The url/* scheme I was talking about before is not being applied in this
script. Although it can be easily done, but it's a non-stardand way of
working, so I made it fall to $BROWSER for any given url that is not
"file:\\".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/portland/attachments/20080731/66e10b98/attachment.htm 


More information about the Portland mailing list