passing URL to firefox vi the CLI

Charles Jacobs cjacobs at mac.com
Fri Mar 21 19:05:44 PDT 2008


On Mar 21, 2008, at 12:21 PM, José Pedro do Amaral wrote:
> Em 21/03/2008, às 13:24, LuKreme escreveu:
>> On 21-Mar-2008, at 08:15, José Pedro do Amaral wrote:
>>> /Applications/Firefox.app/Contents/MacOS/firefox "http://slashdot.org 
>>> "
>>
>> That only works if Firefox is not already running.
>
> OK, then do:
>
> /Applications/Firefox.app/Contents/MacOS/firefox -P default1 -no- 
> remote "slashdot.org" &
>
> This will open a new defaults window, where you can create user  
> default1, and then a new instance of Firefox will run along with the  
> instance already running.
>
> There are a series of other flags, but I could not add tabs to a pre- 
> existing instance...

You could also invoke applescript from the command line:

$ osascript -e 'tell application "Firefox" to OpenURL("foo.com")'





More information about the MacOSX-talk mailing list