You are here

Opera Portable "private"

8 posts / 0 new
Last post
Daniel0312
Offline
Last seen: 2 months 1 week ago
Joined: 2022-01-23 09:01
Opera Portable "private"

I do love private browsing.
To make it default OperaPortable behavior, I added an OperaPortable.ini in OperaPortable root folder, containing only AdditionalParameters=--private.
It works like a charm : when I start a new, empty instance it's in private mode.
Problem is, when I start OperaPortable.exe with an URL as parameter it starts in "normal", non-private mode.
I wonder if it's intended behavior or...

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 39 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Passed In

The --private switch as you have it configured is passed in even when you pass a URL. Is the URL quoted? There may be another switch to add but Opera's command line doesn't seem to be documented. And the standard Chrome ones don't seem to all work through the launcher.exe.

Sometimes, the impossible can become possible, if you're awesome!

Daniel0312
Offline
Last seen: 2 months 1 week ago
Joined: 2022-01-23 09:01
Some tests

I did a pretty simple test, with the AdditionalParameters=--private set.

1- I run OperaPortable from a command prompt --> I get a private empty Opera wnidow
2- I close the window
3- I then run OperaPortable portableapps.com --> the web site opens... in a non-private window.
4- I close the window
5- I then run OperaPortable -- private portableapps.com --> the web site opens in a private window.

Checking with ProcessExplorer, it seems the "root" instance of opera.exe doesn't show the --private parameter in point 3 (it does in 5).
I hope it helps.

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 39 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Opera launcher.exe Weirdness

I decided to try ignoring the OperaPortable.ini and feed parameters directly into OperaPortable.exe. These get passed unaltered to Opera's launcher.exe which then handles them. I confirmed this with a shim app in launcher.exe's place to be sure.

1. OperaPortable.exe --private "https://portableapps.com/"

This opens Opera with the website shown in a private tab.

2. OperaPortable.exe "https://portableapps.com/" --private

This opens Opera with the website shown in a normal tab.

It looks like Opera only accepts parameters in a specific order. It seems launcher.exe strips off --private when it's after a URL but not when it's before. At the moment, there's no way to alter the order of arguments passed in by the PA.c Launcher. To work around this, define your URL pass in the registry as OperaPortable.exe --private "URL" or similar.

Sometimes, the impossible can become possible, if you're awesome!

Daniel0312
Offline
Last seen: 2 months 1 week ago
Joined: 2022-01-23 09:01
A workaround

Thank you for looking into it.
I agree with you regarding the parameters order (I'd done the same test).
And I have found a workaround !
I just edited the %PAL:AppDir%\AppInfo\Launcher\OperaPortable.ini file
[Launch]
...
CommandLineArguments=--user-data-dir="%PAL:DataDir%\profile\data" --private
...

I guess the problem is with the integration of the OperaPortable.ini in the base folder.

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 39 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Reset on Upgrade

Just a heads up that that will be reset on upgrades. Editing that will put the --private before the URL, though, which won't mess up Opera's internal launcher.exe file.

Sometimes, the impossible can become possible, if you're awesome!

Daniel0312
Offline
Last seen: 2 months 1 week ago
Joined: 2022-01-23 09:01
Good to know !

Thank you for the information, it would sure have surprised me !
I guess I'll have to re-edit the file after each update, and hope you'll find a way to make the launcher integrate the OperaPortable.ini file when there's a URL parameter.
Many thanks for your time.

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 39 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Opera Fix

If you can get Opera to fix it so their launcher.exe doesn't eat the --portable profile when it's at the end, that would work, too. It's an undocumented bug in Opera itself. They don't have proper command line documentation either, unfortunately.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments