• header.categories
    • header.recent
    • header.tags
    • header.popular
    • register
    • login

    Widget - Execute Operating System commands

    scheduled pinned locked moved Dashboard
    2 posts 2 posters 841 views 1 watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • jkandasaJ offline
      jkandasa
      global:last-edited-by, jkandasa

      Now it is possible to execute Operating System commands from MyController dashboard. This request created based on the input from https://github.com/mycontroller-org/mycontroller/issues/450

      Add OS Reboot and Date button on the dashboard.

      image

      Select OS Commands from widget list,
      image

      Update button details as follows,
      image

      If we enabled confirmation for a button, will be displayed as follows, Here it is reboot button
      image

      Button JSON content:

      [
        {
          "name": "<i class='fa fa-power-off'></i>",
          "os": "linux",
          "command": "reboot",
          "btnType": "danger",
          "confirmation": true
        },
        {
          "name": "Date",
          "os": "linux",
          "command": "date"
        }
      ]
      
      Supported fields:
      • name - (Mandatory) Name of the button. can be in the form of HTML also. HTML or icons(recommended: font awesome icons)
      • os - (Optional) Operating System, supports, linux and common. If we leave, will be considered as common.
      • btnType - (Optional) can be any one of value in the list [default, primary, success, info, warning, danger] when we leave this field field as blank, default will be selected. Each value give
      • confirmation - (Optional) If you want to confirm before execute this command. Will be good to add on reboot, poweroff commands. Default: false.
      one-reply-to-this-post last-reply-time reply quote 0
      • skywatchS offline
        skywatch
        global:last-edited-by,

        This is excellent news - now even more control from within myc !!!

        There are so many uses for this flexibility - I only asked for a reboot/shutdown button as it would eliminate an ssh connection each time I need to work on the pi - but this is just way better than that!

        Thank you sooooo much 🙂

        one-reply-to-this-post last-reply-time reply quote 1
        • first-post
          last-post

        0

        online

        644

        users

        532

        topics

        3.4k

        posts
        Copyright © 2015-2025 MyController.org | Contributors | Localization