mochman / MMM-Swipe

Use two HC-SR04 sensors to detect hand "swipe" movement.
45 stars 11 forks source link

Cant run Magic Mirror as sudo #1

Open ardboer opened 7 years ago

ardboer commented 7 years ago

Magic Mirror works fine but with this module I need to run it as sudo but when I do DISPLAY=:0 sudo npm start it throws a lot of errors and doesnt work. Can anyone help me run Magic Mirror as sudo so I can use this awesome Swipe module?

masaki84 commented 7 years ago

put sudo before the DISPLAY=:0 npm as in sudo DISPLAY=:0 npm

StefanMeGit commented 6 years ago

run sudo cp ~/.Xauthority /root/ then DISPLAY=:0 sudo npm start