【问题标题】:Starting multiple firefox profiles with batch file in linux在 linux 中使用批处理文件启动多个 firefox 配置文件
【发布时间】:2013-08-10 22:15:06
【问题描述】:

可以用firefox -P <profile-name> -no-remote启动不同的firefox配置文件

但是,当我想在 linux 中同时使用批处理文件启动多个配置文件时,只有第一个配置文件启动,而后续配置文件在前一个退出之前不会启动。

目前我无法使用此批处理脚本:

#! /bin/bash

firefox -P "profile 1" -no-remote
firefox -P "profile 2" -no-remote
firefox -P "profile 3" -no-remote

基本上,profile 1 启动良好,但 profile 2 直到我先退出 Firefox 后才启动;下一个命令在上一个退出之前不会执行。

在 Windows 中,我已经成功地使用这个 bat 文件同时启动了多个 firefox:

start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P "profile 1" 
start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P "profile 2" 
start "" "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P "profile 3"  

start 之后的引号有助于实现这一点,start 之后没有引号,配置文件不会同时启动,但在 linux 中我不知道如何实现这一点?

【问题讨论】:

  • 您需要通过在命令末尾添加& 在后台运行它们
  • 哇,我真是个菜鸟!一个符号可以杀死你或让你活着。非常感谢!所有配置文件同时启动
  • @KeepCalmAndCarryOn:请作为答案发布,以便 OP 可以接受并将其标记为已解决。
  • 将我的评论移至答案

标签: linux bash firefox command-line


【解决方案1】:

您需要通过添加一个

在后台运行它们
  & 

到命令的末尾

【讨论】:

    【解决方案2】:

    这就是我在网上搜索时帮助我的原因

    @echo off
    
    start firefox.exe -P Profile1 -no-remote
    start firefox.exe -P Profile2 -no-remote
    start firefox.exe -P Profile3 -no-remote
    

    【讨论】:

      猜你喜欢
      • 2013-08-12
      • 2016-04-30
      • 2021-06-08
      • 1970-01-01
      • 2013-08-20
      • 2014-04-11
      • 2022-11-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多