anyrun-org / anyrun

A wayland native, highly customizable runner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apps that have a desktop entry in `.local/share/applications` display as a duplicate

MathisP75 opened this issue · comments

These apps have a desktop entry in .local/share/applications that is made to overwrite the one in /usr/share/applications (for electron flags), but anyrun displays both of them.
image
image

Are the values for the Icon entry in the overriding desktop file the same as the system one? The way that the application plugin overrides system desktop files is by inserting user directory ones on top of system ones when a concatenation of the value for the Name and Icon entry are exactly the same.

The way the freedesktop spec for the Icon entry works is that two different values for the Icon entry can resolve to the same absolute path, but the way that anyrun-application implements overriding, this is not considered as a match. I don't think there is any actual standard for how overriding desktop files is supposed to be determined (at least I couldn't find any) so the current implementation is not technically wrong or anything.

The name of the icon and the name of the desktop entry are the exact same for all of the apps that appear twice.

Sorry for the late reply, I couldn't reproduce this on master with these two files:
/usr/share/applications/obsidian.desktop

[Desktop Entry]
Name=Obsidian
Exec=/usr/bin/obsidian %U
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

~/.local/share/applications/obsidian.desktop

[Desktop Entry]
Name=Obsidian
Exec=env OBSIDIAN_USE_WAYLAND=1 obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland %U
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

What do your files look like?

/usr/share/applications/obsidian.desktop:

[Desktop Entry]
Name=Obsidian
Exec=env DESKTOPINTEGRATION=false /usr/bin/obsidian %u --no-sandbox %U
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
X-AppImage-Version=1.2.8
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

~/.local/share/applications/obsidian.desktop:

[Desktop Entry]
Name=Obsidian
Exec=env DESKTOPINTEGRATION=false /usr/bin/obsidian %u --enable-features=UseOzonePlatform --ozone-platform-hint=wayland
Terminal=false
Type=Application
Icon=obsidian
StartupWMClass=obsidian
X-AppImage-Version=1.1.15
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;

I will try copying yours to see if it makes a difference.

After messing around, I found out that this is caused by having the libapplications.so plugin in the plugins folder.

Ah that makes sense, seems like you had an older version of the plugin being used.