9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] multiple acme instances with plan9port
@ 2012-11-07 14:55 Ruslan Khusnullin
  2012-11-07 15:53 ` Bence Fábián
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Ruslan Khusnullin @ 2012-11-07 14:55 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

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 ;)

[-- Attachment #2: Type: text/html, Size: 1442 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 14:55 [9fans] multiple acme instances with plan9port Ruslan Khusnullin
@ 2012-11-07 15:53 ` Bence Fábián
  2012-11-07 15:57   ` Sergio Perticone
  2012-11-07 16:45 ` Ethan Burns
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Bence Fábián @ 2012-11-07 15:53 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

you can try this as a quick fix:

$ mkdir /tmp/ns2.r
$ NAMESPACE=/tmp/ns2.r acme

maybe write a wrapper script for it


2012/11/7 Ruslan Khusnullin <ruslan.khusnullin@gmail.com>

> 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 ;)
>

[-- Attachment #2: Type: text/html, Size: 1988 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 15:53 ` Bence Fábián
@ 2012-11-07 15:57   ` Sergio Perticone
  2012-11-07 16:09     ` Bence Fábián
  0 siblings, 1 reply; 9+ messages in thread
From: Sergio Perticone @ 2012-11-07 15:57 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

On Wed, Nov 7, 2012 at 4:53 PM, Bence Fábián <begnoc@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.

[-- Attachment #2: Type: text/html, Size: 750 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 15:57   ` Sergio Perticone
@ 2012-11-07 16:09     ` Bence Fábián
  2012-11-07 16:22       ` Sergio Perticone
  0 siblings, 1 reply; 9+ messages in thread
From: Bence Fábián @ 2012-11-07 16:09 UTC (permalink / raw)
  To: sergio, Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

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 <g4ll0ws@gmail.com>

>
>
> On Wed, Nov 7, 2012 at 4:53 PM, Bence Fábián <begnoc@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.
>

[-- Attachment #2: Type: text/html, Size: 1650 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 16:09     ` Bence Fábián
@ 2012-11-07 16:22       ` Sergio Perticone
  0 siblings, 0 replies; 9+ messages in thread
From: Sergio Perticone @ 2012-11-07 16:22 UTC (permalink / raw)
  Cc: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

On Wed, Nov 7, 2012 at 5:09 PM, Bence Fábián <begnoc@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.

[-- Attachment #2: Type: text/html, Size: 1348 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 14:55 [9fans] multiple acme instances with plan9port Ruslan Khusnullin
  2012-11-07 15:53 ` Bence Fábián
@ 2012-11-07 16:45 ` Ethan Burns
  2012-11-07 17:10 ` dexen deVries
  2012-11-08  9:48 ` Mark van Atten
  3 siblings, 0 replies; 9+ messages in thread
From: Ethan Burns @ 2012-11-07 16:45 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 14:55 [9fans] multiple acme instances with plan9port Ruslan Khusnullin
  2012-11-07 15:53 ` Bence Fábián
  2012-11-07 16:45 ` Ethan Burns
@ 2012-11-07 17:10 ` dexen deVries
  2012-11-08  7:54   ` Ruslan Khusnullin
  2012-11-08  9:48 ` Mark van Atten
  3 siblings, 1 reply; 9+ messages in thread
From: dexen deVries @ 2012-11-07 17:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wednesday 07 of November 2012 18:55:34 Ruslan Khusnullin wrote:
> 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.


here's my dumb script:


#!/usr/bin/env rc

flag e +

NAMESPACE=`{namespace}^-2
mkdir -p `{namespace}
plumber || true
exec acme


cheers,
--
dx



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 17:10 ` dexen deVries
@ 2012-11-08  7:54   ` Ruslan Khusnullin
  0 siblings, 0 replies; 9+ messages in thread
From: Ruslan Khusnullin @ 2012-11-08  7:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [9fans] multiple acme instances with plan9port
  2012-11-07 14:55 [9fans] multiple acme instances with plan9port Ruslan Khusnullin
                   ` (2 preceding siblings ...)
  2012-11-07 17:10 ` dexen deVries
@ 2012-11-08  9:48 ` Mark van Atten
  3 siblings, 0 replies; 9+ messages in thread
From: Mark van Atten @ 2012-11-08  9:48 UTC (permalink / raw)
  To: 9fans

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  "$@"



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-08  9:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-07 14:55 [9fans] multiple acme instances with plan9port Ruslan Khusnullin
2012-11-07 15:53 ` Bence Fábián
2012-11-07 15:57   ` Sergio Perticone
2012-11-07 16:09     ` Bence Fábián
2012-11-07 16:22       ` Sergio Perticone
2012-11-07 16:45 ` Ethan Burns
2012-11-07 17:10 ` dexen deVries
2012-11-08  7:54   ` Ruslan Khusnullin
2012-11-08  9:48 ` Mark van Atten

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).