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

AppImages seem to be integrated but don't show up on my KDE Application Launcher #323

Open
SugarRayLua opened this issue Jan 5, 2025 · 18 comments · May be fixed by #324
Open

AppImages seem to be integrated but don't show up on my KDE Application Launcher #323

SugarRayLua opened this issue Jan 5, 2025 · 18 comments · May be fixed by #324

Comments

@SugarRayLua
Copy link

Thanks for working on this great utility!

I'm on a Ubuntu 24.40 derivative (KDE) x86_64 and followed the directions on this github to install go-appimage daemon (cut and pasted script from github), and the daemon seemed to install fine. I then tried downloading two app images into my Downloads folder, and got a notification that the daemon detected both, but I don't see either listed in my Application Launcher. I rebooted my system a couple of times but still don't see the appimages in my Application Launcher. When I then go to move the appimages I downloaded from my Downloads folder to the trash, the appimmage daemon seems to know I did that and sends a message that they were deleted which would seem to indicate that the daemon has integrated the app images yet still they don't show up in my Application Launcher which is the main feature I was looking for from the appimage daemon.

Any suggestions?

Thanks!

@Samueru-sama
Copy link

Do you have the appimagekit***.desktop files in $HOME/.local/share/applications or $XDG_DATA_HOME/applications?

@SugarRayLua
Copy link
Author

$HOME/.local/share/applications :-)

@Samueru-sama
Copy link

$HOME/.local/share/applications :-)

If the files are there then thats all that appimaged can do. Seems KDE isnt displaying the .desktop files there for some reason

Can you try launching rofi or another app launcher to see if the .deskop files do show up?

@SugarRayLua
Copy link
Author

SugarRayLua commented Jan 7, 2025

Thanks for the suggestion, @Samueru-sama
I looked up rofi but as a novice didn't really understand it so read up more on the desktop file standards and learned that although KDE follows XDG standard for its desktop files, it uses a different launcher than GNOME does to open it and figured there might be some subtle difference because of the different launchers that was preventing the go-appimage created desktop file from being read by KDE application launcher.

I did though find a reference to "dex" which I did understand better, and after I figured out how to install and use that, I was able to have dex create a desktop file for my App Images which the KDE application launcher did recognize and add to the KDE launcher menu. Using the dex method does take more steps (go-appimage is simpler); however, since I don't have that many AppImages to install in my KDE launcher, I'm comfortable using the following steps in dex to install my App Images in my KDE system:

(sudo apt install dex [from repository])

  1. Download AppImage of interest and make executable (e.g. chmod)
  2. Place it in a folder where you'd like to store AppImages (e.g. ~/AppImages)
  3. cd to directory where you'd like desktop file to be installed that will be automatically detected and added to KDE Application Launcher menu (e.g. ~/.local/share/applications)
  4. dex -c /pathToWhereAppImageIsStored (e.g. ~/AppImages/AppImageOfInterest.AppImage)
  5. cd back to folder where AppImage itself is stored and type:
    ./AppImageOfInterest.AppImage --appimage-extract
    That will unsquash the squashfs filesystem into a directory which inside will contain a .DirIcon which is the png for the app
    Rename the .DirIcon as a .png file for step 7) below
    *correction: inside the squashfs it looks like there also might be a folder "icons" that may also have app icon
  6. Go to the KDE Application Launcher and you should see AppImageOfInterest installed on the menu.
    Right-click on the menu item and select "Edit Application"
  7. On the AppImageOfInterest Application window, click on the blank picture (square); that will open a file menu picker, and you can navigate to the .DirIcon (renamed as a .png) and choose that .png to be the icon associated with the installed AppImage on the KDE Application menu

Lots more steps but consistently works for me in my setup for now. Perhaps in the future, I'll get more time to more closely dissect what the differences are between the .desktop files that go-appimage creates and those that dex creates to perhaps determine why the go-appimage .desktop files aren't loading in my KDE Application Launcher

Fyi, and have a good week.

@Samueru-sama
Copy link

I looked up rofi but as a novice didn't really understand

rofi -show-icons -show drun

learned that although KDE follows XDG standard for its desktop files, it uses a different launcher than GNOME does to open it and figured there might be some subtle difference because of the different launchers that was preventing the go-appimage created desktop file from being read by KDE application launcher.

Yeah every DE uses its own application launcher, but all they do is read files in:

$XDG_DATA_HOME/applications
$HOME/.local/share/applications
/usr/local/share/applications
/usr/share/applications

And that's all, if the file is in one of those locations the application launcher has to show them unless of course the .desktop file itself asks to not be shown or the file contains a non existing file in the TryExec= key.

(sudo apt install dex [from repository])
...

Yeah no, the daemon and many other appimage integration tools are made to avoid doing all of that manually.

@probonopd
Copy link
Owner

Yeah no, the daemon and many other appimage integration tools are made to avoid doing all of that manually.

👍

So what is the actual issue with what appimaged does? If we know what needs to be changed, we can change it. Thanks!

@SugarRayLua
Copy link
Author

Thanks, @Samueru-sama , that does makes sense from the XDG .desktop file standards I read. However, it seems that if there is something some subtle in the syntax or options specified in the .desktop file, it seems that the KDE Application refuses to show it in the menu (the desktop file is there, and in the appropriate place and looks good when I open the file in a text editor to my novice eyes) but mentioned that as a novice to debug it further, I'd likely next need to compare the .desktop files that dex creates with what appimaged creates and see if I can tell what that subtle difference might be (at least for KDE Application Launcher to integrate it in the menu). I can do so in the future when I get more downtime on a weekend if that would be helpful.

Right now, @probonopd, appimaged only creates the .desktop file but the KDE Application launcher does not seem to use that .desktop file to integrate the AppImage referenced into the KDE Application launcher.

@Samueru-sama
Copy link

Alright tomorrow I will spin a kubuntu 24.04 wm and see what happens

@SugarRayLua
Copy link
Author

Thank you, @Samueru-sama.

@CalebQ42
Copy link
Contributor

CalebQ42 commented Jan 7, 2025

My guess is that the desktop cache is not being refreshed. Most definitely to not actively monitor the desktop file locations so appimaged tells the desktop to reload its cache after it adds desktop files.

@CalebQ42
Copy link
Contributor

CalebQ42 commented Jan 7, 2025

Can you try running update-desktop-database and see if that causes the launcher entries to show up? If they do, could you please run journalctl --user -eu appimaged | grep update-desktop-database? That should, hopefully give us an idea as to what's breaking.

@Samueru-sama
Copy link

Samueru-sama commented Jan 7, 2025

Just booted a kubuntu 24.04 vm, can't replicate the issue:

image

@SugarRayLua
Copy link
Author

Thank you both @Samueru-sama & @CalebQ42 for checking. Not sure why mine not working unless I'm doing something wrong but seems to be automated that there wouldn't be a lot I could do differently to make mine not work. I had used the update-desktop-database without success. I will aim by the end of this weekend to try again more times and document my exact steps that I used to try and get appimaged to work, the AppImages I tried to install, and the journalctl output. I'd certainly prefer to use an app like appimaged if it works for my system. Although Tuxedo-OS isn't Kubuntu 24.04, I'd think that its KDE Applicaton launcher functionality should work similarly to Kubuntu's.

@Samueru-sama
Copy link

I'd certainly prefer to use an app like appimaged if it works for my system. Although Tuxedo-OS isn't Kubuntu 24.04, I'd think that its KDE Applicaton launcher functionality should work similarly to Kubuntu's.

Try to install rofi and run rofi -show-icons -show drun after you get the appimaged notifications to see if the desktop entries do show up there.

@SugarRayLua
Copy link
Author

SugarRayLua commented Jan 9, 2025

Hi, @Samueru-sama,

I attempted to be more explicit in my debugging attempts to find out why appimaged isn't working in my distro and followed the instructions you suggested to do so. I also decided to use a more standardized AppImage from this site to test:

https://appimage.github.io/apps/
  1. From that list, I chose to download this free test AppImage from its github site:
https://github.com/trixon/yaya/releases/tag/v24.12

(Yahtzee dice game)
and put in my Games folder (~/Games)

  1. Installed appimaged by copying and pasting this script from appimaged github into my terminal:
# Remove pre-existing conflicting tools (if any)
systemctl --user stop appimaged.service || true
sudo apt-get -y purge appimagelauncher || true
[ -f ~/.config/systemd/user/default.target.wants/appimagelauncherd.service ] && rm ~/.config/systemd/user/default.target.wants/appimagelauncherd.service

# Clear cache
rm "$HOME"/.local/share/applications/appimage*

# Optionally, install Firejail (if you want sandboxing functionality)

# Download
mkdir -p ~/Applications
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimaged-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -P ~/Applications/
chmod +x ~/Applications/appimaged-*.AppImage

# Launch
~/Applications/appimaged-*.AppImage
  1. Message result from terminal after installed:
appimaged-860-x86_64.AppImage 214
2025/01/09 01:35:31 Desktop notification:  Not running on one of the supported Live systems This configuration is currently unsupported but may still work, please give feedback.
2025/01/09 01:35:31 main: PATH: /tmp/.mount_appimajcFKFE/usr/bin:/home/mikes/.nvm/versions/node/v22.11.0/bin:/home/mikes/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
This process based on /proc/self/exe: /tmp/.mount_appimajcFKFE/usr/bin/appimaged
Terminating other running processes with that name...
2025/01/09 01:35:31 Deleted 0 desktop files from /home/mikes/.local/share/applications/; use -v to see details
2025/01/09 01:35:31 Probably not launched by systemd (please file an issue if this is wrong)
2025/01/09 01:35:31 Manually launched, not by systemd. Check if enabled in systemd...
2025/01/09 01:35:31 /etc/systemd/user/appimaged.service does not exist
2025/01/09 01:35:31 Creating ~/.config/systemd/user/appimaged.service
2025/01/09 01:35:31 thisai.path: /home/mikes/Applications/appimaged-860-x86_64.AppImage
2025/01/09 01:35:31 /usr/bin/systemctl --user status appimaged
2025/01/09 01:35:31 exit status 3
2025/01/09 01:35:31 Enabling systemd service...
2025/01/09 01:35:31 Starting systemd service...
2025/01/09 01:35:31 appimaged should now be running via systemd. To check this, run
2025/01/09 01:35:31 /usr/bin/systemctl -l --no-pager --user status appimaged
  1. Successfully installed Rofi from my repository (sudo apt install Rofi)

  2. Cut and pasted the YaYa test App Image from my Games folder to my Downloads folder (~/Downloads) where appimaged monitors

Result:
a) appimaged notified me that it added the YaYa test App Image to my system
b) this this time the App Image (YaYa) DID show up in my KDE Application Launcher menu

However, when I clicked on the YaYa App Image menu item in my KDE Application launcher, I would see the YaYa icon "bounce" like it was getting ready to open but nothing would happen

  1. I confirmed that I could launch the YaYa AppImage by going directly to the YaYa AppImage in my Downloads folder and double clicking on the AppImage (opened and ran fine)

  2. I then did what you suggested and tried to use Rofi to launch the YaYa AppImage by entering in my terminal:

rofi -show-icons -show drun

Result
c) The YaYa AppImage showed up in Rofi's list
d) However, when I attempted to launch the YaYa AppImage from its item in the Rofi list, it didn't launch and instead got this message in the terminal:


(process:98652): GLib-CRITICAL **: 02:03:18.204: g_string_insert_len: assertion 'len == 0 || val != NULL' failed

mikes@tuxedo-os:~$
mikes@tuxedo-os:~$ panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1 pc=0x748c81]

goroutine 61 [running]:
gopkg.in/ini%2ev1.(*File).SectionsByName(0x0, {0x2ee313?, 0xc00003e300?})
        gopkg.in/[email protected]/file.go:156 +0x61
gopkg.in/ini%2ev1.(*File).GetSection(...)
        gopkg.in/[email protected]/file.go:137
gopkg.in/ini%2ev1.(*File).Section(0x0, {0x2ee313, 0xd})
        gopkg.in/[email protected]/file.go:175 +0x26
main.findDesktopFilesPointingToExecutable({0x7ffd35b80cdb, 0x30})
        github.com/probonopd/go-appimage/src/appimaged/appwrapper.go:175 +0x4fa
main.checkDesktopFiles({0x7ffd35b80cdb, 0x30})
        github.com/probonopd/go-appimage/src/appimaged/appwrapper.go:189 +0x25
created by main.appwrap in goroutine 1
        github.com/probonopd/go-appimage/src/appimaged/appwrapper.go:37 +0x227

Perhaps my specific Wayland KDE Ubuntu derivative (Tuxedo OS) is different enough that it is not compatible with appimaged?

Fyi.

Thanks!

@CalebQ42
Copy link
Contributor

CalebQ42 commented Jan 9, 2025

It looks like it's mostly working now, but there is a bug in appimaged that's preventing the app from launching that I can look into.

@SugarRayLua
Copy link
Author

Thank you very much, @CalebQ42.

CalebQ42 added a commit to CalebQ42/go-appimage that referenced this issue Jan 9, 2025
@CalebQ42 CalebQ42 linked a pull request Jan 9, 2025 that will close this issue
@CalebQ42
Copy link
Contributor

CalebQ42 commented Jan 9, 2025

Submitted a PR that should fix new issue. It seems to come from one of your desktop files (not necessarily one made by appimaged) is malformed. I wonder if there's some correlation between that and your previous issue, but then again why would your previous issue be fixed now...

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

Successfully merging a pull request may close this issue.

4 participants