I want to do the following: After reboot I want to start a screen which then should execute a script. Therefore I searched for crontab and screen and I also did find some answers. However, nothing works for me. I am running a ubuntu linux with screen installed and I want to run a python script.
The following works
screen -d -m which opens a screen but does not run anything. Instead, I'd like to create a screen and start a script. From what I found on the net answers told that this is accomplished by
screen -d -m scriptname. In my case scriptname is main.py (which I checked that it is executeable).
screen -m -d /path/to/main.py does not create a screen. This is my console output
$ screen -d -m /opt/main.py $ screen -x There is no screen to be attached.
However, this works but does not execute the python script:
$ screen -d -m $ screen -x
What am I doing wrong here? Thanks :)