On Android, there’s an excellent tool called Shelter. One of it’s features is to “Freeze” an app. This essentially makes it completely dormant and inactive until you unfreeze it. No background processes, network activity, etc.
I’ve looked into firejail and fiddled around with it a little bit, and it seems that I can set lots of parameters to a very secure state, but only as overarching rules. Ie, they take effect both while the program is in use and when it is inactive.
Ideally, I’d like to give a couple programs some access when I’m actively using them (ie, let firefox access the internet, and see my ~/Downloads
folder, but only when I’m using it. Then, when I kill the process, have it automatically lose all privileges and become “frozen”.
To be fair, I’m very unfamiliar with firejail so far, so afaik this could be easily done and I just haven’t found the method yet. If someone could point me towards some resources, or suggest another tool besides firejail to accomplish this, I’d be very grateful.
I don’t quite get what you want to achieve. On Android Apps might run Tasks or be active in the background. But on Linux programs usually dont have a background task, if you close them they are gone. (Unless they “minimize to taskbar”)
So, when you kill the process it’s gone. Removing permission won’t change anything for not running programms.
Maybe you can explain a bit more?