On Jan 25, 2006, at 5:55 PM, Frank Barknecht wrote:
Hallo, IOhannes m zmoelnig hat gesagt: // IOhannes m zmoelnig wrote:
Hans-Christoph Steiner wrote:
Currently, Pd uses firefox or mozilla. Windows has "rundll32 url.dll,FileProtocolHandler", Mac OS X has "open", both are command line apps. I can't think of a GNU/Linux equivalent, it would be good to have instead of mozilla/firefox.
i don't know whether this is standard, but on debian at least you have /usr/bin/x-www-browser which is supposed to point to the preferred graphical browser (however, this is a system wide setting and not per user and probably a hack anyhow...)
It's Debian-specific (and thus could be incorporated into Pd-debs) and part of the "alternatives" mechanism in Debian. This is handled through configuration in /etc/alternatives/ which currently is just a bunch of symlinks for any major app-group. I think, this is to simplify scripting in Debian and stuff like Menu-generation etc. E.g. there also is "x-terminal-emulator" which can be used by command line apps that need to be started through a Window Manager Menu entry (for example "x-terminal-emulator -title Mail -e mutt").
However this does not actually deal with filetype-associations. For this, I would again propose to use the mime-type setup present on practically all Un*xes (and probably somehow also on OS-X and on Windows). This would allow to open files directly in the preferred application instead of first going through a browser which in turn may look in /etc/mailcap and /etc/mime.types anyway. Moz/Firefox does so as a fallback.
A very quick implementation on Debian would be to use run-mailcap(1) instead of opening Firefox/Mozilla. Examples:
$ run-mailcap /usr/lib/pd/doc/1.manual/index.htm $ run-mailcap /usr/lib/pd/doc/1.manual/fig1.1.png
I'm not sure, if other distributions have similar tools, but run-mailcap can be included in Pd directly as code (it's public domain).
I did a tiny bit of googling and also found this regarding the Freedekstop view, which would support Gnome and later maybe KDE as well: http://www.freedesktop.org/Standards/shared-mime-info-spec
That sounds better than using firefox/mozilla to me. Anyone want to submit a patch? I guess we'd have to find out how prevalent run-mailcap is. Or do:
run-mailcap $filename | firefox $filename | mozille $filename
which just modifies the line that's there.
.hc
________________________________________________________________________ ____