snapcrafters / brave

Brave browser for Desktop and Laptop computers running Linux
MIT License
10 stars 14 forks source link

".desktop" file needs to be named correctly #4

Open OpenSourceAnarchist opened 6 years ago

OpenSourceAnarchist commented 6 years ago

On Solus (a Linux distro), I have installed Brave using snap.

I couldn't get Brave to pin to the panel in Budgie (the Desktop Environment). After inquiring about it, I found out the name of the generated ".desktop" file (for me it is located in /var/lib/snapd/desktop/applications) needs to match with the window's WM_Class(string).

For Brave, this string is "brave," while the generated file is named "brave_brave.desktop," which can be easily renamed but I believe will be replaced upon an update to Brave.

I assume other Desktop Environments adhere to this standard also, as Budgie is derived from GNOME 3.

flexiondotorg commented 6 years ago

Can you list the content of the following directory please:

ls -l /snap/brave/current/usr/share/applications/
OpenSourceAnarchist commented 6 years ago

That's very interesting...

I got: total 1 -rw-rw-r-- 1 root root 347 Sep 14 06:06 brave.desktop -rw-r--r-- 1 root root 220 Nov 17 2016 python3.5.desktop

All I know is changing the name of the file in "/var/lib/snapd/desktop/applications" allowed me to pin the application to the panel. If this helps, the only file that has an associated "brave logo" (lion's head) is the one at "/var/lib/snapd/desktop/applications." I saw two other "brave.desktop" files, both in the "/snap/brave.../" directories, and they only show a generic icon. I assume other GNOME DEs would have similar results as well.

flexiondotorg commented 6 years ago

@TheMarketAnarchist Is this still an issue?

0xBRM commented 6 years ago

@flexiondotorg Yes. I just stumbled upon this workaround.