NB: I am not looking for how to switch between windows of the same application. Alt+Tab is great for that.
I often have two browser windows open at once (because they are for distinct profiles). I move my windows around a lot (e.g. Ctrl+Win+← / Ctrl+Win+→), and I often have occasion to show a browser in one half of the screen whilst using a text editor in the other half.
Unfortunately, the 'grouping' behaviour of my system (Ubuntu 17.10 + Gnome desktop) means that when I bring the desired browser window to the foreground (to cover up a terminal, for example), both browser windows come forward. Half the time, the second browser window has been left on the opposite half of the screen, so it covers up my text editor, and I can't refer to my code without further moving windows around.
Is there something I can do to keep these windows ungrouped? In my system at home (Ubuntu + Unity), I don't have this problem.
Edit: I've endeavoured to follow the instructions at https://askubuntu.com/a/1054494/117018 for setting distinct WM_CLASS
values for my different profiles: I updated my .desktop
files, but when I check the WM_CLASS
using xprop
, my changes appear not to have taken effect: WM_CLASS(STRING) = "google-chrome", "Google-chrome"
.
I updated the .desktop
files thus:
function update ()
{
f=$1
newclass=$(basename $f)
newclass=${newclass#*-}
newclass=${newclass%.desktop}
newclass=${newclass/-/_}
sed -i -e "s/StartupWMClass=.*/StartupWMClass=${newclass}/" -e "s/Exec=\(.*\)/Exec=\1 --class ${newclass}/" "$f"
echo $f
}
find $HOME/.local/share/applications -name chrome-\* | while read -r f; do
update "$f"
done
find $HOME/.gnome/apps -name chrome-\* | while read -r f; do
update "$f"
done
Now, the .desktop
files look like the following:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Docs
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=aohghmighlieiainnegkcijnfilokake --class aohghmighlieiainnegkcijnfilokake_Default
Icon=chrome-aohghmighlieiainnegkcijnfilokake-Default
NoDisplay=true
StartupWMClass=aohghmighlieiainnegkcijnfilokake_Default
WM_CLASS
and correspondingStartupWMClass
value in the application launcher for each profile. Possible duplicate of Firefox profiles with different icons in Ubuntu dock – pomsky Nov 30 '18 at 18:43WM_CLASS
. I've amended my post to give details. – Jellicle Nov 30 '18 at 20:25