Skip to content

xonsh/xonsh-flatpak

Repository files navigation

Xonsh Flatpak

Xonsh Flatpak

Flatpak package for xonsh.

Install and Run

# Install flatpak e.g. `sudo apt-get install -y flatpak`
# Download xonsh flatpak
wget https://github.com/xonsh/xonsh-flatpak/releases/latest/download/xonsh.flatpak
flatpak install --user xonsh.flatpak
flatpak run io.github.xonsh.xonsh

Usage

host alias

The Freedesktop runtime includes ~728 standard Unix commands (ls, cat, grep, curl, etc.), but system-specific tools like git, docker, ssh are not available inside the Flatpak sandbox.

To solve this we have host alias in xonsh RC flatpak.xsh. It executes the command on the host system e.g.

host git status  # `flatpak-spawn --host git status`

Symlinks to popular tools

In io.github.xonsh.xonsh.yml we have a list of popular commands (git, docker, ssh, vim, htop, etc). During the Flatpak build, symlinks are created for popular host commands e.g. /app/libexec/host-cmds/git will be the symlink to /app/libexec/host-spawn.

The directory /app/libexec/host-cmds is appended to $PATH with low priority.

Build

sudo apt-get install -y flatpak flatpak-builder
pip install .
xonsh build.xsh  # or with GitHub/GitLab/Codeberg URL: `--git-url https://github.com/xonsh/xonsh/tree/another_branch_name`
flatpak install --user xonsh.flatpak
flatpak run io.github.xonsh.xonsh

See also