(Ubuntu 18.04) Is there a command to open an executable WITH a given icon? I'll give more background. I'm trying to create multiple google chrome "users" (NOT the "People" tab, I need each user to have it's own set of people). I know you can do this, and I did, by first running
mkdir ~/.config/google-chrome-Theo
and
mkdir ~/.config/google-chrome-Teddy
Then making a Desktop executable that runs
google-chrome --user-data-dir=$HOME/.config/google-chrome-Theo
and another one that runs
google-chrome --user-data-dir=$HOME/.config/google-chrome-Teddy
That way, when I run the "Theo" executable, I get Theo's suite of People, bookmarks, etc. but when I run the "Teddy" executable, I get Teddy's People and bookmarks. The issue with this is that I can change the icon of each of the Desktop executables, by going into their Properties menu, but I can't change the icon of the chrome instances that pop up. That is, when I open Theo and Teddy's chromes at once, there are two, generic chrome icons, and I have to search to find the one I want. Is there a command to open an executable WITH a given icon?
EDIT: I tried fra-san's answer, and it didn't seem to work for me. I'll clarify what I tried: I ended up with these two desktop files:
Desktop/Chrome-Theo.desktopwith this content:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Google Chrome
Exec=/opt/google/chrome/google-chrome --user-data-dir="/home/theo/.config/google-chrome-Theo" --class=theo
Icon=/home/theo/Icon-Blue.png
NoDisplay=true
StartupWMClass=theo
Desktop/chrome-teddy.desktop, with this content:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Google Chrome
Exec=/opt/google/chrome/google-chrome --user-data-dir="/home/ubuntu/.config/google-chrome-Teddy" --class=teddy
Icon=home/teddy/Icon-Red.png
NoDisplay=true
StartupWMClass=teddy
However, when I open them, they still show the default chrome icon in the sidebar. Did I mess up somewhere?
EDIT 2: I just realized that the two desktop executables are opening the same user of chrome... I bookmarked a page on the Theo chrome, and when I opened the Teddy one, it had that same bookmark. I'm really confused at this point.