Chrome: Prevent the Gnome-Keyring Prompt (Chrome and Chromium)

You have once again entered the Chrome world of survival horror… Good Luck…

For the purposes of this post, I’ll be referring to Chrome & Chromium as Chromium because Chromium is the open source code-base from which your Chrome is built and I use the “Chromium” build so it makes my life easier to just call them both Chromium. Apply your own changes where needed. Now, to get rid of that annoying prompt…

First open Chromium. Make sure any extensions you want to keep are enabled in Incognito Mode (there’s a checkbox that says as much).

Next clear your full history. That’s everything, including saved passwords. Bookmarks *should* be safe to keep, I’ve never tried because I fixed this during my transition from Firefox (which I still use) so I hadn’t imported my bookmarks yet.

Now exit Chromium and restart it in Incognito mode. To do this, use the “--incognito” parameter, like this (remember “chrome” = “chromium”):
$ chromium --incognito

Now go to a random site like https://wordpress.com and check that there’s no password prompt. There shouldn’t be.

Assuming it was successful, you now realise that all you need to do is run in Incognito Mode, something you should always do by default. However, running “chromium --incognito” from the console or gExec can be tedious, so here are your alternative choices:

1. The Preferred Way: Take advantage of the nice launcher script provided.
2. The Fallback: You could create a launch-script. I won’t cover that in much depth.

Since I don’t know what ships with the official Chrome (as I mentioned, I use Chromium), I can’t be entirely sure that The Preferred Way will be applicable, but I’m pretty sure based on the contents of the launch script (there’s a variable call APPNAME assigned the value “chromium”).

If you’re afraid of the console, editing scripts or anything else, create a launcher to Chrome/Chromium on you desktop/dock/panel and then edit it so the command has “ --incognito” at the end. Click here for an example. Please note, this does not solve opening links and files from outside of Chrome/Chromium.

The Preferred Way
Editing the Startup Script

The location of the startup script should be /usr/bin/chromium (or chrome) on most distributions. Remember you can always use “whereis chromium” or “which chromium” to find out where the launcher script is. Once, you’ve found the launcher script, open it as root in your plain-text editor of choice (mine is nano because it’s simple and comes stock with most Debian children). If you’re lost, don’t fret, just follow the steps below.
Become root (because it is easier than privileging each command):
$ su root
or (Ubuntu users especially):
$ sudo -i
You should (but don’t have to) back it up before editing it:
# cat /path/to/chromium > /path/to/chromium.bkp
Now (where you see nano, substitute your editor)…
# nano /path/to/chromium
Now navigate to the bottom of the script and you’ll find this line:
exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "$@"
which you will change to this:
exec $LIBDIR/$APPNAME $CHROMIUM_FLAGS "--incognito $@"
and save it. If you’re using nano, just press Ctrl+o and Ctrl+x. Congratulations, try running “chromium” (or “chrome”) from the console without parameters. If it starts at all and does so in Incognito Mode, you’re done. If not, go back and ensure you didn’t break anything. To restore the original from the backup (if you made it):
# cat /path/to/chromium.bkp > /path/to/chromium
Don’t give up kid, it’ll happen some day.

The Fallback
Creating a Launch Script

I’m not covering this in detail, if you aren’t comfortable or knowledgeable, just use The Easy Way. You need to be root.
$ su root
or (Ubuntu users, again):
$ sudo -i
Now just do the following (remember “chrome” if you’re using Chrome):
# echo -e "#! /bin/sh\nchromium --incognito\n" > /usr/bin/mychromium
# chmod a+x /usr/bin/mychromium
Now you can set “mychromium” as your default browser via you DE’s settings and you’re done.

Stupid Questions and Assertions

“But now I can’t save my passwords and browsing history!”

And why is it a bad thing? Seriously, saving passwords and history is a bug in the actual design of all browsers. Saving passwords with your browser is probably one of the worst practices of all time. As for history, well you decide.

“Using extensions in Incognito Mode defeats the purpose… blah, blah… It can compromise your privacy… blah, blah…”

If you’re relying on Chrome’s Incognito Mode for absolute privacy, you’re already doing it wrong. Incognito mode is just a way to mitigate, not stop, many, but not all, forms of tracking. By clearing browsing history and cache automatically, it saves me doing it manually. It’s just a convenience (unless you use Grandma’s laptop to visit porn sites, in which case it may be quite vital).

Update on Privacy: Now there’s a very easy way to prevent being tracked (which I’ll cover in detail later) called Privacy Badger. It’s available for Chrome/Chromium and works by “learning”. Simply install the extension and visit some mundane sites filled with advertising (example Gmail, travel agencies, etc) first. After this, you’ll start to see things getting blocked as you browse.

A Final Note

There are many other solutions, but I find this method is most preferable because it prevents the pop-up window entirely, saves the time-wasting of building Chromium, and I use Incognito Mode by default so it serves as a convenience, too, the Gnome Keyring issue notwithstanding.

As usual, feel free to leave comments, ask questions, or post death threats using the comment button below. If you found this post useful, it’s good to share or like it, or even both.

Share the Love:

Easy Print: