1

On MacOS X I can run

open /some/path/index.html

and this would open the page index.html with the default software that handles .html files. Is there something similar on Ubuntu Linux? I have used gnome-open in the past, but if there is no gnome installed, this command fails, of course.

gnome-open /some/path/index.html

Is there a generic "open this file with the default application" on Linux?

topskip
  • 167
  • 2
  • 8
  • There is [`xdg-open`](http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html), [see this question for some details.](http://unix.stackexchange.com/questions/36380/how-to-properly-and-easy-configure-xdg-open-without-any-enviroment) – sr_ May 14 '12 at 10:14

1 Answers1

2

A desktop-environment-agnostic open utility is xdg-open, which could fill your need. It's probably packaged with some other utilities of xdg-utils.

It's discussed here quite often, see for example this question for details on configuring it.

(Other desktop environments come with *-open utilities, too, e.g. there is XFCE's exo-open)

sr_
  • 15,224
  • 49
  • 55