Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    ExecOnMcode

    Scheduled Pinned Locked Moved
    Plugins for DWC and DSF
    11
    76
    6.2k
    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.
    • T3P3Tonyundefined
      T3P3Tony administrators @Falcounet
      last edited by

      @falcounet thanks for this! Also thanks for submitting it to the plugin repository!

      I think we should have a health warning around this advice in the documentation:

      If for some reason you want to go beyond that limitation, create a 010_dsf-nopasswd file into /etc/sudoers.d/ with the following content : dsf ALL=(ALL) NOPASSWD: ALL
      Then use sudo with the command you wish to run using ExecOnMcode.

      outline the risks of allowing the dsf user to run su commands.

      www.duet3d.com

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators @T3P3Tony
        last edited by

        @Falcounet Like the example you have for running a python scrip and getting information baout the state of the SBC back:

        ccbb23e3-ed49-4db5-8f93-a9e466b60761-image.png

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • R4ffersundefined
          R4ffers
          last edited by

          Hi, I've just been looking at this as I'd like to shutdown my SBC. How do you actually go about doing it? Thanks in advance.

          Mb6hc + 3hc + 1lc on Voron V2.4, Mini 5+ exp 2+ on Vzbot 235 AWD, Duet 2 wifi on Ox CNC and Mini 5+ on Millennium Milo v1.5 mini mill.

          Falcounetundefined 1 Reply Last reply Reply Quote 0
          • Falcounetundefined
            Falcounet @R4ffers
            last edited by

            @r4ffers shutdown requires root privileges and thus isn't possible to use that plugin without hacks as the plugin runs as dsf user.
            It is recommended to use the DuetPiManagementPlugin for shutdown.

            R4ffersundefined 1 Reply Last reply Reply Quote 1
            • R4ffersundefined
              R4ffers @Falcounet
              last edited by

              @falcounet thankyou

              Mb6hc + 3hc + 1lc on Voron V2.4, Mini 5+ exp 2+ on Vzbot 235 AWD, Duet 2 wifi on Ox CNC and Mini 5+ on Millennium Milo v1.5 mini mill.

              1 Reply Last reply Reply Quote 0
              • E3D-TCWundefined
                E3D-TCW
                last edited by

                Hello @Falcounet

                I've tried giving this a run and during install we're coming up with the error:
                MicrosoftTeams-image.png

                Any suggestions how to resolve this? We tried installing dsf-python directly via pip install, but it did not seem to resolve it.

                Falcounetundefined 1 Reply Last reply Reply Quote 0
                • Falcounetundefined
                  Falcounet @E3D-TCW
                  last edited by Falcounet

                  @e3d-tcw You need to use pip3 as it is a Python3 module. Install python3-pip package if pip3 isn't available on your system.
                  What DSF version do you use ? This was normally fixed in 3.4

                  1 Reply Last reply Reply Quote 0
                  • CrazyCreatorundefined
                    CrazyCreator
                    last edited by

                    I like this plugin. But version 0.1 is not that advanced yet. Are you ( @Falcounet ) still developing it?

                    http://www.crazycreatorcube.com

                    Falcounetundefined 1 Reply Last reply Reply Quote 0
                    • Falcounetundefined
                      Falcounet @CrazyCreator
                      last edited by

                      @CrazyCreator No real plan so far. Can you be more explicit about what you find it "not that advanced yet" ?

                      1 Reply Last reply Reply Quote 0
                      • CrazyCreatorundefined
                        CrazyCreator
                        last edited by

                        @Falcounet said in ExecOnMcode v0.1:

                        @CrazyCreator No real plan so far. Can you be more explicit about what you find it "not that advanced yet" ?

                        sorry ... that was the bad google translator. The question was, are you still programming or is it finished?

                        http://www.crazycreatorcube.com

                        Falcounetundefined 1 Reply Last reply Reply Quote 0
                        • Falcounetundefined
                          Falcounet @CrazyCreator
                          last edited by

                          @CrazyCreator I'm not still programming it for now but if you have improvement or feature requests, I can consider them.

                          1 Reply Last reply Reply Quote 0
                          • CrazyCreatorundefined
                            CrazyCreator
                            last edited by

                            That sounds good... will try it out in the next few days.

                            http://www.crazycreatorcube.com

                            1 Reply Last reply Reply Quote 0
                            • CrazyCreatorundefined
                              CrazyCreator
                              last edited by CrazyCreator

                              @Falcounet
                              Bildschirm­foto 2022-11-30 um 23.00.01.png

                              Bildschirm­foto 2022-11-30 um 23.00.31.png

                              Raspi 4 with bullseye

                              http://www.crazycreatorcube.com

                              Falcounetundefined 2 Replies Last reply Reply Quote 0
                              • Falcounetundefined
                                Falcounet @CrazyCreator
                                last edited by

                                @CrazyCreator I think it's an issue with AppArmor. Do you use the DuetPi image for the SBC ?

                                CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
                                • CrazyCreatorundefined
                                  CrazyCreator @Falcounet
                                  last edited by

                                  @Falcounet
                                  No ... i make all clean today
                                  Raspi bullseye from raspi

                                  http://www.crazycreatorcube.com

                                  Falcounetundefined 1 Reply Last reply Reply Quote 0
                                  • Falcounetundefined
                                    Falcounet @CrazyCreator
                                    last edited by

                                    @CrazyCreator Then try installing apparmor and try again

                                    CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
                                    • CrazyCreatorundefined
                                      CrazyCreator @Falcounet
                                      last edited by

                                      @Falcounet
                                      I don't just have to install it. This AppArmor still needs to be configured.

                                      Do you know what I have to do exactly? I'm not the Linux expert

                                      http://www.crazycreatorcube.com

                                      Falcounetundefined 1 Reply Last reply Reply Quote 0
                                      • Falcounetundefined
                                        Falcounet @CrazyCreator
                                        last edited by Falcounet

                                        @CrazyCreator DSF configure it for you. Config files are stored into /etc/apparmor.d/.
                                        You should get /etc/apparmor.d/dsf.ExecOnMcode after the plugin installation.

                                        Make sure you also have installed duetpluginservice

                                        CrazyCreatorundefined 1 Reply Last reply Reply Quote 0
                                        • CrazyCreatorundefined
                                          CrazyCreator
                                          last edited by CrazyCreator

                                          @Falcounet
                                          Bildschirm­foto 2022-11-30 um 23.32.18.png

                                          I don't have this file.

                                          But the install from the plugin is not complete, so i think the file is not created.

                                          http://www.crazycreatorcube.com

                                          1 Reply Last reply Reply Quote 0
                                          • CrazyCreatorundefined
                                            CrazyCreator @Falcounet
                                            last edited by CrazyCreator

                                            @Falcounet
                                            Bildschirm­foto 2022-11-30 um 23.48.02.png

                                            in screen you see the pluginservice is running
                                            apparmor freshly installed

                                            http://www.crazycreatorcube.com

                                            chrishammundefined 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA