2017-04-08 188 views
0

如果我去cd /Applications/Firefox.app/Contents/MacOS然后运行./firefox -new-window http://google.com它会打开一个新版本的firefox,所以我必须同时打开,这不是我想要的,我想要它在开放的Firefox中。然后我尝试使用open它可以打开新标签,但我无法打开新窗口。如果我运行open -a firefox -new-window http://google.com它提供了一个错误,即新窗口不是现有参数。 所以然后我试着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如何在mac上用终端在firefox中打开新窗口

回答

-1

也许这可能对您有用:

open -n /Applications/Firefox.app 

-n选项允许在新窗口打开

可能你得到一个错误类似这个: “Firefox的副本已经打开,一次只能打开一份Firefox的副本”

在这种情况下,需要删除的文件.parentlock,你可以找到它:

cd ~/Library/Application\ Support/Firefox/Profiles 
ls -l 
cd <your profile>.default 
rm -rf .parentlock 

,然后再试一次:open -n /Applications/Firefox.app

+1

后来我得到一个[错误](HTTP:// imgur .com/Pqd5JpS) –

+0

@ J.Eng检查更新,我希望这可以帮助你 – elmigue017

相关问题