After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 79498 - gnome-vfs-based version of OS X's "open" command
gnome-vfs-based version of OS X's "open" command
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
unspecified
Other Linux
: Low enhancement
: later
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2002-04-22 13:21 UTC by Dan Winship
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
program to open an uri with the associated app (472 bytes, text/plain)
2003-05-24 12:57 UTC, Christophe Fergeau
Details

Description Dan Winship 2002-04-22 13:21:22 UTC
In OS X, there's a simple command-line util called "open" that just
opens the given file in the correct application. So if you're browsing
around in a terminal and come across a file you want to look at where
"less" isn't the right tool, you can just say "open foo", and it opens
it in your web browser, or the PDF Preview app, or TextEdit, or
whatever. This should be pretty trivial to write using gnome-vfs.

I don't know if the OS X open handles URLs too, but that would be easy
too (using gnome_url_show). (Contrariwise, "open" could be registered
as the default handler for "file:" URLs.)
Comment 1 Seth Nickell 2002-05-10 05:37:09 UTC
I like the idea, and it would be pretty easy to write. Dunno if it
should be actually shipped as part of GnomeVFS itself though...
Comment 2 Dan Winship 2002-05-10 13:50:02 UTC
i suggested gnome-vfs because it would be a pretty small program,
so it probably wants to ship with *something* rather than being
separate.

i noticed yesterday that you can do "open ." too to open the
current directory in the finder. so maybe it should be part of
nautilus. although it would be nice if it wasn't since it's
more useful to people who don't use nautilus at all than it is
to people who do.
Comment 3 Christophe Fergeau 2003-05-23 20:35:46 UTC
That's really easy to do (ie a 10 lines program) with the
gnome_vfs_url_show function added in the 2.3 series
Comment 4 Christophe Fergeau 2003-05-24 12:57:47 UTC
Created attachment 16799 [details]
program to open an uri with the associated app
Comment 5 Alexander Larsson 2003-05-26 09:00:31 UTC
Looks good. Not sure about the name though. I asked some people, and
most people seemed to like gnome-open.
Also, it should probably use
gnome_vfs_make_uri_from_input_with_dirs(uri,
GNOME_VFS_MAKE_URI_DIR_CURRENT) so that files in the current dir works
with "gnome-open <filename>".
Comment 6 Christophe Fergeau 2003-05-27 20:42:00 UTC
Actually, I only wrote this 3 lines of code because I needed them for
testing purpose, I attached them here when I remembered about that
bug. Apart from the name issue, I think it would be a bit weird if
gnome-vfs installed binary files by itself (though the stuff in the
programs/ dir may be installed by default now ?)
Comment 7 Alexander Larsson 2003-05-28 10:14:15 UTC
Yeah, we install a set of command line utils by default now. I don't
see that as strange though. They add no dependencies and can be useful
to people. 

However, maybe a gnome-open app should be on another level so that it
could e.g. open the open-with dialog if there is no app specified for
the type etc.
Comment 8 Anders Carlsson 2003-06-23 21:03:55 UTC
I've added this to libgnome. 

Should we keep this bug open? Perhaps about moving the binary to
somewhere else in order to do the open with stuff (Which I don't
believe will happen until 2.6 but anyway)
Comment 9 Alexander Larsson 2003-07-04 12:59:29 UTC
Nah, i'll close it.