Read the statement by Michael Teeuw here.
(electron:2910): Gtk-WARNING **: 14:16:40.324: cannot open display: :0
-
@bachoo786 said in (electron:2910): Gtk-WARNING **: 14:16:40.324: cannot open display: :0:
yeah it returned nothing.
awesome! thanks
-
@sdetweil what is server mode and client mode? I dont understand the difference. Can you please explain? thanks.
-
@bachoo786 said in (electron:2910): Gtk-WARNING **: 14:16:40.324: cannot open display: :0:
Do I have to worry about installing pm2? will Magic Mirror run automatically if I was to reboot my raspberry? etc?
the current installation only tries to run on the real display… YOU have to figure it out otherwise…
(which we are doing here in this topic) -
@sdetweil I am really confused buddy.
lets start again please. I install mm using the script, what do I do next? do I need to worry about pm2? I suppose installing using the script installs MM as the server on the raspberry pi?
-
@bachoo786 sure…
MagicMirror is a web application.
it can be run in two different models
-
the browser and ‘web server’ are the same app, on the same machine
other machines can access the ‘web server’ part too -
the mirror is run without a display (server only), and some browser somewhere is used to
access the ‘web server’
you might do 2 where u want to provide Mirror access to multiple systems but don’t need it where the pi is installed…
-
-
@sdetweil said in (electron:2910): Gtk-WARNING **: 14:16:40.324: cannot open display: :0:
the mirror is run without a display (server only), and some browser somewhere is used to
access the ‘web server’you might do 2 where u want to provide Mirror access to multiple systems but don’t need it where the pi is installed…
ok makes sense. I normally access the mirror by port forwarding my raspberry pi on port 8080 and thats how I can access it on different machines or at work. And I like it that way to be fair. Because eventually my raspberry pi 4 will be inside the 2 way mirror running the Magic Mirror software.
-
@bachoo786 there is only one install…
but two ways to run…
but if u don’t have a display, then u are forced into serveronly mode
from the readme
https://github.com/MichMich/MagicMirror#server-only
from manual installation
https://github.com/MichMich/MagicMirror#manual-installationManual Installation Download and install the latest Node.js version: curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - sudo apt install -y nodejs Clone the repository and check out the master branch: git clone https://github.com/MichMich/MagicMirror Enter the repository: cd MagicMirror/ Install and run the app with: npm install && npm start For Server Only use: npm install && node serveronly . // < -------
-
@bachoo786 said in (electron:2910): Gtk-WARNING **: 14:16:40.324: cannot open display: :0:
Because eventually my raspberry pi 4 will be inside the 2 way mirror running the Magic Mirror software.
well, in that model, typically, u have both server and browser running on same machine (pi 4) inside the actual mirror enclosure on the wall), so NOT serveronly mode
see the forum section https://forum.magicmirror.builders/category/12/show-your-mirror
where people are showing their implementations, with the whole setup -
@sdetweil ok so I will install like everyone else i.e. server and browser on the same machine. Thanks for sorting my head on that.
Now with regards to the install script I do not need to follow this link (https://github.com/MichMich/MagicMirror/wiki/Auto-Starting-MagicMirror) to autostart magicmirror? as you said thats all taken care in the install script? Am i correct? or?
-
@bachoo786 no… u have pm2 which does it all… (oops, the default run-start.sh script ONLY starts in both mode, YOU have to change it to do serveronly like below)
u have already installed both… again there is only ONE install process, but two ways to run
today
issue the following commands (either set)
run bothcd ~/MagicMirror npm start
or
run serveronlycd ~/MagicMirror node serveronly