I have a problem where I am unable to start a screen session at boot using the rc.local file. The specific screen I am starting is for a spigot minecraft server.
This is my rc.local file:
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# By default this script does nothing.
echo "Starting spigot server in screen \"minecraft\" @ $boot " >> /home/pi/Documents/minecraftlog
screen -S minecraft java -Xms512M -Xmx1008M -jar /home/spigot1_12/spigot-1.12.jar nogui
Running screen in detached mode (when you do not have active terminal, like in rc.local or crontab):
screen -dm -S <session name> <command>
-d -m Start screen in "detached" mode
-S When creating a new session, this option can be used to specify a meaningful name for the session.