Update unix socket directory to be /tmp/ instead of user home.

This commit is contained in:
HannahPadd
2026-03-13 13:51:00 +01:00
parent 6c9341f333
commit 3c945946e7
3 changed files with 13 additions and 4 deletions

View File

@@ -38,8 +38,8 @@ enum class OperatingSystem(
var dir = System.getenv("SLIMEVR_SOCKET_DIR")
if (dir != null) return dir
if (currentPlatform == LINUX) {
dir = System.getenv("XDG_RUNTIME_DIR")
if (dir != null) return dir
dir = "/tmp/"
return dir
}
return System.getProperty("java.io.tmpdir")
}

View File

@@ -45,6 +45,8 @@ val VERSION =
(GIT_VERSION_TAG.ifEmpty { GIT_COMMIT_HASH }) +
if (GIT_CLEAN) "" else "-dirty"
val featureFlags = FeatureFlags()
fun main(args: Array<String>) {
System.setProperty("awt.useSystemAAFontSettings", "on")
System.setProperty("swing.aatext", "true")
@@ -53,7 +55,6 @@ fun main(args: Array<String>) {
val formatter = HelpFormatter()
val options = Options()
val isLinux = System.getProperty("os.name").lowercase().contains("linux")
val featureFlags = FeatureFlags()
options.addOption("h", "help", false, "Show help")
options.addOption("V", "version", false, "Show version")
options.addOption("i", "install", true, "Run the driver install")
@@ -243,7 +244,7 @@ fun provideBridges(
)
yield(linuxBridge)
}
LogManager.info("Socket Dir ${OperatingSystem.socketDirectory}")
yield(
UnixSocketBridge(
server,

View File

@@ -1,5 +1,6 @@
package dev.slimevr.desktop.install.drivers
import dev.slimevr.desktop.featureFlags
import io.eiren.util.logging.LogManager
class Linux {
@@ -33,6 +34,13 @@ class Linux {
fun feeder() {
executeShellCommand("chmod", "+x", "$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App")
val command = if (featureFlags.steam) {
arrayOf("steam-runtime-launch-client", "--alongside-steam", "--", "udevadm", "cat")
} else {
arrayOf("udevadm", "cat")
}
val udevResponse = executeShellCommand(*command)
val feederOutput = executeShellCommand("$path/$LINUX_FEEDER_DIRECTORY/SlimeVR-Feeder-App", "--install")
if (feederOutput == null) {
LogManager.warning("Error installing feeder")