Hi,
Same as kodi I try to run magicmirror on x11docker.
https://magicmirror.builders/
The steps:
I used raspbian-lite from this link:
https://www.raspberrypi.org/downloads/raspbian/
I enabled ssh with:
sudo apt-get update
sudo systemctl enable ssh
sudo reboot
I update host system:
sudo apt-get upgrade -y
I installed docker:
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi
I Installed x11docker:
sudo apt-get install -y xdg-utils
wget https://raw.githubusercontent.com/mviereck/x11docker/master/x11docker -O /tmp/x11docker
sudo bash /tmp/x11docker --update
rm /tmp/x11docker
I create folders:
mkdir /home/pi/docker
mkdir /home/pi/docker/magicmirror
create and edit Dockerfile:
nano /home/pi/docker/magicmirror/Dockerfile
add this:
FROM raspbian/stretch
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install -y curl
RUN bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/$
WORKDIR "/home/pi/MagicMirror"
CMD npm start
build docker container:
sudo docker build -t magicmirror /home/pi/docker/magicmirror
then I run:
x11docker magicmirror
error:
xdpyinfo: unable to open display ":0".
xwininfo: error: unable to open display ":0"
npm ERR! path /home/pi/MagicMirror/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/MagicMirror/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /fakehome/pi/.npm/_logs/2019-02-04T20_05_24_214Z-debug.log
Are you still able to run your kodi image?
Try to add --no-auth. If that works, there is some authentication issue.
Are you still able to run your kodi image?
Try to add--no-auth. If that works, there is some authentication issue.
Yes, kodi is working. Now I try same on other apps.
Do you know how can I run raspbian/stretch bash command line from container and then run commands from dockerfile manually?
What this error means?
x11docker ERROR: Did not find a possibility to provide a display
x11docker ERROR: Did not find a possibility to provide a display
This means x11docker neither runs on X nor found an X server. Is Xorg installed?
x11docker ERROR: Did not find a possibility to provide a displayThis means x11docker neither runs on X nor found an X server. Is Xorg installed?
In host system or container?
In host system or container?
On host. x11docker provides X from host to containers.
On host. x11docker provides X from host to containers.
Ok, thanks.
Can you help me about magic mirror app?
https://magicmirror.builders/
My docker file:
FROM raspbian/stretch:latest
RUN apt-get update
RUN apt-get -y install curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
RUN apt-get -y install nodejs
RUN apt-get -y install git
RUN cd ~/
RUN git clone https://github.com/MichMich/MagicMirror
RUN cd MagicMirror
RUN npm install -g express
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -q -y xinit
RUN apt-get install -y xorg
RUN apt-get install -y matchbox
RUN apt-get install -y unclutter
RUN cd ~/
RUN cd MagicMirror
CMD npm start
command to buil container:
sudo docker build -t magicmirror /home/pi/docker/magicmirror
then I run:
x11docker magicmirror
I get error:
npm ERR! path /fakehome/pi/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/fakehome/pi/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /fakehome/pi/.npm/_logs/2019-02-09T18_20_39_844Z-debug.log
If I run with --homedir:
x11docker --homedir /home/pi/docker/magicmirror magicmirror
I get error:
npm ERR! path /home/pi/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-02-09T18_27_02_112Z-debug.log
I know that error mean the location of package.json is wrong but why, command under Dockerfile is
runing under ~/MagicMirror?
RUN cd MagicMirror
That does not work. You cannot switch directories with the RUN command in a Dockerfile. The next RUN will be in / again.
You can set a working directory with WORKDIR.
RUN cd ~/
That does not make sense either. During build the commands are executed as root. ~ will be /root.
x11docker creates an unprivileged container user with its own home directory different from /root.
RUN git clone https://github.com/MichMich/MagicMirror
RUN cd MagicMirror
RUN npm install -g express
The npm command won't be executet in MagicMirror.
I can't help to set up a correct installation, please look at the magicmirror documentation instead. It seems they provide a ready-to-use docker image. Also they provide instructions for installation with prepared installer scripts instead of fiddeling with the repo itself.
That does not work. You cannot switch directories with the RUN command in a Dockerfile. The next RUN will be in
/again
I didn't know that. Thanks.
It seems they provide a ready-to-use docker image.
Can I use docker ready image? How?
Can I use docker ready image? How?
Looking at the example given on their github page:
docker run -d \
--publish 80:8080 \
--restart always \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--name magic_mirror \
bastilimbach/docker-magicmirror
Pull the image with docker pull bastilimbach/docker-magicmirror
Run x11docker with x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror
Does magicmirror have a GUI at all? If not, you can just use their provided docker command or add x11docker option --tty to run without X.
Does magicmirror have a GUI at all? If not, you can just use their provided docker command or add x11docker option
--ttyto run without X.
Yes it has a GUI.
On host if I run:
npm start
magic mirror starts in GUI mode
if I run it like this:
node serveronly
magic mirror starts in server only mode
Pull the image with
docker pull bastilimbach/docker-magicmirror
Run x11docker withx11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror
error: can't open display. Probably because magicmirror container starts in severonly mode?
I try to run with --tty:
x11docker -- --tty --publish 80:8080 -- bastilimbach/docker-magicmirror
error:
x11docker ERROR: Got error message from docker daemon:
Error response from daemon: No such container: x11docker_X0_cc28c0_bastilimbach-docker-magicmirror
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/pi/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
Error: Can't open display: :0
Error: Can't open display: :0
--tty was meant run run without X and it should be placed before --. If you want X, don't use --tty.
Error: Can't open display: :0
As said above:
Try to add
--no-auth. If that works, there is some authentication issue.
I try to run with --no-auth
x11docker --no-auth -- --publish 80:8080 -- bastilimbach/docker-magicmirror
error:
Error response from daemon: No such container: x11docker_X0_cc28c0_bastilimbach-docker-magicmirror
No other messages? Please show the full output.
Maybe tag is not correct:
https://hub.docker.com/r/bastilimbach/docker-magicmirror/tags
I have raspberry arm cpu?
Maybe tag is not correct:
Than try with tag raspberry.
Pull the image with docker pull bastilimbach/docker-magicmirror:raspberry
Run x11docker with x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry
I find this Dockerfile:
https://github.com/bastilimbach/docker-MagicMirror/tree/master/raspberry
FROM hypriot/rpi-node:latest
ENV NODE_ENV production
WORKDIR /opt/magic_mirror
RUN git clone --depth 1 -b master https://github.com/MichMich/MagicMirror.git .
RUN cp -R modules /opt/default_modules
RUN cp -R config /opt/default_config
RUN npm install --unsafe-perm --silent
COPY docker-entrypoint.sh /opt
RUN apt-get update \
&& apt-get -qy install dos2unix \
&& dos2unix /opt/docker-entrypoint.sh \
&& chmod +x /opt/docker-entrypoint.sh
EXPOSE 8080
CMD ["node serveronly"]
ENTRYPOINT ["/opt/docker-entrypoint.sh"]
and file docker-entrypoint.sh
https://github.com/bastilimbach/docker-MagicMirror/blob/master/docker-entrypoint.sh
Problem is magicmirror starts in server only mode:
CMD ["node serveronly"]
I must add additional lines in Docker file.
Problem is magicmirror starts in server only mode:
You can set another image command after the image name:
x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry node
You can set another image command after the image name:
x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry node
I think magicmirror gui start command is:
npm start or from ssh: DISPLAY=:0 nohup npm start &
docs about manual instalation and start
https://github.com/MichMich/MagicMirror#manual-installation
I changed:
CMD ["node serveronly"]
to this:
CMD ["npm start"]
in Dockerfile
and run with this x11docker command:
x11docker magicmirror
I get this:
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
Usage: npm <command>
where <command> is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, doctor, edit,
explore, get, help, help-search, i, init, install,
install-test, it, link, list, ln, login, logout, ls,
outdated, owner, pack, ping, prefix, prune, publish, rb,
rebuild, repo, restart, root, run, run-script, s, se,
search, set, shrinkwrap, star, stars, start, stop, t, team,
test, tst, un, uninstall, unpublish, unstar, up, update, v,
version, view, whoami
npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
/fakehome/pi/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
[email protected] /usr/local/lib/node_modules/npm
CMD ["npm start"]
Use :
CMD ["npm","start"]
or:
CMD npm start
Use :
CMD ["npm","start"]
or:
CMD npm start
Same message as with CMD ["npm start"]
Try
x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry npm start
I try with original:
CMD ["node serveronly"]
and
x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry npm start
Still same message.
I had a look at the ENTRYPOINT script: https://github.com/bastilimbach/docker-MagicMirror/blob/master/docker-entrypoint.sh
It has a bug in the last line. Instead of $1 it should be $@ or exec $@.
As a workaround, try:
x11docker -- --publish 80:8080 -- bastilimbach/docker-magicmirror:raspberry "npm start"
Edit: Make an update of x11docker to release 5.4.1. The previous version 5.3.3 did not handle quotes correctly in image command.
It has a bug in the last line. Instead of
$1it should be$@orexec $@
Thats it. I add $@ this.
Now I have error:
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]
> [email protected] start /opt/magic_mirror
> sh run-start.sh
fs.js:651
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: EACCES: permission denied, open '/opt/magic_mirror/node_modules/electron/index.js'
at Object.fs.openSync (fs.js:651:18)
at Object.fs.readFileSync (fs.js:553:33)
at Object.Module._extensions..js (module.js:579:20)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/magic_mirror/node_modules/electron/cli.js:3:16)
at Module._compile (module.js:569:30)
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `sh run-start.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /fakehome/pi/.npm/_logs/2019-02-09T22_49_14_260Z-debug.log
Maybe the image is not designed to run with an unprivileged user.
Try with --user=root.
I also try with original:
CMD ["node serveronly"]
message:
Starting MagicMirror: v2.6.0
Loading config ...
WARNING! Could not find config file. Please create one. Starting with default configuration.
Loading module helpers ...
Initializing new module helper ...
Module helper loaded: updatenotification
No helper found for module: helloworld.
All module helpers loaded.
Starting server on port 8080 ...
Server started ...
Connecting socket for: updatenotification
Sockets connected & modules started ...
Ready to go! Please point your browser to: http://localhost:8080
I have nothing on http://IP:8080???
If it shows no error in browser but an empty white page, than the connection has succeeded. Ask the magicmirror developer or look at its documentation why you don't see content.
With --user=root
I get error:
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]
> [email protected] start /opt/magic_mirror
> sh run-start.sh
/opt/magic_mirror/node_modules/electron/dist/electron: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] start: `sh run-start.sh`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /fakehome/root/.npm/_logs/2019-02-09T22_56_33_432Z-debug.log
/opt/magic_mirror/node_modules/electron/dist/electron: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
It seems the image misses a libgtk3 package. Please look which one it might be or ask the magicmirror developer.
I think there missing X11 packages in container?
xinit, xorg, matchbox
There is link with howto install magicmirror gui on raspberry:
http://emmanuelcontreras.com/how-to/how-to-create-a-magic-mirror-2-with-pi-zero-w/
Howto I add them to Dockerfile correctly?
I added those files in Dockerfile:
RUN apt-get -y install libgtk-3-0
RUN apt-get -y install libx11-xcb-dev
RUN apt-get -y install libxtst6
RUN apt-get -y install libxss1
RUN apt-get -y install libgconf-2-4
RUN apt-get -y install libnss3
RUN apt-get -y install libasound2
Now I have error:
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart: [email protected]
npm info lifecycle [email protected]~start: [email protected]
> [email protected] start /opt/magic_mirror
> sh run-start.sh
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `sh run-start.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /fakehome/root/.npm/_logs/2019-02-10T00_24_58_360Z-debug.log
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
This looks quite specific to magicmirror. Ask the developer what it means.
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLEThis looks quite specific to magicmirror. Ask the developer what it means.
I figured out the error occured when I try to run mm from ssh if I run directly on rpi consol it works?
Partial success:)
But I need to find solution to run mm from ssh:
I try like this:
ssh to my rpi and run commands:
export DISPLAY=:0
x11docker --user=root magicmirror
Error:
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
Why do you set export DISPLAY=:0? If you run ssh -X, it should be set already. If not, check XAUTHORITY, too.
If I don't run export DISPLAY=:0 before I run x11docker --user=root magicmirror I get error:
x11docker ERROR: You are running x11docker over SSH without providing a display.
Please run with 'ssh -X' or 'ssh -Y'.
(If you insist, you can run with option '--xorg', but won't see the result.)
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/pi/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
If I run with x11docker --user=root --xorg magicmirror' I get error:
x11docker ERROR: Error during startup of X server --xorg.
Last lines of xinit log:
/usr/lib/xorg/Xorg.wrap: Only console users are allowed to run the X server
Type 'x11docker --help' for usage information
Debug options: '--verbose' (full log) or '--debug' (log excerpt).
Logfile will be: /home/pi/.cache/x11docker/x11docker.log
Please report issues at https://github.com/mviereck/x11docker
Error: Can't open display: :100
ssh -X should set DISPLAY and XAUTHORITY. Check them both and provide them to x11docker.
ssh -X should set DISPLAY and XAUTHORITY. Check them both and provide them to x11docker.
I never use ssh -X and XAUTHORITY. Please explain how?
I never use ssh -X
I thought you would. It allows to show GUI applications locally whilst they are running on a remote server.
You want to access the pi with ssh, but run and show the GUI application on the pi without seeing the GUI? The X server runs on the pi?
Than check XAUTHORITY on your pi and provide both DISPLAY and XAUTHORITY to x11docker.
Than check
XAUTHORITYon your pi and provide bothDISPLAYandXAUTHORITYto x11docker.
How can I check DISPLAY and XAUTHORITY on my pi?
I try like this but I get no output:
XAUTHORITY :
ps -u $(id -u) -o pid= |
xargs -I{} cat /proc/{}/environ 2>/dev/null |
tr '\0' '\n' |
grep -m1 '^XAUTHORITY='
DISPLAY :
ps -u $(id -u) -o pid= |
xargs -I{} cat /proc/{}/environ 2>/dev/null |
tr '\0' '\n' |
grep -m1 '^DISPLAY='
How can I check
DISPLAYandXAUTHORITYon my pi?
Start your pi with its X server.
echo $DISPLAY
echo $XAUTHORITY
I try to start xserver on my pi with command:
startx
I get black screen with cursor on it.
Then I connect through ssh:
When I run echo $DISPLAY or echo $XAUTHORITY I get nothing.
with xauth list command I get this:
raspberrypi/unix:0 MIT-MAGIC-COOKIE-1 0b8d582f6cdf6c3cffd6527411ff119f
raspberrypi:0 MIT-MAGIC-COOKIE-1 0b8d582f6cdf6c3cffd6527411ff119f
If I don't run statx first on my pi (I get black screen with cursor on it) I get nothing if I run xauth list command over ssh? Something missing on my host?
I am using raspbian lite image without desktop.
https://www.raspberrypi.org/downloads/raspbian/
I installed only those packages: xinit, xorg, matchbox
I have changed raspian lite to raspbian desktop image on host.
echo $DISPLAY
:0.0
echo $XAUTHORITY
/home/pi/.Xauthority
provide both
DISPLAYandXAUTHORITYto x11docker.
Can you show me how?
provide both DISPLAY and XAUTHORITY to x11docker.
Can you show me how?
export DISPLAY=:0
export XAUTHORITY=/home/pi/.Xauthority
x11docker [...]
export DISPLAY=:0
export XAUTHORITY=/home/pi/.Xauthority
x11docker [...]
Now is working, with one problem.
If I start raspbian on host only in console mode, magic mirror won't start. If I start raspbian on host with desktop magic mirror works ok. Why?
If I start raspbian on host only in console mode, magic mirror won't start. If I start raspbian on host with desktop magic mirror works ok. Why?
x11docker uses an X server running on the host. If you don't have any, because you are in console mode, it cannot share it with the container. However, when you start in desktop mode, there is an X server running, so it can be shared.
You can probably use --xvfb to make magic mirror work in console mode. But, how are you going to see the content if you do so?
Why KODI works like that?
I start host in raspbian in consol mode. Then I connect to host trough ssh and just run:
export DISPLAY=:0
x11docker --homedir /its/docker/kodi --gpu -- --privileged -- kodi
And KODI start on host display.
You can try comparing or providing the logs to know which option is being used and why it is failing.
x11docker uses an X server running on the host. If you don't have any, because you are in console mode, it cannot share it with the container.
x11docker can start Xorg on itself if it runs on console. (Option --xorg).
However, if it works with kodi but not with magicmirror, than I have no idea why magicmirror fails.
As @1138-4EB says, you can provide x11docker.log on www.pastebin.com. Maybe magicmirror gives a hint in its error messages.
x11docker can start Xorg on itself if it runs on console. (Option
--xorg).
Indeed. However, there is a 'Lite' version of raspbian, which I don't know if includes xorg dependencies (see https://www.raspberrypi.org/downloads/raspbian/). Since he/she provides so little info about the context, who knows whether this is the image being used in 'console mode'.
x11docker can start Xorg on itself if it runs on console. (Option
--xorg).
However, if it works with kodi but not with magicmirror, than I have no idea why magicmirror fails.
As @1138-4EB says, you can providex11docker.logon www.pastebin.com. Maybe magicmirror gives a hint in its error messages.
Error log if I run: x11docker --user=root --xorg magicmirror
https://pastebin.com/mu0he2w3
Error log if I run: x11docker --user=root magicmirror
https://pastebin.com/K5bpsn5f
Indeed. However, there is a 'Lite' version of raspbian, which I don't know if includes xorg dependencies (see https://www.raspberrypi.org/downloads/raspbian/). Since he/she provides so little info about the context, who knows whether this is the image being used in 'console mode'.
I am using raspbian + desktop image.
In:
Error log if I run:
x11docker --user=root magicmirror
pastebin.com/K5bpsn5f
you can find:
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `sh run-start.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-02-14T09_42_30_396Z-debug.log
x11docker --user=root --xorg magicmirror
It seems you ran x11docker in an X session.
You got this warning and an explanation how to fix it:
x11docker WARNING: Your configuration seems not to allow to start
a second core Xorg server from within X. Option --xorg will probably fail.
(Per default, only root or console users are allowed to run an Xorg server).
Possible solutions:
1.) Install one of nested X servers 'Xephyr', 'Xnest' or 'nxagent'.
For --gpu support: install 'weston' and 'Xwayland'.
2.) Switch to console tty1...tty6 with <CTRL><ALT><F1>...<F6>
and start x11docker there.
3.) Run x11docker as root.
4.) Edit file '/etc/X11/Xwrapper.config' and replace line:
allowed_users=console
with lines
allowed_users=anybody
needs_root_rights=yes
If the file does not exist already, you can create it.
On Ubuntu 16.04 and debian 9 you need package xserver-xorg-legacy.
x11docker --user=root magicmirror
It seems you ran x11docker in an X session.
We already had this error message above. I am citing myself:
npm info lifecycle [email protected]~start: Failed to exec start script
npm ERR! code ELIFECYCLE
This looks quite specific to magicmirror. Ask the developer what it means.
So, please find out what this error message means.
I also found:
xhost: unable to open display ":0"
Probably you set DISPLAY, but did not set XAUTHORITY. We already talked about that above.
@lpt2007 Please carefully read the terminal messages and the answers you already got. I am glad to help, but please be aware that it costs my free time and it is a bit frustrating if you don't do this basic work yourself.
I also found:
xhost: unable to open display ":0"
Probably you set
DISPLAY, but did not setXAUTHORITY. We already talked about that above.
Before I run: x11docker --user=root magicmirror
I always run this:
export DISPLAY=:0
export XAUTHORITY=/home/pi/.Xauthority
I get errors xhost: unable to open display ":0" and npm ERR! code ELIFECYCLE only if I start raspbian on host in console mode. If X is running on host mm starts ok, no errors. I already explained here:
export DISPLAY=:0
export XAUTHORITY=/home/pi/.Xauthority
x11docker [...]Now is working, with one problem.
If I start raspbian on host only in console mode, magic mirror won't start. If I start raspbian on host with desktop magic mirror works ok. Why?
I get errors xhost: unable to open display ":0" and npm ERR! code ELIFECYCLE only if I start raspbian on host in console mode.
If you run on console, than you have no X server running. Than you must not set DISPLAY and XAUTHORITY because they suggest an X server would run.
Success:) I added sudo and privileged to command and mm starts ok.
sudo x11docker --user=root --xorg -- --privileged -- magicmirror
thx for time and patience :)
:)