How to install Software via SSH

  • Hello,

    I just installed LibreELEC 9.2.3 (Kodi V 18.7) on my Raspberry Pi 3 b+.

    To power up the Pi I want to use this switch from PiSupply because I dont want to unplug and plug again the usb power cable. With this switch I just have to push a button on the case to boot/power down LibreELEC.

    But this switch needs software to work propperly. I tried to install it using SSH because it seems like there is no terminal avaiable in LibreELEC. UnfortunalIy get the following error:

    I removed "sudo" from the command because I am already root when I use SSH.

    So I cannot install the software using curl -sSL. Is there any other way installing the software? I don´t know if I can just use another commant instead of curls -sSL or apt-get (even though I didn´t used apt-get, it is listet in the error log) or if I can edit some files on the SD Card (I am really new to both linux and libreELEC). Or can I install the software using the addons in Kodi?

    In case there is no way installing the software, are there any other ways to boot the RasPi with a button? I know, a switch would be much easier, but I dont want to flip it anytime I powered off the system to cut the power circuit.

    Thank you for your help :)

  • LE uses it's own add-on system to install packages. APT is not supported. Fortunately you don't need APT or an install script for this project.

    • install the "Raspberry Pi Tools" add-on (provides Python GPIO lib)
    • create the folder /storage/.kodi/userdata/scripts
    • insert this lines between line 4 and 5 of softshut.py:
    Code
    import sys
    sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
    • put softshut.py into /storage/.kodi/userdata/scripts
    • create /storage/.config/autostart.sh with this content:
    Bash
    #!/bin/sh
    
    (
        python /storage/.kodi/userdata/scripts/softshut.py
    ) &
  • Thank you again for your help. It worked! Unfortunaly the Pi switches off within 2 minutes, but thats a known issue. I am going to try the workaround provided by Pi Supply.

  • Hello,

    I have a quite similar problem with the X735 power management board from Geekworm, which is why I found this thread. It needs an installation of scripts via apt-get to make the button work. But that is, as mentioned above, not possible in LE.

    I tried this installation method for LE which unfortunately made my pi not boot anymore. But I found this topic here, which made me a little bit more optimistic to find a method to make it work. Especially because I am such a fan of LE.

    Is it possible to also use the "Raspberry Pi Tools" add-on (and perhaps add some lines to any of these scripts) to make it work? As far as I know the button could work with LE, the fan with pwm however is not very likely to work.

    Thank you very much in advance for your support and your work on LE!