Thanks heaps! Ur the toppest guy. The multiple terminals solve other problems for me too. Is there any way i can still send commands to the server program though if its in the background or its terminal is unresponsive?topguy wrote:If you start a program on the commandline (in a shell) then you will not get back the command-prompt until the program is finished.
You have two choices:
- Start the program in the background. you do this by adding a "&" character to the end of the command.
( test the difference between "sleep 100" and "sleep 100 &", if you type "jobs" after the last one it will be listed as a job running in the background. )
Programs running in the background will still print their output to the shell you are working with that can be confusing/annoying. See next alternative.
- Open another terminal.
From the desktop -menu you can just start another terminal-window.
If you have not started the desktop you can try to press "ctrl+alt+F2". Most linux systems has multiple virtual terminals that can be chosen by pressing respective "ctrl+alt+Fn".
I edited rs.local like the comment belowRaTTuS wrote:how did you start the server automagically
What exactly did you put in rc.local?HerringTin wrote:I edited rs.local like the comment belowRaTTuS wrote:how did you start the server automagically
from my how to auto run a script [which I seriously need to make edits to now]hello world :-) wrote:I once experimented with starting a Minecraft PE server with rc.local (with & after the start server command), but the lines of text the server output when starting were mixed up in the boot process, and I couldn't control the server console, so instead I opted to autologin to the desktop, and added lxterminal with the server start command to the lxde-pi autostart programs, but I suppose I could have just auto-logged in to the terminal and put a line at the bottom of ~/.bashrc with the command to start the the server, although that would have taken over every terminal session of the user.
Code: Select all
if [ $(tty) == /dev/tty1 ]; then
./script
fi
where script is the script you want to run.
so what happens is when the RPi is booted the 1st terminal will run your script - other terminals will want a login and if you login with your normal user will not auto run your script
if your script exits then you will be left at a command prompt, if you exit it will run again