From 21dbaa1a0335597d558ef733019a7b26f5bcb225 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Sat, 1 Feb 2020 13:59:13 +0100 Subject: [PATCH] Move DISPLAY default to electron script. --- js/app.js | 5 ----- js/electron.js | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/app.js b/js/app.js index 920d0c49..08612dd8 100644 --- a/js/app.js +++ b/js/app.js @@ -23,11 +23,6 @@ console.log("Starting MagicMirror: v" + global.version); // global absolute root path global.root_path = path.resolve(__dirname + "/../"); -if (!process.env.DISPLAY) { - console.log("DISPLAY environment variable not set. Using DISPLAY=:0"); - process.env.DISPLAY = ":0"; -} - if (process.env.MM_CONFIG_FILE) { global.configuration_file = process.env.MM_CONFIG_FILE; } diff --git a/js/electron.js b/js/electron.js index c5e9c4cb..77820db2 100644 --- a/js/electron.js +++ b/js/electron.js @@ -1,5 +1,10 @@ /* jshint esversion: 6 */ +if (!process.env.DISPLAY) { + console.log("DISPLAY environment variable not set. Using DISPLAY=:0"); + process.env.DISPLAY = ":0"; +} + "use strict"; const electron = require("electron");