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.

    Unix Fortune

    Scheduled Pinned Locked Moved Requests
    6 Posts 4 Posters 1.2k 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.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer
      last edited by Mykle1

      @spblat said in Unix Fortune:

      We already have the awesome MMM-Fortune module.

      Thank you for your kind words

      Are you aware there’s a “fortune” command in unix/linux?

      I was not.

      a module that pulls a short unix fortune using this command, updating on a configurable interval

      I put something together for you based on your request (and your kind words). User @sdetweil got the data over from the terminal to the module for me. (He’s awesome).

      I took the liberty of naming it something unique. UnixFortune wasn’t doing it for me. FortuneUnix was no better but the combination was cool. At least, I think so.

      https://github.com/mykle1/MMM-Fortunix

      Pass along some help to someone that knows less than you

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 0
      • S Offline
        spblat
        last edited by spblat

        Epic! I’ll start playing with this. During my tests I will experiment with the “-s” and “-n” command line flags for adjusting fortune length and propose/submit updates. Thank you for putting this together!

        Mykle1M cowboysdudeC 2 Replies Last reply Reply Quote 1
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @spblat
          last edited by

          @spblat said in Unix Fortune:

          Thank you for putting this together!

          Not a big deal. I was looking for something to play with. However, you are welcome. Enjoy the module.

          Peace!

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 1
          • cowboysdudeC Offline
            cowboysdude Module Developer @spblat
            last edited by

            @spblat said in Unix Fortune:

            Epic! I’ll start playing with this. During my tests I will experiment with the “-s” and “-n” command line flags for adjusting fortune length and propose/submit updates. Thank you for putting this together!

            You can just fork the module and do anything you want with it :)

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

              @Mykle1

              I found a small bug that causes some issues, at least when running on armbian and starting up via cron . It might be that ‘stock’ armbian isn’t properly setting up the $PATH as X starts. I tested against rasbian and this issue does not appear, and the ‘fix’ to add the full path to fortune (which really should always be done).

              node_helper.js (line 20)

              • exec(‘fortune -s’, (error, stdout, stderr) => {
              • exec(‘/usr/games/fortune -s’, (error, stdout, stderr) => {
              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