Quantcast
Channel: Active questions tagged terminal - Super User
Viewing all articles
Browse latest Browse all 503

Starting a command in a new screen session doesn't work

$
0
0

I want to execute a command in a new screen session (and detach from it) but I don't get it to work. I tried to start a process in a new screen session and detach from it with this:

screen -d -m mycommmand

But when I try to attach to that screen session with

screen -r

I get the message "There is no screen to be resumed". I also tried to start a command in a new screen session with

screen mycommand

When I do that, a new screen session starts but the command doesn't get executed.

The command is a .sh script that starts a game server but the game server doesn't start.

[Edit]Because some people asked for the exact command, here it is:It's a bash script that should start a minecraft server in a seperate screen session.

./startServer.sh

Here is the .sh script:

cd "/home/tim/minecraft/survivalServer"screen -S "minecraft-server-1-14-4" -m -d /home/tim/java/bin/java -Xmx4096M -Xms1024M -jar /home/tim/minecraft/survivalServer/minecraft_server.1.14.4.jar nogui

Now, the problem is, that when I run the script it fails to create the new screen session. Why is that?

Help is much appreciated.Thanks


Viewing all articles
Browse latest Browse all 503

Trending Articles