@arubislander
Thanks for your answer.
Welcome on board! Have you already read some about application confinement?
There are no app armor policy groups that would allow your app to do what you are attempting.
Now, I've read it . It is a pity that it is not supported by AppArmor.
If your app is for personal learning and use then you could go the way of UTTT.
Yes, this is my idea but I can't comprehend the steps of UTTT to become sudo, to forward the root-rights to the python module. I am still too inexperienced in programming for that.
Otherwise the functionality might more properly be proposed to the Music App, to stop playing after a certain time.
That's a good idea, too. But my little timer app should be my first attempt at programming on this platform and I would like to solve the problem.
But without more information as to the goal it is difficult to offer guidance.
Here is a short description:
- Calling the app with sudo-rights
- Chose minutes till shutting down the MusicPlayer
- Go sleep for ...minutes
- Stop AppArmor service in python(with root-rights)
- Kill MusicPlayer
- Start AppArmor service in python(with root-rights)
All code is already finished. The problem is point 4 and 6.
Thanks again.