Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 24995: /trunk/gtk/ /trunk/gtk/: abou
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 15 Apr 2008 00:18:08 -0700
Graeme Lunt wrote:

Well it creates a "file://" URL and then just tries to open this, so
appearing in Firefox is not unexpected - it is probably not your
configuration.
Maybe we need to put something more specific in for directories on Linux.

s/Linux/UN*X+X11/

At least if you hve the Portland Project program xdg-open:

	http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html

installed, passing that program a pathname rather than a URL will, I suspect, cause it to open the directory in the appropriate file viewer. It's also apparently the right tool to use to open URLs in the appropriate Web browser (we appear to use it for that if it's present).

We should probably have separate "open a URL" and "open a file/directory" routines. The latter would, at least on systems that aren't Windows or OS X and that have xdg-open, just pass the argument to xdg-open. I suspect ShellExecute should Just Work on Windows, so "open a file/directory" could do the same thing that "open a URL" does; in Mac OS X, LSOpenCFURLRef() is, I think, the right call to open arbitrary objects (the alternatives involve using FSRefs which are further from pathnames than are URLs, so you Really Don't Want To Go There).