kule isolation
Show what this computer cannot give a sandboxed command, and choose whether commands may run with less.
Synopsis
kule isolation [OPTIONS]
Description
Kule never runs a command less isolated than it means to without your
say. On some computers part of the sandbox is not
available. The common case is Linux without unprivileged user namespaces
(Ubuntu 24.04 refuses them by default), which Kule uses to give each command
a network, a /tmp, processes and shared memory of its own.
While anything is missing and you have not accepted it, Kule refuses to run
commands and agents, and says what is missing. kule isolation shows the
gaps, and --accept-weaker on lets commands run with what the computer
gives. Your choice is kept in Kule's home (isolation.json).
On macOS there are no gaps.
Options
| Option | Value | Default | Meaning |
|---|---|---|---|
--accept-weaker | on or off | off | on runs commands with what this computer gives; off refuses them while anything is missing. |
--home | path | ~/.kule (or KULE_HOME) | Kule's home. See global options. |
-h, --help | Print help. |
Examples
A computer that gives everything (macOS, or Linux with user namespaces and a recent Landlock):
$ kule isolation
this computer gives a sandboxed command all of its isolation
A Linux computer without unprivileged user namespaces:
$ kule isolation
this computer cannot give a sandboxed command:
- shared memory of its own: it could open the System V segments and queues of your other programs
- a network of its own: only the proxy's port is checked, on any address, and datagrams pass
- agents' settings kept read-only while it runs: they are put back after it instead
- a /tmp of its own: it shares /tmp with your other programs and tasks
- processes of its own: what it leaves running is found by a guess, which one could slip
not accepted: commands are refused (kule isolation --accept-weaker on)
The exact lines depend on the kernel: which namespaces it allows and which Landlock version it has.
Accept it:
$ kule isolation --accept-weaker on
this computer cannot give a sandboxed command:
...
accepted: commands run with what it gives
Go back to refusing:
$ kule isolation --accept-weaker off
Better: give the computer what Kule needs
On Ubuntu 24.04 and later, allow unprivileged user namespaces instead of accepting less:
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
To keep it after a reboot, put the same setting in a file under
/etc/sysctl.d/. Network rules also need Linux 6.7 or later (Landlock ABI 4).
See Platforms.
Errors and fixes
| Message | What to do |
|---|---|
kule: maybe: on or off | --accept-weaker takes on or off. |
this computer cannot give the command …. Kule does not run it less isolated without your say: accept weaker isolation in Settings → Policy, or with kule isolation --accept-weaker on (from exec or run) | Allow user namespaces as shown above, or accept weaker isolation knowingly. |
In the app
Settings → Policy lists what is missing, and no agent runs until you tick Run agents with what this computer gives. While that holds, the title bar says Weaker isolation.