简体   繁体   中英

How to open new window in firefox with terminal on mac

If I go to cd /Applications/Firefox.app/Contents/MacOS and then run ./firefox -new-window http://google.com it open a new version of firefox so I have to open at the same time, which is not what I want, I want it in the open firefox program. Then I tried with open it works to open new tabs, but I can't open a new window. If I run open -a firefox -new-window http://google.com It gives an error that -new-window is not a existing parameter. So then I tried open -a firefox --args -new-window http://google.com but nothing happens it just swiches the focus of applictions to firefox. If I run open -a firefox --args http://google.com nothing happens again. When open -a firefox --args -url http://google.com does not work. Recourses I have looked at 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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