繁体   English   中英

如何在Mac上使用终端在Firefox中打开新窗口

[英]How to open new window in firefox with terminal on mac

如果我转到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/zh-CN/docs/Mozilla/Command_Line_Options https://superuser.com/questions/277565/start-firefox-from-terminal-on-mac-os- X-雪豹

也许这对您可能有用:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM