Opening a remote Firefox window
Hey guys,
Anyone know how to open a new Firefox window from the commandline? On linux, you'd just go "firefox http://www.appleinsider.com" and if firefox is already running, you'd just get a new window.
Can't figure out how to do that on OS X. If you run /Applications/whatever/firefox it opens a new firefox session. I've seen some documentation saying to use the "run-mozilla" script, but that's missing form the OS X distribution.
Anyone?
Anyone know how to open a new Firefox window from the commandline? On linux, you'd just go "firefox http://www.appleinsider.com" and if firefox is already running, you'd just get a new window.
Can't figure out how to do that on OS X. If you run /Applications/whatever/firefox it opens a new firefox session. I've seen some documentation saying to use the "run-mozilla" script, but that's missing form the OS X distribution.
Anyone?
Comments
Originally posted by jethro1138
Hey guys,
Anyone know how to open a new Firefox window from the commandline? On linux, you'd just go "firefox http://www.appleinsider.com" and if firefox is already running, you'd just get a new window.
Can't figure out how to do that on OS X. If you run /Applications/whatever/firefox it opens a new firefox session. I've seen some documentation saying to use the "run-mozilla" script, but that's missing form the OS X distribution.
Anyone?
Well you can do it in AppleScript. And if you can do it in AppleScript you can do it in Terminal...
This works for me in Tiger:
Paste the following code into terminal and hit return:
osascript -l AppleScript -e 'tell application "Firefox"' -e 'OpenURL "http://appleinsider.com"' -e 'end tell'
Some documentation:
apple's man page
A macosX hints article
Hope this helps!
Originally posted by AllInOne
osascript -l AppleScript -e 'tell application "Firefox"' -e 'OpenURL "http://appleinsider.com"' -e 'end tell'
Excellent! That works fantastically. Thank you very much!