EDIT 2014-04-19:
To add a little extra context to my question, these are the original instructions I followed http://ricardofeliciano.me/how-to-create-a-unity-launcher-icon-for-each-chromechromium-profile-in-ubuntu/. I got it to work with Ubuntu 14.04 LTS a few weeks before the official release date. After updating on April 17th I can no longer get it to work:
ORIGINAL POST:
I installed Ubuntu 14.04 LTS a few weeks before the official release and set up multiple google chromium profiles. Using "StartupWMClass", I managed to get each profile to have a separate version of the chromium icon in the unity launcher (same icon, separate appearance in the launcher). After the official release of 14.04 I updated all packages (including chromium) and ever since my additional chromium profiles no longer get their own icon location on the launcher, but group together with the main chromium icon.
here's what I believe to be the essentials of my setup:
- Under
~/.local/share/applications/
I have my *.desktop files, containing among others the linesExec=chromium-browser --user-data-dir=/home/<mydir>/.config/chromium/Profiles/<profile-name> --class=<profile-class-name> %U
StartupWMClass=<profile-class-name>
- Under
/usr/share/applications/
I have the default chromium-browser.desktop file created upon installing chromium, containing among others the linesExec=chromium-browser --class=Chromium-browser %U
StartupWMClass=Chromium-browser
Adding --class=Chromium-browser
to the Exec= line of the default installation .desktop file used to do the trick so that each profile including the default profile would be associated with their own icon on the launcher. After the update I am no longer able to get this to work.
I tried:
- closing all chromium windows,
- unlocking from launcher any remaining chromium icons,
- using the unity search to start the default Chromium Web Browser,
- locking the appearing icon to the launcher
- using the unity search to start an additional, custom Chromium profile
- –> the window of the additional chromium profile is associated with the the icon started for the default chromium profile. They use the same launcher icon.
I tried restarting compiz, logging out and even restarting my computer.
Any tips on what I might be missing?
p.s. One thing that confuses me is that the launcher I created for Google Calendar with File -> Create application shortcuts...
works as expected (uses it's own, different icon), and doesn't even make use of the --class=<profile>
argument I thought was necessary…
Best Answer
I came up with this abomination (personal opinion... I'd just like for it to work with sh :) ) It has a few tricks, but is pretty robust for two Windows.. You could specify further windows too, but they have to be manually added by adding more
"specificprofile1"
along with the corresponding function.. Maybe someone could make it have more.. logic!Issues:
Printing gives errors (deprecation warnings..):
For debugging you can use the following to print out the errors when using actual icons: https://askubuntu.com/a/664272/654028 (# The Manual alternative)
while loop bugs out, probably because of looping interval
Also when clicking a corresponding .desktop icon too fast (before the custom class has been set ?), a new window will be opened..
(quite) Sometimes when starting from both Chromium too fast (~<3s), the class of the previously opened window gets reset to chromium-browser.chromium-browser.. Then you can expect the icons to have swapped around or other unexpected behavior.