簡體   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