MozillaZine

Can I run FF in private mode with a command line?

User Help for Mozilla Firefox
vsub
 
Posts: 713
Joined: October 2nd, 2009, 2:20 pm

Post Posted January 20th, 2019, 2:27 am

According to google,the option is "-private" but FF is not starting in private mode
firefox.exe -private -no-remote -Profile "X:\Temp\Private"

DanRaisch
Moderator

User avatar
 
Posts: 122244
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted January 20th, 2019, 5:13 am

Have you tried that with the correct syntax for launching a particular profile? "C:\Program Files\Mozilla Firefox\firefox.exe" -P "Profile Name" Note that it's -P and not -Profile.

Brummelchen
 
Posts: 4616
Joined: March 19th, 2005, 10:51 am

Post Posted January 20th, 2019, 6:02 am

for a profile path its -profile, for a pre-defined profile via profile.ini then its -p.
anyhow both is working here (although i need to recover my last normal session after testing)

firefox.exe -private -no-remote -Profile "X:\Temp\Private"
firefox.exe -private -no-remote -p "test"

https://developer.mozilla.org/en-US/doc ... ne_Options

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 20th, 2019, 1:04 pm

firefox.exe -private -no-remote -Profile "X:\Temp\Private"


Your command line should be working just fine.

(Is "firefox.exe" in your path?
If not, you'll need a full path to it.
C:\WLIB\FIREFOX\FIREFOX\firefox.exe ...)


FF is not starting in private mode

Though FF is opening?
(If so, my earlier (comment) wouldn't apply.)


Is X:\Temp\Private already opened in a non-no-remote'd session?
(No. That would give you an "already running" message.)


Did you typo "-private" as "-privat" ?
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

vsub
 
Posts: 713
Joined: October 2nd, 2009, 2:20 pm

Post Posted January 21st, 2019, 8:10 am

Here is the situation

If I run the profile with "-private" command line,the private mode icon will not appear even if I "File=>Open New Private window" and also in the "REAL" private mode,opening a new tab shows the private mode page every time but started from the command line,it displays the normal new tab page.

It's like the "-private" command line just displays the private mode first page and nothing else

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 21st, 2019, 11:58 am

In FF 52...

-private...

looks to open a private window.
it displays as private.
tabs opened in that window, appear to be private (though do not display the "private" icon).

it also appears that a new window (& any subsequent tabs), opened from the private window, are NOT private.

i did not expect that.
i expected that the entire session, opened with -private, would have been private, but (at least in 52) that appears not to be the case. maybe i've misunderstood the -private command line switch.)


it looks like the only way to get "everything" private, is to go to Options | Privacy -> History --> Never Remember History.
(which sets, user_pref("browser.privatebrowsing.autostart", true);)


SeaMonkey 2.49 looks to give the same results.
SeaMonkey looks to accept & use the browser.privatebrowsing.autostart Pref, but I don't believe they have a UI for it.


According to MDN, -private says "Opens Firefox in permanent private browsing mode. Firefox 3.6 and later only." so I'm not really understanding the behavior I'm seeing?

SUMO Private Browsing does not mention the command-line option.
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

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 21st, 2019, 6:05 pm

And FF 64 looks to be the same.

So yes, seems I've never correctly understood what the expected behavior should be when using the -private command-line option.
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

dickvl

User avatar
 
Posts: 52886
Joined: July 18th, 2005, 3:25 am

Post Posted January 21st, 2019, 10:13 pm

For me it works as expected in Firefox 64 with the -private switch and I can only open a new private window and all tab I open have the label "Private Browsing".
Firefox doesn't show the purple label in such a case just like when you use permanent Private Browsing mode (Always use Private Browsing mode), but all tabs are the PB mode tabs.
You can verify that by opening pages and check the history.

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 22nd, 2019, 10:23 pm

You can verify that by opening pages and check the history.

Yes, that's what I did yesterday - using History in the Sidebar.


Check again.
I just did.

At first, I thought you were right.
And I was trying to think how I saw different yesterday?


And then I realized that on the sidebar, it must not default to actually showing any "days" unless you actually expand the dropdown.
And once I expanded 'Today', I then saw sites I open in a new window, opened from the initial Private Window (at startup).
[Red herring.]


(New Profile, disabled all the spy crap stuff. [Isn't that a crock of crock, that I have to do that even before attempting to use a new Profile!] Displayed the Menu bar. Set FF to restore tabs on startup.)

You should see the sites you open show up interactively in History.
Quit FF & restart & they are still there.


A new window opened from the existing Private Window, will have Ctrl+Shift+DEL available (to clear Private Data).
[More correctly said, a non-Private Window will have Ctrl+Shift+DEL available, where a Private Window will not.]


(And that said, it appears that New Private Window does not actually open a Private Window. Color me confused.)
And then to top it off, seems that some times, at least History is not updated - as if it were a Private Window, & sometimes it is.
Something is wrong, a bug, just not sure what?
[See below.]


Win7, FF64 x64.


I'm thinking that it is a Ctrl+N shortcut from the initial Private Window is opening as a non-Private Window.
If you use File | New Private Window (& it does say, Ctrl+N), or if you use the 3-bar, New Private Window, it opens as Private.
But if you use the keyboard shortcut, Ctrl+N, or the 3-bar, New Window (rather then New Private Window, Ctrl+Shift+P), it opens as a normal window.
Bug.


Yeppers.

https://bugzilla.mozilla.org/show_bug.cgi?id=866407
Ctrl-N in private mode creates a new non-private window and restores session(if that's the configuration)

Seems in their logic, the Bug is Invalid.

Yet everything the OP said is correct, I just duplicated it - before finding the bug.
And everything they said is illogical or simply wrong (as in the wrong shortcut does display).
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

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 22nd, 2019, 11:06 pm

Seems the only reliable method to open & remain in Private Mode is to use the preference item:
> user_pref("browser.privatebrowsing.autostart", true);


(Or at least I haven't found the bug in that scenario, yet :evilgrin:.)
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

therube

User avatar
 
Posts: 20076
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted January 22nd, 2019, 11:09 pm

According to MDN, -private says "Opens Firefox in permanent private browsing mode".

Permanence is such a fleeting concept ;-).
(As is privacy.)


(Actually, if they just get rid of command-line switches, & shortcut keys, that would eliminate a whole host of problems.)
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

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 5 guests