Firefox openURL : OSX Command Line

16,803

Solution 1

open -a Firefox 'http://www.youtube.com/'

Solution 2

If firefox is your default browser you can simply use: open 'http://www.youtube.com'

Solution 3

Maybe you can append two aliases, edit ~/.bash_profile, append code below:

open_by_browser(){ open -a $1 $2}
alias firefox='open_by_browser firefox'
alias chrome='open_by_browser "Google Chrome"'

then you can open html file by Firefox

firefox xxx.html

or by Chrome

chrome xxx.html
Share:
16,803

Related videos on Youtube

Admin
Author by

Admin

Updated on September 14, 2022

Comments

  • Admin
    Admin over 1 year

    Context

    I want to open a Firefox browser from the command line and have it go to youtube.com

    I have tried: open /Applications/Firefox.app --args -remote "openURL(www.youtube.com, new-tab)"

    It successfully opens a Firefox, but does not navigate to youtube.com

    Question:

    How do I fix this?

  • Boris Verkhovskiy
    Boris Verkhovskiy about 5 years
    you don't need to capitalize firefox