AppImages launch from terminal but not with .desktop file or clicking
by A_Pengu from LinuxQuestions.org on (#6DK8X)
As title. I have tried this with Bitwarden, Obsidian, Joplin, and Audacity AppImages. The behavior is the same. On the first run, everything runs perfectly, but after a reboot, it doesn't.
The .desktop files are obtained from running the AppImage with --appimage-extract. The AppImages all have execution permission. If I excute the .desktop files or double-click on the AppImages to execute, they start loading and then crash. (Without showing a window. Also, the crash takes longer than just for the AppImage to normally boot up and run.)
However, if I open the terminal and run the AppImages, nothing goes wrong. In fact, if I copy the exec line from the .desktop file directly into the terminal and run, it also runs perfectly.
How is this possible? Why would executing the command in the terminal work, but executing the command in a desktop file crashes? And how would I debug this issue since terminal execution works perfectly fine?
EDIT:
If I put the path to the AppImage in a bashscript, and attempt to run the bashscript by double-clicking it, nothing happens. But if I open a termianl and run the bashscript, everything works perfectly.
The .desktop files are obtained from running the AppImage with --appimage-extract. The AppImages all have execution permission. If I excute the .desktop files or double-click on the AppImages to execute, they start loading and then crash. (Without showing a window. Also, the crash takes longer than just for the AppImage to normally boot up and run.)
However, if I open the terminal and run the AppImages, nothing goes wrong. In fact, if I copy the exec line from the .desktop file directly into the terminal and run, it also runs perfectly.
How is this possible? Why would executing the command in the terminal work, but executing the command in a desktop file crashes? And how would I debug this issue since terminal execution works perfectly fine?
EDIT:
If I put the path to the AppImage in a bashscript, and attempt to run the bashscript by double-clicking it, nothing happens. But if I open a termianl and run the bashscript, everything works perfectly.