feat: check for DISPLAY variable #12

This commit is contained in:
leukipp
2025-02-23 13:36:46 +01:00
parent 6d23efd713
commit fcc0e5813e
+8
View File
@@ -9,6 +9,14 @@ const { app } = require("electron");
global.ARGS = global.ARGS || {}; global.ARGS = global.ARGS || {};
if (!process.env.DISPLAY) {
console.error(`$DISPLAY variable not set to run the GUI application, are you connected via SSH?`);
console.error(`If you have installed the service use:`);
console.error(` systemctl --user start touchkio.service`);
console.error(`Alternatively export the variables first:`);
console.error(` export DISPLAY=":0" && export WAYLAND_DISPLAY="wayland-0" && touchkio\n`);
}
/** /**
* This promise resolves when the app has finished initializing, * This promise resolves when the app has finished initializing,
* allowing to safely create browser windows and perform other * allowing to safely create browser windows and perform other