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

Fork Mode

Scheduled Pinned Locked Moved Solved Troubleshooting
11 Posts 2 Posters 427 Views 2 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.
  • D Offline
    davidgagne @sdetweil
    last edited by Aug 4, 2024, 4:00 AM

    @sdetweil Yes. I think something is wrong with pm2 itself, because (a) calling the standard pm2 start MagicMirror will appear to work, but it does not actually launch the MagicMirror. This is the output it yields:

    ~/MagicMirror/modules $ pm2 start MagicMirror
    [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 1 ])
    [PM2] [MagicMirror](1) ✓
    [PM2] Process successfully started
    ┌────┬────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
    │ id │ name           │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
    ├────┼────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
    │ 1  │ MagicMirror    │ default     │ 2.28.0  │ fork    │ 2816     │ 1s     │ 57   │ online    │ 0%       │ 29.0mb   │ dvg      │ disabled │
    │ 0  │ pm2            │ default     │ 2.28.0  │ fork    │ N/A      │ 0      │ 0    │ stopped   │ 0%       │ 0b       │ dvg      │ enabled  │
    └────┴────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
    

    And (b) it shows pm2 as stopped which doesn’t make any sense. I thought pm2 was supposed to always be running.

    Calling /installers/mm.sh will launch the MagicMirror, but then I am stuck with it reporting everything back to the ssh Terminal window and I can’t so anything else until/unless I ctrl-z it, which is annoying.

    S 2 Replies Last reply Aug 4, 2024, 10:27 AM Reply Quote 0
    • S Away
      sdetweil @davidgagne
      last edited by sdetweil Aug 4, 2024, 10:27 AM Aug 4, 2024, 10:27 AM

      @davidgagne well you have two apps defined
      MagicMirror and pm2

      So do
      pm2 delete 0
      pm2 delete 1
      pm2 save -f

      Then run my fixuppm2 script, from

      https://github.com/sdetweil/MagicMirror_scripts

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      D 1 Reply Last reply Aug 4, 2024, 3:53 PM Reply Quote 0
      • D Offline
        davidgagne @sdetweil
        last edited by Aug 4, 2024, 3:53 PM

        @sdetweil Awesome! That seemed to do the trick. Thanks!

        1 Reply Last reply Reply Quote 0
        • S Away
          sdetweil @davidgagne
          last edited by sdetweil Aug 4, 2024, 4:48 PM Aug 4, 2024, 4:40 PM

          @davidgagne said in Fork Mode:

          but then I am stuck with it reporting everything back to the ssh

          and a learning thing

          on Windows you can use

          cd %HOME%\MagicMirror
          rem had to make a mm.cmd or mm.bat
          detach installers\mm.cmd 
          

          to spin a job off in the background

          on linux, you end the command with &
          to do the same thing

          # only for  example, could have used the complete path 
          cd ~/MagicMirror
          installers/mm.sh &
          # or
          npm start &
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 2 Replies Last reply Aug 4, 2024, 7:07 PM Reply Quote 0
          • S sdetweil has marked this topic as solved on Aug 4, 2024, 4:48 PM
          • D Offline
            davidgagne @sdetweil
            last edited by Aug 4, 2024, 7:07 PM

            @sdetweil Oh, nice. That’s a good tip. Thanks!

            1 Reply Last reply Reply Quote 0
            • D Offline
              davidgagne @sdetweil
              last edited by Aug 4, 2024, 8:50 PM

              @sdetweil said in Fork Mode:

              installers/mm.sh &

              That doesn’t seem to work:

              ~/MagicMirror $ installers/mm.sh &
              [1] 11788
              
              > magicmirror@2.28.0 start
              > ./run-start.sh $1
              
              [2024-08-04 16:01:09.618] [LOG] Starting MagicMirror: v2.28.0
              [2024-08-04 16:01:10.764] [LOG] Loading config ...
              [2024-08-04 16:01:10.845] [LOG] config template file not exists, no envsubst
              [2024-08-04 16:01:17.539] [LOG] Loading module helpers ...
              [2024-08-04 16:01:17.705] [LOG] No helper found for module: alert.
              [2024-08-04 16:01:19.196] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:19.283] [LOG] Module helper loaded: updatenotification
              [2024-08-04 16:01:19.535] [LOG] No helper found for module: clock.
              [2024-08-04 16:01:20.029] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:20.278] [LOG] Module helper loaded: mmm-systemtemperature
              [2024-08-04 16:01:20.396] [LOG] No helper found for module: weather.
              [2024-08-04 16:01:20.554] [LOG] No helper found for module: weather.
              [2024-08-04 16:01:27.632] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:27.767] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
              [2024-08-04 16:01:30.552] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:30.603] [LOG] Module helper loaded: MMM-birthdays
              [2024-08-04 16:01:30.714] [LOG] No helper found for module: MMM-CloneWarsQuotes.
              [2024-08-04 16:01:30.761] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:30.854] [LOG] Module helper loaded: MMM-ThemeParkWaitTimes
              [2024-08-04 16:01:31.469] [LOG] Initializing new module helper ...
              [2024-08-04 16:01:31.526] [LOG] Module helper loaded: MMM-ImagesPhotos
              [2024-08-04 16:01:31.561] [LOG] All module helpers loaded.
              [2024-08-04 16:01:32.866] [LOG] Starting server on port 8080 ...
              [2024-08-04 16:01:33.567] [WARN]  You're using a full whitelist configuration to allow for all IPs 
              [2024-08-04 16:01:35.645] [LOG] Server started ...
              

              It is still returning all the reporting to Terminal.

              S 1 Reply Last reply Aug 4, 2024, 9:01 PM Reply Quote 0
              • S Away
                sdetweil @davidgagne
                last edited by sdetweil Sep 2, 2024, 1:52 AM Aug 4, 2024, 9:01 PM

                @davidgagne yes, as the starting shell is still open, output is spooled there,
                BUT you can exit the window AND it will stay running… the output will be lost…
                (thats the value of pm2 spawning… it captures the output)

                if you get it running in the background, without pm2, then two ways to kill it

                reboot
                or run a kill script like this

                ps -ef | grep MagicMirror  | awk '{print $2}'| xargs sudo kill -9
                

                for info , the steps
                list the processes and their program path
                find the ones with MagicMirror
                print out just the process number
                sudo kill -9 the process number

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                D 1 Reply Last reply Aug 4, 2024, 9:07 PM Reply Quote 0
                • D Offline
                  davidgagne @sdetweil
                  last edited by Aug 4, 2024, 9:07 PM

                  @sdetweil Oh. So just close that Terminal window and ssh into it again, you mean?

                  S 1 Reply Last reply Aug 4, 2024, 9:08 PM Reply Quote 0
                  • S Away
                    sdetweil @davidgagne
                    last edited by Aug 4, 2024, 9:08 PM

                    @davidgagne yes

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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