MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Frustrated rookie



  • Ok Ive tried the googler machine to find an answer with no luck. Apparently I missed something in my initial set up. I restarted my pi and am stuck and cant get to the desktop. I’ve tried the pm2 commands and anything else I can find. Sooo how do I get past this and back to the desktop and what do I need to do so that this doesn’t happen when I shut it down to finally build it into my frame etc.

    I took pics of what I am getting and tried.

    https://imgur.com/a/UyegwXj

    Cheers. I owe y’all some beers for the help



  • Startx did it. What do I have to do to prevent that in the future? I know I missed something to prevent auto login



  • i made a change in raspi-config that logs me in as user “pi” but I still have to enter startx Not sure how to prevent that so when the mirror is up if I need to reboot or move it, I can do so without having to hook up a keyboard. Any thoughts anyone? raspian stretch desktop is software


  • Project Sponsor

    Looking at your screenshot, pm2 was already running the mirror software when you gave it the start command. That’s probably why you received the ELIFCYCLE error. If you want to stop pm2 from monitoring/restarting the magic mirror, enter pm2 stop 0. Then you can run npm start in the MagicMirror folder and monitor the output.

    When you say “I can’t get to the desktop” is that because the magic mirror interface is taking up the screen, or you are at the command line and the desktop interface isn’t running. I’m guessing that your problem is that you’re at the command line and you’re not seeing the desktop (based upon your mention of running startx. That leads me to conclude that your pi is not booting into the desktop when you start it up. That needs to change.

    Somewhere in your raspi-config menu will be the option to boot to desktop or boot to CLI (command line interface). You need to change that so that you boot to desktop. When you’re looking at the mirror interface, Ctrl+q will close the interface and get you back to the desktop.

    Just be warned: if pm2 is monitoring your mirror, it will notice that something has closed the magic mirror interface and it will restart it again. Ctrl+Alt+t will give you a terminal window and you can enter pm2 stop 0 to stop that behavior.



  • @bhepler Yeah I got it fixed by doing the raspi-config. All good. Thanks for checking it out. Slowly trying to understand code and what it does and mean


  • Project Sponsor

    @motdog - No worries. We’re here to help if you run into another problem.

    Here’s a quick rundown of the moving parts to a typical magic mirror:
    nodejs - This is what runs the Magic Mirror framework. It technically runs a dynamic webpage which is what you see on your monitor.
    npm - Node Package Manager. This is a tool that ships with nodejs that handles the downloading of required packages, compiling and running of nodejs applications - including the Magic Mirror framework.
    electron - This is like a web browser that runs on the Raspi desktop. It shows what nodejs is serving up, minus all the annoying bits of a web browser (menus, address bar, etc.)
    node_helper.js - This is an optional Javascript file in any module. It is responsible for passing data between the front end (display information) and the back end (calls to web services, authentication, etc.)
    pm2 - This is a process monitoring application. It’s responsible for running the Magic Mirror startup script and acts as sort of a cruise control. If the Magic Mirror crashes, pm2 will detect that the script has stopped and restart it. This is normally what starts your magic mirror when it boots.
    X-server - This is the desktop environment for your typical Raspberry Pi. This is what electron runs in, so it must be started in order for electron to work. I’m 90% positive that it’s also necessary for the included web browser Chromium to work. This is what your command startx is firing up.
    config.js - You’ve probably encountered this guy. This is the configuration file for the Magic Mirror web application. It helps to remember that this file is basically a Javascript data file. It controls how the web application loads and positions modules. It’s important to realize that the module itself may need to be installed/compiled before included in the config file. Including an uninstalled module isn’t going to help you much.

    I hope this helps.


Log in to reply