Start screen session on startup using ubuntu

I am using amazon EC2 for a service that I am starting, however, when I try to start a screen session during the startup script (which is started during the boot process), the screen never starts. I made sure you run apt-get install screen -y, but I'm not sure how to get the screen to run correctly.

Any help?

-update -

here is the output from my manual screen command, I shouldn't be typing something ...

root@ip-10-245-118-68:~# screen -A -m -d -S game ./game/orangebox/srcds_run -console -game tf -autoupdate
root@ip-10-245-118-68:~# screen -ls
No Sockets found in /var/run/screen/S-root.

root@ip-10-245-118-68:~# 

      

+2


source to share


2 answers


You run screen

separately. What happens if you try to screen -ls

enumerate your sessions screen

or reconnect with screen -r

or similar?

When the user first starts up, screen

it asks for a profile and creates $HOME/.screenrc

and $HOME/screen-profiles

with some files under it.



Go ahead like root

let's do it and then try again. Perhaps it hangs in this invitation.

You need to provide an absolute path for your ./game/orangebox/srcds_run

. Instead, dot

change this to/path/to/program

+1


source


The screen issue waiting for the enter key to be pressed can presumably be fixed in / etc / screenrc or in the user running your script through the screen at $ HOME:



    # cat .screenrc 
    startup_message off

      

+1


source







All Articles