SelfControlApp / selfcontrol

:skull: Mac app to block your own access to distracting websites etc for a predetermined period of time. It can not be undone by the app or by a restart – you must wait for the timer to run out.
http://selfcontrolapp.com
GNU General Public License v3.0
4.04k stars 399 forks source link

SelfControl for Applications? #515

Open akashagarwal7 opened 6 years ago

akashagarwal7 commented 6 years ago

Firstly, thank you for the wonderful app. It is the only thing saving me from failing at my uni and life. Anyway, is it possible to block Applications from running as well? The only way I can think of doing this is by monitoring the process manager and if the undesirable process is running, we kill -9 it or something more subtle. The processes/apps can be identified by grepping their path.

This feature can be really helpful for me (and anyone else) since I tend to resort to gaming sometimes when all of my internet distractions are blocked.

cstigler commented 6 years ago

I like the idea and it sounds like you have an idea for implementation! Just killing the process in a loop is pretty hacky, but I don't know any better way to do it so that seems good I guess! Are you interested in implementing it?

akashagarwal7 commented 6 years ago

I would be but I feel the same way about the solution, and I can't think of a better one at the moment. I'd really appreciate if someone could suggest something better.

astaninger commented 6 years ago

What if you changed the permissions?

astaninger commented 6 years ago

chmod 655

akashagarwal7 commented 6 years ago

@astaninger you can still run the application as sudo or root user..

image24 commented 6 years ago

Check this out: https://github.com/erikberglund/AppBlocker. You can find the bundle identifier using the terminal command "codesign -dvv" I also chose to lock the files, as well as the plist file in /Library/LaunchDaemons, using "sudo chflags schg" so that it cannot be disabled.

bob-ortiz commented 3 years ago

This one seems to work too: https://github.com/google/santa