linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.58k stars 746 forks source link

Consistent pinning support in GWL #7974

Open jaszhix opened 6 years ago

jaszhix commented 6 years ago

Moved from jaszhix/icingtaskmanager#229, @smurphos wrote: #

Hi jaszhiz,

There a are a few inconsistencies in the way ITM handles flatpak app pinning when there is also a debian packaged version of the app installed which I hope can be resolved and also included in the fork ADW for Cinnamon 4. This issue is also partly prompted by this 18.3 users experience with snap package pinning - https://github.com/jaszhix/icingtaskmanager/issues/228, which was also raised on the Mint forum. I'm not sure if the same underlying issues cause the inconsistency with snap.

For this testing I've used VLC

Preinstalled version is 3.03 - desktop file is usr/share/applications/vlc.desktop

Flatpak version is 3.04 - desktop file is /var/lib/flatpak/app/org.videolan.VLC/current/active/export/share/applications/org.videolan.VLC.desktop There is also a symlink in /var/lib/flatpak/exports/share/applications/org.videolan.VLC.desktop

Test 1 - Launch VLC flatpack from the menu, right click on icon and select pin to panel. Result - vlc.desktop is pinned Preferred result - org.videolan.VLC.desktop should be pinned.

Test 2 - Right click Flatpak VLC in menu and select add to panel. Result - org.videolan.VLC.desktop is pinned Launching from the pinned icon launches the correct version of VLC but another VLC icon is added to ITM, it doesn't group/count the window under the pinned org.videolan.VLC.desktop Preferred result - Correct grouping of the window.

Test 3 - Use the menu editor to rename the Flatpack VLC entry to VLC Flatpak. This creates a new desktop file - _/.local/share/applications/org.videolan.VLC.desktop Repeat test 1 - same result Repeat test 2 - same result

Test 4 - Use the menu-editor to create a new user added menu entry targeting the flatpak version. Repeat test 1 - same result Repeat test 2 - same result

Test 5 - Use a different flatpak without a corresponding debian installed version. I used Oomox for testing - desktop file is /var/lib/flatpak/app/com.github.themix_project.Oomox/current/active/export/share/applications/com.github.themix_project.Oomox.desktop with a symlink in /var/lib/flatpak/exports/share/applications/com.github.themix_project.Oomox.desktop

Retried test 1 - works fine with no unexpected results. Retried test 2 - works fine with no unexpected results.

Contents of org.videolan.VLC.desktop https://pastebin.com/wme6TLp1 Contents of vlc.desktop https://pastebin.com/1ey72Hv4

jaszhix commented 6 years ago

Similar behavior is also occurring with the menu. From the original issue

I'm finding a bug in the menu where I can't even launch the Flatpak version of the app if the Debian version is running and vice versa. More people can analyze it there, and a proper solution probably won't exist in applet code.

In this case GIMP 2.8 and GIMP 2.10, installed via mintinstall.

smurphos commented 6 years ago

Yep, menu launching bug reproduced for me with VLC. If i add both launchers to the desktop the bug also occurs trying to run from there.

Workaround - amend the command line for the flatpack launcher from....

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/vlc --file-forwarding org.videolan.VLC --started-from-file @@u %U @@

to

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=/app/bin/vlc --file-forwarding org.videolan.VLC

and the debian vlc launcher from

/usr/bin/vlc --started-from-file %U

to

/usr/bin/vlc

They can both be launched and run at the same time.

This isn't Cinnamon specific - the menu / desktop launcher bug is reproducible in Mate 19 and fixable with the same workaround.

smurphos commented 6 years ago

For VLC the menu / desktop bug is by design - VLC defaults to preventing running a 2nd instance when launched with the ----started-from-file parameter - https://wiki.videolan.org/VLC_command-line_help/

I've done some testing with GIMP - GIMP also appears to prevent 2nd instances by default when launched with the %U parameter. E.g i can't have two instances of debian gimp launched from the menu / desktop. Nor can I have both debian gimp and flatpack gimp launched from the desktop/.

Interestingly GIMP debian/flatpack does not have the same problems with ITM/GWL as VLC debian/flatpack described in the original issue. I can't work out why.

smurphos commented 5 years ago

https://forums.linuxmint.com/viewtopic.php?f=90&t=285644&p=1579904#p1579454

An example of some weirdness in getting a couple of snaps to pin. Despite the desktop files being in var/lib/snapd/desktop and this path being in $XDG_DATA_DIRS the user had to copy the desktop files into ~.local/share/applications to get the pin option to show in the context menu.

LinuxOnTheDesktop commented 5 years ago

I tried to pin the flatpak of KSystemLog and I could not - not even having created a launcher.

If the Grouped Window List Applet is to remain in Mint (and it should, for it provided basic functionality) then, if I may say so, it needs a maintainer - and I think it lacks one at the moment.

ghost commented 5 years ago

@clefebvre Can you please unban my account so I can unsubscribe from these threads? Linux Mint issues are congesting my Github feed. Thanks.

MenthaSuaveolens commented 4 years ago

LM 19.3 - all updates installed

Gimp-issue is partially fixed, but the issue still happens when GIMP is started from Xviewer!

Steps to reproduce

  1. Open Nemo and display image with Xviewer 2.4.3
  2. In Xviewer : Open image with GIMP => New temp pin is created (see screenshot) DoubleGimpEntries