Skip to content

Setup Installing

finthetechguy edited this page Nov 24, 2026 · 3 revisions

Building and installing

1. Install the build tools

Distribution Command
Arch Linux sudo pacman -S rust iw iproute2 python python-gobject gtk4 libadwaita polkit maturin
Debian/Ubuntu sudo apt install cargo iw iproute2 python3-gi gir1.2-gtk-4.0 gir1.2-adw-1 policykit-1 then pip install maturin in a virtual environment
Fedora sudo dnf install cargo iw iproute python3-gobject gtk4 libadwaita polkit maturin

The GTK, libadwaita, PyGObject and polkit packages are only needed for the desktop app. Check that your distro's Rust is 1.86 or newer with rustc --version. If it is older, install Rust with rustup.

2. Get the source and build

git clone https://github.com/finthetechguy/ctrpass.git
cd ctrpass
cargo build --release

The command-line tool builds to target/release/ctrpass.

3a. Command line only

Copy the binary somewhere on your PATH:

sudo install -m755 target/release/ctrpass /usr/local/bin/ctrpass

Radio commands need root, or the CAP_NET_ADMIN and CAP_NET_RAW capabilities. Run them with sudo.

3b. Desktop app

The app itself runs as your user. When you start StreetPass, it launches ctrpass serve with root rights through polkit. app/install.sh installs the binary, the polkit action and the desktop entry.

Pick one of these:

# Ask for your password each time StreetPass starts
sudo sh app/install.sh --no-rule

# Let your account start StreetPass without a password
sudo sh app/install.sh --user "$(id -un)"

The second option creates a ctrpass group, adds your user to it, and installs a polkit rule that lets that group run only ctrpass serve -i <interface>, nothing else. Log out and back in afterwards so the new group applies.

Then install the Python module and the app:

python3 -m pip install ./crates/ctrpass-py ./app

If your distro blocks system-wide pip installs, use pip install --user, pipx, or a virtual environment. Make sure the ctrpass-app command ends up on your PATH, since the desktop entry runs it.

Installer options

Option Effect
--prefix DIR Install under DIR instead of /usr/local.
--bin FILE Install this ctrpass binary instead of the release build.
--group NAME Group allowed to start StreetPass without a password (default ctrpass).
--user NAME Add NAME to that group.
--no-rule Always ask for a password.
--destdir DIR Stage files under DIR, for packaging.
--uninstall Remove what the installer added. The group is kept.

4. Check it works

ctrpass --version
sudo ctrpass scan -i wlan1

Replace wlan1 with your adapter's interface. With a 3DS nearby and StreetPass on, the scan prints one JSON line per console it hears.

Next: Building and installing

Clone this wiki locally