使用 -no-remote 命令显示“Firefox 已在运行”

使用 -no-remote 命令显示“Firefox 已在运行”

我想打开一个新的 Firefox 实例。我试过了

firefox -no-remote

MOZ_NO_REMOTE=1 firefox

详细在文档中。然而我不断收到这样的信息

Firefox is already running, but is not responding. To open a new window, 
you must first close the existing Firefox process, or restart your system.

如何从命令行启动 Firefox 的新实例?

答案1

-无远程选项用于同时运行多个 Firefox 配置文件。您将获得“Firefox 已在运行”消息,因为您正尝试打开具有相同配置文件的第二个 Firefox 实例。

您应该按如下方式使用此选项:

firefox -no-remote -P "Another Profile"

或者

firefox -no-remote -profile "profile_path"

其中profile_path是绝对的还是相对的(火狐浏览器) 小路。

答案2

我和你有同样的需求:在同一台机器上运行许多 Firefox 实例。

基本上,当您运行 Firefox 实例时,会.mozilla在您的文件夹中$HOME创建一个文件夹(如果尚不存在)。您可以根据需要使用多配置文件解决方案,如下所示劉劉曉如上所述。因此,所有用户的配置文件都位于该 .mozilla 目录(数据库)中。

我有另一个技巧,我认为它比该解决方案更优雅。创建一个目录来保存新的 Firefox:

$ mkdir $HOME/new_firefox

$ cd $HOME/new_firefox

$ tar xvf setup/firefox-33.0.tar.bz2

然后创建一个小脚本,如:

#!/bin/sh
HOME=$HOME/new_firefox
$HOME/firefox/firefox -no-remote &

现在运行脚本来获取另一个 Firefox 实例。并且您的新用户配置文件将存在于 中$HOME/new_firefox/.mozilla

如果您使用 GNOME,只需创建一个new_firefox.desktop文件并将其放在/usr/share/applications目录或目录中$HOME/.local/share/applicationsExec该文件中的参数是Exec=/home/your_name/path-to-your-script。如果您不知道如何创建,请查看上述两个目录中是否存在一个已存在的文件。

相关内容