Thanks for this  - I often wonder where to find
the code behind the papers in IWP9 proceedings.


ak

On Wed, Nov 2, 2011 at 12:29 PM, yy <[email protected]> wrote:
> Two attached files:
>
> - 9p-srv.c is a devdraw(1) version which uses 9pclient(3) to talk with
> Plan 9-like devices and use them for its windows.
>
> - p9p.patch is a patch that has to be applied to the p9p tree to use
> this devdraw version.
>
> The drawing device expects to find draw(3), cons(3) and mouse(3) files
> in the $WSYS directory, as can be found in /dev in a Plan 9 terminal
> (including 9vx or drawterm) or /mnt/wsys when using rio. Then, those
> devices are used to run p9p programs.
>
> I wrote 9p-srv as an experiment to use wsys(4) [1] with p9p
> applications, but have found it quite useful to open p9p programs -
> like 9term or sam - in rio windows (for example, from 9vx).
>
> Although it could be argued that this is not the most efficient thing
> to do writing it was quite funny, and much easier than expected.
>
> Installation (once the patch has been applied and p9p built):
>
>        cp 9p-srv.c $PLAN9/src/cmd/devdraw
>        cd $PLAN9/src/cmd/devdraw
>        9c 9p-srv.c && 9l -o devdraw.9p 9p-srv.o
>        cp devdraw.9p $PLAN9/bin
>
> Now, to run 9term in a rio window:
>
>        # From 9vx's rio:
>        ; mount $wsys /n/w new
>        ; bind -a '#i' /n/w
>        ; aux/listen1 -t 'tcp!*!12345' /bin/exportfs -r /n/w
>
>        # From unix:
>        $ WSYS='tcp!127.0.0.1!12345'
>        $ DEVDRAW=devdraw.9p
>        $ 9term
>
> These files are also included with wsys(4), in the util directory
> (instructions are in the README). To use the drawing device with
> wsys(4) just set WSYS to "unix!/tmp/ns.$USERNAME.$DISPLAY/wsys".
> However, it is not working so well as with rio. The reason is probably
> some bug in wsys, and not in 9p-srv. I hope to fix it at some point,
> but is not an easy bug to track.
>
> If (after some more testing) the 9p drawing device could be included
> with p9p that would be great. If it has to stay in the wsys repository
> that is fine too but, could the p9p patch be applied at least? The two
> small changes shouldn't be a problem for the other versions of
> devdraw.
>
> Comments are welcomed.
>
>
> [1] http://bitbucket.org/yiyus/devwsys-prev/ (there is also a blog
> about the development of wsys(4) at
> http://summerofdevdraw.blogspot.com/ and a WIP short paper is included
> in the proceedings of the last iwp9).
>
> --
> - yiyus || JGL .
>

Reply via email to