flatpaks icon indicating copy to clipboard operation
flatpaks copied to clipboard

flatpaks

A few Flatpaks that I hastly packaged. These are not thoroughly tested so use at your own discretion.
Packaging was adapted mainly from Arch Linux's official PKGBUILDs and the AUR.
Most of these are PoC, not maintained, might need some cleanup, missing a feature here and there, and in general are not ready to publish via Flathub.
The catalyst for packaging these apps is to prove that it's possible to convert to, and as a precondition for switching to an immutable system, an OS that has a clear seperation between the stateless read-only distributed OS files, and the stateful data and configs.

How to build

  1. Install flatpak-builder
  2. Clone the flatpaks repo
git clone https://github.com/tinywrkb/flatpaks.git
git submodule init
git submodule update
  1. Create a working folder for flatpak-builder somewhere
mkdir build
  1. Build the package with flatpak-builder and install it as a user Flatpak app. Replace manifest.yaml with the path to application manifest.
flatpak-builder --install --user --force-clean \
  --state-dir=build/flatpak-builder \
  --repo=build/flatpak-repo build/flatpak-target \
  manifest.yaml

Tips and tricks

Font packages

Flatpak does not support font packages or extensions. In order for Flatpak and host apps to use fonts installed as Flatpak package we need a few workarounds.

  1. Give all our Flatpak apps access to the user's fontconfig configuration file, and also the font package installed path.
    Due to a mismatch of XDG_CONFIG_DIR value between the host and the Flatpak sandbox (a different path for each app), we need to set some environment variables.
    Also note that the fontconfig variable value need to be an absolute path, meaning it needs to be expanded before given to the flatpak override command.
$ flatpak override --user \
    --filesystem=~/.config/fontconfig:ro \
    --filesystem=~/.local/share/flatpak:ro \
    --filesystem=/var/lib/flatpak:ro \
    --env=FONTCONFIG_FILE=$XDG_CONFIG_HOME/fontconfig/fonts.conf

If your fontconfig folder is in dotfiles, then apps that use the --persist=. permission (e.g. Steam) will fail to start after a first seccessful run and will output the following error message.

bwrap: Can't make symlink at /home/USER/.config/fontconfig: File exists

The workaround for this issue is to create first a ~/.config/fontconfig folder before creating the dotfiles symlinks, so the folder will be bind mounted into the container instead of having flatpak try creating a ~/.config/fontconfig symlink on each run.
This workaround requires adding a filesystem access permission to the dotfiles folder.

$ flatpak override --user \
    --filesystem=~/.dotfiles/fontconfig/.config/fontconfig:ro
  1. Adding the following to $XDG_CONFIG_HOME/fontconfig/fonts.conf will tell fontconfig to include the Flatpak font package in its scan.
    The first directive is required because fc-cache omits the default font locations when scanning inside a Flatpak sandbox, and that's due to our use of FONTCONFIG_FILE variable.
    Note that you need to replace {FontName} with the name of the font as defined in the Flatpak app ID, see for example the Noto fonts packages.
<include ignore_missing="yes">/etc/fonts/fonts.conf</include>

<dir prefix="default">.local/share/flatpak/app/org.freedesktop.Platform.Fonts.{FontName}/current/active/files/share/fonts</dir>
<dir>/var/lib/flatpak/app/org.freedesktop.Platform.Fonts.{FontName}/current/active/files/share/fonts</dir>
<include prefix="default" ignore_missing="yes">.local/share/flatpak/app/org.freedesktop.Platform.Fonts.{FontName}/current/active/files/share/fonts/conf.d</include>
<include ignore_missing="yes">/var/lib/flatpak/app/org.freedesktop.Platform.Fonts.{FontName}/current/active/files/share/fonts/conf.d</include>
  1. You can also set FONTCONFIG_PATH, but make sure that your user's fonts.conf is including the system's conf.d folder, as fontconfig might not find the system's conf.d if it was set as a relative path in the system's fonts.conf.
$ flatpak override --user \
    --env=FONTCONFIG_PATH=$XDG_CONFIG_HOME/fontconfig

Add the include element to your user's fonts.conf.

<include ignore_missing="yes">/etc/fonts/conf.d</include>
  1. Now we can update the host's font cache.
cd ~
fc-cache
  1. To update the font cache of a Flatpak app sandbox just restart the app.
Fontconfig related bugs

extra-data caching and avoiding download

Copy the extra-data source into FLATAPK_INSTALLATION_PATH/extra-data/CHECKSUM/FILENAME.

Terminal emulators: host access

  • SSH over tcp, use keys from an already running ssh-agent session.
  • SSH over a unix socket using socat.
  • Start a shell session on the host using flatpak-spawn.
    This actually doesn't work correcty, and the proper solution is implemented in flatterm.
    1. Create an override: $ flatpak override --user --talk-name=org.freedesktop.Flatpak FLATPAK_ID
    2. From the sandbox, start a shell session on the host: $ flatpak-spawn --host /bin/bash
  • Use a terminal multiplexer.
    1. Set the multiplexer socket path to a folder that can be bind mounted into the sandbox.
    export SCREENDIR=$XDG_RUNTIME_DIR/screen
    export TMUX_TMPDIR=$XDG_RUNTIME_DIR/tmux
    
    1. Create the multiplexer socket folder on boot with systemd-tempfiles.
    # $XDG_CONFIG_HOME/user-tmpfiles.d/tmux.conf
    d %t/tmux 0700 - - - -
    
    # $XDG_CONFIG_HOME/user-tmpfiles.d/screen.conf
    d %t/screen 0700 - - - -
    
    1. Make sure the systemd-tempfiles user service was started and enabled.
    $ systemctl --user enable --now systemd-tmpfiles-setup.service
    
    1. Create overrides.
    $ flatpak override --user --filesystem=xdg-run/tmux FLATPAK_ID
    $ flatpak override --user --filesystem=xdg-run/screen FLATPAK_ID
    

List of applications

Container and virtualization

  • Fedora CoreOS Butane
  • Virt-Viewer

Development

Development/Binary analysis

Development/Binary analysis/Assembler & disassemblers
  • Hopper
  • REDasm
  • Yasm
Development/Binary analysis/ELF
  • ABI Compliance Checker
  • libabigail
Development/Binary analysis/Hex editors & viewers
  • BEYE
  • Bviplus
  • dhex
  • hexer
  • hexyl
  • hyx
Development/Binary analysis/Firmware
  • Binwalk
  • UEFITool
Development/Binary analysis/PE
  • pev

Development/Database

  • SQLiteStudio

Development/Debugging

  • GDBFrontend

Development/Flatpak

  • Flatpak Builder (Also on Flathub as org.flatpak.Builder)

Development/Kernel

  • Hotspot

Development/Markup & data serialization

  • dasel
  • jq
  • yq

Development/Python

  • pyautogit
  • Pyinstaller

Development/VCS

  • GitHub CLI
  • GitHub hub
  • kdesvn

Display server

  • Sway

Display server/Remoting and screen sharing

  • FreeRDP
  • Weylus
  • wlvncc

Display server/Screen config managers

  • wdisplays

Display server/Shell

  • Hybridbar
  • Waybar
  • nwg-panel

Display server/X11

  • Xpra
  • xeyes
  • xprop

Documents

Documents/Journaling

  • Journey

Documents/Notetaking

  • Boost Note

Documents/Office suites and editors

  • Zoho Writer

Documents/PDF tools

  • PDFSam (check out PDF Mix Tool, it might be a better choice)
  • pdfcrack

Documents/Text editors

  • Neovim Qt
  • Notepad++ (WIP)
  • l3afpad

Documents/Viewers

  • Pympress
  • Qpdfview
  • Zathura
  • pdfpc

Electronics

Electronics/Analog circuit simulation

  • LTspice (WIP)
  • Oregano (EOL)
  • Qucs-S
  • Qucs
  • gSpiceUI

Electronics/Digital logic

  • BOOLR (Abandoned)
  • Digital
  • SmartSim

Electronics/Embedded

  • ARM Mbed Studio
  • Arduino CLI
  • Arduino Create Agent
  • Code With Mu
  • Microchip MPLAB X IDE
  • NXP MCUXpresso IDE (Authenticated download is required now. Use the extra-data caching method)
  • PICsimLab
  • TI CCSTUDIO IDE

Electronics/HDL

  • Icestudio
  • Lattice Diamond
  • Papilio DesignLab IDE (Abandoned)
  • Intel Quartus Prime ModelSim Altera Starter Edition
  • Intel Quartus Prime Lite

Electronics/Printed circuit board design

  • Autodesk Eagle
  • gEDA

Electronics/Signals

Electronics/Signals/Instrumentation
  • SmuView
  • PulseView
Science/Electronics/Signals/SDR
  • GNU Radio
  • Gqrx SDR
  • QSpectrumAnalyzer
  • SDR# (Latest Linux Mono compatible version)
  • SDR# (Windows) (WIP, no drivers, SPY server only)
  • SigDigger

Engineering

Engineering/CAD

  • BRL-CAD
  • Fusion 360 (WIP, not working correctly ATM)
  • LibreCAD
  • QCAD

Engineering/Calculators and unit converters

  • bc
  • bcal

Games

  • Cemu (WIP)
  • SDLPoP: Prince of Persia

Files

Files/Mobile devices

  • Android File Transfer for Linux
  • ifuse

Files/File managers

  • QtFM
  • Sunflower

Files/Archiving and compression tools

  • unappimage

Files/Duplicates cleaners

  • rmlint

Fonts

  • Noto CJK Fonts
  • Noto Emoji Font
  • Noto Fonts

Fonts/Tools

  • Fontweak (EOL)
  • Google Fonts Tools
  • LCDF Typetools

Internet

Internet/Communication

  • Ripcord
  • WeeChat

Internet/File sharing

Internet/File sharing/BitTorrent
  • trxo
  • tremc
Internet/File sharing/Cloud sync
  • Insync
  • Megatools
  • Rclone

Internet/Media downloaders

  • youtube-dl

Internet/URL watcher

  • urlwatch

Internet/Web browsers

  • Edge Dev

Math

Math/Algebra

  • wxMaxima

Multimedia

Multimedia/Codecs

  • FFmpeg

Multimedia/Icons

  • icoutils

Multimedia/Image

  • PTGui
  • exiv2
  • imv
  • jhead
  • qimgv
Multimedia/Image/Screenshot
  • Swappy

Multimedia/Audio

  • mps-youtube
  • QjackCtl
  • pasystray
  • puddletag

Multimedia/Video

  • mpv (Also on Flathub as io.mpv.Mpv)

Network

Network/Diagnostics

  • speedtest-cli

Network/Network managers

  • Airport Utility (WIP)
  • iwgtk

Security

Security/2FA, passwords & keys

  • Authy
  • gpg-tui

Security/Analysis & pentesting

  • SSHGuard

System

System/Benchmarking & diagnostics

  • GFXBench (BROKEN, extreme memory leak)
  • Unigine Heaven
  • Unigine Heaven (Windows) (WIP)
  • mesa-demos
  • s-tui

Terminal

Terminal/Session tools

  • asciinema

Terminal/Text terminal emulators

  • minicom
  • picocom

Terminal/Video terminal emulators

  • Alacritty
  • GTKTerm
  • Termite
  • Wez's Terminal

Utilities

Utilities/Calendar and date

  • libhdate
  • hebcal

Utilities/Translation

  • Translate Shell

Utilities/Typing

  • GNU Typist