LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   screen: using 'cat > fifo' in .screenrc (https://www.linuxquestions.org/questions/linux-software-2/screen-using-cat-fifo-in-screenrc-787347/)

bartonski 02-05-2010 11:45 PM

screen: using 'cat > fifo' in .screenrc
 
I'm setting up .screenrc, and I'm trying to set up a couple of screens as follows:

screen 1: cat > ~/fifo
screen 2: bash

~/fifo already exists...

This way, in screen 2, I can do something like this:

Code:

$ cat ~/fifo | tr a-z A-Z
then I can type

Code:

stop shouting!
into screen 1, and I'll see

Code:

STOP SHOUTING!
in screen 2.

I'm having trouble setting up screen 1. Here's my .screenrc
Code:

startup_message off
screen cat > ~/.fifo

I start up screen, and it exits immediately:
Code:

$ screen
[screen is terminating]

Now...

when I run this at the shell, the fifo will block for input, and the process won't quit until I enter Control-D which closes the file. The process launched by .screenrc exits immediately.

I can run the command from within screen, operates just like it would in any other shell session...

... when 'cat > ~/.fifo' starts, launched within screen, I guess stdin is empty, so the process terminates immediately... is there a way of launching this in a way that leaves stdin open?


All times are GMT -5. The time now is 09:02 PM.