A desktop app for firejail v1.3.0

Put any app behind bars. You choose what it sees.

Jailcat lists every application you can start, lets you choose what a sandboxed copy of one may see and do, and installs that copy as firejail-<app> in your application menu and in ~/.local/bin. You fill in a form. Jailcat writes the firejail profile.

Install it GitHub

soft install github.com/rm4n0s/jailcat
The Installed tab with four sandboxes, and the build firejail-firefox-2 open in the editor on its Files tab The Files tab of a build of Visual Studio Code, with Own private home chosen and a list of folders that are read-write or read-only The Security tab with switches for the seccomp filter, capabilities, new privileges, the root user, namespaces and writable-and-executable memory The Preview dialog with the generated profile of firejail-code, where the lines from the settings are yellow and the lines that undo the base profile are red

The Installed tab lists every sandbox you installed. A click opens one to change it, install it again or uninstall it.

The home folder is the most important choice of a build. Under it, each folder is read-write, read-only or hidden. A dot on a tab and a “changed” mark on a field show what you changed.

The restrictions firejail puts on the app, each with one line that says what it does.

Before anything is written, Preview shows the profile, the launcher and the menu entry, with your lines in color.

9 tabs

of settings, from the home folder to firejail lines you write yourself

4 files

are what a build writes, all of them in your own folders

1 program

is all a sandbox needs to run. It is firejail, not Jailcat

0 times

it asks for root. Jailcat never writes outside your own folders

  • It starts from firejail's profile

    Jailcat starts from firejail’s own profile for the app when firejail has one, for VS Code code.profile, and from default.profile when it has none. Every field shows the profile’s value until you change it.

  • A copy with its own name

    The sandbox is installed as firejail-<app>, in your application menu and in ~/.local/bin. It gets the app’s own icon with a small jail-bar badge, so you can tell it from the original.

  • It runs without Jailcat

    The sandbox needs only firejail to run. It keeps working when Jailcat is closed or removed, and firejail’s updates to the profile still reach it.

A copy you can tell from the original

The sandboxed copy is an ordinary entry of your application menu, and an ordinary command in your shell. Its menu name is the app’s name with “(sandboxed)” after it, until you change it, and its icon is the app’s own icon with a badge over the corner.

  • The categories, the keywords and the field codes of Exec come from the app’s own entry
  • An action of the app, such as VS Code’s New Empty Window, is kept and starts the sandbox too
  • The copy does not take over the app’s file types, unless you switch that on
  • The entry runs the launcher, a short script that starts firejail with the build’s profile and the app
The Launcher tab of a build of Calculator, with the sandbox name firejail-calculator, the menu name Calculator in a jail, and the app's icon with a badge

Four steps from an app to its sandbox

Pick an app, pick a profile, change what you want, and install. Each step is one part of the same window.

1. Pick an app

Every application you can start

The list on the left has the applications of your menu and every program on your $PATH. One search box finds an app by its name or its program, and three filters show all of them, the menu apps or the binaries.

  • A built app shows “built” in the list
  • Flatpak and Snap apps are listed and marked as already sandboxed
  • The list is read again when you press Refresh
Jailcat in the dark theme with the list of apps, among them Ark, Audacity, Blender and Calculator, which is marked built, and one sandbox counted on the Installed tab

2. Pick a profile

Firejail's profile, another one, or none

A new build starts on the profile firejail itself would pick for the program. You can take any other firejail profile, import your own, or choose None and start from nothing.

  • A searchable list, with the profile for this app at the top
  • With None, the sandbox is only what the form says
  • When you change the profile of a build that has changes, Jailcat asks whether to keep them or start over
The dialog Choose a profile with a search box, the groups For this app and Firejail profiles, and the button Import profile

3. Change what you want

What the app sees as its home

Full home, only the folders you choose, an empty home that is thrown away each time, or a private home of its own that is kept between runs. Folders outside the home are added one by one, each as read-write, read-only or hidden.

  • Rows that come from the profile carry a “from profile” mark
  • Quick switches for Downloads, removable drives, programs in the home, /tmp, /dev and the cache
  • Reset to profile undoes one change
The Files tab with the four choices for the home folder and four folders, three of them marked from profile

Security

Switches with a warning where one is due

Seccomp, capabilities, new privileges, the root user, namespaces, socket types, writable-and-executable memory and Landlock are one switch each. For an Electron or Chromium app, the tab says that some of them can stop the app from starting, and tells you to press Try first.

The Security tab with a note about Electron and Chromium apps above the switches, and the seccomp filter marked as changed

Extra rules

Firejail lines of your own, checked as you type

What no field covers goes into a text box, one firejail line in a row. Jailcat checks each row against firejail’s list of commands. A row with an error blocks Try and Install, and a row that a field already covers gets a warning that names the field.

  • include may name only a file of firejail’s folders or of Jailcat’s profiles
  • Under the box, the lines of the base profile that no field covers, grouped by file, to read
The Extra rules tab with three rows, a warning that net none belongs to the Network tab, and the error that firejail has no command frobnicate

4. Preview, Try, Install

Look at it, try it, then install it

Preview shows the three text files of the build. Try starts the sandbox without installing anything, shows firejail’s output as it comes, and has a Stop button. Install writes the files and then runs the sandbox once with true in place of the app, to see that firejail accepts the profile.

The Preview dialog with the tabs Profile, Launcher and Desktop entry, and the profile of firejail-code

And after the install

A build is kept in a database, so the work does not end at Install.

  • Open it again

    Every build can be opened, changed and installed again. Jailcat reads the base profile as it is now, and puts your changes on top.

  • Several builds of one app

    An app can have more than one sandbox, for example firejail-code and firejail-code-work, each with its own settings.

  • Nothing of yours is overwritten

    Jailcat never overwrites a file it did not make. When a file is in the way, a dialog lists it, and nothing is written until you decide.

  • Uninstall removes its own files

    Uninstall removes only the files Jailcat wrote. A file you edited since is listed and left in place unless you confirm.

  • Firejail updated

    When your firejail has another version than the one a build was made with, the build shows “firejail updated”, and its extra rules are checked again.

  • VS Code

    A sandboxed VS Code gets a data folder of its own. Without one it would hand its window to your open VS Code, outside the sandbox. Your settings, keybindings and snippets are shared through links.

  • Two kinds of icon

    The app’s own icon with the badge over its corner, or a random icon that Jailcat makes for the build and that stays the same on every rebuild.

  • Drafts

    Changes you did not install yet are kept as a draft when you select another app or close the window.

What a build writes

Four files, and a folder when you chose a private home. All of them are under your home.

FileWhere
The profile: your changes, then include of the profile you chose~/.local/share/jailcat/profiles/firejail-<app>.profile
The launcher, for bash~/.local/bin/firejail-<app>
The menu entry~/.local/share/applications/firejail-<app>.desktop
The icon~/.local/share/icons/hicolor/scalable/apps/firejail-<app>.svg
Own private home~/.local/share/jailcat/homes/firejail-<app>/
VS Code only: its own data folder~/.local/share/jailcat/appdata/firejail-<app>/

Every generated file carries a line that says Jailcat made it, and the number of its build.

Your changes, then firejail's profile

A build’s profile is a short file. Your changes come first, as firejail lines, and the profile you chose is included after them. Nothing of firejail’s profile is copied.

  • A restriction you turn on is written as its firejail command, such as net none
  • A line of the profile you turn off is undone with firejail’s own ignore
  • The profile is included by its path, so firejail’s fixes reach the sandbox at its next start, without a rebuild
  • The file is in Jailcat’s folder, so a plain firejail code behaves as before
# Generated by Jailcat. Do not edit: change it in Jailcat and rebuild.
# jailcat-build: 7
quiet

# Settings
net none
noblacklist ${HOME}/Projects
read-only ${HOME}/Projects

# Undo base profile lines
ignore nosound

# Extra rules
dbus-user.talk org.freedesktop.Notifications

# Base profile
include /etc/firejail/code.profile

Built on Glutter, installed by Soft

The window of Jailcat is drawn by my own GUI toolkit, and my installer for Go apps puts it in your application menu.

What Jailcat does not do

Better to read it here than to find it out.

  • It is for Linux only, and it needs firejail. Without firejail it still opens, but Try and Install are switched off.
  • It never runs as root and changes nothing outside your own folders: not /etc/firejail, not firecfg, not the system’s menus.
  • It does not sandbox Flatpak, Snap and AppImage apps.
  • It makes no network namespace, because that needs root. So an app has the whole network or none, and the fields for the firewall and for X11 isolation say what firejail cannot do without one.
  • Building it needs a C compiler, for SQLite.

Under the hood#

Jailcat is written in Go, with Glutter for the window and SQLite for its data. Every build is kept in the database with only the settings you changed, so a build that is opened again starts from the profile as it is today.

Your changes are written as firejail lines placed before the include of the profile, because firejail’s ignore acts only on the lines that are read after it. That is how one short file can switch off a line of a profile that it does not copy.

Each file is written to a temporary file in the same folder and renamed over its target. Jailcat records every file it wrote with its SHA-256, and that is how it knows later whether a file is still its own.

The sandboxed copy gets the app’s own icon as an SVG, with the jail-bar badge over its bottom right corner. Jailcat writes the icon as text, and removes scripts and references to other files from the app’s icon on the way.

The specification is docs/SPEC.md in the repository, and docs/IMPLEMENTED.md is the log of what was built, with a proof picture for each step. The pictures of this page come from there.

Kind
Application
Language
Go
Runs on
Linux
License
BSD-3-Clause
Version
v1.3.0
The logo of Jailcat: a cat behind jail bars

Install it, then pick an app

You need Go 1.27 or newer, a C compiler (gcc, for SQLite) and firejail. Soft builds Jailcat with your Go, puts it in your application menu with its logo, and keeps it updated.

Source on GitHub

# Install it with Soft, with a menu entry
$ soft install github.com/rm4n0s/jailcat
# Or with Go alone, without a menu entry
$ go install github.com/rm4n0s/jailcat/cmd/jailcat@latest
# Start it
$ jailcat