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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to invoke a terminal from other terminal

Status
Not open for further replies.

dotaliu

Technical User
Mar 25, 2008
15
CN
If I have got terminal(A) ID, how to invoke A from terminal(B)?
 
What are Terminals A and B? That is, are they separate computers, or are they separate shells on the same computer?

_________________
Bob Rashkin
 
separate shells on the same computer.
 
And the OS is what?

_________________
Bob Rashkin
 
OK. I'm still a UNIX(LINUX) novice but let's see. Now, when you say "invoke", and considering we're talking Tcl here, what do you mean.

You have a script running in B. Do you want to send output to be visible in A? Do you want to interact with another script in A? Are either the script in B or the possible script in A running Tk (wish)? Do you want to make some other program run?

_________________
Bob Rashkin
 
What i want to do is : In a terminal (maybe dtterm),a TK(wish) is called and running in the front ground. But During the period of wish, I want to invoke dtterm in the front ground. Some guys say to use "console show" , but I don't find this command in wish.
 
console show will bring up the Tcl console, if that's what you want. I frequently bind one of the function keys to console show to achieve this:
Code:
bind . <F3> {console show}

Then, when the Tk window has the focus, pressing F3 brings up the console.

Is this what you want?

_________________
Bob Rashkin
 
I want to try this command, but i don't find it in my wish.
Is there some packages need to load, what's them?
 
Are you saying that console is not recognized by your wish interpreter. That would be very strange, indeed and means you have a corrupted installation. console is a Tk built-in command.

_________________
Bob Rashkin
 
Hi

Strange enough it "works" the same way here :
Code:
[blue]master #[/blue] wish 
% console show
invalid command name "console"
% puts $tk_version
8.5
Or I misunderstand something ?


Feherke.
 
It looks like you're running wish from a shell, in which case you're already in the console. console show only has meaning from within a running script so that the console can be exposed.

_________________
Bob Rashkin
 
thanks Bong . If I want wish to invoke & popup the shell. how to do it?
 
If what we're talking about here is the "tcl console", then console show is the way to do it.

Let's get some nomenclature straight:
wish is the "windowing shell" that runs Tk.
window is what Tk displays automatically with a name (path) of ".".
console is a terminal window that accepts Tcl/Tk commands and outputs system messages. That is console is: stdin, stdout, and stderr.

So if you have a script written in Tcl/Tk and you run it using wish, then all the interpreter is going to display for you automatically is a window. If you want a console (and the only reason you might is because you have one or more of stdin, stdout, stderr used in your script) then you need to invoke the console explicitly with console show in your script.

You need to be clear that console is a Tcl/Tk device. It is not an OS shell.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top