I use two operating systems daily: Ubuntu 15.04 with the Unity desktop environment and Manjaro with KDE-plasma-5 desktop. I spend a good chunk of time in my email and it is convenient for me to have it behave like a stanalone program, rather than a tab in chromium.

On both systems, I can create a launcher for gmail, via the settings menu under "More tools". On Ubuntu/Unity, I can add this launcher to the panel and it will act as a standalone program with its own separate icon and keyboard shortcut. On Manjaro/KDE, I the gmail shortcut displays a unique icon, but as soon as the program is started, the gmail window will be recognized as a chromium window and it will be merged with existing chromium windows in the panel instead of retaining the icon that is displayed on the shortcut. I have also tried to create the shortcuts directly with command line flags as described in this rather old post, but the behavior is the same.

How can I mimic the Unity behavior in KDE? Is it possible to get a webapp to behave like a standalone program or will it always merge into any existing open chromium window?

  • So you just want to run a stand-alone instance of a web browser, separate from the regular browser's profile? Try a web search for that? Firefox works great with "-no-remote" and "-p"
    – Xen2050
    Dec 20, 2015 at 8:22
  • As I mentioned, I have tried running chrome with the command line flags for a single separate window (both app and url), but this is still merged with any open chrome window. I tried your firefox suggestion and they same thing happens, the window is grouped in the panel together with any other open firefox instance. Using your suggestions, I also have to choose the profile each time rather than having gmail open directly. Dec 20, 2015 at 15:46

5 Answers 5


The Problem

The problem causing this issue is that KDE identifies applications for the show a launcher when not running feature by their X11 window class, and chrome does not change the X11 window class, but rather leaves it as google-chrome and instead changes the classname to a unique value.

The Solution

Thankfully, it's possible to force the gmail window to behave the way you want.

  1. Install an application called xdotool with your package manager.
  2. Open up the file manager and browse to ~/.local/share/applications/.
  3. Open the .desktop file there that chrome created for your gmail webapp with a text editor
  4. Note the value of StartupWmClass
  5. append the following to the Exec line: && xdotool search --sync --classname <value> set_window --class <value>, replacing <value> with the value of StartupWmClass.

Here's an example from another webapp I've edited this way:

[Desktop Entry]
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=hlomdbnjeagldabepchlcdhkaagfedim && xdotool search --sync --classname crx_hlomdbnjeagldabepchlcdhkaagfedim set_window --class crx_hlomdbnjeagldabepchlcdhkaagfedim
Name=Outlook 365

That change will change the window class for the webapp to what KDE is expecting it to be. The app icon may briefly show as the normal chrome icon, but it will quickly be replaced by the proper icon as set in the .desktop file as soon as xdotool completes.

  • Thanks for the answer! I have abandoned KDE since I asked this question, but it is good to know that there is a solution to this problem if I ever think about switching back. Apr 22, 2016 at 21:34
  • 1
    I think this is fixed with Plasma 5.8, at least it works for me with Chrome (but not Chromium).
    – hurikhan77
    Oct 7, 2016 at 11:40
  • @hurikhan77 interesting that chrome would work but not chromium. My kde desktop is down right now due to nouveau failings, but I hope you're right and this ugly hack isn't needed anymore! Oct 7, 2016 at 16:42
  • I tried with plasma 5.8.2 and chrome 54.0.2840.71, under archlinux, and it still doesn't work. It used to work even for chromium a few days ago, but it stopped, probably because of an update.
    – Jesse
    Oct 25, 2016 at 11:59
  • @Jesse Yes, with the latest upgrade this has changed back to the old behavior for me, too. I wonder which patch it is.
    – hurikhan77
    Oct 30, 2016 at 12:58

Try going to chrome://apps , rigth clicking and app and selecting "open as window"

Source: https://www.wikihow.com/Turn-Your-Favorite-Website-Into-Desktop-Apps-With-Google-Chrome


As I found it very helpful, I've made a little script which applies stoncrushers instruction automatically for every chrome app installed because I have a lot of them.

(Considering Totos comment I will show the script below) It's trying to determine the id from a chrome app and appends the xdotool command at the end of the Exec= line


set -e


if ! command -v xdotool > /dev/null; then
  echo "installing xdotool..."
  yes | sudo pacman -S xdotool

for file in $(ls $DIR/$PATTERN)
  echo "$file:"
  ID=$(grep -m 1 Exec $file | sed -E 's/^(.*)--app-id=(\w*).*$/\2/g')
  CMD=" \&\& xdotool search --sync --classname $ID set_window --class $ID"
  if grep -q "$CMD" $file; then
    echo "  skip file"
  echo "  changing file"
  sed -E -i 's!^(Exec=)(.*)$!\1\2'"${CMD}"'!g' $file

echo "updating desktop database"
update-desktop-database $DIR
echo "done"

You can find it also here because this script may receive some bugfixes in the future.

Maybe it's also helpful for others.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Toto
    Mar 12, 2022 at 10:45
  • This worked. Thanks much!
    – mFat
    Aug 26, 2022 at 22:09

NOTE: This is basically the same reply from stonecrusher above, but changed slightly.

Follow the instructions on the stonecrusher answer above, then change the following:

For the Exec setting on the .desktop file, use this:

Exec=/usr/bin/chromium --profile-directory=Default --app=APP_URL; xdotool search --sync --classname APP_DOMAIN set_window --class CUSTOM_WM_class

Make sure to replace these values:

  • APP_URL the app URL you want to display as a chromium app
  • APP_DOMAIN the domain for the app (e.g. For https://web.whatsapp.com it is "web.whatsapp.com")
  • CUSTOM_WM_CLASS is the value of StartupWMClass on your .desktop file

Note that we're using ; xdotool ... instead of && xdotool ... in the command above. This guarantees it will run, regardless of the exit code of the preceding chromium command.

Tip: If you check for the WM Class using xprop WM_CLASS (and subsequently clicking on the window), you will notice that Chromium reports the Website Domain for the app:

WM_CLASS(STRING) = "web.whatsapp.com", "Chromium"

This allows us to match with the domain name of the app when searching using xdotool.


Oddly enough for me, I have the same problem you described on chrome in manjaro kde but chromium handles web app icons just fine. Its rather odd some people have this issue with chrome and others with chromium, with installing the opposite one seeming to fix the issue. If Im not mistaken though chromium is available in the manjaro repo while chrome is only available via aur, which im guessing may have something to do with it (but i dont know for sure, just a guess). I do hope in one of these next versions of chrome they fix this issue though, but in the meantime my work around is to use chromium for web apps and chrome for access to the good old google account, it seems to be running smooth despite using both of them simultaneously (and im on a 8yr old lenovo G500s i3). Maybe that workaround solution could work for you until Google fixes this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .