[Feature] Support for Bazzite
Before Requesting
- [x] I found no existing issue matching my feature request
- [x] This request is related to Millennium, and not a request for a specific theme/addon
Describe the feature you'd like!
Support for bazzite as it is immutable and does let you write on system files, but just steam files (I think), I've seen discussions before about this topic and they got pretty as far as it being quite possible and they even highlighted the fact that all paths are changeable so that might be a good starting point.
I would love to see it fully implemented as alot of non-linux savvy people try out bazzite and having plugins and themes on steam are especially helpful and great to have!
Also this is technically similar to #475 but I believe this is about bazzite not all immutable systems as that seems like alot of variation to go thru.
Anything else?
posts mentioned: https://github.com/SteamClientHomebrew/Millennium/pull/503 https://github.com/SteamClientHomebrew/Millennium/issues/475
Two problems need to be worked around on Bazzite as of Millennium 2.35.0:
Part 1 — Install to a writable location
The installer does sudo cp -r to /usr/lib/millennium, /usr/share/millennium, and /opt/python-i686-3.11.8 which are all on the read-only OSTree rootfs. The fix is to skip the system copy entirely and extract the release tarball directly to ~/.local/.
Part 2 — Fix hardcoded paths in the binaries
Even with files in ~/.local/, the binaries still reference the original system paths as C++ compile-time constants — environment variables have no effect on them. The fix is a binary patch to redirect those paths to /var/, backed by systemd-tmpfiles.d symlinks pointing to ~/.local/ — the idiomatic Bazzite mechanism for persistent /var/ entries that survive reboots.
Below is the script that does both pieces:
#!/usr/bin/bash
# Millennium installer/upgrader for Bazzite (immutable OS)
# Works around read-only /usr and /opt by:
# 1. Extracting the tarball directly to ~/.local/
# 2. Patching hardcoded paths in the .so files (/opt, /usr -> /var, same length)
# 3. Using systemd-tmpfiles to create /var/ symlinks on every boot
set -e
MILL_LIB="$HOME/.local/lib/millennium"
MILL_SHARE="$HOME/.local/share/millennium"
PYTHON_DIR="$HOME/.local/opt/python-i686-3.11.8"
STEAM_DIR="$HOME/.steam/steam"
GITHUB_ACCOUNT="SteamClientHomebrew/Millennium"
# ── 1. Fetch latest release tag ───────────────────────────────────────────────
echo "==> Fetching latest Millennium release..."
TAG=$(curl -fsSL "https://api.github.com/repos/${GITHUB_ACCOUNT}/releases" \
-H 'Accept: application/vnd.github.v3+json' \
| jq -r '[.[] | select(.prerelease == false)] | first | .tag_name')
if [[ -z "$TAG" || "$TAG" == "null" ]]; then
echo "ERROR: Could not fetch release info"
exit 1
fi
VERSION="${TAG#v}"
TARBALL_URL="https://github.com/${GITHUB_ACCOUNT}/releases/download/${TAG}/millennium-v${VERSION}-linux-x86_64.tar.gz"
echo " Version: $VERSION"
# ── 2. Download and extract to ~/.local/ ──────────────────────────────────────
echo "==> Downloading tarball..."
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
curl -fsSL "$TARBALL_URL" -o "$TMPDIR/millennium.tar.gz"
echo "==> Extracting to ~/.local/..."
mkdir -p "$MILL_LIB" "$MILL_SHARE" "$PYTHON_DIR"
# Extract to temp dir first, then copy to writable targets
tar -xzf "$TMPDIR/millennium.tar.gz" -C "$TMPDIR" --warning=no-timestamp 2>/dev/null || true
cp -r "$TMPDIR/usr/lib/millennium/." "$MILL_LIB/"
cp -r "$TMPDIR/usr/share/millennium/." "$MILL_SHARE/"
cp -r "$TMPDIR/opt/python-i686-3.11.8/." "$PYTHON_DIR/"
chmod +x "$PYTHON_DIR/bin/python3.11"
# ── 3. Verify key files ───────────────────────────────────────────────────────
for f in \
"$MILL_LIB/libmillennium_x86.so" \
"$MILL_LIB/libmillennium_bootstrap_86x.so" \
"$PYTHON_DIR/lib/libpython-3.11.8.so" \
"$PYTHON_DIR/bin/python3.11"
do
[[ -f "$f" ]] || { echo "ERROR: missing $f"; exit 1; }
done
# ── 4. Patch binaries (same-length string replacement, no relocation needed) ──
# /opt/python-i686-3.11.8 (23 chars) -> /var/python-i686-3.11.8 (23 chars)
# /usr/lib/millennium (19 chars) -> /var/lib/millennium (19 chars)
# /usr/share/millennium (21 chars) -> /var/share/millennium (21 chars)
echo "==> Patching binaries..."
perl -pi -e '
s|/opt/python-i686-3\.11\.8|/var/python-i686-3.11.8|g;
s|/usr/lib/millennium|/var/lib/millennium|g;
s|/usr/share/millennium|/var/share/millennium|g;
' "$MILL_LIB/libmillennium_x86.so" \
"$MILL_LIB/libmillennium_bootstrap_86x.so"
echo " Verified patched paths:"
strings "$MILL_LIB/libmillennium_x86.so" \
| grep -E "^/var/(python-i686|lib/millennium|share/millennium)" \
| sed 's/^/ /'
# ── 5. Steam preload symlink ──────────────────────────────────────────────────
echo "==> Installing Steam preload hook..."
ln -sf "$MILL_LIB/libmillennium_bootstrap_86x.so" \
"$STEAM_DIR/ubuntu12_32/libXtst.so.6"
# ── 6. systemd-tmpfiles for persistent /var/ symlinks ────────────────────────
echo "==> Writing /etc/tmpfiles.d/millennium.conf (requires sudo)..."
sudo tee /etc/tmpfiles.d/millennium.conf > /dev/null << EOF
# Millennium Steam mod framework — Bazzite immutable OS workaround
# Redirects hardcoded /var/ paths (patched from /opt/ and /usr/) to ~/.local installs
L /var/python-i686-3.11.8 - - - - $HOME/.local/opt/python-i686-3.11.8
L /var/lib/millennium - - - - $HOME/.local/lib/millennium
L /var/share/millennium - - - - $HOME/.local/share/millennium
EOF
sudo systemd-tmpfiles --create /etc/tmpfiles.d/millennium.conf
echo ""
echo "==> Symlinks:"
ls -la /var/python-i686-3.11.8 /var/lib/millennium /var/share/millennium
echo ""
echo "Done — Millennium $VERSION installed. Restart Steam to load it."
https://github.com/SteamClientHomebrew/Millennium/blob/main/src/sys/env.cc
All paths are overridable by environment variables. if you start Steam with a environment var that shadows one Millennium uses, it will use yours instead. No patching.
Hi 👋. While is true that Bazzite has a read-only /usr, /usr/local is writable (being a symlink to /var/usrlocal) as so is /opt (symlink pointing to /var/opt, though this convention is weaker and might turn read-only in a non foreseeable future). Dropping that bit of information there, as personally feel like creating directories directly under /var is a bit messy.
Just gonna voice my support for this request, having learned of the project through Brodie's Youtube video about the project. I run Bazzite, and was saddened to discover the read only filesystem was like "NAH BRO IT AIN'T HAPPENING". ... Sadge.
@shdwmtr great, thanks for the note, with that the script can fully do with just setting the correct env using tmpfiles:
#!/usr/bin/bash
# Millennium installer/upgrader for Bazzite (immutable OS)
# Works around read-only /usr and /opt by:
# 1. Extracting the tarball directly to ~/.local/
# 2. Setting env vars so Millennium finds libs/assets in ~/.local/ (no binary patching)
# 3. Using systemd-tmpfiles to create /opt/python-i686-3.11.8 symlink on every boot
# (/opt -> var/opt on OSTree, so the original RUNPATH works without patching)
set -e
MILL_LIB="$HOME/.local/lib/millennium"
MILL_SHARE="$HOME/.local/share/millennium"
PYTHON_DIR="$HOME/.local/opt/python-i686-3.11.8"
STEAM_DIR="$HOME/.steam/steam"
GITHUB_ACCOUNT="SteamClientHomebrew/Millennium"
ENV_DIR="$HOME/.config/environment.d"
# ── 1. Fetch latest release tag ───────────────────────────────────────────────
echo "==> Fetching latest Millennium release..."
TAG=$(curl -fsSL "https://api.github.com/repos/${GITHUB_ACCOUNT}/releases" \
-H 'Accept: application/vnd.github.v3+json' \
| jq -r '[.[] | select(.prerelease == false)] | first | .tag_name')
if [[ -z "$TAG" || "$TAG" == "null" ]]; then
echo "ERROR: Could not fetch release info"
exit 1
fi
VERSION="${TAG#v}"
TARBALL_URL="https://github.com/${GITHUB_ACCOUNT}/releases/download/${TAG}/millennium-v${VERSION}-linux-x86_64.tar.gz"
echo " Version: $VERSION"
# ── 2. Download and extract to ~/.local/ ──────────────────────────────────────
echo "==> Downloading tarball..."
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
curl -fsSL "$TARBALL_URL" -o "$TMPDIR/millennium.tar.gz"
echo "==> Extracting to ~/.local/..."
mkdir -p "$MILL_LIB" "$MILL_SHARE" "$PYTHON_DIR"
tar -xzf "$TMPDIR/millennium.tar.gz" -C "$TMPDIR" --warning=no-timestamp 2>/dev/null || true
cp -r "$TMPDIR/usr/lib/millennium/." "$MILL_LIB/"
cp -r "$TMPDIR/usr/share/millennium/." "$MILL_SHARE/"
cp -r "$TMPDIR/opt/python-i686-3.11.8/." "$PYTHON_DIR/"
chmod +x "$PYTHON_DIR/bin/python3.11"
# ── 3. Verify key files ───────────────────────────────────────────────────────
for f in \
"$MILL_LIB/libmillennium_x86.so" \
"$MILL_LIB/libmillennium_bootstrap_86x.so" \
"$PYTHON_DIR/lib/libpython-3.11.8.so" \
"$PYTHON_DIR/bin/python3.11"
do
[[ -f "$f" ]] || { echo "ERROR: missing $f"; exit 1; }
done
# ── 4. Write environment.d overrides ──────────────────────────────────────────
# MILLENNIUM_RUNTIME_PATH: bootstrap reads getenv() in release builds (not compiled-in)
# MILLENNIUM__SHIMS_PATH / MILLENNIUM__ASSETS_PATH: environment.cc respects pre-set vars
echo "==> Writing $ENV_DIR/millennium.conf..."
mkdir -p "$ENV_DIR"
cat > "$ENV_DIR/millennium.conf" << EOF
MILLENNIUM_RUNTIME_PATH=$HOME/.local/lib/millennium/libmillennium_x86.so
MILLENNIUM__SHIMS_PATH=$HOME/.local/share/millennium/shims
MILLENNIUM__ASSETS_PATH=$HOME/.local/share/millennium/assets
MILLENNIUM__DATA_LIB=$HOME/.local/share/millennium
EOF
# ── 5. Steam preload symlink ──────────────────────────────────────────────────
echo "==> Installing Steam preload hook..."
ln -sf "$MILL_LIB/libmillennium_bootstrap_86x.so" \
"$STEAM_DIR/ubuntu12_32/libXtst.so.6"
# ── 6. systemd-tmpfiles for /opt/python symlink ───────────────────────────────
# /opt -> var/opt on OSTree, so creating /var/opt/python-i686-3.11.8 satisfies
# the RUNPATH baked into libmillennium_x86.so (/opt/python-i686-3.11.8/lib)
echo "==> Writing /etc/tmpfiles.d/millennium.conf (requires sudo)..."
sudo tee /etc/tmpfiles.d/millennium.conf > /dev/null << EOF
# Millennium Steam mod framework — Bazzite immutable OS workaround
# /opt -> var/opt on OSTree; this satisfies the RUNPATH in libmillennium_x86.so
L /var/opt/python-i686-3.11.8 - - - - $HOME/.local/opt/python-i686-3.11.8
EOF
sudo systemd-tmpfiles --create /etc/tmpfiles.d/millennium.conf
echo ""
echo "==> Symlink:"
ls -la /opt/python-i686-3.11.8
echo ""
echo "Done — Millennium $VERSION installed."
echo "Log out and back in (or reboot) for environment.d vars to take effect, then restart Steam."
It does work on Bazzite but I had to remove leading blanks in the script otherwise it gets mad on file writing steps. I also replaced << EOF with <<EOF.
@shdwmtr great, thanks for the note, with that the script can fully do with just setting the correct env using tmpfiles:
Strange. The exact same script failed today with
cp: cannot stat '/tmp/tmp.3mLQtYT57G/usr/share/millennium/.': No such file or directory
I changed
mkdir -p "$MILL_LIB" "$MILL_SHARE" "$PYTHON_DIR"
to
mkdir -p "$MILL_LIB" "$MILL_SHARE" "$PYTHON_DIR" "$TMPDIR/usr/lib/millennium/." "$TMPDIR/usr/share/millennium/." "$TMPDIR/opt/python-i686-3.11.8/."
Seemed to fix it.
Also trap 'rm -rf "$TMPDIR"' EXIT should be guarded with checks to prevent accidental rm -rf /
For whatever reason files ~/.local/lib/millennium/libmillennium_luavm_x86 and ~/.local/lib/millennium/libmillennium_pvs64 lost exec permission and prevented steamwebhelper from running.
bazzite stable, 44.20260515 I use the latest script that u/igor-tsiglyar provided, with the latest change from @hidnight just like you, hidnight, I got a permission issue when launching steam what solved it was running the script, log in/out, trying to execute /tmp/.millennium-pv-OvSiOx/bin/pressure-vessel-unruntime downloaded/installed themes are missing, but now millenium works
all of this may be because of the 3.1.0 update ? this projet is very good, it's just a bit complicated to get it working/to update it on bazzite