probonopd / go-appimage

Go implementation of AppImage tools
MIT License
680 stars 69 forks source link

Some managed desktop entries stopped working after system update (Fedora 35 KDE) #195

Closed gwerbin closed 2 years ago

gwerbin commented 2 years ago

I had set up Appimaged using appimaged-651-x86_64.AppImage, and it seemed like everything was working. After an update of several packages, oddly some of the desktop entry files became corrupted in a particular way, and I had to edit them manually to fix them.

The problem was that the Exec= invocation became wrapped in an extra layer of quotes. So the entry that should have read

Exec=.../Applications/appimaged-651-x86_64.AppImage wrap ".../Applications/Vial-v0.4.2-x86_64.AppImage"

actually read

Exec=".../Applications/appimaged-651-x86_64.AppImage wrap ".../Applications/Vial-v0.4.2-x86_64.AppImage" "

This caused the desktop entries to fail to start the program, because it thought the entire line was the name of the executable, rather than the full command. Manually editing these entries to remove the extra quote layer fixed the problem.

CalebQ42 commented 2 years ago

So I did a double check of the code and I don't see anything immediately that could have caused it. Just to see if it is in fact AppImaged or something from the update, could you try restarting the appimaged's service (systemctl --user restart appimaged). Restarting your computer should also have the same effect.

Whenever appimaged is started, all desktop files are deleted and re-made, so if you take the steps above and wait a few seconds for it to fully initialize then it should be a new desktop file. If the new desktop files have the extra quotes on the Exec line then I can look into this further.

gwerbin commented 2 years ago

If the new desktop files have the extra quotes on the Exec line then I can look into this further.

I ran systemctl --user restart appimaged, and it does look like the extra layer of quotes has returned!

I wasn't actually expecting to be able to reproduce this, I thought it was going to be a weird one-time issue.

Weirdly, it only happens to some of the managed desktop entries, but not all of them.

CalebQ42 commented 2 years ago

Is it consistently certain AppImages that are having the issue? As in if you restart appimaged is the same applications having the issues. If so, please let me know what they are.

gwerbin commented 2 years ago

Is it consistently certain AppImages that are having the issue? As in if you restart appimaged is the same applications having the issues. If so, please let me know what they are.

I know these two started doing it reliably:

Note that this didn't seem to be an issue before I updated my packages, including the kernel and a few other core packages. So it might still be some kind of adverse interaction with something else on my system. I can try to figure out how to extract the list from a Snapper snapshot.

Note that I do have an appimage file for AppImageLauncher sitting on my system in ~/Applications, but it is not "active" in that its Systemd service is not installed, and it is not running otherwise.

CalebQ42 commented 2 years ago

It does look like an issue with appimaged as I'm having the same issue with those AppImages. I'll try to figure out what's going wrong.

probonopd commented 2 years ago

Thanks for reporting this @gwerbin and thanks for looking into it @CalebQ42.