Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
There is xdg-open, see this question for some details. –  sr_ May 14 '12 at 10:14
    
@sr_ Can you turn this into an answer? I'll accept it then. –  topskip May 14 '12 at 10:20

1 Answer 1

up vote 2 down vote accepted

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.