Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have enabled Parental Controls on my son's MacBook Pro (OS X 10.8.1, Mountain Lion) and have restricted the applications his account can use. Everything works fine with the exception of Minecraft (of course the application most important to him). Minecraft is marked as an application that he's allowed to use in the parental control settings.

When I try to start Minecraft under his account, a message pops up saying that he's not allowed to run it, giving the following three options:

  • Always Allow
  • Allow One Time
  • Cancel

When clicking Allow One Time, I have to enter the admin account username and password and the game starts without problems. But when I click Always Allow, it asks for the admin account as well, but then pops up the same message again. I have verified that I'm using the right admin account username and password, but it's still refusing to run the game.

When I disable parental controls, everything works, but the moment I turn it on again, it fails, despite having Minecraft in the list of allowed applications for his account.

In the Console application, I can see the following weird error message whenever this happens:

com.apple.launchd.peruser.501[148]: 
([0x0-0x11c11c].com.Mojang Specifications.Minecraft.Minecraft[1216]) 
Job failed to exec(3) for weird reason: 13

Has anybody else experienced this or knows how to fix this?

share|improve this question
    
I'm guessing it's because Minecraft is only a wrapper application, and it activates another application (most likely a jar). –  theAmateurProgrammer Aug 31 '12 at 13:43
    
Good point - I know it's using Java internally. I didn't see the Java executable in the list of applications that I can allow/disallow. But it doesn't explain the weird reason error in the logs or why it works with the Allow One Time option. –  nwinkler Sep 1 '12 at 18:11
add comment

4 Answers

This gave me enough info to fix the Minecraft launcher. The prior answer works, but has an ugly menu name, which my son would pester me about. So instead, I fixed the Minecraft.app setup.

In a nutshell, in terminal:

cd /Applications/Minecraft/Contents/MacOS
mv JavaApplicationStub Minecraft
cat > JavaApplicationStub << EOF
#!/bin/sh

exec `dirname $0`/Minecraft "$@"
EOF
chmod +x ./JavaApplicationStub

Basically, it would appear that ParentalControls expects the application being run to match the name of the executable (which is not the case with the distributed app: It's Minecraft.app, and JavaApplicationStub), so by moving the executable to match the app name, it works. I had to create a shell script to actually exec the executable because I got "Path not found" otherwise.

This seemed to work.

I only put this here because it worked for me. If you do not understand the code block again, please keep in mind you might have to re-download the app (or make a copy first).

share|improve this answer
add comment
up vote 1 down vote accepted

I've posted the same question on the Apple Support forums here - quite a few people seem to have the same issue, but no answers so far.

Meanwhile, I have worked around it and have managed to get it to work on my son's MacBook Pro. Here's what I did:

I added a shell script called MyMinecraft with the following contents:

#!/bin/bash
java -jar -Xms512m -Xmx1024m /Applications/Minecraft.app/Contents/Resources/Java/MinecraftLauncher.jar

After saving this file, I made it executable (either through Finder's Show Info or using chmod +x MyMinecraft in the Terminal) and tried running it from my son's account. It worked fine and started Minecraft. So far so good.

To make it a bit more pretty, I created a real Mac application from the script - there are multiple options for this:

  1. Platypus: http://sveinbjorn.org/platypus
  2. Create the following directory structure in the user's Application directory: MyMinecraft.app/Contents/MacOS and move the MyMinecraft script there. Now you can add the original Minecraft icon through Finder's Show Info dialog

Double-clicking the MyMinecraft icon should now start Minecraft.

share|improve this answer
    
I used this solution for a while until I learned that it was a permissions issue, not a Java issue. Please read my answer for more information. –  spex Feb 21 '13 at 21:18
add comment

When you use /Applications/Utilities/Console.app to watch for errors and get:

Job failed to exec(3) for weird reason: 13

...it is usually a permissions issue. The symptom is that you will click on an application and it will not launch at all. You will need to make the application binary executable for the current user.

I do this by opening /Applications/Utilities/Terminal.app and running the following command:

chmod u+x <Application.app>/Contents/MacOS/<application binary>

<Application.app> needs to be changed to the location of the app, and <application binary> needs to be changed to the name of the binary.

For Minecraft, if it is located in the root /Applications folder, the command would be:

chmod u+x /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub

If it is located in /Users/jsmith/Applications, where jsmith would be your username on your Mac, the command would be:

chmod u+x /Users/jsmith/Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub

chmod is the command to change file modes or Access Control Lists. You can read the manual for chmod by running the command: man chmod In this case, we are allowing the file to be executed by the current user. So u+x means "user add executable permission." If you would like to make the file executable for all users, then you would change u+x in the above commands to be a+x.

I hope this helps.

share|improve this answer
    
Gosh...can someone give me a step-by-step in layman's terms please? I'm confused!! –  user50680 Jun 5 '13 at 18:56
add comment

The answer to this problem is date related. If you change the system date to something before 2008 it will cause this problem.

Reset date - then "Always allow" the app and voila!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.