Bug 390732 - Cannot add Krusader to favorites in Gnome Dock
Summary: Cannot add Krusader to favorites in Gnome Dock
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.6.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-19 14:42 UTC by jakkubu
Modified: 2018-05-06 00:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jakkubu 2018-02-19 14:42:03 UTC
Ubuntu 17.10 (the one that re-introduced gnome).

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
Comment 1 Nate Graham 2018-02-19 16:26:19 UTC
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:36:18 UTC
Reported to GNOME. Their answer

> 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 ...

I can confirm that setting StartupWMClass=krusader in org.kde.krusader.desktop solves this issue.
Comment 3 jakkubu 2018-02-20 11:42:06 UTC
forget about gnome issue link: https://bugzilla.gnome.org/show_bug.cgi?id=738672
Comment 4 Nate Graham 2018-02-20 20:02:21 UTC
Thanks for that. Adding that line to the desktop file is a pretty simple change. Would you like to tackle it? I bet you can do it!

Documentation is here: https://community.kde.org/Get_Involved/development
Comment 5 jakkubu 2018-02-22 13:02:16 UTC
You wouldn't loose your bet, but I don't want to dig in Phabricator patch making, creating another account etc. If it would be on github - no problem. I really don't have time to get more involved in kde development.
Comment 6 Toni Asensi Esteve 2018-02-22 14:27:25 UTC
> You wouldn't loose your bet, but I don't want to dig in Phabricator patch
> making, creating another account etc. If it would be on github - no problem. I
> really don't have time to get more involved in kde development.

Now you do not have to worry about that :-) , jakkubu: 
https://phabricator.kde.org/D10746

Thank you, if you attach a patch (or attach the new files) in a bug report, other people can perform the rest of the operations for you :-)
Comment 7 Toni Asensi Esteve 2018-02-24 11:39:57 UTC
Thanks, this bug was solved in Krusader (and Jakkubu and Nate Graham appear in the credits :-) ):
https://phabricator.kde.org/R167:0e0f4ae6dd349a14d48e6ae1b80d03dfc8ec72ca