I am trying to figure out how to write a script which would start program(s) in GNU Screen sessions(s) at system boot. I am trying this:
#!/bin/bash screen -S test -d -m -X $HOME/folder/folder/.program \ screen -S test2 -d -m -X $HOME/folder/folder/.program2 \
but the command cant be executed because session is already detached? The only thing that i need is run command in screen session and detach this session immediately.
Thanks for answers, but now i faced another problem. Script stops working after i put some variables for my "program and program2". Something like this:
#!/bin/bash screen -S test -d -m $HOME/folder/folder/.program -f config.cfg
for some reason "-f config.cfg" got ignored. I am also tried to quote command and doesnt help too.