You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 5.3 you can use the `--sandbox` option to run AppImages using a sandbox, and since version 6.12 Firejails has been dropped in favour of "[Aisap](https://github.com/mgord9518/aisap)", a [Bubblewrap](https://github.com/containers/bubblewrap) frontend for AppImages.
919
+
Since version 6.12, "AM"/"AppMan" uses Bubblewrap for sandboxing AppImage packages, thanks to "[Aisap](https://github.com/mgord9518/aisap)", a highly intuitive and configurable command line solution.
912
920
921
+
The option "`--sandbox`", which since version 5.3 was using Firejail, has taken on a completely different appearance and usability, thanks to the intense work of @Samueru-sama, who managed to extend and enhance "Aisap", making it extremely easy to use in our project, to the point of making us forget that we are using a command line utility.
922
+
923
+
[Bubblewrap](https://github.com/containers/bubblewrap) is an highly used sanboxing solution, used in multiple projects for GNU/Linux, including Flatpak.
924
+
925
+
In this sense, "Aisap" may be considered a reference point for the future of AppImages sandboxing!
926
+
927
+
#### How to enable a sandbox
913
928
This method works as follows:
914
929
```
915
930
am --sandbox $APP
@@ -918,21 +933,32 @@ or
918
933
```
919
934
appman --sandbox $APP
920
935
```
921
-
- if the "aisap" package is not installed, you will be asked if you want to install it via "AM"/AppMan;
922
-
- you will be asked if your AppImages can have access to the main XDG directories (Pictures, Videos, Documents... using the system language);
923
-
- requires replacing the symlink in $PATH with a script ("AM" users will need the root password);
924
-
- to work, the Appimage will be set to "not executable", and the AM-updater will also have its `chmod` command set to `a-x` instead of `a+x`.
936
+
The "aisap" package installed is required, whether it is available system-wide ("AM") or locally ("AppMan"), the important thing is that the "aisap" command is in $PATH. If it is not present, "AM"/"AppMan" will ask you if it can proceed with the installation before continuing.
925
937
926
-
The default location for the sandboxed homes is at $HOME/.local/am-sandboxes, but that location can be changed by setting the $SANDBOXDIR env variable.
938
+
We will first compile the Aisap script in a non-privileged, easy-to-access directory, before being placed in $PATH (see step 2, below).
939
+
1. Once started, you will be asked whether to enable the sandbox (default "Y") or not (type "N"):
940
+
- the main XDG directories (Pictures, Videos, Documents...) will be listed, answer whether to authorize access (type "Y") or not ("N", default);
941
+
- at the end, choose whether to specify some directories to access (default "N"), and if "Yes", write the path.
942
+
2. Now that the script is complete, it should be placed in $PATH. "AM" users will need to authorize writing to /usr/local/bin by entering their password. "AppMan" users do not have these problems;
943
+
3. To allow Aipman take care of the AppImage, the latter be set to "not executable" and the related AM-updater will also have its `chmod` command set from `a+x` to `a-x`.
944
+
4. Now your AppImage is in a sandbox!
927
945
928
-
To restore the use of the AppImage without sandbox, you need to run the application command with the "--disable-sandbox" option:
946
+
NOTE, the default location for the sandboxed homes is at $HOME/.local/am-sandboxes, but that location can be changed by setting the $SANDBOXDIR environemt variable.
947
+
948
+
#### How to disable a sandbox
949
+
To remove the sandbox just run the command of the AppImage with the flag "--disable-sandbox", like this:
929
950
```
930
951
$APP --disable-sandbox
931
952
```
932
-
In the video we will use "Baobab" (GTK3 version), a disk space analyzer, available in the database as "baobab-gtk3", and giving it read/write permissions only in "Video" (the Italian for "Videos") :
In the video below we will use "Baobab" (GTK3 version), a disk space analyzer, available in the database as "baobab-gtk3".
956
+
957
+
Among the XDG directories we will authorize "Images" (Pictures) and "Videos" (Videos), while manually we will authorize "Public". The test will be carried out in normal mode, then in sandbox and again without sandbox:
0 commit comments