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.

    How to autorun script on MagicMirror boot

    Scheduled Pinned Locked Moved Solved Troubleshooting
    8 Posts 4 Posters 1.8k Views 4 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.
    • S Offline
      sdetweil @byte_me
      last edited by

      @byte_me use pm2

      pm2 start xxx.py
      pm2 save

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      B 1 Reply Last reply Reply Quote 0
      • BKeyportB Offline
        BKeyport Module Developer
        last edited by

        I use PM2 and scripts to call the various external modules…

        EG: buttons.sh, mm.sh and omx.sh

        buttons.sh is a short script to launch python3 for buttons.py, my external button runner.
        mm.sh is the startup per the old instructions found in the old docks.
        omx.sh launches OMXplayer with a bunch of options.

        I wouldn’t use two of 'em, if I could get pm2 to launch with command line options.

        The "E" in "Javascript" stands for "Easy"

        K 1 Reply Last reply Reply Quote 0
        • B Offline
          byte_me @sdetweil
          last edited by

          @sdetweil said in How to autorun script on MagicMirror boot:

          @byte_me use pm2

          pm2 start xxx.py
          pm2 save

          @BKeyport said in How to autorun script on MagicMirror boot:

          I use PM2 and scripts to call the various external modules…

          EG: buttons.sh, mm.sh and omx.sh

          buttons.sh is a short script to launch python3 for buttons.py, my external button runner.
          mm.sh is the startup per the old instructions found in the old docks.
          omx.sh launches OMXplayer with a bunch of options.

          I wouldn’t use two of 'em, if I could get pm2 to launch with command line options.

          Thank you both, this seems to have solved the issue!

          1 Reply Last reply Reply Quote 0
          • K Offline
            kelly97129 @BKeyport
            last edited by

            @BKeyport
            Hello
            Can you tell me or show me what your omx.sh and other scripts look like that you are running on pm2 because I am in raspi4 and buster updated and my MM is running hard and I don’t know why
            thank you in advance

            S BKeyportB 2 Replies Last reply Reply Quote 0
            • S Offline
              sdetweil @kelly97129
              last edited by

              @kelly97129 if you run the

               top 
              

              command, what process is most active?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kelly97129 @sdetweil
                last edited by kelly97129

                @sdetweil
                vncserver 3.6% ,squeezelite 13.9% and Xorg 4.5%

                1 Reply Last reply Reply Quote 0
                • BKeyportB Offline
                  BKeyport Module Developer @kelly97129
                  last edited by

                  @kelly97129 Sure. PM2 is simply the best way I’ve found to manage what’s running automatically on my system.

                  The "E" in "Javascript" stands for "Easy"

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    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