9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: a@9srv.net
To: 9fans@9fans.net
Subject: Re: [9fans] Export local plumber to remote unix host?
Date: Wed, 27 Aug 2008 13:53:32 -0400	[thread overview]
Message-ID: <fdd3da28178fd649caec32d09f6c1fe7@9srv.net> (raw)
In-Reply-To: <1219823269-sup-1399@neocybil.x1024.net>

Let me make sure I understand the problem right: you have p9p
installed on two Unix boxes, A and B. Sitting at A, you ssh to B to
read your mail, and want to be able to plumb (or something
similar) attachments and have applications on A display them.
I presume you're also using non-p9p applications to view the
attachments.

If that's right, the problem is in two parts: having B feed
messages to the plumber on B, and having B find the files
referenced.

You can probably make the terminal mount the server; do so.
How doesn't matter: v9fs, fuse, nfs, afp, whatever. Just get it at,
say, /mnt/B. Make a plumbing rule that checks for files in
/mnt/B (after the normal check for files). You want
	arg isfile	/mnt/B/$1
or something very similar in that rule. Now when you plumb
/home/me/attachment1, after not finding that file locally
your plumber will look for /mnt/B/home/me/attachment1.
Have the 'plumb start' bit call open or OpenOffice or whatnot.

For the other part, rather than trying to figure out how to pass
messages around (which is easy if you can mount A from B:
just set $NAMESPACE to /mnt/A/whatever; but you likely
can't do that), just use the local plumber in the first place. For
example, 9term's "plumb" menu item (like plan9's rio) will
just feed things to a local plumber. If you've set the plumbing
rule up as described above, that's all you need.

(If you're using pine or something that 9term isn't up to, I'm
told there's an "rxvt-unicode extension for plumbing", but I
didn't know what "rxvt-unicode" was before being told that,
so I can't speak any more to it. ask in #plan9 on freenode.)

If, for whatever reason, you need to do something like
"!plumb" from mail (and can't mount A from B), things are
harder for you. A fake plumber to shuttle bytes to A is
probably doable, but it's likely a lot less work to figure out
how to use a local plumber instead.

Anthony




      parent reply	other threads:[~2008-08-27 17:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27  8:02 Jon Dugan
2008-08-27 15:57 ` sqweek
2008-08-27 16:11   ` erik quanstrom
2008-08-27 16:53   ` sqweek
2008-08-27 17:53 ` a [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fdd3da28178fd649caec32d09f6c1fe7@9srv.net \
    --to=a@9srv.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).