Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"screen" help needed

Status
Not open for further replies.

rburke

Programmer
Apr 28, 2002
426
US
Hello all,

Has anyone ever used the -X option on the "screen" command? According to the man page you should be able to pass commands into a screen using the -X option and specififying the screen with -S <name>. However I've been unable to figure out how to make this work. Has anyone ever got this to work and if so could you provide me with some instructions and/or a quick example of some kind?

Thanks,
Ryan
 
My [tt]screen[/tt] seems to have a different meaning for the [tt]-S[/tt] option, so I can't help much with that part.


Here's an example of using the [tt]-X[/tt] option without specifying the session:

tty1
Code:
$ screen
$ echo This is screen 0
[COLOR=red]This is screen 0[/color]

tty2
Code:
$ screen -X 'screen'
Here, "screen" is the [tt]screen[/tt] command to create a new screen running a shell, then switch to it; it's equivalent to [tt]C-a C-c[/tt]. The list of commands' names is in the man page.

tty1 again
Code:
$ echo This is screen 1
[COLOR=red]This is screen 1[/color]
 
Per the man page, the -X command does not work if the session is password protected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top