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.

How do get an html file to open in preferred html application from cmdline on linux ?

To claridy I have an xterm window open and an html file I want to do something like

open test.html

and that will start my preferred browser with the test.html file loaded.

(I'm looking for a solution that will work for any Linux desktop machine without me needing to know hat browser app they have installed.)

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

That's OS/distribution/desktop-environment dependent, but in many places, you'll find a xdg-open command that does just that.

share|improve this answer
    
Thx that did the trick –  Paul Taylor Nov 29 '12 at 18:33
add comment

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.