Re: [9fans] multiple acme instances with plan9port
Two years or so ago I found the script below, allowing you to start any number of instances of acme. E.g. if you name the script acme9 you use acme9 -n 1, acme9 -n 2, etc., each of which can followed by the usual arguments you wish to pass on to acme. Thanks to whomever wrote this. Mark. #!/bin/sh [ $1 = -n ] { export NAMESPACE=/tmp/ns.$USER.$2; mkdir -p $NAMESPACE; shift; shift; } 9p ls plumb/ /dev/null 2/dev/null || (cd /; 9 plumber) exec acme $@
Re: [9fans] multiple acme instances with plan9port
On Wed, Nov 7, 2012 at 4:53 PM, Bence Fábián beg...@gmail.com wrote: you can try this as a quick fix: $ mkdir /tmp/ns2.r $ NAMESPACE=/tmp/ns2.r acme maybe write a wrapper script for it But probably you should also take care to run (another instance?) of plumber(1) in the same namespace. s.
Re: [9fans] multiple acme instances with plan9port
Yes. It's clumsy. issuing Local plumber starts it. you could try changing fsys.c:124: if(post9pservice(p[0], acme, mtpt) 0) to post acme.$pid instead of acme. it's fairly trivial, however might break something. i don't have time to check it right now. (there's a global var mainpid. i ithink it is set by the time of the post) 2012/11/7 Sergio Perticone g4ll...@gmail.com On Wed, Nov 7, 2012 at 4:53 PM, Bence Fábián beg...@gmail.com wrote: you can try this as a quick fix: $ mkdir /tmp/ns2.r $ NAMESPACE=/tmp/ns2.r acme maybe write a wrapper script for it But probably you should also take care to run (another instance?) of plumber(1) in the same namespace. s.
Re: [9fans] multiple acme instances with plan9port
On Wed, Nov 7, 2012 at 5:09 PM, Bence Fábián beg...@gmail.com wrote: Yes. It's clumsy. issuing Local plumber starts it. you could try changing fsys.c:124: if(post9pservice(p[0], acme, mtpt) 0) to post acme.$pid instead of acme. it's fairly trivial, however might break something. i don't have time to check it right now. (there's a global var mainpid. i ithink it is set by the time of the post) It breaks programs that interact with acme. Something like: `echo hello | 9p write acme/$winid/body' won't work anymore. s.
Re: [9fans] multiple acme instances with plan9port
On Wednesday, November 7, 2012 9:55:34 AM UTC-5, Ruslan Khusnullin wrote: Hi! I'm using acme from plan9port on ubuntu linux. I tried running multiple acmes in Inferno and it works fine, didn't try it in Plan9 but guess it works too. When I try to start acme (having one instance running) I get an error: ; /usr/local/plan9/bin/acme 9pserve: announce unix!/tmp/ns.r.:0/acme: Address already in use acme: can't post service: 9pserve failed ; namespace /tmp/ns.r.:0 ; ll `namespace total 0 srwxr-xr-x 1 r r 0 Nov 7 12:23 acme= srwxr-xr-x 1 r r 0 Nov 7 12:23 plumb= srwx-- 1 r r 0 Nov 7 12:21 wmii= How do you run multiple acme instances with plan9port? Is it possible at all (considering plan9port lacks true namespaces support)? I need more than one acme because I have not very big display (19) but please don't suggest buying a bigger display ;) It's a work around, but when I need multiple acmes I use ssh -X localhost and open an acme from there. Best, Ethan
Re: [9fans] multiple acme instances with plan9port
Thank you all, I've ended up with this wrapper: ; cat $home/bin/acme; echo EOF #!/usr/bin/rc NAMESPACE = `{mktemp -d} plumber /dev/null [2=1] #font = $PLAN9/font/lucm/unicode.9.font font = '/mnt/font/Droid Sans Mono/11a/font' exec $PLAN9/bin/acme -ab -f $font -F $font $* EOF it works fine now letting me use as many acmes as I wish. Though I lost my -l $home/acme.dump option in exec acme string because it will certainly bring problems. I tried writing a test for an acme running and skipping -l option if there is but it looked so ugly that I dropped the idea, I write and click Load command when I need it instead. Also I don't use any programs interacting with acme so still not having problems with isolated namespaces.