Quote fromI think I found and fixed the problem. Since the script runs as a daemon, it needs to know a little bit about the user environment to send messages to it: the user name and display. I added these variables to the top of the script so that you can easily change them to match your system.
Let me know if this works for you. It worked for me on one of my two test systems (the other one is misconfigured I think).
I hard-coded my username into that setting and it works! Will confirm later if the display part was the larger issue by seeing if the "minecraft" user will also let it display...