Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 21, 2010, 12:51 PM   #1
benjoshua
macrumors newbie
 
Join Date: Nov 2010
typing in two terminals at the same time

hello everybody!
is it possible to open two terminal's windows and after some time, be able to type in one window and it will automatically will happened in the other? it will be extremely handy for my using the diff command to test my projects...

can anyone help?
thanks!
benjoshua is offline   0 Reply With Quote
Old Nov 21, 2010, 02:20 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Not possible as described.

Two windows is easy: choose New Window from Terminal's Shell menu.

You can copy and paste commands into a Terminal window. You can even copy commands from one window and paste them into another. Or enter commands in any text editor (TextEdit with a Plain Text window open), then copy and paste them into Terminal windows. Or select in TextEdit and drag-n-drop to Terminal windows.

For anything more than simple commands, I almost always edit in a text editor, then drag-n-drop or paste into a Terminal window. You can build up sets of commands quite easily, and store them in text files associated with a project. Remember to write comments with your commands so when you come back next month you know what the commands do.
chown33 is offline   0 Reply With Quote
Old Nov 21, 2010, 03:25 PM   #3
holmesf
macrumors 6502a
 
Join Date: Sep 2001
Quote:
Originally Posted by benjoshua View Post
hello everybody!
is it possible to open two terminal's windows and after some time, be able to type in one window and it will automatically will happened in the other? it will be extremely handy for my using the diff command to test my projects...

can anyone help?
thanks!
Yeah, it's not really possible, not easily anyway. Each terminal window acts like its own session. Every application run by the terminal is owned by that terminal process. To get any communication you'd have to set up some inter-process communication. This could be accomplished through a socket, but using unix at this level is beyond me.
holmesf is offline   0 Reply With Quote
Old Nov 21, 2010, 04:29 PM   #4
BertyBoy
macrumors 6502
 
Join Date: Feb 2009
Quote:
Originally Posted by benjoshua View Post
hello everybody!
is it possible to open two terminal's windows and after some time, be able to type in one window and it will automatically will happened in the other? it will be extremely handy for my using the diff command to test my projects...

can anyone help?
thanks!
If you explain in more detail what you want to achieve ...

We've picked up something about running diff. Do you want to send output to the other terminal ? or run the same diff (for whatever reason) in the other terminal at the exact same time ? Or do something completely different ?
BertyBoy is offline   0 Reply With Quote
Old Nov 21, 2010, 08:25 PM   #5
jared_kipe
macrumors 68030
 
jared_kipe's Avatar
 
Join Date: Dec 2003
Location: Seattle
Send a message via AIM to jared_kipe
I immediately thought of CloneKeys, but it seems it doesn't work between two windows of the same application. However if you used two different applications CloneKeys should be able to do it. Say by duplicating Terminal.app maybe.
jared_kipe is offline   0 Reply With Quote
Old Nov 22, 2010, 01:22 PM   #6
wlh99
macrumors 6502
 
Join Date: Feb 2008
Is it possible to redirect the output of a command to a differnt tty? Never tried it, but I would think it would work.

Something like:

somecommand some_arguments > /dev/tty01

Where /dev/tty01 is the tty of the other xterm running.
__________________
Warren Holybee
wlh99 is offline   0 Reply With Quote
Old Nov 22, 2010, 02:16 PM   #7
BertyBoy
macrumors 6502
 
Join Date: Feb 2009
Quote:
Originally Posted by wlh99 View Post
Is it possible to redirect the output of a command to a differnt tty? Never tried it, but I would think it would work.

Something like:

somecommand some_arguments > /dev/tty01

Where /dev/tty01 is the tty of the other xterm running.
I was thinking of a variety of possibilities, from using a form of the "write" command, to using a named pipe and maybe tee.

But let's see what the OP actually wants to achieve. Whatever, it should be do-able on real Unix, and hopefully just as easily in OS X Terminal.
BertyBoy is offline   0 Reply With Quote
Old Nov 22, 2010, 02:23 PM   #8
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Quote:
Originally Posted by BertyBoy View Post
<snip>it should be do-able on real Unix, and hopefully just as easily in OS X Terminal.
There is no distinction, OS X is UNIX...
"POSIX-compliant, Open Brand UNIX 03 Registered Product"

From: http://images.apple.com/macosx/techn...UNIX_TB_FF.pdf

As for the OP... he hasn't been back to the forums since he made this post. For the last day people have been taking stabs, but it seems at this point that the suggestions need to be read and he needs to clarify what he wants if the current set of replies don't work.

-Lee
lee1210 is offline   1 Reply With Quote
Old Nov 22, 2010, 06:31 PM   #9
elppa
macrumors 68040
 
elppa's Avatar
 
Join Date: Nov 2003
Just to back up the previous point: given the long and complex history of Unix and given Apple have got Mac OS X 10.5 on intel and Mac OS X 10.6 officially certified as Unix, I too am curious to know what people mean when they say “real Unix”.

And I'm not talking specifically to BertyBoy. People describe ‘Unix’ and Mac OS X as if they are different things.
elppa is offline   0 Reply With Quote
Old Sep 13, 2013, 07:04 PM   #10
BertyBoy
macrumors 6502
 
Join Date: Feb 2009
OK, 3 years late, but trying to answer your query as to what many consider "real Unix", and it should help avoid confusion in the future.

"real Unix" is the SVR4 (or whatever release it was at when you started to use it) Unix.
BSD Unix, which was always referred to as Unix-like, was not part of this. And I believe Mac OS is more a BSD derivative than SVR4.

That's just the way things were when I started on "real Unix" in 1984 - same time I started on Mac, and VMS. We just never referred to our BSD machines and SunOS machines (from end 1986) as Unix.

I'm the same today, Linux is linux, never Unix. AIX is AIX, Solaris is solaris.
BertyBoy is offline   0 Reply With Quote
Old Sep 14, 2013, 08:49 AM   #11
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by BertyBoy View Post
OK, 3 years late, but trying to answer your query as to what many consider "real Unix", and it should help avoid confusion in the future.
But to be honest unless mentioned in a historic context do you really think many refer to the actual OS once called UNIX.

Today it's a standard maintained by the Open Group, which if met ensures Unix compatibility. By that definition AIX, Solaris and OS X are all certified Unix and systems that does not meet the standard are Unix like.

http://www.opengroup.org/openbrand/register/
subsonix is offline   0 Reply With Quote
Old Sep 14, 2013, 04:48 PM   #12
northerngit
macrumors member
 
Join Date: Jul 2007
Location: England
Hi,

Hopefully I've understood your requirement! You want to have multiple terminal windows open, and simply replicate input to stdin on one, to the other?

Depending on whether you are SSH'ing to another machine, or working locally, dictates a likely solution.

iTerm2 (http://www.iterm2.com/) - You can send keyboard input to multiple tabs

CSSHX (https://code.google.com/p/csshx/) - csshX is a tool to allow simultaneous control of multiple SSH sessions. A master window will also be created. All keyboard input in the master will be sent to all the slave windows.

Or the venerable Cluster SSH http://sourceforge.net/projects/clusterssh/

Example usage instructions on combining ClusterSSH and CSSHX -

(http://eric.lubow.org/2010/system-ad...sh-with-csshx/)

Hope this helps!
northerngit is offline   0 Reply With Quote
Old Sep 14, 2013, 05:13 PM   #13
subsonix
macrumors 68030
 
Join Date: Feb 2008
Quote:
Originally Posted by northerngit View Post
Hi,

Hopefully I've understood your requirement! You want to have multiple terminal windows open, and simply replicate input to stdin on one, to the other?
It's a 3 year old thread that was awaken from the dead today. Redirecting stdout to a tty device works as suggested previously, for diff it's possible that splitting the screen (upper right corner in Terminal) would be sufficient, but the OP never returned to explain what exactly he wanted to achieve.
subsonix is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
iPhone: Disable typing/response "..." ellipse bubble from revealing you are typing - iMessage osx86 Jailbreaks and iOS Hacks 35 Jul 14, 2014 11:06 PM
It is time to bring SwiftKey or gesture typing on iOS Nanasaki iOS 7 37 Oct 21, 2013 12:52 AM
Typing Class Apps Now for Free Available On AppStore Limited Time Offer!!! aurthurdenz iPhone and iPod touch Apps 0 Nov 22, 2012 02:40 AM
Mac Pro 2008 (ML) crashing from time to time when typing MythicFrost Mac Pro 6 Oct 28, 2012 04:59 PM
Does Gatekeeper blocks terminals installation?? hit.anand OS X 10.8 Mountain Lion 1 Jun 26, 2012 07:10 AM

Forum Jump

All times are GMT -5. The time now is 03:41 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC