Posts: 18
Joined: Wed Jul 17, 2019 8:28 am

Autologin in two ttys at the same time and run a command in one of them

Thu Sep 19, 2019 5:44 am


What I want to achieve:
1) Boot to Desktop and autologin (this is already working out of the box)
2) Autologin to one of the tty and run a command there

I want to run a Minecraft server at boot with command:

Code: Select all

cd /home/pi/minecraft
sudo java -Xms512M -Xmx2016M -jar spigot-1.14.4.jar nogui
cd /home/pi
in a separate console session.

And be able to switch with CTRL+ALT+F5 to that console to see what's going on there.
I don't want to have minecraft terminal window on my main graphical desktop.

I've seen some other ways of running Minecraft server but all of them are based on startup scripts or running as a service which looks a bit complicated to me. Or I could put a startup command in /etc/rc.local but in that case I think it would run in background and there would be no way to see consile window and live Minecraft server log.

Raspbery Pi 4 4GB

Return to “Advanced users”