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");