Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2007 15:44:52 -0700 (PDT)
From:      youshi10@u.washington.edu
To:        Tek Bahadur Limbu <teklimbu@wlink.com.np>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: See output of local xterm session on remote ssh session.
Message-ID:  <Pine.LNX.4.43.0706051544520.27212@hymn09.u.washington.edu>
In-Reply-To: <46659748.3030001@wlink.com.np>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Jun 2007, Tek Bahadur Limbu wrote:

> Pieter de Goeje wrote:
>> On Saturday 02 June 2007, Jeremy Gransden wrote:
>>> Hello,
>>> 
>>> I have been searching Google for a few days for this but have not been
>>> coming up with the correct answer. Then again maybe I am asking the wrong
>>> question... If I start a process, i.e. compile a kernel, on my desktop, 
>>> how
>>> can I then connect to it from my laptop and see the output of that process
>>> via the ssh session?
>>> 
>>> thanks,
>>> Jeremy
>> screen(1) is the tool for this. You can find it in the ports collection 
>> (sysutils/screen).
>> 
>> For example:
>> $ screen
>> $ cd /usr/src; sudo make buildworld
>> (now press CTRL+A D)
>> 
>> On the other machine, ssh into the desktop
>> $ screen -r
>> (press CTRL+A D if you've seen enough)
>> 
>> Also, this will protect the running job from accidental (or purposefully) 
>> closure of the terminal.
>
> Wow, always thought of learning how to learn this "magic". Thanks for sharing 
> this wonderful tip!
>
>
> Thanking you...
>
> FreeBSD Rocks!
>
>> 
>> HTH,
>> Pieter de Goeje

Don't forget to run screen -wipe from time to time to get rid of leftover screen sockets though. Doesn't happen often, but if screen dies or the machine reboots spontaneously, this will happen..
-Garrett




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.43.0706051544520.27212>