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:
and I can indeed drag&drop the newly created Chrome to my launcher:
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:
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:
--class
and a correspondingStartupWMClass
entry to thechrome-2.desktop
file following this. It works with Firefox, not sure about Chrome.StartupWMClass
tactic. You can also see what it does by usingwmctrl -l -x
to print out theWM_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 customWM_CLASS
of A. If you then close all chrome windows and click launcher B, then A, thenwmctrl
shows theWM_CLASS
of B for both.--user-data-dir=...
to the Exec line, due to bugs.chromium.org/p/chromium/issues/detail?id=118613