pseudo terminals

Gordon Messmer yinyang at eburg.com
Thu Sep 10 02:31:15 UTC 2009


On 09/08/2009 09:16 AM, devi wrote:
>   	I executed a command like
> echo "service httpd status">  /dev/pts/2 , where /dev/pts/2, is the
> virtual machine's terminal from the other terminal.  The command
> "service httpd status" is executing in the virtual machine's terminal.
>    

I think you're mistaken.  If you redirect output to another terminal in 
the method that you describe, you will cause that text to be displayed 
as output on that terminal.  It does not become input to the shell (or 
other program) running there, and will not be executed.

> What I want is to get the output of the command "service httpd status",
> executed in virtual machine into the terminal,
> where  echo "service httpd status">  /dev/pts/2  command was executed
> i.e to the other terminal.  I have tried different options, but no use.
>    

The command line:

  service httpd status > /dev/pts/2 2>&1

...will display the output of the command on the second pty.

> Can we use "openvm" command to achieve this requirement?
>    

I think you mean openvt.  As far as I know, it won't do what you want.  
I believe that it only works on VTs (/dev/ttyN), and only on ones that 
are currently unattached.

It's not clear what you want to do, but maybe the "screen" application 
would be of interest to you.




More information about the fedora-list mailing list