How can I start a separate instance (not profile) of Chromium, with its own icon?

What worked (cobbled together from the various answers and comments - thanks!) was to create a .desktop file in ~/.local/share/applications with a few tweaks:

[Desktop Entry]
Version=1.0
Name=Chromium Browser 2
GenericName=Web Browser 2
Comment=Chromium Alternate
Exec=/usr/lib/chromium-browser/chromium-browser --user-data-dir=/home/dandv/Chr2 --class="Chr2"
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/dandv/chromium-browser-2.png
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
StartupNotify=true
Actions=NewWindow;Incognito;TempProfile;
X-AppInstall-Package=chromium-browser
StartupWMClass=Chr2

Make sure to replace /home/dandv/ with your home directory. Using ~ did not work.

The tweaks I applied to the .desktop file were:

  1. Add --class="SomethingLikeChr2" to the Exec= line
  2. Add StartupWMClass=SomethingLikeChr2 to the [Desktop Entry] (use the same unique value as above; apparently this is what makes a separate window, that won't get lumped in with existing Chromium windows
  3. Add --user-data-dir=... to the Exec line, due to this Chromium bug.

Result

task switching among two different Chromium instances


I was inspired by the other answers, but I discovered that we only need to set --class and --user-data-dir options for Chrome's executable.

So I wrote a script to make this automatically and if you want to try (don't worry, it won't perform any action before you confirm -- unless you use --force), just run:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/felipecassiors/dotfiles/master/scripts/create_alternative_chrome_shortcut.sh")"

If you want to know more about it, take a look here.

The only caveat is that since it uses --user-data-dir instead of --profile-directory, the new Chrome instance will act like a fresh new. This is needed because of this bug.

In the end, you'll end up with something like this:

Check GIF here.