Thursday, August 22, 2013

Private Browsing in Firefox and Chrome

I wanted to start my Firefox and Chrome browsers in private/incognito mode by default and here is what is working for me.

In Linux distributions, applications are usually packaged with *.desktop files which act as the shortcuts for launching the corresponding applications. For example Firefox browser package has   /usr/share/applications/firefox.desktop shortcut file and the google chrome package has /opt/google/chrome/google-chrome.desktop short cut file. These shortcut files list the actual program to be launched with Exec= setting.

My /usr/share/applications/firefox.desktop  by default has:

Exec=firefox %u



and I changed it to


Exec=firefox -private %u


My /opt/google/chrome/google-chrome.desktop file by default has:

Exec=/opt/google/chrome/google-chrome %U

and I changed it to

Exec=/opt/google/chrome/google-chrome --incognito %U


After making the above changes, firefox and Chrome browsers directly start in Private and Incognito modes respectively.

The *.desktop files have a standard format with groups like Desktop Entry, New Window Entry etc. Seems like only the entries of Desktop Entry group are taken into consideration while launching applications in gnome. So, update the Exec value as mentioned above in Desktop Entry group and tha will do.

This is working in Fedora 18, and should work in other distributions as well. 

No comments:

Post a Comment