如果我转到cd /Applications/Firefox.app/Contents/MacOS
然后运行./firefox -new-window http://google.com
它会打开一个新版本的Firefox,所以我必须同时打开,这不是我想要的,我想要它在公开场合firefox程序。然后我尝试使用open
它可以打开新选项卡,但我无法打开一个新窗口。如果我运行open -a firefox -new-window http://google.com
它会给出一个错误 - -new-window不是现有参数。
所以我尝试了open -a firefox --args -new-window http://google.com
但没有任何反应只是将应用程序的重点转移到firefox上。如果我运行open -a firefox --args http://google.com
什么也没发生。 open -a firefox --args -url http://google.com
不起作用时。
我看过的资源
https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
https://superuser.com/questions/277565/start-firefox-from-terminal-on-mac-os-x-snow-leopard
答案 0 :(得分:0)
Maybe this could be useful for you:
open -n /Applications/Firefox.app
The -n
option allows open new window
Is possible that you are getting an error something like this: "A copy of Firefox is already open. Only one copy of Firefox can be open at a time"
In that case is necessary delete the file .parentlock
, you can find it in:
cd ~/Library/Application\ Support/Firefox/Profiles
ls -l
cd <your profile>.default
rm -rf .parentlock
And try again: open -n /Applications/Firefox.app