Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# LinuxFiles

LinuxFiles is an independent Linux-only file manager built with C#/.NET 10 and Uno Platform's Skia desktop host. It runs on X11, including XWayland on Wayland desktops, without Windows or Wine.
LinuxFiles is an independent Linux-only file manager built with C#/.NET 10 and Uno Platform's Skia desktop host. Current source builds prefer native Wayland through the Uno 6.7 fork and fall back to X11/XWayland, without Windows or Wine. Published alpha4 assets remain X11/XWayland; native Wayland ships with the next validated release.

Based on [Files](https://github.com/files-community/Files) by the [Files Community](https://github.com/files-community) and its [contributors](https://github.com/files-community/Files/graphs/contributors), this fork is not affiliated with or endorsed by the Files Community. LinuxFiles has no Windows support or upstream sync. Individual upstream fixes may be brought over selectively with attribution; see the [upstream policy](../docs/linux-port/upstream-policy.md).

Expand All @@ -23,7 +23,7 @@ See the [showcase](../docs/linux-port/SHOWCASE.md) for screenshots and [packagin

## Known limits

- X11/XWayland only; native Wayland and AT-SPI accessibility are not implemented. Text and icons can look soft under XWayland, particularly with fractional scaling. See [Troubleshooting](#troubleshooting).
- AT-SPI accessibility is not implemented. The native Wayland host still needs compositor and package validation before release; see [the Wayland handoff](../docs/linux-port/wayland-packages.md#maintainer-and-build-handoff). Alpha4 and X11 fallback can show soft text under fractional compositor scaling; see [Troubleshooting](#troubleshooting).
- Select-all in folders with around 10,000 items remains slow because of Uno selection handling.
- Tags use Linux extended attributes and a local database. Extended-attribute writes can fail on read-only files or unsupported filesystems; alpha4 preserves edits in the database across reloads and restarts, but those edits cannot be written back to the file when xattrs fail.
- Release packages target x86_64. arm64 publishing is wired but untested. Network/MTP browsing requires a working GVfs session.
Expand Down Expand Up @@ -137,18 +137,24 @@ curl -LO https://github.com/MemerGamer/LinuxFiles/releases/download/nightly/Linu

## Troubleshooting

**Choose a host (current source / future Wayland release):** `UNO_SKIA_HOST=x11 files` forces X11/XWayland; `UNO_SKIA_HOST=wayland files` requires native Wayland. The default chooses Wayland when available and falls back to X11 when `WAYLAND_DISPLAY` is unset. Restart Files when switching. See [host and package details](../docs/linux-port/wayland-packages.md).

**Soft text or icons on niri / xwayland-satellite:** Enable **Detect display scale from the compositor (experimental)** in Settings > Appearance and restart Files to use niri's focused output scale when no Uno, Xft, GDK or Qt scale hint is present and both `NIRI_SOCKET` and `WAYLAND_DISPLAY` are set. Check stderr for `[display-scale]` to see whether IPC or CLI detection succeeded. Detection defaults off and may double-scale on some setups. `FILES_NIRI_SCALE=1` forces it on and `FILES_NIRI_SCALE=0` forces it off, overriding the saved preference. Launch with `UNO_DISPLAY_SCALE_OVERRIDE=1.25 files` to select a scale manually (replace `1.25` with your output scale). The scale is chosen at startup. See [display scale details](../docs/linux-port/appearance-transparency.md#display-scale-on-niri).

## Building from source

Install the .NET 10 SDK and the native Linux dependencies: fontconfig, FreeType, X11 libraries (Xcursor, Xrandr, Xi and Xext), Mesa/OpenGL and GLib. An X11 server or XWayland is required to run the app. See the [AUR recipe](../packaging/linux/aur/linuxfiles-bin/PKGBUILD) for the Arch package names.
Install the .NET 10 SDK and the native Linux dependencies: fontconfig, FreeType, Wayland client/cursor/EGL libraries, xkbcommon, X11 libraries (Xcursor, Xrandr, Xi and Xext), Mesa/OpenGL/EGL and GLib. Run with a Wayland compositor or X11/XWayland. Fetch the pinned Uno fork packages from its public GitHub Release before restoring (Bash, Python 3, curl, coreutils and util-linux required). See the [AUR recipe](../packaging/linux/aur/linuxfiles-bin/PKGBUILD) for Arch package names and [package setup](../docs/linux-port/wayland-packages.md) for the initial publisher step.

```sh
git clone https://github.com/MemerGamer/LinuxFiles.git
cd LinuxFiles
build/fetch-uno-wayland.sh
build/clear-uno-wayland-cache.sh
dotnet build src/Files.App -f net10.0-desktop
```

To build with upstream X11 packages, use `dotnet build src/Files.App -f net10.0-desktop -p:UseUnoWayland=false`; no fork fetch is needed. `scripts/linux/publish.sh --x11` provides the same opt-out for publishing.

For self-contained publishing and a user-local install:

```sh
Expand All @@ -170,7 +176,7 @@ Submit focused pull requests to `main` in [MemerGamer/LinuxFiles](https://github
## Credits

- **[Files Community](https://github.com/files-community)** and all [upstream contributors](https://github.com/files-community/Files/graphs/contributors): the Files app, its design, code and translations (via [Crowdin](https://crowdin.com/project/files-app)) that this port is built on. Files is licensed under the MIT License, with some files under the Mozilla Public License 2.0 (MPL-2.0), Copyright (c) 2018 - present Files Community.
- **[Uno Platform](https://platform.uno/)**: WinUI on Skia/X11 for Linux, which makes this port possible.
- **[Uno Platform](https://platform.uno/)**: WinUI on Skia for Linux, including the [native Wayland fork](https://github.com/MemerGamer/uno/tree/wayland/host), which makes this port possible.
- **[SkiaSharp](https://github.com/mono/SkiaSharp)**, **[Selawik](https://github.com/microsoft/Selawik)** (UI font) and **Uno.Fonts.Fluent** (icons).
- **[Tmds.DBus](https://github.com/tmds/Tmds.DBus)**, **[TagLibSharp](https://github.com/mono/taglib-sharp)**, **[Markdig](https://github.com/xoofx/markdig)**, **[ColorCode](https://github.com/CommunityToolkit/ColorCode-Universal)**, **[LibGit2Sharp](https://github.com/libgit2/libgit2sharp)**, **[FluentFTP](https://github.com/robinrodricks/FluentFTP)**, **[SharpCompress](https://github.com/adamhathcock/sharpcompress)**, **[7-Zip](https://www.7-zip.org/)** and the .NET Community Toolkit.

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install platform test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends xvfb xauth x11-utils x11-xkb-utils xkb-data libx11-6 libfontconfig1 fonts-dejavu-core bubblewrap ffmpeg poppler-utils dbus
sudo apt-get install -y --no-install-recommends xvfb xauth x11-utils x11-xkb-utils xkb-data libx11-6 libwayland-client0 libwayland-cursor0 libwayland-egl1 libxkbcommon0 libegl1 libfontconfig1 fonts-dejavu-core bubblewrap ffmpeg poppler-utils dbus
# Ubuntu 24.04 runners block unprivileged user namespaces, which bubblewrap needs.
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true

Expand All @@ -62,14 +62,23 @@ jobs:
with:
global-json-file: global.json

- name: Check Uno package downloader (offline)
run: python3 build/tests/test-fetch-uno-wayland.py

- name: Fetch verified Uno Wayland packages
run: build/fetch-uno-wayland.sh

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', 'Directory.Build.props', 'nuget.wayland.config', 'build/uno-wayland-packages.sha256') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Remove cached Uno fork packages before restore
run: build/clear-uno-wayland-cache.sh

- name: Build Files.Shared
run: dotnet build src/Files.Shared/Files.Shared.csproj -c Release -warnaserror

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/nightly-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ jobs:
with:
global-json-file: global.json

- name: Fetch verified Uno Wayland packages
run: build/fetch-uno-wayland.sh

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', 'Directory.Build.props', 'nuget.wayland.config', 'build/uno-wayland-packages.sha256') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Remove cached Uno fork packages before restore
run: build/clear-uno-wayland-cache.sh

- name: Publish self-contained linux-x64
run: scripts/linux/publish.sh --rid linux-x64 --tarball

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/package-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ jobs:
with:
global-json-file: global.json

- name: Fetch verified Uno Wayland packages
run: build/fetch-uno-wayland.sh

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props', 'Directory.Build.props', 'nuget.wayland.config', 'build/uno-wayland-packages.sha256') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Remove cached Uno fork packages before restore
run: build/clear-uno-wayland-cache.sh

- name: Publish self-contained linux-x64
run: scripts/linux/publish.sh --rid linux-x64 --tarball

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
.idea/
# Local tools and verified Uno fork package feed (.cache/uno-wayland-feed).
.cache/

# Shared opt-in Linux publish analysis profile
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ LinuxFiles is an independent Linux-only fork of [Files](https://github.com/files

## Unreleased

- Linux builds prefer the native Uno Wayland host, retain automatic X11 fallback and support `UNO_SKIA_HOST=x11|wayland|auto`. Build with `-p:UseUnoWayland=false` or publish with `--x11` to use upstream X11 packages.
- Distribute the eight pinned Uno fork packages through public, versioned GitHub Release assets with SHA-256 verification into a repo-local feed. CI and source publishing fetch them; AppImage, Flatpak, AUR binary and Nix consume the application release. Add Wayland runtime dependencies and the Flatpak Wayland socket. The fork's revision 4 release must be published and validated before shipping; alpha4 assets are unchanged. See [the package contract and handoff](docs/linux-port/wayland-packages.md).

Pull requests merged after `linux-v0.1.0-alpha4`, from the stored `origin/main` history:

- [#157](https://github.com/MemerGamer/LinuxFiles/pull/157): Update the Nix flake to alpha4 and its release hashes, including compatible NixOS root-actions support.
Expand Down
10 changes: 7 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to LinuxFiles

LinuxFiles is an independent Linux-only fork of [Files](https://github.com/files-community/Files), built with C#/.NET 10 and Uno Platform (Skia, X11/XWayland). It has no Windows support or upstream sync. Read [AGENTS.md](AGENTS.md), [CLAUDE.md](CLAUDE.md), [Linux agent rules](docs/linux-port/AGENT-RULES.md) and the [upstream policy](docs/linux-port/upstream-policy.md) before changing code. Historical porting plans are archived context.
LinuxFiles is an independent Linux-only fork of [Files](https://github.com/files-community/Files), built with C#/.NET 10 and Uno Platform (Skia, Wayland/X11). It has no Windows support or upstream sync. Read [AGENTS.md](AGENTS.md), [CLAUDE.md](CLAUDE.md), [Linux agent rules](docs/linux-port/AGENT-RULES.md) and the [upstream policy](docs/linux-port/upstream-policy.md) before changing code. Historical porting plans are archived context.

## Issues and pull requests

Expand All @@ -16,15 +16,19 @@ Treat file operations, clipboard, drag/drop, previews, archives, settings persis

## Build and validation

Install the .NET 10 SDK and [Linux desktop dependencies](.github/README.md#building-from-source). Run affected builds first, sequentially:
Install the .NET 10 SDK and [Linux desktop dependencies](.github/README.md#building-from-source). Linux builds default to the pinned Uno Wayland fork; obtain the public release packages before restoring. See [Wayland package setup](docs/linux-port/wayland-packages.md) and its publisher/build handoff. Run affected builds first, sequentially:

```sh
build/fetch-uno-wayland.sh
build/clear-uno-wayland-cache.sh
dotnet build src/Files.App -f net10.0-desktop
dotnet build tests/Files.Platform.Tests
dotnet test --project tests/Files.Platform.Tests/Files.Platform.Tests.csproj --no-build
```

Use `scripts/linux/headless-run.sh` for UI checks on a private Xvfb display with a throwaway home. Never launch checks against the user's display or alter desktop settings. Clean up started processes, inspect screenshots before sharing, and never commit private home data or screenshots. If the desktop toolchain is unavailable, use focused reference searches and state which checks were not run.
The build opt-out is `-p:UseUnoWayland=false` (also pass it to a separate restore); `scripts/linux/publish.sh --x11` publishes without the fork. Runtime `UNO_SKIA_HOST=x11|wayland|auto` selects a host in fork-enabled builds. Use a fresh package version for fork changes; never replace published NuGet packages.

Use `scripts/linux/headless-run.sh` for UI checks on a private Xvfb display with a throwaway home. It covers X11 fallback; native Wayland additionally needs a private nested/headless compositor and the checks in the Wayland handoff. Never launch checks against the user's display or alter desktop settings. Clean up started processes, inspect screenshots before sharing, and never commit private home data or screenshots. If the desktop toolchain is unavailable, use focused reference searches and state which checks were not run.

## AI assistance and attribution

Expand Down
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
<!-- Generic properties -->
<BaseTargetFramework>net10.0</BaseTargetFramework>
<DesktopTargetFramework>$(BaseTargetFramework)-desktop</DesktopTargetFramework>
<!-- Set the Linux-only Uno targets before NuGet imports Directory.Packages.props, including outer builds. -->
<TargetFramework Condition="'$(UsingUnoSdk)' == 'true' And '$(MSBuildProjectName)' == 'Files.App.UnoVirtualization' And '$(TargetFramework)' == '' And '$(TargetFrameworks)' == ''">$(DesktopTargetFramework)</TargetFramework>
<TargetFrameworks Condition="'$(UsingUnoSdk)' == 'true' And '$(TargetFramework)' == '' And '$(TargetFrameworks)' == ''">$(DesktopTargetFramework)</TargetFrameworks>
<UseUnoWayland Condition="'$(UseUnoWayland)' == ''">true</UseUnoWayland>
<!-- One effective switch for the Linux desktop target; the build machine's OS is irrelevant. -->
<FilesUseUnoWayland>false</FilesUseUnoWayland>
<FilesUseUnoWayland Condition="'$(UsingUnoSdk)' == 'true' And '$(UseUnoWayland)' == 'true' And ('$(TargetFramework)' == '$(DesktopTargetFramework)' Or ('$(TargetFramework)' == '' And '$(TargetFrameworks)' == '$(DesktopTargetFramework)')) And ('$(RuntimeIdentifier)' == '' Or $(RuntimeIdentifier.StartsWith('linux-')))">true</FilesUseUnoWayland>
<LangVersion>preview</LangVersion>
<!-- Uno's nullability annotations differ from WinUI's; keep nullable diagnostics as warnings on the Linux desktop build for now. -->
<WarningsAsErrors Condition="!$(TargetFramework.EndsWith('-desktop'))">nullable</WarningsAsErrors>
Expand Down
21 changes: 20 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,23 @@
<PackageVersion Include="Markdig" Version="0.38.0" />
<PackageVersion Include="ColorCode.Core" Version="2.0.15" />
</ItemGroup>
</Project>
<!-- Native Wayland host from the MemerGamer/uno fork; see docs/linux-port/wayland-packages.md -->
<PropertyGroup>
<UnoWaylandVersion Condition="'$(UnoWaylandVersion)' == ''">6.7.135-wayland.4</UnoWaylandVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(FilesUseUnoWayland)' == 'true'">
<RestoreConfigFile Condition="'$(RestoreConfigFile)' == ''">$(MSBuildThisFileDirectory)nuget.wayland.config</RestoreConfigFile>
</PropertyGroup>
<ItemGroup Condition="'$(FilesUseUnoWayland)' == 'true'">
<PackageVersion Update="Uno.WinUI" Version="$(UnoWaylandVersion)" />
<PackageVersion Update="Uno.WinUI.Runtime.Skia.X11" Version="$(UnoWaylandVersion)" />
<PackageVersion Include="Uno.WinUI.Runtime.Skia.Wayland" Version="$(UnoWaylandVersion)" />
</ItemGroup>
<!-- Uno.Sdk rejects any Uno.WinUI other than its own release (UNOB0005); allow only the reviewed fork cohort with its unchanged 6.7.135 SDK base.
Runs before UnoSdkVersionCheck evaluates its condition, which is the only user of PkgUno_WinUI. -->
<Target Name="_FilesAllowUnoWaylandPackages" BeforeTargets="BeforeBuild;ResolveReferences" Condition="'$(FilesUseUnoWayland)' == 'true' And '$(UnoWaylandVersion)' == '6.7.135-wayland.4' And '$(UnoVersion)' == '6.7.135' And $([System.IO.Path]::GetFileName($(PkgUno_WinUI))) == '$(UnoWaylandVersion)'">
<PropertyGroup>
<PkgUno_WinUI />
</PropertyGroup>
</Target>
</Project>
11 changes: 11 additions & 0 deletions build/clear-uno-wayland-cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Remove the pinned fork cohort from NuGet's global cache before restoring.
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
version="$(sed -n 's/.*<UnoWaylandVersion[^>]*>\([^<]*\)<.*/\1/p' "$root/Directory.Packages.props")"
pins="$(python3 "$root/build/uno-wayland-pins.py" "$version")"
cache="${NUGET_PACKAGES:-$HOME/.nuget/packages}"
while read -r _ name; do
id="${name%."$version".nupkg}"
rm -rf -- "${cache:?}/${id,,}/${version:?}"
done <<< "$pins"
Loading
Loading