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.

    MM on Ubuntu

    Scheduled Pinned Locked Moved Solved Troubleshooting
    90 Posts 4 Posters 42.0k 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.
    • G Offline
      goncalovsc @sdetweil
      last edited by

      @sdetweil deleted magucmirror.old and everything went back to zero, all the changes i´ve made :/

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

        @goncalovsc what?

        pm2 stop 0
        cd ~/MagicMirror
        npm start
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        G 1 Reply Last reply Reply Quote 0
        • G Offline
          goncalovsc @sdetweil
          last edited by

          @sdetweil Probably i was editing on the wrong files. Already re-edited on the correct ones. Thanks for your kind help

          1 Reply Last reply Reply Quote 0
          • D Offline
            dwburger
            last edited by

            My MM2 is running well under Ubuntu 18.04. I’ve installed pm2 and that works as well to start/stop MM2. However, I’m not able to get pm2 to work when using crontab. My crontab script looks like this:

            40 * * * * pm2 restart mm.sh

            so I can restart MM2 at 40 minutes after each hour. I don’t really plan to restart MM2 that often, I just want to get this working. I don’t know my way around Linux well enough to figure out what’s wrong. Can anyone point me to solution or an approach to one? Thanks!

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

              @dwburger what does crontab say when i tries to launch pm2?

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • D Offline
                dwburger
                last edited by

                Well…I learned something. I didn’t know about crontab logs and I found this command to try:

                sudo grep CRON /var/log/syslog

                When I did that I found this line on the end of the log:

                Apr 24 10:40:01 dave-ubuntu CRON[2931]: (CRON) info (No MTA installed, discarding output)

                I guess I need to install an MTA???

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

                  @dwburger said in MM on Ubuntu:

                  (CRON) info (No MTA installed, discarding output)

                  see the last answer here
                  https://superuser.com/questions/445347/why-is-my-crontab-not-running

                  but that doesn’t some why pm2 was not executed
                  note that you saved the pm2 config as user pi, and cron will run as root

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    dwburger
                    last edited by

                    Hmmm…installed the default MTA for Ubuntu 18 which fixed the error message in the logfile, but pm2 still didn’t restart the MM2. I’m afraid I don’t really understand your note about pi versus root cron running. I can “sudo crontab -e” if that’s a better idea. I will add, my Ubuntu is starting up with its GUI and then I’m opening a terminal window to start MM2 using “pm2 start mm.sh”.

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

                      @dwburger ok, but you don’t have to do ANY of this… if you used my install script, it set pm2 to autostart on boot

                      to fix if you DIDN’T use my install script, use my fixuppm2 script
                      see
                      https://github.com/sdetweil/MagicMirror_scripts

                      read the readme.

                      if MM crashes, pm2 auto restarts

                      YOU don’t have to have any additional commands any where

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        dwburger
                        last edited by

                        I may have given you the wrong impression…I really don’t know my way around Linux/Ubuntu. However, I was able to run your fixuppm2 script and I now see what you mean about not having to do anything else. I’m getting the behavior I want. When I reboot my machine MM2 starts right up. I’m getting ready to make another MM2 on a mini PC running Ubuntu. This time, I’m going to use your install script!

                        1 Reply Last reply Reply Quote 2
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 6
                        • 7
                        • 8
                        • 9
                        • 4 / 9
                        • 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