Support for AppImages managed by appimaged #567
+24
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A quick addition that enables Resources to pick up the correct data for AppImages managed by appimaged.
appimaged is the official AppImage management daemon, and it has some neat functionality like automatically registering installed AppImages, automatically updating supported AppImages, and integrations with Firejail. To do so, it needs to know when AppImages are launched, so it injects itself into the
Execfield in the generated desktop files which causes Resources to mistakenly associate every AppImage process with whichever generated desktop file it finds first.The PR does the following:
process_data::Containerization::AppImage.APPIMAGEenvironment variable.X-AppImage-Identifierkey (part of appimaged and libappimage).X-ExecLocationkey created by appimaged when present.I realize that parsing the entire environment to determine if a process is an AppImage is somewhat expensive but it seems to be the only 100% robust way to verify (since they can be renamed to remove the
.AppImagesuffix and the cmdline doesn't reference appimaged at all). If you think that there's a better way to do this then I'm open to suggestions, but it doesn't seem to significantly increase the CPU utilization on my system so I think it's fine.