Hello :) Anyone know why I can't add those Electron apps to Favorites in Gnome Shell?
3 Answers
I've been able to make a shortcut to Franz by creating a .desktop file and registering it in dconf. There's a problem though that when the app is launched there appears and other icon and the favorite icon isn't the active one. You're stuck with two icons but maybe there's someone out there who can help on this point. Following the instruction on how to make a .desktop file I added the following lines to the file:
[Desktop Entry]
Encoding=UTF-8
Name=Franz
Exec=/opt/Franz/Franz
Icon=/opt/Franz/resources/app.asar.unpacked/assets/franz.svg
Type=Application
Categories=Development;
...and then copied it over to /usr/share/applications.
In dconf Editor I navigated to org.gnome.shell and added franz.desktop to the array in the manner described here, like:
, 'franz.desktop'
(mind the space after the comma)
-
I'm not sure if it's resolved my problem, but I just figured out that Electron apps should be in /opt/ folder to be able to add as favorite and fint it on dash. Thanks for the help :)– euDennisSep 10, 2016 at 18:06
-
Nice! Adding it with dconf Editor to the array did the trick. Creating the .desktop file was not sufficient in my case on Ubuntu 18 for DataGrip and PHPStorm (start shell scripts). Don't know why adding a shortcut must be that complicated in 2021...– dompieJul 23, 2021 at 7:37
I have the same problem, only for electron apps. i use https://github.com/jiahaog/nativefier to create webapps on my system, but the selfmade .desktop files always open up in a new icon
I Have the same problem, my solution is simple.
File Desktop Entry
[Desktop Entry]
Comment=WhatsApp for Linux.
Exec=/opt/whatsapp/whatsapp
GenericName=WhatsApp for Linux.
Icon=/opt/whatsapp/resources/app/icon.png
Name=WhatsApp
Categories=Network
Type=Application
StartupWMClass=whatsapp-nativefier-7bbd2c
Terminal=false
StartupNotify=true
To fix this issue you need to change the StartupWMClass value inwhatsapp.desktop file.
$ xprop WM_CLASS
place the crosshair on the WhatsApp window. You will get something of the type whatsapp-nativefier-7bbd2c in the terminal, change the original value on
StartupWMClass=
with this in the whatsapp.desktop file.
Following the instruction on THIS POST