firefox.exe -private %USERPROFILE%\Desktop\index.html

User Help for Mozilla Firefox
Post Reply
mijoper
Posts: 6
Joined: March 26th, 2022, 1:43 am

firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by mijoper »

Hello
Can you fix this:

When using this command the page opens in a normal mode, private mode does not open:

Code: Select all

firefox.exe -private %USERPROFILE%\Desktop\index.html
In Google Chrome browser when using this command the page opens in a private mode:

Code: Select all

chrome.exe --incognito %USERPROFILE%\Desktop\index.html
Last edited by mijoper on March 26th, 2022, 8:45 am, edited 3 times in total.
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by morat »

Try these:
firefox.exe --private-window %USERPROFILE%\Desktop\index.html
firefox.exe --private-window file:///C:/Users/%USERNAME%/Desktop/index.html
Private Command Line Options
http://wiki.mozilla.org/Firefox/Command ... s#-private

Use quotes around the command parameter if you have a space in your user name.
mijoper
Posts: 6
Joined: March 26th, 2022, 1:43 am

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by mijoper »

morat wrote:Try these:
firefox.exe --private-window %USERPROFILE%\Desktop\index.html
firefox.exe --private-window file:///C:/Users/%USERNAME%/Desktop/index.html
Private Command Line Options
http://wiki.mozilla.org/Firefox/Command ... s#-private

Use quotes around the command parameter if you have a space in your user name.
This does not work too.

If use this command then the page opens in a private mode:

Code: Select all

firefox.exe -private
But when open local html page then the page opens in a normal mode:

Code: Select all

firefox.exe -private %USERPROFILE%\Desktop\index.html
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by morat »

My examples work for me in Firefox 98.

The "private" option doesn't use a parameter, according to the source.

Reference (see handleFlag and handleFlagWithParam)
http://searchfox.org/mozilla-release/so ... andler.jsm

I don't know what works in Firefox 56. (mijoper's user agent)
User avatar
dickvl
Posts: 54145
Joined: July 18th, 2005, 3:25 am

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by dickvl »

I think that in 56 you needed to use the legacy extension Private Tab to open an external link in a PB mode tab/window.

Private Tab: viewtopic.php?t=2665169
extensions.privateTab.allowOpenExternalLinksInPrivateTabs
mijoper
Posts: 6
Joined: March 26th, 2022, 1:43 am

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by mijoper »

dickvl wrote:I think that in 56 you needed to use the legacy extension Private Tab to open an external link in a PB mode tab/window.

Private Tab: viewtopic.php?t=2665169
extensions.privateTab.allowOpenExternalLinksInPrivateTabs
I don't want to use the extraneous extension. I wish the developers would fix this in the next browser update. :wink:
mijoper
Posts: 6
Joined: March 26th, 2022, 1:43 am

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by mijoper »

Installed the latest version of Firefox browser 98.0.2:

Now if use this command then the page opens in a private mode:

Code: Select all

firefox.exe -private-window %USERPROFILE%\Desktop\index.html
But if use this command then the page opens in a normal mode:

Code: Select all

firefox.exe -private %USERPROFILE%\Desktop\index.html
Still doesn't work with command:

Code: Select all

-private
morat
Posts: 6404
Joined: February 3rd, 2009, 6:29 pm

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by morat »

The "private" option with an argument is not supported.

You can use a batch file.

Code: Select all

@echo off
if "%~1"=="" (
start firefox.exe -private
) else (
start firefox.exe -private
ping.exe -n 3 127.0.0.1 >nul
start firefox.exe %1
)
e.g.
private.bat
private.bat http://www.mozillazine.org/
Insert delays in batch file with ping
http://www.robvanderwoude.com/wait.php#PING
User avatar
therube
Posts: 21703
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by therube »

-private
Is not a valid (FF) switch name - so will never work.

If you use that, FF simply ignores it.
-private-window
Is the name of the switch you want, & that should work just as well in FF 56 as it does in FF 98.

Code: Select all

C:\SEA\FirefoxFox52\firefox.exe  -private-window index.html  -profile .\PROFILE

(SeaMonkey uses -private to open a private window.)
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
mijoper
Posts: 6
Joined: March 26th, 2022, 1:43 am

Re: firefox.exe -private %USERPROFILE%\Desktop\index.html

Post by mijoper »

Thanks everyone for your answers.

I hope the developers will support the "-private" option with the argument "%USERPROFILE%\Desktop\index.html".

Perhaps the "-private" command works, but there is no mask icon (private mode) in the browser.
Post Reply