An app you install normally runs as you, and can read everything you can: your documents, your SSH keys, your browser profile. Most apps never need that. A PDF viewer needs the PDF.
So the panther channel now has sandboxed variants of 41 apps and growing. It’s the same program, same version; it just starts with an empty home folder and only gets what it needs to do its job.
What’s covered
- Browsers and mail: Firefox, ungoogled-chromium, Thunderbird
- Chat: Signal, Element, Telegram, Slack, Zulip, Fractal, Nheko, Dino, Gajim, Tuba
- Office and notes: LibreOffice, Papers, Okular, Zotero, Calibre, Komikku, Kiwix, Obsidian, Anytype, Bitwarden, Qalculate
- Photo and graphics: GIMP, Inkscape, darktable, RawTherapee, Loupe, Vitrine
- Audio and video: mpv, Celluloid, Rhythmbox, Amberol, Strawberry, Audacity, Spotifast, Tidal Hi-Fi
- Downloads: Transmission, qBittorrent, Fragments
What each one gets depends on the app. Firefox sees its own profile and ~/Downloads, plus network, camera and microphone. The image and document viewers see the file you opened and nothing else, and have no network at all (13 of the 41 don’t).
In the Software app
As of Software (guix-gui) 0.1.21, this is built in. An app that has a sandboxed variant shows up once in search, with a “Sandboxed” switch. Below it is a plain list of what the sandbox allows: which folders the app can read or write, and whether it gets network, audio, camera or screen capture.
If the app is already installed, the same switch moves it into the sandbox or back out, in one step. The app needs a restart after.
From a terminal it’s the usual:
guix search sandboxed
guix install firefox-sandboxed
Install the sandboxed variant or the original, not both.
Good to know
- Files outside the allowed folders aren’t visible to the app, including in its “Open” dialog. For viewers, open the file from your file manager.
- Anything the app writes outside its allowed folders is gone when it closes.
- On an X11 session (XFCE, MATE) the sandbox covers your files and the network, but apps can still see each other’s windows and keyboard input. That’s how X11 works; Wayland sessions don’t have this.
This is new, so expect an app here and there that’s missing access to something it needs. Please file those: codeberg.org/gofranz/panther/issues.