After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738672 - Unable to favorite some applications in gnome-shell dock
Unable to favorite some applications in gnome-shell dock
Status: RESOLVED NOTGNOME
Product: gnome-shell
Classification: Core
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2014-10-17 09:08 UTC by Mildred
Modified: 2018-05-22 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mildred 2014-10-17 09:08:45 UTC
There are few application that can't be favorited once running. These are the applications that don't have a registered .desktop file.

Steps to reproduce:

- download an application from the developper website. Don't choose a distribution package, but rather a cross-distro built executable.

- uncompress the archive, go to the directory, and start the executable

- the application appears on the desktop and on the dock

- right-clicking on the icon on the dock doesn't have the option to favourite the application. It is thus impossible to have an easy access to it.

Expected behaviour:

- The menu should have a "Add to favorites" entry
- This should create a .desktop entry file with the application icon and pointing to the application executable. The .desktop entry should be added to favorites.

Use cases: my distribution can't package all applications out there, I should be able to download some from the developper website and have a seamless user experience.

Example of such applications:

- Firefox: https://www.mozilla.org/en-US/firefox/new/
- Tox IM: https://wiki.tox.im/Binaries#Other_Linux

Currently, developpers don't create much of those packages because of the less than optimal integration with desktop environments. If desktop environments start to allow integration of those apps, developpers would be encouraged to provide easy access to their applications by providing cross-distro precompiled binaries.
Comment 1 jakkubu 2018-02-20 11:06:33 UTC
The same problem with Krusader.

Gnome 3.26.2 in Ubuntu 17.10 (the one that re-introduced gnome). 

Filed a bug report in Krusader, but they say it should be resolved in gnome:
https://bugs.kde.org/show_bug.cgi?id=390732

> I wasn't able to add Krusader to favorites in dock (usually it can be done via right click on dock icon). I manage to do it via results in gnome overview, but didn't work as expected (hitting shortcut always creates new Krusader instance instead going to already opened one).

> Changing org.kde.krusader.desktop to krusader.desktop solves all these issues. 

> Probably (I didn't check it) instead of renaming .desktop file you could rename krusader's binary. Find it here: https://unix.stackexchange.com/questions/58824/how-do-i-add-eclipse-to-my-gnome-shell-favorites/59654#59654

Their answer: 

> That is not an appropriate change. The desktop file *should* match the AppStream ID. The AppStream ID is org.kde.krusader.desktop (https://cgit.kde.org/krusader.git/tree/krusader/org.kde.krusader.appdata.xml#n3), so the Desktop file needs the same filename. If GNOME or the Dock extension you're using can't handle the binary bding named something different from the AppStream ID, that's a problem there (though I doubt it, since GNOME programs tend to be good citizens and all use the same naming conventions that we do, e.g. Nautilus is org.gnome.nautilus).

> Please report this to GNOME.
Comment 2 jakkubu 2018-02-20 11:10:26 UTC
fixed the formatting of previous comment:

The same problem with Krusader.

Gnome 3.26.2 in Ubuntu 17.10 (the one that re-introduced gnome). 

Filed a bug report in Krusader, but they say it should be resolved in gnome:
https://bugs.kde.org/show_bug.cgi?id=390732

> I wasn't able to add Krusader to favorites in dock (usually it can be done 
via right click on dock icon). I manage to do it via results in gnome overview,
but didn't work as expected (hitting shortcut always creates new Krusader 
instance instead going to already opened one).

> Changing org.kde.krusader.desktop to krusader.desktop solves all these issues. 

> Probably (I didn't check it) instead of renaming .desktop file you could 
rename krusader's binary. Find it here: 
https://unix.stackexchange.com/questions/58824/how-do-i-add-eclipse-to-my-gnome-shell-favorites/59654#59654

Their answer: 

> That is not an appropriate change. The desktop file *should* match 
the AppStream ID. The AppStream ID is org.kde.krusader.desktop 
(https://cgit.kde.org/krusader.git/tree/krusader/org.kde.krusader.appdata.xml#n3),
so the Desktop file needs the same filename. If GNOME or the Dock extension 
you're using can't handle the binary bding named something different from 
the AppStream ID, that's a problem there (though I doubt it, since GNOME 
programs tend to be good citizens and all use the same naming conventions 
that we do, e.g. Nautilus is org.gnome.nautilus).

> Please report this to GNOME.
Comment 3 Florian Müllner 2018-02-20 11:14:19 UTC
It's not that the desktop file cannot be called 'org.kde.krusader.desktop', it's that we need a way to associate a window with the file.

Considering that it is strongly recommended that .desktop files follow the reverse-DNS patter (that is, 'org.kde.krusader.desktop' is *better* than 'krusader.desktop'), these are better alternatives:

 - set the window's WM_CLASS to 'org.kde.krusader'
 - add 'StartupWMClass=krusader' to the .desktop file

Or if the KDE developers give us some other way to match windows to .desktop files, we can consider adding it. But as it is, the ball is in their court ...
Comment 4 Toni Asensi Esteve 2018-02-24 11:41:27 UTC
Thanks, Florian. Consequently, today a change was made in Krusader (and Florian and Jakkubu appear in the credits :-) , thank you all):

https://phabricator.kde.org/R167:0e0f4ae6dd349a14d48e6ae1b80d03dfc8ec72ca
Comment 5 Keith Myers 2018-05-20 22:53:36 UTC
I added myself to the buglist.  I can't favorite the BOINC Manager to the dock. I have always been able to do so on Ubuntu 16.04 Unity Desktop Manager so this issue cropped up just now with Ubuntu 18.04 and Gnome Desktop Manager.
Comment 6 Florian Müllner 2018-05-21 09:47:37 UTC
As in the previous case, the issue is that the application doesn't provide us with enough information to link its windows to its .desktop file.
Comment 7 Keith Myers 2018-05-21 16:02:46 UTC
I successfully made a desktop file for boincmgr and could then dock it.  But the application does not launch the client, only an empty Manager window.

This all work just fine in Unity and 16.04.  So something has changed in how desktop files work.
Comment 8 Florian Müllner 2018-05-21 16:46:18 UTC
(In reply to Keith Myers from comment #7)
> This all work just fine in Unity and 16.04.  So something has changed in how
> desktop files work.

First, "how desktop files work" hasn't changed, *your desktop* changed from a produce called "Unity" to a product called "GNOME".

And yes, the heuristics for matching windows to the corresponding .desktop files are different in gnome-shell and libbamf (used by Unity). For instance, the latter also matches the launching process against the Exec field in .desktop files. We decided early on that we would *not* adopt that in GNOME, because it's a fairly messy heuristic (just take a look at the black- and whitelist options in https://bazaar.launchpad.net/~unity-team/bamf/trunk/view/head:/src/bamf-matcher.c#L56 (and how "newer" stuff like "pkexec" and "flatpak" are missing)).
Comment 9 Keith Myers 2018-05-21 17:19:42 UTC
So how do I get the ability to Dock my most often used application?
Comment 10 Florian Müllner 2018-05-21 17:28:14 UTC
Ask the developers of your most used application to provide an appropriate .desktop file that can be correctly associated with the app's open windows.
Comment 11 Keith Myers 2018-05-22 00:26:56 UTC
Well you are no help. Both you and the BOINC developers say the problem lies with the other.  BOINC has not changed any code.  It works fine in all previous distributions.  It works fine in 18.04 with Unity desktop manager.
Comment 12 Florian Müllner 2018-05-22 01:45:26 UTC
(In reply to Keith Myers from comment #11)
> Well you are no help.

To be fair, you haven't provided much information that would allow me to help you.

(In reply to Keith Myers from comment #11)
> It works fine in all previous distributions.

Oh, do you mean it worked with older GNOME versions? Which versions/distributions?

>  It works fine in 18.04 with Unity desktop manager.

Sigh - again, I'm not disputing this, but it is completely irrelevant. It is like answering "I cannot pin BOINC to the dash" with "Oh, but I can pin Firefox just fine". It's true, but it's also comparing apples and oranges ...
Comment 13 Keith Myers 2018-05-22 03:13:12 UTC
I can't vouch personally whether earlier distributions with Gnome desktop manager worked.  I have only ever used Unity.

However the developer of the Linux/MAC BOINC application HAS checked BOINC on every distribution back to 12.04 through 17.10 and KDE/Gnome/Unity desktop managers and said BOINC has worked normally always.

He is only just recently fighting with the most recent MAC release which is causing troubles.
Comment 14 jakkubu 2018-05-22 07:26:42 UTC
Florian - can you provide link to the discussion with Linux/MAC BOINC developer?

(In reply to Keith Myers from comment #7)
> I successfully made a desktop file for boincmgr and could then dock it.  But
> the application does not launch the client, only an empty Manager window.

It may be connected to other bug - https://groups.google.com/a/ssl.berkeley.edu/forum/#!topic/boinc_alpha/17XrXDk71XE

So the .desktop file may work well, but then you hit another bug.
Comment 15 Florian Müllner 2018-05-22 09:23:03 UTC
(In reply to jakkubu from comment #14)
> Florian - can you provide link to the discussion with Linux/MAC BOINC
> developer?

Which discussion? There's some general advice about application requirements in the wiki[0], for most apps it boils down to either

 - having windows' WM_CLASS property match the .desktop file name (without the file extension)

 - setting the StartupWMClass field in the .desktop file to the WM_CLASS windows will use

(Although I'm surprised that this supposedly used to work in GNOME, as there haven't been any fundamental changes in years)

For less abstract advice, I'd need more information, like the .desktop file that we fail to match (both filename and contents, ideally with translations stripped for legibility) and the output of `xprop | grep WM_CLASS` for a window cannot be pinned.

[0] https://wiki.gnome.org/Projects/GnomeShell/ApplicationBased
Comment 16 jakkubu 2018-05-22 12:29:35 UTC
Sorry Florian - actually I wanted to ask Keith about this link. 

So:
Keith - can you provide link to the discussion with Linux/MAC BOINC developer?
Comment 17 Keith Myers 2018-05-22 17:44:31 UTC
I am not in contact with the repository BOINC Linux developer,Gianfranco Costamagna.  I am in contact with TBar who compiles the BOINC source code from the Github source tree for MAC and the special application versions.

My discussions have been through PM messages on the Seti forum so I can't provide a link.