diff --git a/js/electron.js b/js/electron.js index 77820db2..c5e9c4cb 100644 --- a/js/electron.js +++ b/js/electron.js @@ -1,10 +1,5 @@ /* 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"); diff --git a/package.json b/package.json index 9c753db7..1b150ed4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "The open source modular smart mirror platform.", "main": "js/electron.js", "scripts": { - "start": "./node_modules/.bin/electron js/electron.js", + "start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js", "server": "node ./serveronly", "install": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error", "install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error",