Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Using "screen" terminal commands

    I'm trying to figure out if its possible to use screen the way i'd like to.

    Is it possible to create a new window in a screen session from command line? or rather execute a sh scrmipt and within the script it starts a session and creates multiple windows within the session. and then later I can run another sh script and have it send a command to a specific window in a specific screen session?

    so questions are...

    can you open a new window from the terminal in a currently detached screen session without attaching it?

    from the terminal can you send a command to a specific screen sessions specific window without attaching the window?

    I've been looking for months and haven't had luck, if anyone can help it would be greatly appreciated!

    I'm looking to do this for my minecraft servers, I run 5 and I want to be able to start/stop them with one command instead of opening all the windows and sending the command ".stopwrapper"

    like have a with functions (start, stop, stop1, stop2, stop3, stop4, stop5, start1, start2,...)
    to start and stop all servers or start and stop a single server without effecting the others...

  2. #2

    you might want to take a look at tmux, it is a terminal multiplexer. the minecraft nerds say it is better than screen so check it out. i bet if you google for the two, you might come up with something.

    anyway, i can say i use tmux to have multiple windows open at the same time, although i've never tried to use it like i do screen; that is, start it in the background and send commands to it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts