Add Linux support (Avalonia): FFmpeg discovery, packaging & docs
Summary
ScreenForge currently builds and runs on Windows. We want to add Linux (x64) support next. If you have experience running Avalonia on Linux (X11/Wayland) and handling FFmpeg on Linux, your help would be greatly appreciated.
Why
The goal of ScreenForge is to be cross-platform. Linux support unblocks a large part of our users and contributors and keeps the codebase portable from day one.
Scope (Linux first)
- Target: linux-x64, .NET 8, Avalonia (Skia).
- Out of scope for this issue: macOS packaging. (We’ll file a separate issue later.)
Proposed approach
- FFmpeg discovery (cross-platform)
- Resolve path in this order:
SCREENFORGE_FFMPEG env var (absolute path to ffmpeg),
- user tools dir (e.g.,
~/.local/share/ScreenForge/tools/ffmpeg/bin/ffmpeg),
- app-local
tools/ffmpeg/bin/ffmpeg (if we add optional tooling later),
- system
PATH (via which ffmpeg).
- Throw a clear error with instructions if not found.
- Process execution
- Use
UseShellExecute=false, capture stderr/stdout, and ensure UTF-8 compatibility.
- Build tweaks
- Ensure
ScreenForge.App builds with -r linux-x64 on .NET 8.
- Remove/guard any Windows-only assumptions (e.g., path separators, Win32 specifics).
- Packaging (first step)
- Start with a portable publish (no FFmpeg bundled):
dotnet publish ScreenForge.App -c Release -r linux-x64 --self-contained false
- Document how to install FFmpeg via distro package manager.
- Docs
- Add a new README › Linux section (install .NET SDK 8 + FFmpeg, run instructions).
- CI (nice to have)
- Add a Linux job to GitHub Actions that builds
linux-x64 and runs a smoke test (launch and exit).
Getting started (suggested)
- Prereqs on Linux:
- .NET 8 SDK (
dotnet --list-sdks should include 8.x).
- FFmpeg available on PATH (
ffmpeg -version).
- Install examples:
- Debian/Ubuntu:
sudo apt update && sudo apt install ffmpeg
- Fedora:
sudo dnf install ffmpeg
- Arch:
sudo pacman -S ffmpeg
- Build:
dotnet restore
dotnet publish ScreenForge.App -c Release -r linux-x64 --self-contained false
Acceptance criteria
- ✅ App builds on
linux-x64 (.NET 8) without code changes to Windows-only bits.
- ✅ When FFmpeg is installed on the system
PATH, recording works (manual smoke test: select region, start/stop, output file created).
- ✅ FFmpeg path resolution covers:
SCREENFORGE_FFMPEG pointing to a valid binary,
- user tools dir fallback,
- system
PATH via which.
- ✅
README updated with Linux instructions (install, build, run, troubleshooting).
- ✅ No binary artifacts committed (keep
**/bin, **/obj, **/runtimes ignored).
Nice-to-haves (future follow-ups)
- Optional downloader that offers to fetch FFmpeg on first run (e.g., using SharpCompress).
- Packaging as AppImage or Flatpak/Snap once basic
linux-x64 runtime is solid.
- Wayland vs X11 notes (overlays, screen capture APIs, permissions).
Where to look in the codebase
- FFmpeg path resolution:
ScreenForge.FFmpeg/FFmpegLocator.cs (or equivalent place in App startup).
- App services:
ScreenForge.App/Services/*.
- UI/ViewModels:
ScreenForge.App/ViewModels/* and Views/*.
How to contribute
- Please comment below if you’re familiar with Avalonia on Linux and FFmpeg.
- Open a Draft PR early if you start implementing this.
- Suggested labels:
help wanted, platform:linux, avalonia.
Thanks in advance to anyone who can help us bring ScreenForge to Linux!
Add Linux support (Avalonia): FFmpeg discovery, packaging & docs
Summary
ScreenForge currently builds and runs on Windows. We want to add Linux (x64) support next. If you have experience running Avalonia on Linux (X11/Wayland) and handling FFmpeg on Linux, your help would be greatly appreciated.
Why
The goal of ScreenForge is to be cross-platform. Linux support unblocks a large part of our users and contributors and keeps the codebase portable from day one.
Scope (Linux first)
Proposed approach
SCREENFORGE_FFMPEGenv var (absolute path toffmpeg),~/.local/share/ScreenForge/tools/ffmpeg/bin/ffmpeg),tools/ffmpeg/bin/ffmpeg(if we add optional tooling later),PATH(viawhich ffmpeg).UseShellExecute=false, capture stderr/stdout, and ensure UTF-8 compatibility.ScreenForge.Appbuilds with-r linux-x64on .NET 8.dotnet publish ScreenForge.App -c Release -r linux-x64 --self-contained falselinux-x64and runs a smoke test (launch and exit).Getting started (suggested)
dotnet --list-sdksshould include 8.x).ffmpeg -version).sudo apt update && sudo apt install ffmpegsudo dnf install ffmpegsudo pacman -S ffmpegdotnet restore dotnet publish ScreenForge.App -c Release -r linux-x64 --self-contained falseAcceptance criteria
linux-x64(.NET 8) without code changes to Windows-only bits.PATH, recording works (manual smoke test: select region, start/stop, output file created).SCREENFORGE_FFMPEGpointing to a valid binary,PATHviawhich.READMEupdated with Linux instructions (install, build, run, troubleshooting).**/bin,**/obj,**/runtimesignored).Nice-to-haves (future follow-ups)
linux-x64runtime is solid.Where to look in the codebase
ScreenForge.FFmpeg/FFmpegLocator.cs(or equivalent place in App startup).ScreenForge.App/Services/*.ScreenForge.App/ViewModels/*andViews/*.How to contribute
help wanted,platform:linux,avalonia.Thanks in advance to anyone who can help us bring ScreenForge to Linux!