In KDE plasma 5, how to I create standalone launchers/desktop shortcuts to web apps like gmail?

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]
Comment=
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=hlomdbnjeagldabepchlcdhkaagfedim && xdotool search --sync --classname crx_hlomdbnjeagldabepchlcdhkaagfedim set_window --class crx_hlomdbnjeagldabepchlcdhkaagfedim
Icon=chrome-hlomdbnjeagldabepchlcdhkaagfedim-Default
Name=Outlook 365
NoDisplay=false
Path[$e]=
StartupNotify=true
StartupWMClass=crx_hlomdbnjeagldabepchlcdhkaagfedim
Terminal=0
TerminalOptions=
Type=Application
Version=1.0
X-KDE-SubstituteUID=false
X-KDE-Username=

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.


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