MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED Autostarts but doesn't run, will run on restart

    Troubleshooting
    3
    47
    180
    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.
    • S
      sdetweil @ember1205 last edited by

      @ember1205 said in Autostarts but doesn't run, will run on restart:

      0|mm | + xprop -root
      0|mm | xprop: unable to open display ‘:0’

      thanks… x not up yet…

      weird, never seen this on any other system pi otherwise…
      I have 3 pi3, 2 pi4, pi 0w and pi02w and jetson nano, odroid, chromebox, plus desktops…

      i’ll add another environment variable check
      u add it to the mm.sh used to launch…

      let me test it…

      thanks for your help

      Sam

      Create a working config
      How to add modules

      E 1 Reply Last reply Reply Quote 0
      • E
        ember1205 @sdetweil last edited by

        @sdetweil

        Happy to have broken it. Again. lol

        S 1 Reply Last reply Reply Quote 0
        • S
          sdetweil @ember1205 last edited by

          @ember1205 ok, do this

          cd ~/MagicMirror
          curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/test/run-start.sh >run-start.sh
          

          edit the MagicMirror/installers/mm.sh

          add a line before the npm start

          export wait_for_x=1 
          

          (or true, or ANYTHING)
          the value can be anything

          edit the run-start.sh and add the -x on the 1st line again

          do the pm2 flush
          pm2 restart

          just to test
          then do the reboot test

          Sam

          Create a working config
          How to add modules

          E 1 Reply Last reply Reply Quote 0
          • E
            ember1205 @sdetweil last edited by

            @sdetweil said in Autostarts but doesn't run, will run on restart:

            export wait_for_x=1

            That isn’t the mm.sh that my system launches from, though… Mine is ~/mm.sh

            Does the one you’re referencing get called from one of the other scripts?

            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @ember1205 last edited by

              @ember1205 whatever script…

              if you used my setup script it uses the one already in installers

              Sam

              Create a working config
              How to add modules

              E 1 Reply Last reply Reply Quote 0
              • E
                ember1205 @sdetweil last edited by

                @sdetweil

                Ok… Modified the ~/mm.sh script

                pm2 restart mm failed to start Chromium correctly - landed on the Chrome Desktop.
                Purged the config directory and started mm without issue.

                Restarted the mirror and everything came up clean multiple times, but there is clearly still something weird happening with Chromium in that I have to continue wiping the config directory before it will start up correctly.

                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @ember1205 last edited by

                  @ember1205 the new script wipes the config folder already

                  Sam

                  Create a working config
                  How to add modules

                  E 2 Replies Last reply Reply Quote 0
                  • E
                    ember1205 @sdetweil last edited by

                    @sdetweil

                    Whatever it’s doing, it isn’t doing it correctly. “pm2 restart mm” lands me on the Chrome Desktop every time. I have to wipe the config folder by hand.

                    1 Reply Last reply Reply Quote 0
                    • E
                      ember1205 @sdetweil last edited by

                      @sdetweil

                      Its trying to wipe a non-existent directory

                      0|mm  | + rm -rf /home/pi/.config/chromium-browser
                      
                      S 2 Replies Last reply Reply Quote 0
                      • S
                        sdetweil @ember1205 last edited by

                        @ember1205 ah. I ‘assumed’ folder name matched executable…doah…

                        Sam

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 4 / 5
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy