How to Run a Shell Script with Mac App Sandbox Enabled?
2014-08-15 09:35
561 查看
Is it possible to have an app, that runs within the sandbox, execute a shell script? The script makes use of two basic commands:defaults write killall I know that there are some exceptions to the sandbox, that can be added via the entitlements file, but not sure wheter it would be possible to have the user confirm the execution of the small script and then run it? Please give me a practical hint... When I run my app with sandbox off, everything works fine. With sandbox on both commands are not working and this is shown in the console: killall: warning: kill -TERM 12322: Operation not permitted osx shell mac-app-store appstore-sandbox
| |||
add a comment |
1 Answer
activeoldestvotesup vote1down voteaccepted | Why would you want to sandbox such a powerful App it in the first place? Do you want to modify defaults and killall for specific other apps (somehow possible) or for "all that exist on the machine"? If for specific other apps, why not do it without shell? For defaults write use com.apple.security.temporary-exception.shared-preference.read-write and add the domains you'd like to modify (eg. com.apple.DigitalColorMeter) and use CFPreferencesSetValue() For killall use com.apple.security.temporary-exception.apple-events and run an Applescript / send AppleEvents to terminate specific processes.
| ||||
|
相关文章推荐
- How to Run a Shell Script with Mac App Sandbox Enabled
- How to run a Java Program as a daemon (service) on Linux (openSUSE) using a shell script
- how to run 2 or more commands in a shell script [for Linux & Windows]
- How to Run a Custom Shell Script During an XCODE Build
- How to Run a Custom Shell Script During an XCODE Build
- How to control the jobs with shell?
- http://www.howtoforge.com/how-to-run-fully-virtualized-guests-hvm-with-xen-3.2-on-debian-lenny-x86_64
- 如何在MMIT上使用WMLScript文件(How To Use WMLScript Files With MMIT)
- [转贴]How to work with stored procedures by using script in an Office InfoPath 2003 form
- Bash tip: How to stop many processes in with a small script
- How To Create a Simple Magazine App with Core Text
- how-to-automate-your-iphone-app-builds-with-hudson
- How to run debug SQL with in front end(EBS)?
- How to execute shell script in Java?
- How to Run Mac OS X in VirtualBox on Windows
- How To Make A Simple WoPhone Game With Cocos2d-x : How To Run Hello World
- How to check the MS SQL Server job run status by using Script
- How to call webservices with ASP.NET at Run time?
- How to publish an App-V-enabled application in Citrix XenApp
- How to execute shell script in Java?