Set default DISPLAY in package.json.

This commit is contained in:
Michael Teeuw 2020-02-01 15:02:47 +01:00
parent e2d4a0fde8
commit 8ef8388c32
2 changed files with 1 additions and 6 deletions

View File

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

View File

@ -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",