On 2009-01-21 08:04:16 -0500, Kurt Hillig wrote:
> If you always use ssh for remote logins then you can test for the  
> existence of the SSH_CLIENT environment variable.  It doesn't exist when  
> you're logged in locally.

You need to be a bit smarter: the SSH_CLIENT environment variable
isn't necessarily meaningful.

1. Start the "screen" utility locally.
2. From a remote machine, ssh to the Mac OS X machine.
3. Recall the "screen" session.
4. Start the editor from it.

As SSH_CLIENT is not defined (because the "screen" session has been
started locally), the editor will open on the wrong physical screen!

If you want to have an idea of what can be done, see

  http://www.vinc17.org/mutt/index.en.html#smutt

I run Mutt in "screen" from my Mac OS X machine, which I can use
remotely by ssh (typically, a Linux machine). And my editor (Emacs)
opens its own window (on the Mac OS X screen) *only* when I've
recalled the "screen" session from the Mac OS X machine.

-- 
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to