Skip to content

Use $APPIMAGE for autostart entry when running as AppImage - #4866

Open
someone-ua wants to merge 1 commit into
flameshot-org:masterfrom
someone-ua:appimage_autoload
Open

Use $APPIMAGE for autostart entry when running as AppImage#4866
someone-ua wants to merge 1 commit into
flameshot-org:masterfrom
someone-ua:appimage_autoload

Conversation

@someone-ua

Copy link
Copy Markdown

When Flameshot runs as an AppImage, "flameshot" is not on PATH and QCoreApplication::applicationFilePath() points at the temporary squashfs mount, which disappears once the AppImage exits. Use the $APPIMAGE environment variable as the Exec path when set, falling back to "flameshot" otherwise, so the generated autostart .desktop file keeps working after reboot.

When Flameshot runs as an AppImage, "flameshot" is not on PATH and
QCoreApplication::applicationFilePath() points at the temporary
squashfs mount, which disappears once the AppImage exits. Use the
$APPIMAGE environment variable as the Exec path when set, falling
back to "flameshot" otherwise, so the generated autostart .desktop
file keeps working after reboot.
@mmahmoudian

Copy link
Copy Markdown
Member

I understand the code logic and it make sense [1], but I'm not sure if it works. Have you tested this yourself?

  1. https://docs.appimage.org/packaging-guide/environment-variables.html

@mmahmoudian mmahmoudian added the AppImage Issues related to AppImage label Aug 9, 2026
@someone-ua

Copy link
Copy Markdown
Author

Yes, I have tested it. It works. There is now actual path to .AppImage in .desktop file so autostart works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AppImage Issues related to AppImage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants