Skip to content
Open
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
20 changes: 20 additions & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,24 @@ Debian and Arch Linux ARM packages and additional Alpine packages are downloaded

## Source availability

The optional local SteamFrame image experiment preserves SteamOS and its
packages under their respective terms; the image is not included in the IPA.
Device preparation adds Arch Linux ARM x11vnc 0.9.17 and libvncserver 0.9.15
(GPL-2.0-family terms, with per-file notices). Their upstream sources are
https://github.com/LibVNC/x11vnc/tree/0.9.17 and
https://github.com/LibVNC/libvncserver/tree/LibVNCServer-0.9.15.
The exact package hashes and helper build steps are retained in
`tools/steamos/prepare-device-image.py`. LinuxRunner's added guest helper
sources remain in `app/LinuxRunner/GUISupport.bundle`. Preserve component
notices and corresponding source when sharing any prepared guest image.

The optional SteamOS graphics overlay contains a separate Mesa build at
`590bf21d918c86908d96d1f4590ecd25b9657171`, from
https://gitlab.freedesktop.org/mesa/mesa.git. It retains Mesa's license inventory
under `/opt/linuxrunner/steamos-gpu/share/licenses/mesa`, and its build identity
in `BUILD.json`. The graphics probe's source and repository licensing files
are included under `share/linuxrunner`. Packaging is defined by
`tools/steamos/package-gpu-overlay.py`; the source/build options and isolated
prefix are described in `docs/STEAMOS_EXPERIMENT.md`.

The application source, build scripts and dependency revisions are retained in the repository. [SOURCE_ORIGIN.txt](SOURCE_ORIGIN.txt) records the release lineage and exact dependency commits. Submodule contents are not included in GitHub's automatic source archives; initialize the pinned submodules when building from a clone. Source-distribution requirements for bundled binaries apply separately from the licenses of packages downloaded later by users. The release source asset must include the matching application snapshot, pinned build dependencies, graphics source/patches, matching Alpine recipes and checksum-verified inputs, and matching Ghostty Web/Ghostty source. The unchanged bundled Alpine root archive can use the already retained matching source inputs. Preserve the complete notices asset alongside the IPA.
4 changes: 3 additions & 1 deletion app/App.xcconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#include "iOS.xcconfig"

PRODUCT_NAME = LinuxKit
LINUXRUNNER_DISPLAY_NAME = $(PRODUCT_NAME)
PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_BUNDLE_IDENTIFIER)
INFOPLIST_FILE = app/Info.plist
INFOPLIST_PREPROCESS = YES
INFOPLIST_PREFIX_HEADER = $(BUILT_PRODUCTS_DIR)/infoplisticons.h
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CODE_SIGN_ENTITLEMENTS = app/iSH.entitlements
LINUXRUNNER_CODE_SIGN_ENTITLEMENTS = app/iSH.entitlements
CODE_SIGN_ENTITLEMENTS = $(LINUXRUNNER_CODE_SIGN_ENTITLEMENTS)

HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT) $(SRCROOT)/deps/libarchive/libarchive
// AccessibilityFixes.m contains a static constructor that we don't want removed
Expand Down
2 changes: 1 addition & 1 deletion app/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ - (int)boot {
NSArray<NSString *> *command;
command = UserPreferences.shared.bootCommand;
#ifdef LINUXRUNNER
if ([LRRuntimeBridge activeEnvironmentIsDebian] || [LRRuntimeBridge activeEnvironmentIsArch]) command = @[@"/bin/sh", @"/usr/lib/linuxrunner/init.sh"];
if ([LRRuntimeBridge activeEnvironmentIsDebian] || [LRRuntimeBridge activeEnvironmentIsArch] || [LRRuntimeBridge activeEnvironmentIsSteamOS]) command = @[@"/bin/sh", @"/usr/lib/linuxrunner/init.sh"];
#endif
if (command.count == 0) {
NSLog(@"boot command is empty");
Expand Down
2 changes: 1 addition & 1 deletion app/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<string>$(LINUXRUNNER_DISPLAY_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
33 changes: 33 additions & 0 deletions app/LinuxRunner/GUISupport.bundle/desktop-components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,39 @@ if [ "$environment" = plasma ]; then
# password prompt over the desktop after a few idle minutes. First start of an
# account only; a kscreenlockerrc the user already has is left as it is.
plasma_config="${XDG_CONFIG_HOME:-$HOME/.config}"
if [ "$(sed -n 's/^ID=//p' /etc/os-release | tr -d '\"')" = steamos ]; then
export KWIN_COMPOSE=N
if [ "${LR_STEAMOS_GPU:-0}" = 1 ]; then
unset QT_QUICK_BACKEND QT_OPENGL LIBGL_ALWAYS_SOFTWARE
export QT_XCB_GL_INTEGRATION=xcb_egl QSG_RHI_BACKEND=opengl QSG_RHI_GL_USE_GLES=1
else
export QT_XCB_GL_INTEGRATION=none QT_QUICK_BACKEND=software QT_OPENGL=software
fi
mkdir -p "$plasma_config/autostart"
/bin/sh ./steamos-fonts.sh || echo 'STEAMOS_FONTS: optional default unavailable; desktop startup continues'
if [ ! -e "$plasma_config/startkderc" ] && [ ! -L "$plasma_config/startkderc" ]; then
printf '[General]\nsystemdBoot=false\n' > "$plasma_config/startkderc"
fi
if [ ! -e "$plasma_config/autostart/steam.desktop" ] && [ ! -L "$plasma_config/autostart/steam.desktop" ]; then
printf '[Desktop Entry]\nType=Application\nHidden=true\n' > "$plasma_config/autostart/steam.desktop"
fi
# The milestone is a desktop and terminal, without system services or updates.
# Discover's Flatpak notifier crashes; Baloo reserves a 256 GiB index mapping;
# the image's Python firewall/IBus applets also fail and consume address space.
# XDG overrides apply to existing accounts too, preserving explicit choices.
# iPadOS owns power, display brightness and authentication; their Linux
# agents repeatedly query a system bus that this userspace does not provide.
for applet in org.kde.discover.notifier baloo_file firewall-applet ibus powerdevil polkit-kde-authentication-agent-1; do
if [ ! -e "$plasma_config/autostart/$applet.desktop" ] && [ ! -L "$plasma_config/autostart/$applet.desktop" ]; then
printf '[Desktop Entry]\nType=Application\nHidden=true\n' > "$plasma_config/autostart/$applet.desktop"
fi
done
# Tell KDE's Places model that indexing is disabled too. Merely suppressing
# the daemon leaves it trying to enumerate the unavailable tags:/ location.
if grep -qx 'Hidden=true' "$plasma_config/autostart/baloo_file.desktop" && command -v kwriteconfig6 >/dev/null; then
kwriteconfig6 --file baloofilerc --group 'Basic Settings' --key Indexing-Enabled false
fi
fi
if mkdir -p "$plasma_config" && [ ! -e "$plasma_config/kscreenlockerrc" ]; then
printf '[Daemon]\nAutolock=false\nLockOnResume=false\n' > "$plasma_config/kscreenlockerrc" && echo 'DESKTOP_STARTUP: plasma screen locker defaults written (autolock off; iOS locks the device)'
fi
Expand Down
1 change: 1 addition & 0 deletions app/LinuxRunner/GUISupport.bundle/desktop-profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cd "$(dirname "$0")"
. ./support-common.sh
mode=${1:-check}
distro=$(sed -n 's/^ID=//p' /etc/os-release 2>/dev/null | tr -d '"')
if [ "$distro" = steamos ]; then exec /bin/sh ./steamos-profile.sh "$@"; fi
have() { command -v "$1" >/dev/null 2>&1; }
helper_key() { { cat support-version; sha256sum "$@"; } | sha256sum | awk '{print $1}'; }

Expand Down
5 changes: 5 additions & 0 deletions app/LinuxRunner/GUISupport.bundle/package-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ if command -v apt-get >/dev/null; then distro=debian
elif command -v pacman >/dev/null; then distro=archarm
elif command -v apk >/dev/null; then distro=alpine
else echo 'PACKAGE_OPERATION: unsupported distribution'; exit 2; fi
if [ "$(sed -n 's/^ID=//p' /etc/os-release | tr -d '\"')" = steamos ]; then
case "$operation" in installed|details|diagnose|dependencies) ;;
*) echo 'PACKAGE_OPERATION: The SteamOS image experiment supports installed-package inspection. Package changes and repository updates are not enabled for this prepared image.'; exit 2;;
esac
fi
printf 'operation=%s\ndistribution=%s\nstarted=%s\n' "$operation" "$distro" "$(date +%s)" > package-interrupted
printf 'running\n' > package-result
rm -f package-state.tsv.new package-details.txt.new
Expand Down
71 changes: 66 additions & 5 deletions app/LinuxRunner/GUISupport.bundle/session.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,24 @@ if [ "$(id -u)" = 0 ] && [ "$guest_user" != root ]; then
[ -c /dev/dri/card1 ] || mknod -m 660 /dev/dri/card1 c 226 1
if (exec 3<>/dev/dri/card1) 2>/dev/null; then kms_desktop=wayfire-gpu; else rm -f /dev/dri/card1; fi
fi
if [ "$mode" = desktop ] && { [ "$kms_desktop" = hyprland ] || [ "$kms_desktop" = wayfire-gpu ]; } && command -v seatd >/dev/null; then
if [ "$mode" = desktop ] && [ "$kms_desktop" = plasma ] &&
[ "$(sed -n 's/^ID=//p' /etc/os-release | tr -d '\"')" = steamos ]; then
/bin/sh ./steamos-desktop.sh tags-policy "$guest_user" || echo 'STEAMOS_TAGS: optional workaround unavailable; custom paths preserved, desktop startup continues'
rm -f /dev/dri/card0 /dev/dri/renderD128
mkdir -p /dev/dri
[ -c /dev/dri/card1 ] || mknod -m 660 /dev/dri/card1 c 226 1
[ -c /dev/dri/renderD129 ] || mknod -m 660 /dev/dri/renderD129 c 226 129
if (exec 3<>/dev/dri/card1) 2>/dev/null && [ -x /usr/lib/Xorg ] &&
/bin/sh ./steamos-gpu.sh; then
chown "root:$gid" /dev/dri/card1 /dev/dri/renderD129
chmod 660 /dev/dri/card1 /dev/dri/renderD129
printf 'enabled\n' > "$session/steamos-gpu"
echo 'GUI_SESSION: SteamOS gpu=virgl-metal (Xorg glamor and Qt; KWin effects off)'
else
rm -f /dev/dri/card1 /dev/dri/renderD129
echo 'GUI_SESSION: SteamOS gpu=software (GPU device or overlay unavailable)'
fi
elif [ "$mode" = desktop ] && { [ "$kms_desktop" = hyprland ] || [ "$kms_desktop" = wayfire-gpu ]; } && command -v seatd >/dev/null; then
mkdir -p /dev/dri /run/udev/data
[ -c /dev/dri/card0 ] || mknod -m 660 /dev/dri/card0 c 226 0
[ -c /dev/dri/renderD128 ] || mknod -m 666 /dev/dri/renderD128 c 226 128
Expand Down Expand Up @@ -166,6 +183,11 @@ export DISPLAY=:$display
# Debian Mesa needs server GLX for real desktop OpenGL contexts. This is
# software rendering, independent of optional Metal framebuffer presentation.
distro=$(sed -n 's/^ID=//p' /etc/os-release | tr -d '"')
if [ "$distro" = steamos ]; then
# Breeze's QWidget painter crashed in the supplied image. Fusion keeps
# both direct children and D-Bus-activated Qt applications on one style.
export QT_STYLE_OVERRIDE=Fusion
fi
# Session graphics default chosen in Settings; a launcher's own
# LR_GUI_GPU_MODE (command.sh) takes precedence for that application.
gpu_mode=mesa
Expand All @@ -177,6 +199,15 @@ desktop_environment=linuxrunner
[ ! -f "$session/desktop-environment" ] || desktop_environment=$(cat "$session/desktop-environment")
case "$desktop_environment" in linuxrunner|plasma|lxqt|enlightenment|wayfire|hyprland) ;; *) desktop_environment=linuxrunner;; esac
export LR_DESKTOP_ENVIRONMENT="$desktop_environment"
steamos_gpu=0
if [ "$distro" = steamos ] && [ "$mode" = desktop ] && [ "$desktop_environment" = plasma ] &&
[ "$(cat "$session/steamos-gpu" 2>/dev/null || true)" = enabled ] && [ -c /dev/dri/card1 ]; then
steamos_gpu=1
export LD_LIBRARY_PATH=/opt/linuxrunner/steamos-gpu/lib
export LIBGL_DRIVERS_PATH=/opt/linuxrunner/steamos-gpu/lib/dri
export __EGL_VENDOR_LIBRARY_FILENAMES=/opt/linuxrunner/steamos-gpu/share/glvnd/egl_vendor.d/50_mesa.json
export MESA_LOADER_DRIVER_OVERRIDE=virtio_gpu GALLIUM_DRIVER=virgl LR_STEAMOS_GPU=1
fi
glx_mode=off
[ "$distro" != debian ] || glx_mode=software
[ ! -f "$session/glx-mode" ] || glx_mode=$(cat "$session/glx-mode")
Expand Down Expand Up @@ -204,6 +235,17 @@ export QT_QPA_PLATFORM=${QT_QPA_PLATFORM:-xcb}
export QT_FORCE_STDERR_LOGGING=${QT_FORCE_STDERR_LOGGING:-1}
export QT_WIDGETS_RHI=${QT_WIDGETS_RHI:-0} QT_QUICK_BACKEND=${QT_QUICK_BACKEND:-software}
export QT_OPENGL=${QT_OPENGL:-software} LIBGL_ALWAYS_SOFTWARE=${LIBGL_ALWAYS_SOFTWARE:-1}
if [ "$steamos_gpu" = 1 ]; then
unset LIBGL_ALWAYS_SOFTWARE QT_QUICK_BACKEND QT_OPENGL
export QT_XCB_GL_INTEGRATION=xcb_egl QSG_RHI_BACKEND=opengl QSG_RHI_GL_USE_GLES=1 QSG_INFO=1
fi
steamos_software_fallback() {
steamos_gpu=0
unset LD_LIBRARY_PATH LIBGL_DRIVERS_PATH __EGL_VENDOR_LIBRARY_FILENAMES MESA_LOADER_DRIVER_OVERRIDE GALLIUM_DRIVER LR_STEAMOS_GPU
unset QSG_RHI_BACKEND QSG_RHI_GL_USE_GLES QSG_INFO
export QT_QUICK_BACKEND=software QT_OPENGL=software LIBGL_ALWAYS_SOFTWARE=1 QT_XCB_GL_INTEGRATION=none
echo 'GUI_SESSION: SteamOS GPU check failed; starting the software desktop (see graphics.log and xorg.log)'
}
# A fresh X server belongs to this guest root; DISPLAY is session-scoped.
width=640 height=480
if [ -f "$session/geometry" ]; then
Expand All @@ -213,12 +255,24 @@ if [ -f "$session/geometry" ]; then
width=${geometry%x*};height=${geometry#*x}
if [ "$width" -lt 320 ] || [ "$width" -gt 2560 ] || [ "$height" -lt 240 ] || [ "$height" -gt 1600 ] || [ $((width % 2)) -ne 0 ] || [ $((height % 2)) -ne 0 ]; then echo 'GUI_SESSION: invalid display geometry'; exit 2; fi
fi
if [ "$steamos_gpu" = 1 ] && ! /opt/linuxrunner/steamos-gpu/bin/graphics-check > "$session/graphics.log" 2>&1; then
steamos_software_fallback
fi
export XAUTHORITY="$session/authority"
umask 077
xauth -f "$XAUTHORITY" add "$DISPLAY" . "$(cat "$session/cookie")"
echo "GUI_SESSION: root=${LINUXRUNNER_ENVIRONMENT:-current} distribution=$distro DISPLAY=$DISPLAY geometry=${width}x${height} backend=xvfb-rfb interpreter-baseline"
echo "GUI_SESSION: starting X.Org software display, ${width}x${height}, no JIT"
Xvfb "$DISPLAY" -screen 0 "${width}x${height}x24" -nolisten tcp -auth "$XAUTHORITY" "$shm_switch" MIT-SHM "$glx_switch" GLX > "$session/xvfb.log" 2>&1 & xpid=$!
echo "GUI_SESSION: root=${LINUXRUNNER_ENVIRONMENT:-current} distribution=$distro DISPLAY=$DISPLAY geometry=${width}x${height} backend=$([ "$steamos_gpu" = 1 ] && echo xorg-virgl-rfb || echo xvfb-rfb) interpreter-baseline"
if [ "$steamos_gpu" = 1 ]; then
cp ./steamos-xorg.conf "$session/xorg.conf"
echo 'xorg-virgl' > "$session/display-backend"
echo "GUI_SESSION: starting Xorg modesetting/glamor on virgl/Metal, ${width}x${height}, no JIT"
/usr/lib/Xorg "$DISPLAY" -config "$session/xorg.conf" -logfile "$session/xorg.log" -noreset -nolisten tcp \
-novtswitch -sharevts -auth "$XAUTHORITY" > "$session/xvfb.log" 2>&1 & xpid=$!
else
echo 'xvfb-software' > "$session/display-backend"
echo "GUI_SESSION: starting X.Org software display, ${width}x${height}, no JIT"
Xvfb "$DISPLAY" -screen 0 "${width}x${height}x24" -nolisten tcp -auth "$XAUTHORITY" "$shm_switch" MIT-SHM "$glx_switch" GLX > "$session/xvfb.log" 2>&1 & xpid=$!
fi
i=0
while [ ! -S "/tmp/.X11-unix/X$display" ]; do
[ ! -f "$session/stop" ] || exit 0
Expand All @@ -245,7 +299,7 @@ xmodmap -pm >> "$session/keymap.log" 2>&1 || true
xkb=-xkb
if [ -f "$session/xkb-mode" ] && [ "$(cat "$session/xkb-mode")" = noxkb ]; then xkb=-noxkb; fi
focus_policy=managed; [ "$mode" != desktop ] || focus_policy=window-manager
echo "GUI_SESSION: keyboard=$xkb focus=$focus_policy encoding=Hextile/Raw software-rendering"
echo "GUI_SESSION: keyboard=$xkb focus=$focus_policy encoding=Hextile/Raw renderer=$([ "$steamos_gpu" = 1 ] && echo virgl-metal || echo software)"
# A Linux sockaddr_un path holds at most 107 bytes. A support-directory UUID
# path plus GVFS/Qt socket suffix exceeds it. Use a uniquely owned short path
# for every GUI mode, with restrictive permissions and no preexisting reuse.
Expand All @@ -271,6 +325,11 @@ if command -v dbus-daemon >/dev/null; then
if dbus-update-activation-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR HOME PATH DBUS_SESSION_BUS_ADDRESS; then
echo 'GUI_SESSION: dbus_activation_environment=PASS (explicit session variables, no systemd required)'
else echo 'GUI_SESSION: dbus_activation_environment=FAIL; inspect bus.log'; fi
if [ "$steamos_gpu" = 1 ]; then
dbus-update-activation-environment LD_LIBRARY_PATH LIBGL_DRIVERS_PATH __EGL_VENDOR_LIBRARY_FILENAMES \
MESA_LOADER_DRIVER_OVERRIDE GALLIUM_DRIVER LR_STEAMOS_GPU QT_STYLE_OVERRIDE \
QT_XCB_GL_INTEGRATION QSG_RHI_BACKEND QSG_RHI_GL_USE_GLES || true
fi
fi;;
*) echo 'GUI_SESSION: dbus_session=unavailable; inspect bus.log (applications still attempted)';;
esac
Expand Down Expand Up @@ -313,7 +372,9 @@ echo "GUI_INPUT: mode=$input_mode experimental=$([ "$input_mode" = eager ] && ec
# autocomplete splice typed URLs (2 of 5 gate runs), so it stays opt-in.
# The others are latency experiments.
vnc_timing=default
[ "$steamos_gpu" != 1 ] || vnc_timing=adaptive
[ ! -f "$session/vnc-timing" ] || vnc_timing=$(cat "$session/vnc-timing")
if [ "$vnc_timing" = default ] && [ "$steamos_gpu" = 1 ]; then vnc_timing=adaptive; fi
case "$vnc_timing" in
default|legacy) vnc_timing_options="-noxdamage -defer 16 -wait 25";;
threads) vnc_timing_options="-noxdamage -defer 16 -wait 25 -threads";;
Expand Down
42 changes: 42 additions & 0 deletions app/LinuxRunner/GUISupport.bundle/steamos-desktop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
# Reversible SteamOS-only workaround for KIO 6.14 enumerating tags even when
# Baloo is disabled. Retain the original plugin outside Qt's plugin search tree.
set -eu
[ "$(id -u)" = 0 ] || { echo 'STEAMOS_TAGS: root-required'; exit 1; }
[ "$(sed -n 's/^ID=//p' /etc/os-release | tr -d '\"')" = steamos ] || exit 0
plugin=/usr/lib/qt6/plugins/kf6/kio/tags.so
backup=/opt/linuxrunner/steamos-disabled-plugins
action=${1:-}
case "$action" in
tags-policy)
user=${2:-}
case "$user" in ''|*[!a-z0-9_-]*|[0-9-]*) exit 2;; esac
home=$(awk -F: -v name="$user" '$1==name {print $6; count++} END {if(count!=1)exit 1}' /etc/passwd)
case "$home" in /*) ;; *) exit 2;; esac
# No override means the managed desktop's default (Baloo off). Preserve an
# explicit account autostart override and put back our saved worker for it.
override="$home/.config/autostart/baloo_file.desktop"
action=disable-tags
if [ -e "$override" ] || [ -L "$override" ]; then
grep -qx 'Hidden=true' "$override" || action=restore-tags
fi
;;
disable-tags|restore-tags) ;;
*) echo 'Usage: steamos-desktop.sh tags-policy USER | disable-tags | restore-tags'; exit 2;;
esac
for path in /opt /opt/linuxrunner "$backup" "$plugin" "$backup/tags.so"; do
[ ! -L "$path" ] || { echo 'STEAMOS_TAGS: symlink refused'; exit 1; }
done
if [ "$action" = disable-tags ]; then
if [ -f "$plugin" ]; then
mkdir -p "$backup"
# An unexpected second copy can be a package update; keep both untouched.
[ ! -e "$backup/tags.so" ] || { echo 'STEAMOS_TAGS: plugin changed; retained copies, no override'; exit 0; }
mv "$plugin" "$backup/tags.so"
fi
[ ! -f "$backup/tags.so" ] || echo 'STEAMOS_TAGS: unavailable worker disabled; original retained (restore-tags to undo)'
elif [ -f "$backup/tags.so" ]; then
[ ! -e "$plugin" ] || { echo 'STEAMOS_TAGS: package worker already present; backup retained'; exit 0; }
mv "$backup/tags.so" "$plugin"
echo 'STEAMOS_TAGS: original worker restored'
fi
27 changes: 27 additions & 0 deletions app/LinuxRunner/GUISupport.bundle/steamos-fonts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
# Managed default for a scaled virtual display, run as the selected Linux user.
# RGB subpixel antialiasing assumes a fixed physical RGB stripe arrangement;
# it produces colored edges when the framebuffer is resized or rotated.
set -eu
config=${XDG_CONFIG_HOME:-$HOME/.config}
file="$config/kdeglobals"
if [ -L "$file" ] || { [ -e "$file" ] && [ ! -f "$file" ]; }; then
echo 'STEAMOS_FONTS: custom configuration path preserved'
exit 0
fi
# KConfig handles the write. Conservatively preserve any explicit account key,
# including immutable/expanded forms, even when it is in another group.
if [ -f "$file" ] && grep -Eq '^[[:space:]]*XftSubPixel(\[\$[ie]\])*[[:space:]]*=' "$file"; then
echo 'STEAMOS_FONTS: explicit subpixel preference preserved'
exit 0
fi
if ! command -v kwriteconfig6 >/dev/null; then
echo 'STEAMOS_FONTS: configuration tool unavailable; defaults unchanged'
exit 0
fi
mkdir -p "$config" || { echo 'STEAMOS_FONTS: configuration directory unavailable; defaults unchanged'; exit 0; }
if kwriteconfig6 --file "$file" --group General --key XftSubPixel none; then
echo 'STEAMOS_FONTS: grayscale antialiasing default for scaled framebuffer'
else
echo 'STEAMOS_FONTS: configuration write unavailable; defaults unchanged'
fi
Loading