• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Frustrated rookie

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 1.4k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    motdog
    last edited by motdog Mar 1, 2019, 11:59 PM Mar 1, 2019, 11:56 PM

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

    1 Reply Last reply Reply Quote 0
    • M Offline
      motdog
      last edited by Mar 3, 2019, 4:38 AM

      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

      1 Reply Last reply Reply Quote 0
      • B Offline
        bhepler Module Developer
        last edited by Mar 3, 2019, 10:12 PM

        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.

        M 1 Reply Last reply Mar 4, 2019, 1:13 AM Reply Quote 1
        • M Offline
          motdog @bhepler
          last edited by Mar 4, 2019, 1:13 AM

          @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

          B 1 Reply Last reply Mar 4, 2019, 1:43 AM Reply Quote 0
          • B Offline
            bhepler Module Developer @motdog
            last edited by bhepler Mar 4, 2019, 1:58 AM Mar 4, 2019, 1:43 AM

            @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.

            1 Reply Last reply Reply Quote 3
            • 1 / 1
            1 / 1
            • First post
              6/6
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy