Command line option --help broken

User Help for Mozilla Firefox
Post Reply
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Command line option --help broken

Post by morat »

The help message shows the list of available command line options in the command console.

How do I show the help message for Firefox 102.0 on Windows? I tried...
firefox.exe --help | more
firefox.exe --help > help.txt
dir /b help.txt
type help.txt
del help.txt
Here is the help message for Thunderbird 102.0 on Windows.

Code: Select all

Usage: thunderbird.exe [ options ... ] [URL]
       where options include:

  -h or --help       Print this message.
  -v or --version    Print Thunderbird version.
  --full-version     Print Thunderbird version, build and platform build ids.
  -P <profile>       Start with <profile>.
  --profile <path>   Start with profile at <path>.
  --migration        Start with migration wizard.
  --ProfileManager   Start with ProfileManager.
  --no-remote        Do not accept or send remote commands; implies
                     --new-instance.
  --new-instance     Open new instance, not a new window in running instance.
  --safe-mode        Disables extensions and themes for this session.
  --allow-downgrade  Allows downgrading a profile.
  --MOZ_LOG=<modules> Treated as MOZ_LOG=<modules> environment variable,
                     overrides it.
  --MOZ_LOG_FILE=<file> Treated as MOZ_LOG_FILE=<file> environment variable,
                     overrides it. If MOZ_LOG_FILE is not specified as an
                     argument or as an environment variable, logging will be
                     written to stdout.
  --console          Start Thunderbird with a debugging console.
  --headless         Run without a GUI.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  -compose [ <options> ] Compose a mail or news message. Options are specified
                     as string "option='value,...',option=value,..." and
                     include: from, to, cc, bcc, newsgroups, subject, body,
                     message (file), attachment (file), format (html | text).
                     Example: "to=john@example.com,subject='Dinner tonight?'"
  --jsconsole        Open the Browser Console.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --devtools         Open DevTools on initial load.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  -mail              Open the mail folder view.
  -mail <URL>        Open the message specified by this URL.
  --marionette       Enable remote control server.
  --remote-debugging-port [<port>] Start the Firefox Remote Agent,
                     which is a low-level remote debugging interface used for WebDriver
                     BiDi and CDP. Defaults to port 9222.
  --remote-allow-hosts <hosts> Values of the Host header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
  --remote-allow-origins <origins> Values of the Origin header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
  -options           Open the options dialog.
  -addressbook       Open the address book at startup.
  -file              Open the specified email file or ICS calendar file.
  -setDefaultMail    Set this app as the default mail client.
Reference
http://searchfox.org/mozilla-esr102/sea ... ns+include
http://searchfox.org/mozilla-esr102/search?q=handleFlag
Last edited by morat on July 5th, 2022, 5:30 am, edited 1 time in total.
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: Command line option --help broken

Post by BruceAWittmeier »

Try a single dash

I used this and it generated a help.txt file
G:\Firefox>firefox -help > help.txt

I lied...just change to the
firefox installation directory -- had to change to the Firefox directory (Firefox not in my path statement) - but no display to the screen
Only way I could display to the screen is the pipe:
G:\Firefox>firefox | help


Raises the question -- were you in the Thunderbird installation directory to generate the Thunderbird help you posted?
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Command line option --help broken

Post by morat »

I ran the --help command line option in the install directory.
cd /d C:\Program Files\Mozilla Thunderbird
thunderbird.exe --help | more
Installation directory
http://kb.mozillazine.org/Installation_directory
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: Command line option --help broken

Post by BruceAWittmeier »

morat,

cd /d C:\Program Files\Mozilla Thunderbird
thunderbird.exe --help | more

Assuming (we know what that does) your Firefox is installed similar
what if you run -- what do you get:
cd /d C:\Program Files\Mozilla Firefox
Firefox.exe --help | more
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Command line option --help broken

Post by morat »

BruceAWittmeier wrote:what do you get
I get an empty string for Firefox 102.0. I tried -h and -help and --help command line options.

Help message in chosen solution (3 years old thread)
http://support.mozilla.org/questions/1251531
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: Command line option --help broken

Post by BruceAWittmeier »

I get the file with commands and switches using all the above techniques providing I'm in the proper directory or specify.

I assume you use the path in your Firefox (adjusted for Firefox) command like the Thunderbird that worked.
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Command line option --help broken

Post by therube »

Working here 102 x64 EME-free, Win7 x64.

Code: Select all

C:\FF102\>firefox --version|tee firefoxhelp.TXT && pause && firefox --h
elp |tee -a firefoxhelp.TXT
firefoxhelp.TXT:

Code: Select all

Mozilla Firefox 102.0
Usage: C:\TMP\SEA\FF102\X\firefox.exe [ options ... ] [URL]
       where options include:

  -h or --help       Print this message.
  -v or --version    Print Firefox version.
  --full-version     Print Firefox version, build and platform build ids.
  -P <profile>       Start with <profile>.
  --profile <path>   Start with profile at <path>.
  --migration        Start with migration wizard.
  --ProfileManager   Start with ProfileManager.
  --no-remote        Do not accept or send remote commands; implies
                     --new-instance.
  --new-instance     Open new instance, not a new window in running instance.
  --safe-mode        Disables extensions and themes for this session.
  --allow-downgrade  Allows downgrading a profile.
  --MOZ_LOG=<modules> Treated as MOZ_LOG=<modules> environment variable,
                     overrides it.
  --MOZ_LOG_FILE=<file> Treated as MOZ_LOG_FILE=<file> environment variable,
                     overrides it. If MOZ_LOG_FILE is not specified as an
                     argument or as an environment variable, logging will be
                     written to stdout.
  --console          Start Firefox with a debugging console.
  --headless         Run without a GUI.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  --browser          Open a browser window.
  --new-window <url> Open <url> in a new window.
  --new-tab <url>    Open <url> in a new tab.
  --private-window <url> Open <url> in a new private window.
  --preferences      Open Options dialog.
  --screenshot [<path>] Save screenshot to <path> or in working directory.
  --window-size width[,height] Width and optionally height of screenshot.
  --search <term>    Search <term> with your default search engine.
  --setDefaultBrowser Set this app as the default browser.
  --first-startup    Run post-install actions before opening a new window.
  --kiosk            Start the browser in kiosk mode.
  --disable-pinch    Disable touch-screen and touch-pad pinch gestures.
  --jsconsole        Open the Browser Console.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --devtools         Open DevTools on initial load.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  --marionette       Enable remote control server.
  --remote-debugging-port [<port>] Start the Firefox Remote Agent,
                     which is a low-level remote debugging interface used for WebDriver
                     BiDi and CDP. Defaults to port 9222.
  --remote-allow-hosts <hosts> Values of the Host header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
  --remote-allow-origins <origins> Values of the Origin header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
(|more instead of |tee is also working just fine.)


Running any kind of window manager, or similar, that might be affecting things on your end?


(Heh.
And the funny thing, that after all these years, on Windows, you still have to redirect output to see any output.
Every program in the world uses -help, or --help for UNIX-like programs, & they output to stdout - except for Mozilla ;-).)
firefox.exe --help > help.txt
dir /b help.txt
type help.txt
del help.txt
Are you saying that with that, that help.txt does not exist?
If so, that is really weird.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
BruceAWittmeier
Posts: 3076
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Re: Command line option --help broken

Post by BruceAWittmeier »

It is my belief that if the installation directory for Firefox.exe (or Thunderbird.exe) is not in the Windows Path statement it will not find the executable to create the help file.

It is also my belief that even if the command to generate the help.txt fails, it will still create an empty file or as morat identified the 0 byte string.
firefox.exe -help > help.txt This will create a 0 byte file in the current directory where executed

Running any of the above command I was able to generate a help.txt file starting in the installation directory or specifying the path to the executable file.
g:\firefox\firefox.exe -help > help.txt This will create a 4k file with the help commands

firefox.exe -help > help.txt This executed in the firefox installation directory will create a 4k file with the help commands

This also works with the Firefox and Thunderbird path in the environment variables.

Change Environment Variables Windows 10
============================================
Start > Settings > Control Panel > User Accounts
Click "Change my environment variables"

In the User variables for <username> double-click the entry "Path"

Click New
Click Browse -- locate the desired directory(s)

Repeat for all directories desired

Click OK to close the window

You will have to close your command (or DOS) window to affect the env changes
I often take a long windy road to my destination. Upon arrival, I wonder how I missed the shortcut.
morat
Posts: 6421
Joined: February 3rd, 2009, 6:29 pm

Re: Command line option --help broken

Post by morat »

The issue may affect 32-bit builds only.

@therube

Thanks for posting the help message.

Edit:

I meant the issue may affect 32-bit systems only.
Last edited by morat on July 5th, 2022, 2:30 pm, edited 1 time in total.
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Command line option --help broken

Post by therube »

Working here - with 102.0.1, x86, Win7 x64.
(I do not have x86 OS and x86 browser to test on, if that might make a difference.)
(And note, that I'm using the x86 version of .0.1, rather then 0.0.)

Code: Select all

Mozilla Firefox 102.0.1
Usage: C:\TMP\SEA\FF102.0.1-x86\X\firefox.exe [ options ... ] [URL]
       where options include:

  -h or --help       Print this message.
  -v or --version    Print Firefox version.
  --full-version     Print Firefox version, build and platform build ids.
  -P <profile>       Start with <profile>.
  --profile <path>   Start with profile at <path>.
  --migration        Start with migration wizard.
  --ProfileManager   Start with ProfileManager.
  --no-remote        Do not accept or send remote commands; implies
                     --new-instance.
  --new-instance     Open new instance, not a new window in running instance.
  --safe-mode        Disables extensions and themes for this session.
  --allow-downgrade  Allows downgrading a profile.
  --MOZ_LOG=<modules> Treated as MOZ_LOG=<modules> environment variable,
                     overrides it.
  --MOZ_LOG_FILE=<file> Treated as MOZ_LOG_FILE=<file> environment variable,
                     overrides it. If MOZ_LOG_FILE is not specified as an
                     argument or as an environment variable, logging will be
                     written to stdout.
  --console          Start Firefox with a debugging console.
  --headless         Run without a GUI.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  --browser          Open a browser window.
  --new-window <url> Open <url> in a new window.
  --new-tab <url>    Open <url> in a new tab.
  --private-window <url> Open <url> in a new private window.
  --preferences      Open Options dialog.
  --screenshot [<path>] Save screenshot to <path> or in working directory.
  --window-size width[,height] Width and optionally height of screenshot.
  --search <term>    Search <term> with your default search engine.
  --setDefaultBrowser Set this app as the default browser.
  --first-startup    Run post-install actions before opening a new window.
  --kiosk            Start the browser in kiosk mode.
  --disable-pinch    Disable touch-screen and touch-pad pinch gestures.
  --jsconsole        Open the Browser Console.
  --jsdebugger [<path>] Open the Browser Toolbox. Defaults to the local build
                     but can be overridden by a firefox path.
  --wait-for-jsdebugger Spin event loop until JS debugger connects.
                     Enables debugging (some) application startup code paths.
                     Only has an effect when `--jsdebugger` is also supplied.
  --devtools         Open DevTools on initial load.
  --start-debugger-server [ws:][ <port> | <path> ] Start the devtools server on
                     a TCP port or Unix domain socket path. Defaults to TCP port
                     6000. Use WebSocket protocol if ws: prefix is specified.
  --marionette       Enable remote control server.
  --remote-debugging-port [<port>] Start the Firefox Remote Agent,
                     which is a low-level remote debugging interface used for WebDriver
                     BiDi and CDP. Defaults to port 9222.
  --remote-allow-hosts <hosts> Values of the Host header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
  --remote-allow-origins <origins> Values of the Origin header to allow for incoming requests.
                     Please read security guidelines at https://firefox-source-docs.mozilla.org/remote/Security.html
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Post Reply