0

I am trying to run a python file in termux for use in tasker. The termux tasker plugin requires an executable (you can't just run a command like "python something.py"). However, running chmod +x results in operation not permitted.

Here is a screenshot of the top of my python file, pointing to the python I installed via "pkg install python".

enter image description here

Any help?

  • Tasker has root access? – iBug Mar 13 '18 at 11:55
  • My phone isn't rooted. I thought that termux was it's own separate environment though. If the termux-tasker plugin requires an executable I would assume there would be a way of making an executable. – theParanoidAndroid Mar 13 '18 at 12:06
  • AFAIK, you need root for Tasker to access the python3 binary file, because it belongs to Termux. – iBug Mar 13 '18 at 12:06
  • Is there any way to just run a termux command through tasker then? Surely tasker doesn't need access the the python binaries as it just tells termux to do it. – theParanoidAndroid Mar 13 '18 at 12:08
  • I'm afraid no, but why do you think Tasker is telling Termux to do it instead of doing it directly? – iBug Mar 13 '18 at 12:09
0

You need to grant Tasker root access in order to let it run the script.

The script requires an interpreter, as specified in its shebang line. To run the script "directly", Tasker still needs to execute the interpreter, the python3 binary. Since it's located in Termux's data directories, other apps can't access it without root access.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.