The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
GNU screen neked UNIX for Advanced & Expert Users 2 09-26-2008 12:30 AM
I won't get the login screen balarajum AIX 2 04-02-2007 12:58 PM
clear screen in g++ gefa High Level Programming 2 04-22-2006 09:00 AM
printing to the screen google UNIX for Advanced & Expert Users 2 10-23-2003 11:19 PM
screen capture merlin UNIX for Dummies Questions & Answers 10 02-10-2003 02:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-20-2006
Gurth Gurth is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
Help with screen

Hello everyone!

I'm trying to figure out how to send commands from one screen to another.
For example i wish to send a simple "ls -all" from screen #1 to screen #2,
can it be done, and how?

Thank you!
  #2 (permalink)  
Old 12-20-2006
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
what is meant by sending commands from one screen to another?
  #3 (permalink)  
Old 12-20-2006
Gurth Gurth is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
Well this is the deal:
i am in screen #1 and i wish to send a command to screen #2.

The thing is that using screen -x i can have 2 terminals open and monitor 2 screens. I wish to be able to control both screens from either of them.
So if i have two windows open on my desktop, and i work in a window with screen #1, i wish to be able to send commands to a screen #2 that is open in another window on my desktop.

I need this to have several automated processes, for example: feed in screen #1 triggers events in screen #2.
  #4 (permalink)  
Old 12-20-2006
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
  
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
I think you are talking about the screen utility, right?
What I do not know is what you mean when you say "send commands". I can think of two possibilities:
- You want to send commands that run on the other screen (shell). For now, I'm not aware of any way to do this.
- You want to display the o/p of the commands you execute in one screen on the other. In this case, you need to know the terminal asociated to the screen session and redirect the output there:

Code:
screen 1                                     screen 2
--------                                     --------
$ tty                                        $ tty
/dev/pts/3                                   /dev/pts/4
$ echo Helo | tee -a /dev/pts/4 
Helo                                         Helo
Regards
  #5 (permalink)  
Old 12-20-2006
Gurth Gurth is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
Thank you for your reply Grial, however this just sends the output from
/dev/pts/3 to /dev/pts/4.

I wish to do the following from /dev/pts/3:

<funcname> /dev/pts/4 echo hello

where <funcname> is the program that enables me to send a command to /dev/pts/4 so the command executes on /dev/pts/4.

Thank you!

Last edited by Gurth; 12-20-2006 at 07:46 AM..
  #6 (permalink)  
Old 12-20-2006
Gurth Gurth is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 6
I have been able to come close using "screen" utility.
If i enter the command prompt of the "screen" i can then do:

Code:

at 1# "ls -al"
The problem is that i can't get an escape char from the shell. I need to type
ctrl-a-: to get to the command prompt of the screen utility.

Can i perhaps prefix the

at 1# "ls -al"

with some char sequence to emulate the escape char?
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0