• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

how to setup systemd script in clickable project directory ?

Scheduled Pinned Locked Moved App Development
8 Posts 2 Posters 223 Views 1 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.
    • D Offline
      ds2k5
      last edited by 28 Oct 2024, 09:39

      @lduboeuf

      Hi Lionel,
      I did not understand how to build
      a systemd script in the Source Code dirertory
      that after build a click file an install it with clickable
      the systemd script is available and started.

      I like to Port the: Upower Indicator (for UB 1604) from open-store

      but did not understand how to build the scripts

      I converted the APP so far that I can build the APP for
      UB 20.04. But found some errors.

      the orginal service file is this:

      <?xml version="1.0" encoding="UTF-8"?>
      <service id="indicator.upower.ernesst_indicator-upower">
        <type>webapps</type>
        <name>indicator-upower</name>
        <provider>indicator-upower</provider>
      </service>
      

      my try for new version is this:

      [Unit]
      Description=indicator upower
      
      [Service]
      EnvironmentFile=/home/phablet/.config/indicator.upower.ernesst/indicator.upower.ernesst.conf
      ExecStart=/home/phablet/.local/share/indicator.upower.ernesst/indicator-upower
      
      
      [Install]
      WantedBy=graphical-session.target
      

      and I tyed to mod the indicator-upower-helper
      but busybox did not include "cp" command

      [28.10.24 06:51] library "eglSubDriverAndroid.so" not found
      [28.10.24 06:51] Creating a QMirClientScreen now
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:516:15: QML Label: Cannot anchor to an item that isn't a parent or sibling.
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:516:15: QML Label: Cannot anchor to an item that isn't a parent or sibling.
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:368:15: QML Label: Cannot anchor to an item that isn't a parent or sibling.
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:368:15: QML Label: Cannot anchor to an item that isn't a parent or sibling.
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:495:19: Unable to assign [undefined] to int
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:510:19: Unable to assign [undefined] to int
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:539:19: Unable to assign [undefined] to int
      [28.10.24 06:51] file:///opt/click.ubuntu.com/indicator.upower.ernesst/0.3/qml/Main.qml:554:19: Unable to assign [undefined] to int
      [28.10.24 06:52] QObject::startTimer: Timers cannot be started from another thread
      [28.10.24 06:54] qt.qpa.mirclient: Attempted to deliver an event to a non-existent window, ignoring.
      [28.10.24 06:54] qt.qpa.mirclient: Attempted to deliver an event to a non-existent window, ignoring.
      [28.10.24 06:54] qt.qpa.mirclient: Attempted to deliver an event to a non-existent window, ignoring.
      
      L 2 Replies Last reply 28 Oct 2024, 09:40 Reply Quote 0
      • L Offline
        lduboeuf @ds2k5
        last edited by lduboeuf 28 Oct 2024, 09:40

        @ds2k5 can you share the link to the source code repository ?

        D 1 Reply Last reply 28 Oct 2024, 09:54 Reply Quote 0
        • D Offline
          ds2k5 @lduboeuf
          last edited by ds2k5 28 Oct 2024, 09:54

          @lduboeuf

          https://gitlab.com/ubtouch2/fork-indicator-upower

          1 Reply Last reply Reply Quote 0
          • L Offline
            lduboeuf @ds2k5
            last edited by 28 Oct 2024, 09:59

            @ds2k5 you will have to adapt install.sh, uninstall.sh to copy the service file to user systemd directory ( /home/phablet/.config/systemd/user/ )

            D 2 Replies Last reply 28 Oct 2024, 10:08 Reply Quote 0
            • D Offline
              ds2k5 @lduboeuf
              last edited by 28 Oct 2024, 10:08

              @lduboeuf

              I will try thank you so much!

              How to fix the issue:

              [27.10.24 21:42] library "eglSubDriverAndroid.so" not found
              

              more see above

              1 Reply Last reply Reply Quote 0
              • D Offline
                ds2k5 @lduboeuf
                last edited by 28 Oct 2024, 10:47

                @lduboeuf

                how to set that the .sh scripts are executable
                because in source file they are
                But on the device after install by clickable they not executable:

                -rw-r--r-- 1 clickpkg clickpkg  555 Oct 28 11:20 install.sh
                -rw-r--r-- 1 clickpkg clickpkg  262 Oct 28 11:42 uninstall.sh
                
                L 1 Reply Last reply 28 Oct 2024, 12:37 Reply Quote 0
                • L Offline
                  lduboeuf @ds2k5
                  last edited by 28 Oct 2024, 12:37

                  @ds2k5 said in how to setup systemd script in clickable project directory ?:

                  @lduboeuf

                  how to set that the .sh scripts are executable
                  because in source file they are
                  But on the device after install by clickable they not executable:

                  -rw-r--r-- 1 clickpkg clickpkg  555 Oct 28 11:20 install.sh
                  -rw-r--r-- 1 clickpkg clickpkg  262 Oct 28 11:42 uninstall.sh
                  

                  it is done by code: https://gitlab.com/ubtouch2/fork-indicator-upower/-/blob/main/plugins/Indicator/indicator.cpp#L19

                  D 1 Reply Last reply 28 Oct 2024, 12:41 Reply Quote 0
                  • D Offline
                    ds2k5 @lduboeuf
                    last edited by 28 Oct 2024, 12:41

                    @lduboeuf

                    thanks

                    1 Reply Last reply Reply Quote 0
                    • C CiberSheep moved this topic from General on 30 Oct 2024, 14:49
                    6 out of 8
                    • First post
                      6/8
                      Last post