-
Notifications
You must be signed in to change notification settings - Fork 557
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
AppImage: automatically detect profile #4355
Comments
I always thought that this is not possible because an AI can have any name and the notation often varies (e.g. KeePassXC vs. keepassxc). Do the most AI have a consistent name inside? |
I don't know enough about AppImages. Maybe a profile name could be determined heuristically via the AppImage filename?
Edit: But you are right, with mixed cases in the name, it's probably difficult to find the right profile. But maybe it could work for some cases. If |
I think that the only way to properly detect the declared program name would be The good news is that the specification says that every image should
The name of this file could be used to determine the profile, just like But do note that an AppImage may have a .desktop file named in any way (and Now, the issue is in how to properly and reliably extract the contents of an
According to the author in the issue above, it's already possible with
The problem with this approach is that it requires downloading and running And AFAICT AppImageKit is not packaged on Arch/Artix, not even in the AUR, So these are the alternatives that I thought of:
|
So, I just found this: From README.md:
From README:
The project at least exists in the AUR: If this would be considered good enough for now, firejail could try detecting |
Actually this does not really work because of names like org.gnome.Maps.desktop or mozilla-firefox.desktop. (#2624)
AFAIK that is what we already do. |
@rusty-snake commented 13 hours ago:
In that case I'd consider adding profiles that redirect to the
The amount of extra redirect profiles could get rather unwieldly, but I suppose
I also thought about parsing cut -f 2 -d = | cut -f 1 -d ' ' | xargs -E '' -n 1 basename Example: $ printf 'Exec=some/path/foobar -abc\n' | cut -f 2 -d = | cut -f 1 -d ' ' |
xargs -E '' -n 1 basename
foobar But what if it's run using # fails
Exec=/usr/bin/foo "${HOME}"
# should work (or something similar)
Exec=sh -c '/usr/bin/foo "${HOME}"' I'm not sure how common that is in AppImages compared to normal .desktop files, Additionally, I think that the
Nice; in that case ignore those suggestions. |
I just noticed this mentioned on the AppImageKit CONTRIBUTING.md:
To be clear, I consider that it's one thing to download and run the AppImage of |
The name of 16 AIs randomly picked from AppImageHub:
I think the most users won't rename their AIs. They just download and move to e.g. |
All these will end up using default.profile. |
Do we want to improve the heuristic or close here? |
When you want to start an AppImage with firejail, it currently loads the
default.profile
by default (when you don't explicitely specify which profile to load).The default profile is in most cases not very helpful, so you have to manually specify
--profile=
to load the right profile.It would be nice if firejail could automatically detect which profile to load.
The text was updated successfully, but these errors were encountered: