https://twitter.com/danfrisk/status/283682787033247744I don't mind if people use the leaked build, but be aware that it's pre-alpha quality.
I haven't tried that, but i haven't got a USB hub, and is there a way to bypass the permissions?6677 wrote:did you try running the files from USB? you will hit permissions issues if so.
running it as pi, as i don't know how to make a new user.malakai wrote:are you running it as pi or did you create a new user account
I ran into the same issue. I used this tutorial to learn to change permissions:Kbho wrote:The Only reason i posted that is because i got a permission denied error when i tried to run the file, with the instructions included with the file.
Thanks, Is this supposed to be a permenant fix, or will i have to keep doing this?Diln21 wrote:I ran into the same issue. I used this tutorial to learn to change permissions:Kbho wrote:The Only reason i posted that is because i got a permission denied error when i tried to run the file, with the instructions included with the file.
http://catcode.com/teachmod/index.html
I opened LXTerminal and navigated to the mcpi folder and ran this command:
chmod u=rwx ./minecraft-pi
u (owner of file) = rwx (new pemissions, read write and execute) ./minecraft-pi (file to be changed)
Good luck I hope it works for you to
Code: Select all
sudo ./minecraft-pi
Code: Select all
from mcrpi import McRpi
mc = McRpi()
mc.connect()
mc.setBlock(0, 0, 0, 1)
Code: Select all
import socket
import sys
class McRpi:
def connect(self):
try:
self.mcsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket.error:
print "Socket creation failed."
sys.exit()
host = 'localhost'
port = 4711
try:
remote_ip = socket.gethostbyname(host)
except socket.gaierror:
print "Hostname resolution failed."
sys.exit()
self.mcsock.connect((remote_ip , port))
print "Connected to Minecraft server at " + remote_ip + ":" + port
def setBlock(self, x, y, z, type):
message = "set-block(" + x + "," + y + "," + z + ")\n"
try:
self.mcsock.sendall(message)
except socket.error:
print 'Failed to send setBlock message.'
sys.exit()
# end of source program