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

CALL FOR TESTERS: New install script

Scheduled Pinned Locked Moved General Discussion
26 Posts 7 Posters 1.1k Views 6 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.
  • K Offline
    KristjanESPERANTO Module Developer @drdeath
    last edited by Sep 3, 2024, 9:34 AM

    @drdeath I’m a bit sceptical about trying it out as it contains a few hundred encoded lines and the comments don’t clearly describe what it does and why it’s encoded.

    B D 2 Replies Last reply Sep 3, 2024, 6:49 PM Reply Quote 1
    • B Offline
      BKeyport Module Developer @KristjanESPERANTO
      last edited by Sep 3, 2024, 6:49 PM

      @KristjanESPERANTO Encoded lines? Oh hell no.

      Don’t care if it’s fully documented, if I’m not able to at least look at the code, then it’s a hell no for me.

      The "E" in "Javascript" stands for "Easy"

      1 Reply Last reply Reply Quote 0
      • D Offline
        drdeath @KristjanESPERANTO
        last edited by Sep 4, 2024, 12:38 PM

        @KristjanESPERANTO What are you talking about, the listing of those config files is right there in the comments, and the purpose of that binary is quite obvious if you have a basic knowledge of Linux and Xorg. Also the file name the binary gets stored under is a dead giveaway. Don’t expect me to spoon-feed you obvious information.

        1 Reply Last reply Reply Quote -1
        • D Offline
          drdeath
          last edited by Sep 5, 2024, 8:49 AM

          @BKeyport @KristjanESPERANTO Turns out I owe you some thanks, if only because you got me thinking and questioning my assumptions.

          I had previously assumed the anchor process of an X server needed to be an X application, but that turned out to be not the case, so the whole blackpixel executable could be removed entirely, eliminating a major contributor to the script size and a maintenance headache for me.

          It does make the script even more obscure and alien though. That’s easily the strangest X config I’ve ever created.

          Code is updated.

          M 1 Reply Last reply Sep 5, 2024, 1:32 PM Reply Quote 1
          • M Offline
            mumblebaj Module Developer @drdeath
            last edited by Sep 5, 2024, 1:32 PM

            @drdeath I think what the guys were saying or are trying to say, is that for the standard MM user, looking at the script and seeing “coded” code they may be hesitant to test the script. Although it can easily be decoded with echo 'base64 string' | base64 -d which would reveal the coded strings, the normal user does not know this.

            It does make the script so much smaller but for a newb looking at that would scare them away.

            Just my 2pence.

            Check out my modules at: https://github.com/mumblebaj?tab=repositories

            S 1 Reply Last reply Sep 5, 2024, 2:28 PM Reply Quote 2
            • S Away
              sdetweil @mumblebaj
              last edited by Sep 5, 2024, 2:28 PM

              @mumblebaj AND there is no practical need for encoding anything

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              K 1 Reply Last reply Sep 5, 2024, 4:39 PM Reply Quote 1
              • K Offline
                karsten13 @sdetweil
                last edited by Sep 5, 2024, 4:39 PM

                @sdetweil said in CALL FOR TESTERS: New install script:

                @mumblebaj AND there is no practical need for encoding anything

                there was a need for the binary which was removed meanwhile, but not for the text files …

                so e.g. this

                base64 -d > /tmp/mm-install/xinitrc <<< 'IyEvYmluL3NoCgp4c2V0IHMgb2ZmICAgICAgICAgIyBkb24ndCBhY3RpdmF0ZSBzY3JlZW5zYXZl
                cgp4c2V0IC1kcG1zICAgICAgICAgIyBkaXNhYmxlIERQTVMgKEVuZXJneSBTdGFyKSBmZWF0dXJl
                cy4KeHNldCBzIG5vYmxhbmsgICAgICMgZG9uJ3QgYmxhbmsgdGhlIHZpZGVvIGRldmljZQoKaWYg
                WyAtciAiL2V0Yy9tYWdpY21pcnJvci94cmFuZHJfb3B0cyIgXTsgdGhlbgogICAgICAgZWNobyAi
                cnVubmluZyB4cmFuZHIgd2l0aCBhcmd1bWVudHMgXCIkKGNhdCAvZXRjL21hZ2ljbWlycm9yL3hy
                YW5kcl9vcHRzKVwiIgogICAgICAgRElTUExBWT06MCB4cmFuZHIgJChjYXQgL2V0Yy9tYWdpY21p
                cnJvci94cmFuZHJfb3B0cykKZWxzZQoJZWNobyAibm90IHJ1bm5pbmcgeHJhbmRyIgpmaQoKeHNl
                dHJvb3QgLXNvbGlkIGJsYWNrCgppZiBbIC1yICIvZXRjL21hZ2ljbWlycm9yL3hfYmFja2dyb3Vu
                ZF9pbWFnZSIgXSAmJiBbIC1yICIkKGNhdCAvZXRjL21hZ2ljbWlycm9yL3hfYmFja2dyb3VuZF9p
                bWFnZSkiIF07IHRoZW4KCXhsaSAtb25yb290ICQoY2F0IC9ldGMvbWFnaWNtaXJyb3IveF9iYWNr
                Z3JvdW5kX2ltYWdlKQpmaQoKd2hpbGUgOjsgZG8gc2xlZXAgMTAwMDA7IGRvbmUKCg=='
                

                could be replaced by

                cat > /tmp/mm-install/xinitrc <<"EOF"
                #!/bin/sh
                
                xset s off         # don't activate screensaver
                xset -dpms         # disable DPMS (Energy Star) features.
                xset s noblank     # don't blank the video device
                
                if [ -r "/etc/magicmirror/xrandr_opts" ]; then
                       echo "running xrandr with arguments \"$(cat /etc/magicmirror/xrandr_opts)\""
                       DISPLAY=:0 xrandr $(cat /etc/magicmirror/xrandr_opts)
                else
                        echo "not running xrandr"
                fi
                
                xsetroot -solid black
                
                if [ -r "/etc/magicmirror/x_background_image" ] && [ -r "$(cat /etc/magicmirror/x_background_image)" ]; then
                        xli -onroot $(cat /etc/magicmirror/x_background_image)
                fi
                
                while :; do sleep 10000; done
                
                EOF
                
                D 1 Reply Last reply Sep 5, 2024, 9:18 PM Reply Quote 1
                • D Offline
                  drdeath @karsten13
                  last edited by Sep 5, 2024, 9:18 PM

                  @karsten13 I tried here-docs initially, and it caused all kinds of problems, from missing newlines to empty files, although at least some of that probably was due to me writing the string to variables instead of directly to files and causing problems with the shell’s variable space.

                  Using base64 may not strictly necessary, but it’s robust and portable, and not in the least harmful. It’s also relatively easy to fact-check if you have a basic working knowledge of Linux. If you don’t, well then any software is a total black box to you and you just have to trust the person providing it. See the recent kerfuffle around obscured malicious code in ssh. I wouldn’t have been able to find it.

                  The way it works is, people who have the knowing fact-check and give the thumbs-up for those who don’t.

                  I’d also like to point out that

                  a) the contents of the files are listed as comments
                  b) if you were looking at a binary instead of a script, you’d be no wiser if you had it in binary rather than base64,
                  c) if I had made the pivot to makeself instead of encoding the files in b64, you’d see even less of the script before you executed it
                  d) most of the software you have on your system right now was provided in binary form, and
                  e) unless you are a closet uber-geek, you probably wouldn’t understand half of it if you had the source code, and
                  f) even if you are, a single human lifetime wouldn’t be nearly enough to fact-check the software on even a basic Linux install.

                  I feel you are blowing the fact that I’m using base64 to encode those files WAY out of proportion. As it is, it’s working as intended, and I’m not going running that gauntlet of trying to get here-docs to work again without better reason than people getting queasy over seeing base64 strings in a file.

                  If you want to modify it, you’re welcome to do so and provide a well-tested pull request. If on the other hand you wish to reject my work on a technicality like that, that’s a shame, but it hurts the community WAY more than it hurts me.

                  T D K 3 Replies Last reply Sep 5, 2024, 11:19 PM Reply Quote 0
                  • T Offline
                    tdw @drdeath
                    last edited by Sep 5, 2024, 11:19 PM

                    @drdeath sure couldn’t tell from this chain. Feels like a solution in search of a problem.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      drdeath @drdeath
                      last edited by Sep 6, 2024, 12:13 AM

                      Actually, there’s two more things I’d like to point out, now that I think about it.

                      First, I specifically put in the readme that the script is written for people with a basic understanding of Linux and X. That’s not saying it can’t be used by people who don’t have that, but everything we’ve been discussing so far boils down to “It’s obscure to people who lack a basic understanding of Linux and X”. Well, yes it is, and I won’t apologize for that.

                      Second, what sparked the whole controversy was originally the presence of the blackpixel executable in the script. Funny thing is, nobody even asked me about the purpose or the source code of the blackpixel executable when it was still in there. I would have gladly shown it off and explained it, but instead of asking, all anyone ever did was basically criticize me for it being there because they didn’t understand it just by looking at it.

                      Everybody should remember that IT isn’t easy. If it is easy, that’s because people who have the skills and knowledge put in the work to make it easy for those who don’t. I’m very grateful to all the great people who put in the hard work so I can have Linux, X, MagicMirror or a ridiculously cheap versatile computer like the Raspberry Pi. I just wish the world would reciprocate just this once.

                      1 Reply Last reply Reply Quote -1
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        6/26
                        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