Ergebnis 1 bis 8 von 8
  1. #1
    Senior Mitglied Avatar von valdemirs
    Registriert seit
    13.03.2015
    Ort
    Sao Paulo - Brazil
    Beiträge
    115
    Thanks (gegeben)
    29
    Thanks (bekommen)
    7
    Total Downloaded
    10,99 MB
    Total Downloaded
    10,99 MB
    ReceiverDanke
    Box 1:
    Vu+Duo2
     
     
    Box 2:
    Mi Box S
     
     
    Box 3:
    https://bit.ly/3eJp781
     
     

    Start a program on device´s startup

    Hi,


    I need start a program in the device´s startup.


    Is there any way to do this ?

    •   Alt Advertising

       

  2. #2
    Senior Mitglied Avatar von s3n0
    Registriert seit
    02.01.2017
    Ort
    Slovakia
    Beiträge
    1.463
    Thanks (gegeben)
    91
    Thanks (bekommen)
    420
    Total Downloaded
    323,0 KB
    Total Downloaded
    323,0 KB
    ReceiverDanke
    Box 1:
    Vu+ Zero 4K
     
     
    Box 2:
    Vu+ Solo SE V2
     
     
    Box 3:
    Formuer F4-TURBO
     
     
    What do you mean by the "program" ?

    Do you mean a satellite channel or executable file (binary) ? Or some script maybe ?

  3. Thanks valdemirs bedankten sich
  4. #3
    Avatar von Topfi
    Registriert seit
    05.04.2013
    Beiträge
    597
    Thanks (gegeben)
    204
    Thanks (bekommen)
    214
    Total Downloaded
    5,76 MB
    Total Downloaded
    5,76 MB
    ReceiverDanke
    Yes.


    There are many possibilities to do this, one is:
    Create an executable script in /etc/init.d, e.g. /etc/init.d/myautostartscript.sh
    Create a link in a runlevel directory, e.g. ln -sf /etc/init.d/myautostartscript.sh /etc/rcS.d/S99Autostartscript.sh

    More info here:
    http://wiki.linuxquestions.org/wiki/Run_Levels

  5. Thanks valdemirs bedankten sich
  6. #4
    Senior Mitglied Avatar von s3n0
    Registriert seit
    02.01.2017
    Ort
    Slovakia
    Beiträge
    1.463
    Thanks (gegeben)
    91
    Thanks (bekommen)
    420
    Total Downloaded
    323,0 KB
    Total Downloaded
    323,0 KB
    ReceiverDanke
    Box 1:
    Vu+ Zero 4K
     
     
    Box 2:
    Vu+ Solo SE V2
     
     
    Box 3:
    Formuer F4-TURBO
     
     
    Yup. Exactly.

    If you want, then there is always a bash-script in OpenATV after each boot and before starting Enigma2:
    /usr/bin/enigma2_pre_start.sh
    You also have to enable the attributes for running the script:
    chmod +x /usr/bin/enigma2_pre_start.sh

    If you want to start something right after the system is started, then use the folder:
    /etc/init.d/
    You place your bash-script in this folder, for example "autostart.sh". Ideal as ANSI character encoding, and especially with LF line format - Unix LF format, not Windows format CR+LF ! You set the following attributes for this bash-script:
    chmod +x /etc/init.d/autostart.sh
    Then you push this "autostart.sh" bash-script to Run-Level-3, which is used as a normal system run. So you will use the command:
    ln -sf /etc/init.d/autostart.sh /etc/rc3.d/S95autostart.sh

    For more information, you need to search the internet. For example, linking the script from /etc/init.d/ to the /etc/rc3.d/ directory. Or how to use the "unlink" command. Or what are the numbers when linking to /etc/rc3.d/, etc. .

    The system startup scripts from the /etc/init.d/ folder can work with the input parameter - start, stop, restart. This method also runs some system services. As an example, you can view the contents of the script for launching CRON service in OpenATV:
    /etc/init.d/crond (follow the input argument for: start, stop, and restart)

    Prerequisite is also the knowledge of Unix/Linux systems (bash script must have an identifier at the beginning of the file: #!/bin/sh ...or... #!/bin/bash).

  7. Thanks valdemirs bedankten sich
  8. #5
    Anfänger
    Registriert seit
    10.10.2021
    Beiträge
    2
    Thanks (gegeben)
    0
    Thanks (bekommen)
    0
    Total Downloaded
    0
    Total Downloaded
    0
    ReceiverDanke
    Hello I dont want open new thread as I see there is some help but Im not expert and dont know how to start.. i cant code so i need big help..

    i want to have Kodi plugin start up with boot.. I mean i power up my uclan ustym 4k pro and i want imediatly have kodi opened.. how to do it? need to create autostart.sh ? but what to put inside there? and big help?

  9. #6
    Senior Mitglied Avatar von s3n0
    Registriert seit
    02.01.2017
    Ort
    Slovakia
    Beiträge
    1.463
    Thanks (gegeben)
    91
    Thanks (bekommen)
    420
    Total Downloaded
    323,0 KB
    Total Downloaded
    323,0 KB
    ReceiverDanke
    Box 1:
    Vu+ Zero 4K
     
     
    Box 2:
    Vu+ Solo SE V2
     
     
    Box 3:
    Formuer F4-TURBO
     
     
    Hi.

    I don't use KODI, so I can't help you. In addition, it is a plugin, not a LINUX / UNIX system-dependent process. So you have to run it via Enigma2.

    Of course, it is possible to do it by any way. For example, via the Shell:
    1 x pressing the "green" button (the Plugin MENU) + 3 x (for example) "cursor down" button + 1 x "OK" button
    I mean, after successfully booting of the Enigma2, a shell-script will run, which will control the virtual RCU, with the help of OpenWebif (Web-GUI interface).

    If you want to use KODI, then please, do not use Enigma2. It's an unnecessarily big burden on the system ! Also, KODI for Enigma2 is NOT reliable and not full-fledged ! For example, buy a set-top box with a multiboot disk (for example Zgemma H9.2H-SE), on which you can boot Android (with KODI) and also Enigma2 (with OpenATV or another Enigma2 distribution) separately.

    Maybe... it is possible to set this to start KODI automatically, somewhere in the KODI configuration (KODI for Enigma2). I mean the automatic launch of KODI, after a successful boot of Enigma2. I have no idea. Sorry. I really don't use KODI and I don't want to.

    KODI is a sloppy multimedia GUI. Requires powerful hardware. And that's just because KODI is programmed totally sloppy. KODI works on multiple layers:

    (1) Linux / Unix kernel
    (2) JAVA language as the development platform
    (3) Android as the alleged "operating system" but basically it is not an operating system... maybe it's a "system", but not an "operating system"... just a "graphics system"... and that's a powerful marketing ploy... a real operating system for Android, the Linux or Unix kernel is the basis (I don't remember exactly which one)
    (4) KODI - as the GUI, programmed in the JAVA language, originally intended and especially for the Android

    And that's why KODI requires so much hardware performance. If KODI was designed directly as a standalone firmware, a chipset with a CPU of only 100-500 MHz (depending on the firmware structure) would suffice and everything would work perfectly.

  10. #7
    Anfänger
    Registriert seit
    10.10.2021
    Beiträge
    2
    Thanks (gegeben)
    0
    Thanks (bekommen)
    0
    Total Downloaded
    0
    Total Downloaded
    0
    ReceiverDanke
    Zitat Zitat von s3n0 Beitrag anzeigen
    Hi.

    I don't use KODI, so I can't help you. In addition, it is a plugin, not a LINUX / UNIX system-dependent process. So you have to run it via Enigma2.

    Of course, it is possible to do it by any way. For example, via the Shell:
    1 x pressing the "green" button (the Plugin MENU) + 3 x (for example) "cursor down" button + 1 x "OK" button
    I mean, after successfully booting of the Enigma2, a shell-script will run, which will control the virtual RCU, with the help of OpenWebif (Web-GUI interface).

    If you want to use KODI, then please, do not use Enigma2. It's an unnecessarily big burden on the system ! Also, KODI for Enigma2 is NOT reliable and not full-fledged ! For example, buy a set-top box with a multiboot disk (for example Zgemma H9.2H-SE), on which you can boot Android (with KODI) and also Enigma2 (with OpenATV or another Enigma2 distribution) separately.

    Maybe... it is possible to set this to start KODI automatically, somewhere in the KODI configuration (KODI for Enigma2). I mean the automatic launch of KODI, after a successful boot of Enigma2. I have no idea. Sorry. I really don't use KODI and I don't want to.

    KODI is a sloppy multimedia GUI. Requires powerful hardware. And that's just because KODI is programmed totally sloppy. KODI works on multiple layers:

    (1) Linux / Unix kernel
    (2) JAVA language as the development platform
    (3) Android as the alleged "operating system" but basically it is not an operating system... maybe it's a "system", but not an "operating system"... just a "graphics system"... and that's a powerful marketing ploy... a real operating system for Android, the Linux or Unix kernel is the basis (I don't remember exactly which one)
    (4) KODI - as the GUI, programmed in the JAVA language, originally intended and especially for the Android

    And that's why KODI requires so much hardware performance. If KODI was designed directly as a standalone firmware, a chipset with a CPU of only 100-500 MHz (depending on the firmware structure) would suffice and everything would work perfectly.
    I full agree with you that kodi is sloppy and not special good for engima2. but I have old plasma panasonick and no other option to watch netflix..(buying new device with netflix, plugin PC to tv...) .. neflix plugin to opeantv doesnt work for me because i have error code c7717 every few minutes i watched so its annoying. i tried other images and stil c7717. ok.. i will do it manually.. thx for help

  11. #8
    Senior Mitglied Avatar von s3n0
    Registriert seit
    02.01.2017
    Ort
    Slovakia
    Beiträge
    1.463
    Thanks (gegeben)
    91
    Thanks (bekommen)
    420
    Total Downloaded
    323,0 KB
    Total Downloaded
    323,0 KB
    ReceiverDanke
    Box 1:
    Vu+ Zero 4K
     
     
    Box 2:
    Vu+ Solo SE V2
     
     
    Box 3:
    Formuer F4-TURBO
     
     
    Which version of Netflix-plugin are you using ? You need to find on the internet the author of the code, for the used Netflix-plugin and write to the creator of the plugin, this error report.

    If you want a delayed start, this can be done via a shell script (pre_start), which starts before Enigma. There you add the execution of your short code, in the background of the system, after some time (sleep command) so that the pre_start script can continue to run and complete. After a while, your script will run automatically, which will invoke individual buttons via the virtual RCU in OpenWebif (to start the KODI plugin). Here is the shell-script, started before Enigma:
    /usr/bin/enigma2_pre_start.sh
    (if the file doesn't exist, then create a new file... and of course the UNIX newlines format must be used there)

    Code:
    #### webif_rc is a function for calling any RCU buttons - via the OpenWebif (Enigma2 Web-GUI)
    #### usage syntax:    webif_rc "keycode:pause:repeat" "keycode:pause:repeat" "keycode:pause:repeat" . . . . . "end"
    #### Remote Control Unit - ID code list :   https://github.com/openatv/enigma2/blob/7.0/lib/python/keyids.py
    webif_rc()
    {
       arr=("$@")
       i="0"
       #echo ${arr[@]}
       until [ ${arr[i]} == "end" ] || [ $i -gt 100 ]
       do
    	  key=$(  echo ${arr[i]} | cut -f1 -d ':'  )
    	  tim=$(  echo ${arr[i]} | cut -f2 -d ':' | cut -f1 -d ':'  )
    	  rep=$(  echo ${arr[i]} | cut -f3 -d ':'  )
    	  #rep=${!rep}   # convert string to value
    	  #echo --- $i --- ${arr[i]} ------------ key=$key -- time=$tim -- repeat=$rep
    	  until [ $rep == "0" ]
          do
    	     wget -q -O - http://127.0.0.1/web/remotecontrol?command=$key > /dev/null 2>&1
    	     sleep 0.1s
    	     sleep $tim
    	     rep=$[$rep-1]
    	  done
    	  i=$[$i+1]
       done
    }
    
    # Example :
    
    webif_rc "364:2.0:1" "158:0.1:1"  "108:0.5:4" "352:0.8:1" "108:0.3:1" "352:2.0:1" "103:0.5:2" "352:0.5:1" "end"
    ####      FAV         Recall       DOWN x 4    OK          DOWN        OK          UP x 2      OK
    Another option is to add a quick action for any RCU button - on your physical RCU. If there are functional and unused buttons on the RCU, you can "assign" them to a function - including starting one of the installed plugins in Enigma2. I think, the RCU hotkey choice is also a good thing for solving your problem:

    MENU > Settings > Usage & GUI > Hotkey Setup : now press the quick button on your RCU and select the desired action for this button

    Here is an example of using the shell script "/usr/bin/enigma2_pre_start.sh" in OpenATV (v6.4):

    Code:
    #!/bin/bash
    
    # EXAMPLE OF RUNNING A SHORT SHELL-SCRIPT CODE, WITH A DELAY OF A FEW SECONDS, BUT IN THE BACKGROUND OF THE SYSTEM (RESIDENTIAL) + CONTINUATION OF RUNNING THE ORIGINAL SHELL-SCRIPT PRE_START:
    
    CMD="sleep 60
    wget -qO- 'http://127.0.0.1/web/message?type=1&timeout=15&text=Test+message+invoked%0A+from+the+background+script.' > /dev/null 2>&1
    echo -e 'TEST' > /tmp/enigma2_pre_start_-_test.log"
    
    eval "${CMD}" &>/dev/null & disown
    Geändert von s3n0 (13.10.2021 um 14:25 Uhr) Grund: added example of the script - enigma2_pre_start.sh


Stichworte

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:50 Uhr.
Powered by vBulletin® Version 4.2.5 (Deutsch)
Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.
Resources saved on this page: MySQL 5,56%
Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)
vBulletin Skin By: PurevB.com