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. 

Access VM's Virtual Consoles in Qemu

To access Virtual Terminals on a Linux host, the users can go about hitting Ctrl+Alt+F1 ... Ctrl+Alt+F7 key combinations. But while working on a Virtual Machine on qemu, users cannot directly hit the above key combinations to get to the Virtual Terminals.


The users will have to hit Ctrl+Alt+2 first which will get to qemu's Monitor console. Once at the Monitor Console, the user can enter the following command to get to VT2

(qemu) sendkey ctrl-alt-f2


Another nice feature of the qemu monitor console is the screen dump feature, which can be used to capture the screenshot of the Virtual Machine. The users will have to run the following command:

(qemu) screendump  /home/username/test.ppm







I gathered this information from other public articles and re-posting it for my future reference.