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.
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
- 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
- Replace the line by
a few remarks:
/home/yourname/.local/share/applicationsis a hidden folder by default. To make it visibe: go to your home folder, type ctrl + h, the
.localfolder will appear.
You can copy the
chromium-browser.desktopfile 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.
There are two steps,
sudo update-alternatives --config x-www-browserand select
/usr/bin/chromium-browser. This will make Chromium your system's default browser.
sudo -e /etc/chromium-browser/default(edit as root), and change the line that reads
That's it. Changes are instantaneous.
Also, if you ever want to open chrome without incognito mode, just hold Ctrl + n in incognito mode.
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
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.
(I just did it so I know it works.)
You need create a
Chorme incognito.desktop file like with the following contents,
#!/usr/bin/env xdg-open [Desktop Entry] Version=1.0 Name=Chorme 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 a nautilus with root permission. (run
/usr/share/applications and paste the file here.
Now you can drag this icon to your launcher.
Click on launcher icon, chorme will start in incognito mode.