From 5ba23a6d7a40052d9e1d4bd0cf018cfe7814d03a Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Mon, 6 Apr 2026 21:20:36 -0500 Subject: Use fluorine data dir for NXM socket instead of XDG_RUNTIME_DIR XDG_RUNTIME_DIR may point to a read-only location on Steam Deck (SteamOS has a read-only root filesystem). Use ~/.local/share/fluorine/tmp/ instead, which is always writable. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/src/nxmhandler_linux.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/src/nxmhandler_linux.cpp b/src/src/nxmhandler_linux.cpp index 5d4f8ab..4fa66b5 100644 --- a/src/src/nxmhandler_linux.cpp +++ b/src/src/nxmhandler_linux.cpp @@ -1,4 +1,5 @@ #include "nxmhandler_linux.h" +#include "fluorinepaths.h" #include @@ -161,12 +162,14 @@ NxmHandlerLinux::~NxmHandlerLinux() QString NxmHandlerLinux::socketPath() { - const QString runtimeDir = qEnvironmentVariable("XDG_RUNTIME_DIR"); - if (!runtimeDir.isEmpty()) { - return QDir(runtimeDir).filePath("mo2-nxm.sock"); + // Use our own data dir for the socket — XDG_RUNTIME_DIR may point to a + // read-only location on Steam Deck (SteamOS has a read-only root). + const QString dataDir = fluorineDataDir(); + if (!dataDir.isEmpty()) { + return QDir(dataDir).filePath("tmp/mo2-nxm.sock"); } - return "/tmp/mo2-nxm.sock"; + return QDir::homePath() + "/.local/share/fluorine/tmp/mo2-nxm.sock"; } void NxmHandlerLinux::registerHandler() const -- cgit v1.3.1