UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Jerzecokno
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 0

    Jerzecokno

    @Jerzecokno

    0
    Reputation
    2
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Jerzecokno Unfollow Follow

    Latest posts made by Jerzecokno

    • RE: Run python script within confined app

      @arubislander Unfortunately QML is not an option for me, given I don't know the first thing about it, and despite repeated attempts to learn it, I don't expect to be capable of building and maintaining a QML app in the long term within a reasonable timeframe.

      I would've hoped that, given Ubuntu Touch supports non-QML apps, I could find a non-QML way to do it, so I could provide extended support for that app. I currently need only file storage and Content Hub support (both of which would work well if I could run a basic python script - or any equivalent), but I'd like to potentially support more OS features in the future and to fix bugs that users will report, thus I would prefer to make my app in an environment I can control enough to provide serious maintenance for it.

      If QML is really the only way, is there such a thing as a "dead simple" QML WebView template which I could maintain in the long term by changing only the scripts, without needing to change the QML part? If not, is there any other way I could do it?

      posted in App Development
      J
      Jerzecokno
    • Run python script within confined app

      I currently have an HTML5 app which needs to store large amounts of data, and which can't afford to risk eviction.

      Since I couldn't get the HTML5 API working, I worked around this issue by hosting a basic HTTP server on the user's phone, which the app could exchange data through XHR, and the server takes care of managing the data (saving data into files and exposing that same data to the app for later use). Currently, I use a simple python invocation with CGI scripts.

      My problem is the following: I cannot call the python executable from within a script while my app is confined. I can work around this by creating a python script and setting it as executable, but then it can't access the HTTP modules required for my case.

      My current (bad) solution: Putting my app in unconfined mode and giving it full system access seems to resolve the problem. However, it also allows the app to access parts of the system it needs not access, and I feel that giving my app full system access only to be able to run a simple script is overkill and a (very, very) bad practice.

      Is there any way I could make my app cleaner? Can I (and should I) bundle a custom python with modules with my app? Can I use something else to host an HTTP server with CGI support?

      posted in App Development apparmor python network html5
      J
      Jerzecokno