aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-06 21:20:36 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-06 21:20:36 -0500
commit5ba23a6d7a40052d9e1d4bd0cf018cfe7814d03a (patch)
tree3e13fd6bf1eeb285b622c158b3dfde6e9c820631 /src
parente29d056a16fe0233d610c7a57eb141c3fd1dbba8 (diff)
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) <noreply@anthropic.com>
Diffstat (limited to 'src')
-rw-r--r--src/src/nxmhandler_linux.cpp11
1 files changed, 7 insertions, 4 deletions
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 <log.h>
@@ -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