Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to set the priority on an application to be higher, but I keep getting 'permission denied' when attempting to do som even as the superuser. From the Terminal: Alexandsteins-Macbook:~ alexanderstein$ sudo nice -n -10 /Applications/ nice: /Applications/ Permission denied

share|improve this question

migrated from Apr 23 '13 at 8:17

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

firstly, you need to nice the program that is launched. You're pointing at a directory. Applications on mac os are files within the application bundle.

The file you're looking for will be located within the directory:


I don’t have minecraft, so I don’t know what the file is called.

you can nice that file, which should have the desired effect.

You could use a little bit of applescript to accomplish something similar (it's not exactly the same):

tell application "Minecraft"
  delay 1
end tell

tell application "System Events" to set pid to unix id of process "Minecraft"
do shell script ("renice -10 -p " & pid) password "xxxxxxxxx" with administrator privileges

You can either replace the xxxxxxxxx with your password, or else omit the entire password "xxxxxxxxx", and have the UI prompt you for an administrator account to perform the task.

This will also work with running copies of minecraft.

To get the applescript to run, you can use the applescript editor to create a scriptlet, or put it into a simple text file, and run it using osascript textfile.

share|improve this answer
Ah, okay. So you have to point it to the actual binary fine, then? – Alexandstein Apr 23 '13 at 7:51
Yes, I'll add a little bit of applescript that can accomplish something similar – Petesh Apr 23 '13 at 7:53

You must log in to answer this question.