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

    How can a script running in libertine container activate the display?

    Scheduled Pinned Locked Moved Libertine
    6 Posts 3 Posters 543 Views 2 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.
      • M Offline
        muskist
        last edited by

        I have a Tcl/Tk script started and running in the container. After a while - say 10 min - the script will create a window with a button to press.

        Meanwhile the display has gone dark. Therefore I have to press the (hardware) power button in order to activate the display before can press the said (software) button.

        Is there any way to activate the display "from within the container" to immediately be able to press the said (software) button and avoid pressing the power button?

        Thanks in advance!

        AppLeeA 1 Reply Last reply Reply Quote 0
        • Pulsar33P Offline
          Pulsar33
          last edited by

          Not sure to understand what you want and what you mean by "gone dark". Is the screen "dark and locked" or only "dark without any lock pass phrase or code" ?
          If there's no pass, why don't you let the screen always on by setting the screensaver to "never" in Preferences ?

          I know I don't reply to your question but it's difficult to look for the variable to act on if we don't understand what you want.

          Maybe someone knows how to do ? Please tell us ...
          Pulsar33

          Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
          Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
          Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

          1 Reply Last reply Reply Quote 0
          • AppLeeA Offline
            AppLee @muskist
            last edited by

            Hi @muskist

            Have you tried to set keep-display-on:
            https://docs.ubports.com/en/latest/appdev/platform/apparmor.html

            I don't know if it can be applied to Libertine apps.

            1 Reply Last reply Reply Quote 0
            • M Offline
              muskist
              last edited by

              @Pulsar33 and @AppLee Thanks for your replies and sorry for putting my problem so poorly.

              I don't want the screen to be always on because I'm trying to make an alarm clock. Therefore the screen has to go inactive ("dark") eventually - else I can't sleep :).

              The "snooze" button of the UT clock app is pretty tiny. When I finally found it I'm wide awake.

              Therefore I'm trying to make an app with a huge "snooze" button that's filling the whole screen so I just have to tap on the display to hit it. But the screen has to be active to do so.

              I want my script to do what the UT-clock-app does: Activate the screen when the alarm goes off.

              AppLeeA 1 Reply Last reply Reply Quote 0
              • AppLeeA Offline
                AppLee @muskist
                last edited by

                @muskist
                If I had to do it, I would fork UT's clock and strip it down.
                I think the app should be unconfined in order to be able to wake the screen but you can check the apparmor list I sent.

                Pulsar33P 1 Reply Last reply Reply Quote 2
                • Pulsar33P Offline
                  Pulsar33 @AppLee
                  last edited by

                  @applee Fine solution !
                  Pulsar33

                  Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                  Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                  Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post