[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can screen tell me where I logged in from?
From: |
Eric Smith |
Subject: |
Re: Can screen tell me where I logged in from? |
Date: |
Sat, 9 Dec 2006 21:57:59 +0100 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
The best way I could think of was to grep the following in my
script to determine my current location.
sudo tcpdump -t -q -c 10 -Z eric 2>/dev/null
Uses sudo alas
Eric
Original Message Phil!Gregory on Sat-09-Dec 06 1:20AM
.
> * Eric Smith <address@hidden> [2006-12-08 10:07 +0100]:
> > Is it possible to export a variable to a running screen session so
> > that it is redefined when I reattach?
> >
> > Or do I have to attach screen via a wrapper script that writes
> > location info to a file - which is messy.
>
> You pretty much have to have a wrapper script to do this. It could be as
> simple as having a 'screen -X setenv SSH_CLIENT $SSH_CLIENT' in the
> wrapper, but that would only update screen, not any shells or other
> programs already running inside screen. The best complete approach I can
> think of does involve writing to a file in the wrapper and having
> everything else check that file periodically.
>