From 8aa2ac37e1219498be5b9cdc8bb77596f98e6d0b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 21 Apr 2026 20:17:46 -0400 Subject: [PATCH] Support writable headless Xorg launch config --- .../.local/bin/stormux_launch_helpers.sh | 20 +++++++++++++ .../etc/X11/xorg.conf.d/10-headless.conf | 28 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 home/stormux/.local/etc/X11/xorg.conf.d/10-headless.conf diff --git a/home/stormux/.local/bin/stormux_launch_helpers.sh b/home/stormux/.local/bin/stormux_launch_helpers.sh index c0a1157..b2978a2 100755 --- a/home/stormux/.local/bin/stormux_launch_helpers.sh +++ b/home/stormux/.local/bin/stormux_launch_helpers.sh @@ -6,6 +6,26 @@ start_screen_reader() { cthulhu & } +check_architecture() { + local architecture + local supportedArch + + architecture="$(uname -m)" + for supportedArch in "$@"; do + if [[ "$architecture" == "$supportedArch" ]]; then + return 0 + fi + done + + if [[ "$architecture" == "aarch64" && -d "${HOME}/.fex-emu/RootFS/ArchLinux" && "$*" == *"x86_64"* ]]; then + export fex="FEXLoader -- " + return 0 + fi + + printf 'This game is not compatible with %s.\n' "$architecture" >&2 + return 1 +} + fex_load() { local gameDir="$1" local exeName="$2" diff --git a/home/stormux/.local/etc/X11/xorg.conf.d/10-headless.conf b/home/stormux/.local/etc/X11/xorg.conf.d/10-headless.conf new file mode 100644 index 0000000..053bc44 --- /dev/null +++ b/home/stormux/.local/etc/X11/xorg.conf.d/10-headless.conf @@ -0,0 +1,28 @@ +Section "Monitor" + Identifier "dummy_monitor" + HorizSync 28.0-80.0 + VertRefresh 48.0-75.0 + Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 +EndSection + +Section "Device" + Identifier "dummy_card" + Driver "dummy" + VideoRam 256000 + Option "UseFBDev" "false" +EndSection + +Section "Screen" + Identifier "dummy_screen" + Device "dummy_card" + Monitor "dummy_monitor" + SubSection "Display" + Depth 24 + Modes "1920x1080" + EndSubSection +EndSection + +Section "ServerLayout" + Identifier "dummy_layout" + Screen 0 "dummy_screen" +EndSection