Use script for start MagicMirror

This commit is contained in:
Rodrigo Ramírez Norambuena 2017-01-24 02:12:36 -03:00
parent 57ea2ac039
commit 566ea9a110
3 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Option to use RegExp in Calendar's titleReplace.
- Hungarian Translation.
- Icelandic Translation.
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
### Fixed
- Update .gitignore to not ignore default modules folder.

View File

@ -4,7 +4,7 @@
"description": "A modular interface for smart mirrors.",
"main": "js/electron.js",
"scripts": {
"start": "electron js/electron.js",
"start": "sh run-start.sh",
"postinstall": "sh installers/postinstall/postinstall.sh",
"test": "./node_modules/mocha/bin/mocha tests --recursive"
},

4
run-start.sh Normal file
View File

@ -0,0 +1,4 @@
if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
export DISPLAY=:0 # Set by defaul display
fi
electron js/electron.js