4

I'm using super+1 to access the first item on the dock/launcher, which is Google Chrome.

I want to have super+2 bound to another instance of Chrome, so that I could go between them with my keyboard.

I have tried creating a dedicated chrome profile (Profile 4) and adding a chrome-2.desktop entry with the following:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Exec=google-chrome --profile-directory=Profile\ 4
Name[en_US]=Chrome-Profile\ 4
Name=Chrome-Profile\ 4
Icon=google-chrome

Now I have 2 Chrome icons in Applications:
enter image description here

and I can indeed drag&drop the newly created Chrome to my launcher:
enter image description here

The problem is, when I click it, or do super+2 in keyboard, it opens a new window but binds it to the first dock item, so I get two Chrome instances on the first item, and nothing on the second one:
enter image description here

What am I missing here? Is this even possible? I don't mind downloading anything the would be nice to solve it in a "clean" way.

strong textThings tried: adding StartupWmClass=Profile4 and Exec=google-chrome --profile-directory=Profile\ 4 --class Profile4 as mentioned in the comments. the result is still opening the windows under the first chrome dock item, and displaying this:

enter image description here

4
  • 1
    Try adding a new custom --class and a corresponding StartupWMClass entry to the chrome-2.desktop file following this. It works with Firefox, not sure about Chrome.
    – pomsky
    Jun 15, 2019 at 21:03
  • thanks, tried that and it doesn't work (see image at bottom of question)
    – goldylucks
    Jun 16, 2019 at 5:18
  • I can also confirm that chrome does not cooperate with the StartupWMClass tactic. You can also see what it does by using wmctrl -l -x to print out the WM_CLASS of all open windows at a command line. If you create two launcher icons for chrome, each with a different class, "the first one wins". If you click launcher A, then B, then both windows will have the custom WM_CLASS of A. If you then close all chrome windows and click launcher B, then A, then wmctrl shows the WM_CLASS of B for both. Mar 23, 2020 at 3:29
  • 1
    halleluyah! this other answer (askubuntu.com/a/1113914/231504) is working for me. the key is their "step 3", which says: Add --user-data-dir=... to the Exec line, due to bugs.chromium.org/p/chromium/issues/detail?id=118613 Mar 23, 2020 at 3:36

0

You must log in to answer this question.

Browse other questions tagged .