Firefox/Chromium浏览器的启动命令选项参数等配置

Share on:

Overview

获取命令行帮助

Chromium

1chromium --help
2无帮助

Firefox

 1firefox --help
 2
 3Usage: /usr/lib64/firefox-esr/firefox-esr [ options ... ] [URL]
 4       where options include:
 5
 6X11 options
 7  --display=DISPLAY  X display to use
 8  --sync             Make X calls synchronous
 9  --g-fatal-warnings Make all warnings fatal
10
11Firefox options
12  -h or --help       Print this message.
13  -v or --version    Print Firefox version.
14  --full-version     Print Firefox version, build and platform build ids.
15  -P <profile>       Start with <profile>.
16  --profile <path>   Start with profile at <path>.
17  --migration        Start with migration wizard.
18  --ProfileManager   Start with ProfileManager.
19  --no-remote        Do not accept or send remote commands; implies
20                     --new-instance.
21  --new-instance     Open new instance, not a new window in running instance.
22  --safe-mode        Disables extensions and themes for this session.
23  --allow-downgrade  Allows downgrading a profile.
24  --MOZ_LOG=<modules> Treated as MOZ_LOG=<modules> environment variable,
25                     overrides it.
26  --MOZ_LOG_FILE=<file> Treated as MOZ_LOG_FILE=<file> environment variable,
27                     overrides it. If MOZ_LOG_FILE is not specified as an
28                     argument or as an environment variable, logging will be
29                     written to stdout.
30  --headless         Run without a GUI.
31  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
32                     but can be overridden by a firefox path.
33  --wait-for-jsdebugger Spin event loop until JS debugger connects.
34                     Enables debugging (some) application startup code paths.
35                     Only has an effect when `--jsdebugger` is also supplied.
36  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
37                     a TCP port or Unix domain socket path. Defaults to TCP port
38                     6000. Use WebSocket protocol if ws: prefix is specified.
39  --browser          Open a browser window.
40  --new-window <url> Open <url> in a new window.
41  --new-tab <url>    Open <url> in a new tab.
42  --private-window <url> Open <url> in a new private window.
43  --preferences      Open Preferences dialog.
44  --screenshot [<path>] Save screenshot to <path> or in working directory.
45  --window-size width[,height] Width and optionally height of screenshot.
46  --search <term>    Search <term> with your default search engine.
47  --setDefaultBrowser Set this app as the default browser.
48  --first-startup    Run post-install actions before opening a new window.
49  --kiosk            Start the browser in kiosk mode.
50  --disable-pinch    Disable touch-screen and touch-pad pinch gestures.
51  --jsconsole        Open the Browser Console.
52  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
53                     but can be overridden by a firefox path.
54  --wait-for-jsdebugger Spin event loop until JS debugger connects.
55                     Enables debugging (some) application startup code paths.
56                     Only has an effect when `--jsdebugger` is also supplied.
57  --devtools         Open DevTools on initial load.
58  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
59                     a TCP port or Unix domain socket path. Defaults to TCP port
60                     6000. Use WebSocket protocol if ws: prefix is specified.
61  --marionette       Enable remote control server.
62  --remote-debugging-port [<port>] Start the Firefox Remote Agent,
63                     which is a low-level remote debugging interface used for WebDriver
64                     BiDi and CDP. Defaults to port 9222.
65  --remote-allow-hosts <hosts> Values of the Host header to allow for incoming requests.
66                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
67  --remote-allow-origins <origins> Values of the Origin header to allow for incoming requests.
68                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html

启动指定profile路径

Chromium:

1chromium --user-data-dir=/path/chromium-user-data --profile-directory=test-prof

会使用/path/chromium-user-data/test-prof目录

同时/path/chromium-user-data也存有内容

启动后在chrome://version中看路径信息

Firefox

1firefox --no-remote --profile /path/test-prof

启动后在about:support中看路径信息

用命令截图

Firefox

1:screenshot --dpr 2 --fullpage
本博客文章皆属原创(除特别标明外)。 未联系作者获得同意前,不可转载。
All articles are original (except for those specially claimed) and copyrighted. Copying without permission is forbidden.

打赏作者

写作不易,感谢支持! 扫个码吧~