Cuberite Forum
Help with autostart please? :) - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Help with autostart please? :) (/thread-2382.html)

Pages: 1 2 3


Help with autostart please? :) - Utking - 02-25-2016

Hi guys!

Been trying to get autostart to work on my RPI without luck :/

The server works perfect, but as soon as i close the terminal, it exits.

Now i've been trying to follow the autostart guide here on the forum, without any luck.

does anyone care to help me


Tmux guide - LogicParrot - 02-25-2016

I have written a Tmux-based guide some time ago:
https://forum.cuberite.org/thread-1940.html


RE: Tmux guide - Utking - 02-25-2016

(02-25-2016, 06:14 PM)LogicParrot Wrote: I have written a Tmux-based guide some time ago:
https://forum.cuberite.org/thread-1940.html

Hey LogicParrot!

Yeah i tried to follow it, but no matter what i did it wouldn't autostart :/ 
how should i write the path thing? I have Cuberite installed in default location, so when i start it i use cd Server; ./Cuberite.


su - minecraft -c 'tmux new -d "Server; ./Cuberite" '

is this correct then?
thx, i'm still learning in the linux jungle, lol Smile


RE: Help with autostart please? :) - LogicParrot - 02-25-2016

You need to specify the full path. `./cuberite` is a relative path, and will not work. I don't know what your "default location" is.

If you are not sure what the full path is, do this:
cd Server
pwd # This will print the full path

Let's suppose it prints: `/home/minecraft/cuberite/Server`. If so, what you'd need to do is:


su - minecraft -c 'tmux new -d "/home/minecraft/cuberite/Server/Cuberite" '


RE: Help with autostart please? :) - Schwertspize - 02-25-2016

Actually, this would start cuberite from within your home directory. Shouldn't you do

su - minecraft -c \'tmux new -d "cd /home/minecraft/cuberite/Server && ./Cuberite" \'

??


RE: Help with autostart please? :) - Utking - 02-26-2016

Hmm, i used the full path, but still can't get it to work :/ nothing happens when i boot up again.
Oh, on the minecraft launcher i cant even launch Cuberite, even after adding minecraft user to sudoers etc. I tried to just use the standard user which is Pi on mine, but it won't work there either Sad

Any suggestions?


RE: Help with autostart please? :) - LogicParrot - 02-26-2016

(02-26-2016, 04:46 AM)Utking Wrote: Any suggestions?

Try simply running this in a terminal, ( put your own path though)
sudo su - minecraft -c 'tmux new -d /YOUR/PATH/Cuberite" '

What is the output?


RE: Help with autostart please? :) - LogicParrot - 02-26-2016

(02-25-2016, 11:06 PM)Schwertspize Wrote: Actually, this would start cuberite from within your home directory. Shouldn't you do

Aren't these the same in this context?


RE: Help with autostart please? :) - bearbin - 02-26-2016

No, the worlds and configuration files will be placed in the current directory, not the directory where the binary is located. Unless tmux is being strange, that's what should happen?


RE: Help with autostart please? :) - Utking - 02-26-2016

when i write sudo su - minecraft -c 'tmux new -d "/home/pi/Server/Cuberite" '

i don't get any output,  no process when i run top either :/

Edit: tmux is running though.!