I would like to be able to open Chromium in incognito mode automatically. I'm new to Linux and I love it so far but I haven't yet found a way to do this. I'm using Ubuntu 14.04.
5 Answers
I assume you mean the Chromium Web Browser.
You have to change one line in the chromium-browser.desktop
file. The best is to do that locally:
- Copy the file from
/usr/share/applications
to/home/yourname/.local/share/applications
- Open the file with gedit (open gedit and drag the local desktop file on to the gedit window)
- Find the first line in the file that begins with
Exec=
- Replace the line by
Exec=chromium-browser --incognito
a few remarks:
The folder
/home/yourname/.local/share/applications
is a hidden folder by default. To make it visibe: go to your home folder, type ctrl + h, the.local
folder will appear.You can copy the
chromium-browser.desktop
file to your local folder with the command:cp /usr/share/applications/chromium-browser.desktop ~/.local/share/applications/chromium-browser.desktop
You might have to log out and back in before the changes to take effect.
-
-
2I downvoted this too, more complex and not as good as this older answer. This method doesn't open it by default, it makes a shortcut that opens it specifically. Commented Nov 4, 2016 at 1:40
-
-
1Hi @orschiro I found this: tekrevue.com/tip/incognito-mode-shortcut or more precisely this: cdn1.tekrevue.com/wp-content/uploads/2014/07/… Commented Feb 21, 2017 at 8:17
-
Thanks, @JacobVlijm. So, the Ubuntu Google Chrome package doesn't ship a default one?– orschiroCommented Feb 21, 2017 at 9:57
There are two steps,
- Run
sudo update-alternatives --config x-www-browser
and select/usr/bin/chromium-browser
. This will make Chromium your system's default browser. - Run
sudo -e /etc/chromium-browser/default
(edit as root), and change the line that readsCHROMIUM_FLAGS=""
toCHROMIUM_FLAGS="--incognito"
.
That's it. Changes are instantaneous.
Also, if you ever want to open chrome without incognito mode, just hold Ctrl + n in incognito mode.
See also,
-
1The question asks for
incognito
for both Chromium and Google Chrome—where in the world is thedefault
file for Chrome?– OxwiviCommented Nov 6, 2015 at 6:25 -
@Oxwivi your distro doesn't control or bundle Google Chrome. The version of Google Chrome that they do bundle, they call Chromium. Google forces them to rename the browser because they technically publish their own patches, like the one that has the default file. It also doesn't make sense to have "a default" for more than one browser because the WM will only launch only one when you click a link. Commented Apr 20, 2017 at 3:10
This is how I do it using alacarte (main menu). Install alacarte (aka main menu) from the Ubuntu Software Center if you don't already have it. Launch it.
On the left hand side, under Menus, make sure Applications is expanded. Look for Internet. Single click it. Now look for Chrome under Items. Single click it. Look for Properties on the right hand side. Single click it. A little window appears. (I've dragged it to the right for clarity.) Look for Command. For me, I see /opt/google/chrome/google-chrome %U
.
Carefully change that to:
/opt/google/chrome/google-chrome --incognito %U
Click Close on the little window and then click Close on the Main Menu window. You need to log out and log in to make the change register.
You're done.
(I just did it so I know it works.)
You need create a
Chrome incognito.desktop
file like with the following contents:#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Name=Chrome incognito Exec=/opt/google/chrome/google-chrome --incognito Terminal=false Icon=google-chrome Type=Application Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
Save this file, open Nautilus with root permission (run
gksu nautilus
).Browse to
/usr/share/applications
and paste the file here.Now you can drag this icon to your launcher.
Click on launcher icon, Chrome will start in incognito mode.
-
Can't one just use ala carte (main menu) to do this via a GUI?– user25656Commented Jul 4, 2012 at 17:33
The solution which worked for me:
- open an incognito window
- lock it to luncher
- remove the other chrome from luncher
- whenever you click this icon in luncher an incognito window of chrome will be opened.