A blog about my nerdy stuff. 0x3a29

Thursday, September 3, 2009

Phantom / Private Opera

One can almost take for granted a feature named “Private browsing” in Firefox or “Incognito” in Google Chrome and their similar counterparts in other browsers such as IE8 and Safari. It was a surprise to me that Opera 10 still doesn't have this feature. I searched for it in the Opera Forums, but I could find only a overcomplicated script that went like this:

cp ~/.opera ~/.opera.bak
opera
rm -rf ~/.opera
mv ~/.opera.bak ~/.opera


This way, any changes that occur during the private session will be deleted and the ~/.opera directory will be restored to how it was. It works fine, but I don't feel like copying 40MB around every time I want to browse in private mode.

Other option would be disable cookies, history, disk cache, etc. The problem with this approach is that there isn't a quick way to go through this options and you have to remember doing and undoing them every time you want to be in private mode.

The solution I'm using is creating a new directory, named ~/.opera/phantom and changing Opera's configuration directory with the -pd (“profile directory”) flag. The actual name of the directory (and where it is) doesn't matter much. I put it inside ~/.opera so everything gets together, but it has no connection to the profile being used in ~/.opera. One could also use something such as ~/.foo. So after creating the directory you want to use, create a little shell script:

#!/bin/sh
opera -pd ~/.opera/phantom


Give it a name easy to remember (I'm using operap) and add executable permission to it: chmod +x operap.

Now start operap and configure the options so it won't accept cookies, save visited websites, save cache in disk, etc. Don't forget also to change the initial page -- by default it's “open last time tabs”, so change to show Speed Dial, or something like that.

Note: “Private mode” wasn't made to make you safer in the Internet, but to prevent people that have physical access to your computer to see what you've been browsing. Suppose you and your wife/husband share the same computer and you want to make them a surprise. If the other person saw your browser history, they would be able to discover the surprise and it wouldn't be fun anymore. OK, I'm lying: the main use of private browsing is porn.

No comments:

Post a Comment