【问题标题】:How to open new window in firefox with terminal on mac如何在 Mac 上使用终端在 Firefox 中打开新窗口
【发布时间】:2017-04-08 13:33:10
【问题描述】:

如果我去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

【问题讨论】:

    标签: macos firefox terminal


    【解决方案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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-24
      • 2010-11-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多