`port edit`, local/console vs. remote use

Brandon Allbery allbery.b at gmail.com
Tue Dec 6 17:50:47 CET 2016


On Tue, Dec 6, 2016 at 5:41 PM, Ryan Schmidt <ryandesign at macports.org>
wrote:

> I would like `port edit` to open TextWrangler when I'm at my Mac or vi
> when I'm sshing in from another machine.


Check for $SSH_CONNECTION in the environment and set MP_EDITOR to "open -a
TextWrangler" (or maybe "open -t") or "vi" accordingly.

Your notion of handling ssh to another machine and back to the Mac likely
won't work, because Apple's sshd creates a session that is distinct from
the GUI session and will return permission errors if you try to access the
GUI from it. (There *may* be ways around this. There used to be, but Apple
has several times tightened their GUI isolation over the years and I have
no idea if there is a current way to evade it, or whether such evasion will
continue to work in e.g. Sierra or future macOS releases.)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20161206/916fe349/attachment.html>


More information about the macports-dev mailing list