Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ulauncher can't find Joplin appimage. #792

Closed
ThomasDNguyen opened this issue Aug 25, 2021 · 10 comments
Closed

Ulauncher can't find Joplin appimage. #792

ThomasDNguyen opened this issue Aug 25, 2021 · 10 comments

Comments

@ThomasDNguyen
Copy link

Steps to reproduce

  1. Open Ulauncher.
  2. Search for Joplin (Appimage).

Current behavior

For some reason, Ulauncher can't find the Joplin appimage. This is strange since I have another appimage (App Outlet) on my system and Ulauncher can find that app. Both are installed using AppImageLauncher.

Expected behavior

Ulauncher finds all appimages on the system.

Environment

Ulauncher version: latest from ubuntu ppa.
Linux distro: Kubuntu 21.04
Desktop environment: KDE Plasma 5.21.4

@friday
Copy link
Member

friday commented Aug 25, 2021

Does it show in other launcher/menu apps/widgets? We try to follow the XDG specs and can't help it if a package doesn't do their part.

@ThomasDNguyen
Copy link
Author

ah sorry for not including that info. Yes, Joplin does show up on other launchers/menus (both from the application dashboard/launcher/menu and Kubuntu's Krunner.

@friday
Copy link
Member

friday commented Aug 26, 2021

If you run this command, what does it say:

python -c "from xdg.BaseDirectory import xdg_data_dirs; print(xdg_data_dirs)"

For me it shows ['~/.local/share', '/usr/local/share', '/usr/share']. Those are the standard user data dirs I think.

And do you know the location the appimage places the desktop entry? It probably installs it to one directly for Joplin specifically and symlinks all desktop entries to another place? It should be in a subdirectory of the xdg_data_dirs

@ThomasDNguyen
Copy link
Author

ThomasDNguyen commented Aug 27, 2021

Hi, sorry for the late reply. Here are the dirs in my $XDG_DATA_DIRS:
['/home/thomas/.local/share', '/usr/share/plasma', '/home/thomas/.local/share/flatpak/exports/share', '/var/lib/flatpak/exports/share', '/usr/local/share', '/usr/share']
-> All the standard user data dirs are included.
.
I believe AppImageLauncher creates all of its .desktop files in ~/.local/share/applications/. It seems that both App Outlet and Joplin's .desktop files are in this dir yet only App Outlet can be found by Ulauncher.

@friday
Copy link
Member

friday commented Aug 28, 2021

Since I can't test this myself I have to put the debugging on you unfortunately. If you figure out where exactly the file is and what it contains it could be possible for me to figure out the problem from there, but without this information I'd have to go through a ton of work, and I don't have the time for that.

@ThomasDNguyen
Copy link
Author

Ok, I've done some research on AppImageLauncher: basically, it moves the .Appimage file to a specified location (default ~/Application), make it executable, and creates the .desktop file in ~/.local/share/applications/. If this whole process stops here then Ulauncher indeed is able to find the Appimage. However, for Joplin specifically, the app, for some reason, doesn't have an icon -> Which is why I proceeded to give it one manually (by Right click -> Properties then choose an icon) -> this lead to a condition where Ulauncher can still find Joplin but is unable to invoke the app -> After a reboot, Ulauncher can no longer find Joplin.
.
This behavior is reproducible 100% of the time. I have no idea why Joplin isn't shipped with an icon (yet the icon is in my system and is searchable) or if my system somehow refuses to display its icon or why Ulauncher fails to find the appimage after the user manually added an icon to it.
.
If you'd like me to test/debug anything else please just ask. I quite like Appimages and I'm also a fan of Ulauncher (it strikes the perfect balance between looking elegant/aesthetic and being highly customizable + functional) therefore I really hope to help improve Ulauncher seamlessly integrate into more user's setup (otherwise I could've easily written a .desktop file into /usr/share/applications/ and Ulauncher can find the app there 100% of the time lol).
Thank you for such a great app btw.

@ThomasDNguyen
Copy link
Author

ThomasDNguyen commented Aug 28, 2021

Ok, I think I found out why Ulauncher couldn't find Joplin after I manually added an icon to it. This is the .desktop file of Joplin before and after manually adding icons:

Before manually adding an icon:

[Desktop Entry]
Name=Joplin (2.3.5)
Exec=/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage %U
Terminal=false
Type=Application
Icon=appimagekit_dba797216f7b38026b6de3d68264318f_joplin
StartupWMClass=Joplin
X-AppImage-Version=2.3.5
Comment=Joplin for Desktop
Categories=Office;

TryExec=/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage
X-AppImage-Old-Icon=joplin
X-AppImage-Old-Name=Joplin
X-AppImage-Identifier=dba797216f7b38026b6de3d68264318f
Actions=Remove;
X-AppImageLauncher-Version=2.2.0 (git commit 0f91801), built on 2020-09-29 21:36:15 UTC

[Desktop Action Remove]
Name=Remove AppImage from system
Icon=AppImageLauncher
Exec=/usr/lib/x86_64-linux-gnu/appimagelauncher/remove "/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage"
Name[ast]=Desaniciar AppImage del sistema
Name[cs]=Odebrat AppImage ze systému
Name[de]=AppImage vom System entfernen
Name[en]=Remove AppImage from system
Name[es]=Eliminar Appimage del Sistema
Name[fr]=Supprimer l'AppImage du système
Name[it]=Rimuovi AppImage dal sistema
Name[nl]=AppImage deïnstalleren
Name[pl]=Usuń AppImage z systemu
Name[pt]=Remover AppImage do sistema
Name[pt_PT]=Remover AppImage do sistema
Name[ru]=Удалить AppImage из системы
Name[zh_Hans]=从系统中移除 AppImage

After adding icon:

[Desktop Action Remove]
Exec=/usr/lib/x86_64-linux-gnu/appimagelauncher/remove "/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage"
Icon=AppImageLauncher
Name[en_US]=Remove AppImage from system
Name=Remove AppImage from system
Name[ast]=Desaniciar AppImage del sistema
Name[cs]=Odebrat AppImage ze systému
Name[de]=AppImage vom System entfernen
Name[es]=Eliminar Appimage del Sistema
Name[fr]=Supprimer l'AppImage du système
Name[it]=Rimuovi AppImage dal sistema
Name[nl]=AppImage deïnstalleren
Name[pl]=Usuń AppImage z systemu
Name[pt]=Remover AppImage do sistema
Name[pt_PT]=Remover AppImage do sistema
Name[ru]=Удалить AppImage из системы
Name[zh_Hans]=从系统中移除 AppImage

[Desktop Entry]
Actions=Remove;
Categories=Office;
Comment[en_US]=Joplin for Desktop
Comment=Joplin for Desktop
Exec=/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage %U
GenericName[en_US]=
GenericName=
Icon=appimagekit_dba797216f7b38026b6de3d68264318f_@joplinapp-desktop
MimeType=
Name[en_US]=Joplin (2.3.5)
Name=Joplin (2.3.5)
Path=
StartupNotify=true
StartupWMClass=Joplin
Terminal=false
TerminalOptions=
TryExec=/home/thomas/Applications/Joplin-2.3.5_eb68d86a4fe7320765757a8d04862b4a.AppImage
Type=Application
X-AppImage-Identifier=dba797216f7b38026b6de3d68264318f
X-AppImage-Old-Icon=joplin
X-AppImage-Old-Name=Joplin
X-AppImage-Version=2.3.5
X-AppImageLauncher-Version=2.2.0 (git commit 0f91801), built on 2020-09-29 21:36:15 UTC
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

.
For some reason, it's been changed quite a bit... which probably lead Ulauncher to fail to read the .desktop file?

@ThomasDNguyen
Copy link
Author

While this is indeed a strange behavior, I believe the causation lies in Joplin appimage icon not displaying properly. I will continue to investigate over at laurent22/joplin#3529 and close this issue for now. I'll come back with an update if anything interesting comes up so If any future user encounters this problem they might have a proper explanation.

@friday
Copy link
Member

friday commented Aug 28, 2021

Thank you! Nice investigation work. We probably should handle this better on our end too though, so I'll reopen the issue if you don't mind?

I'm thinking we could default to some "Icon missing" icon, in case there isn't any icon. I think the Desktop Entry is actually invalid if the icon is missing, but not showing the app at all makes it hard to understand how to fix the issue

@friday friday reopened this Aug 28, 2021
@friday
Copy link
Member

friday commented Apr 29, 2022

I have now documented this in the troubleshooting: #991 (comment)

KDE produces some invalid desktop entries that the GTK APIs can't read.

@friday friday closed this as completed Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants