From owner-freebsd-questions@FreeBSD.ORG Thu Aug 2 16:09:40 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BCFE16A419 for ; Thu, 2 Aug 2007 16:09:40 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 394FC13C481 for ; Thu, 2 Aug 2007 16:09:40 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id l72G9dPK065008; Thu, 2 Aug 2007 11:09:39 -0500 (CDT) (envelope-from dan) Date: Thu, 2 Aug 2007 11:09:38 -0500 From: Dan Nelson To: Jim Stapleton Message-ID: <20070802160938.GA77822@dan.emsphone.com> References: <80f4f2b20708020819l69e054a1ia070efba2b04d2ad@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80f4f2b20708020819l69e054a1ia070efba2b04d2ad@mail.gmail.com> X-OS: FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-questions@freebsd.org Subject: Re: attaching a terminal to 'join' another? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2007 16:09:40 -0000 In the last episode (Aug 02), Jim Stapleton said: > Sorry if my question is a bit confusing - I'm not even sure the > proper terminology, so I don't know what the best way to start > looking is. > > I'm rebuilding a system at home, and I'd like to check how the build > is going at a slow time at work sometimes. I can connect to the > system from work (ssh into my main box, and then from there, ssh to > the system I'm working on). I have a terminal opened on that system > (actually, another ssh session fron the main box), and I'd like to > have my new connection attach to that terminal session, if possible, > so that I can just pick up where I left off, and monitor it from > here. Is this possible? The best solution is to install the sysutils/screen port and run your build process in a window under that. Then you can attach to that screen session from any number of other logins (at the same time even). As a side-effect, screen will protect you from accidental terminal disconnections (if you close your xterm or ssh disconnects on you, screen will detach the session and it will run headless until you reattach to it). The next-best is to use the /usr/sbin/watch command to attach to an existing tty and see its screen output. You'll need to rebuild your kenel and add the "snp" device (or load it as a module). > Sessions > main desktop terminal A [ssh]--> workstation terminal A (where builds > are currently being processed) > > work desktop terminal [ssh]--> main destop terminal B [ssh]--> > workstation terminal B > > > I would like to have workstation terminal B intercept workstation > terminal A, or main desktop terminal B intercept main desktop > terminal A. Can it be done? Where do I start looking, what are the > words and phrases of interest? I tried looking at both the bash and > xterm commands/man page, but they are rather long, and I'd miss what > I was looking for without having a clue in advance. > > I'm guessing something like /dev/?tty?? might work, but how do I > figure out which tty to use? -- Dan Nelson dnelson@allantgroup.com