Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Skip Tavakkolian
> * I can’t seem to find a way to have an incrementing loop counter in rc shell 
> (best I could do is check the size of a growing list variable)

most of the time seq(1), hoc(1) and similar tools can help do the job:

fn square {
echo $1 '*' $1 | hoc
}

for (i in `{seq 1 10}) {
j = `{square $i}
echo $i^² '=' $j
}


> * I couldn’t think of a good way to name the image files so that they can be 
> sorted into the correct sequence as input to togif

awk printf perhaps?

for (i in (0 10 100)) {
echo $i
} | awk '{printf "image_%0.3d\n", $0}'




Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Chris McGee
I tried to write an rc script that would make a screen video as an animated 
gif. I have something that almost works, but ran into a few 
problems/limitations.

* I can’t seem to find a way to have an incrementing loop counter in rc shell 
(best I could do is check the size of a growing list variable)
* The gif command barfs when the GIF is any larger than a few megabytes due to 
an allocation error
* I couldn’t think of a good way to name the image files so that they can be 
sorted into the correct sequence as input to togif

I’ll try banging my head on the solution again tomorrow. I’m hoping that either 
it can be a one-liner of rc shell scripting or put into a full utility script 
(e.g. recscreen) that anyone could use.

Thanks,
Chris

> On Nov 23, 2016, at 3:07 PM, Skip Tavakkolian <9...@9netics.com> wrote:
> 
>> it's one of the reasons I'm liking plan 9.
> 
> ingenious glenda.
> 




[9fans] ipv6on

2016-11-23 Thread arisawa
hello,

in /rc/bin/ipv6on we (labs,9atom and 9front) have the following code.
ip/ipconfig $xdir loopback /dev/nulladd $mev6 /128

this code is curious to me.
the code doesn’t put ipv6 loopback address "::1" to /net/ipselftab.
and, why we need $mev6 (my ipv6 address) for simply adding loopback address  
"::1" to /net/ipselftab?

isn’t it enough the code below?
ip/ipconfig $xdir loopback /dev/nulladd ::1 /128

it seems this code is working for me.

Kenji Arisawa




Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Jules Merit
Thanks I bought one.
/REMdmr

On Nov 23, 2016 1:59 PM, "Steve Simon"  wrote:

>
> kudos for the use of m4.
>
> sadly my o2s went the way of ebay years ago, nice machines though.
>
> -Steve
>
>
> On 23 Nov 2016, at 21:30, Jules Merit 
> wrote:
>
> I ported doom, after someone Runed plan9. Trying to get 9front Jurassic
> Park on MIPS r12k now.
>
> Also plan9 clearly needs EEG for user defined scheduler and jukebox
> selection whilst in the labs.
>
> On Nov 23, 2016 12:57 PM, "Skip Tavakkolian" <9...@9netics.com> wrote:
>
> > i have a slightly related question: how do i find out an other
> > window's window id if there is no shell temporarily available? e.g.
> > doom is running inside.
>
> maybe 'grep doom /dev/wsys/*/label' ?
>
>
>
> 
>
> 
>
>


Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Steve Simon

kudos for the use of m4.

sadly my o2s went the way of ebay years ago, nice machines though.

-Steve


> On 23 Nov 2016, at 21:30, Jules Merit  
> wrote:
> 
> I ported doom, after someone Runed plan9. Trying to get 9front Jurassic Park 
> on MIPS r12k now.
> 
> Also plan9 clearly needs EEG for user defined scheduler and jukebox selection 
> whilst in the labs.
> 
> 
> On Nov 23, 2016 12:57 PM, "Skip Tavakkolian" <9...@9netics.com> wrote:
> > i have a slightly related question: how do i find out an other
> > window's window id if there is no shell temporarily available? e.g.
> > doom is running inside.
> 
> maybe 'grep doom /dev/wsys/*/label' ?
> 
> 
> 
> 
> 


Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Skip Tavakkolian
> i have a slightly related question: how do i find out an other
> window's window id if there is no shell temporarily available? e.g.
> doom is running inside.

maybe 'grep doom /dev/wsys/*/label' ?




Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Skip Tavakkolian
>> tojpg < /mnt/wsys/window > window.jpg
> 
> Simpler because you're capturing a specific window in this case?

yes. from rio(1):

"/mnt/wsys  Files served by rio (also unioned in
 /dev in a window's name space, before
 the terminal's real /dev files)"




Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread hiro
i have a slightly related question: how do i find out an other
window's window id if there is no shell temporarily available? e.g.
doom is running inside.



Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread James A. Robinson
On Wed, Nov 23, 2016 at 12:33 PM Benjamin Purcell 
wrote:
> even simpler:
>
> tojpg < /mnt/wsys/window > window.jpg

Simpler because you're capturing a specific window in this case?


Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Benjamin Purcell
even simpler:

tojpg < /mnt/wsys/window > window.jpg

On Wed, Nov 23, 2016 at 2:07 PM, Skip Tavakkolian <9...@9netics.com> wrote:
>> it's one of the reasons I'm liking plan 9.
>
> ingenious glenda.



Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Skip Tavakkolian
> it's one of the reasons I'm liking plan 9.

ingenious glenda.


Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Chris McGee
Thanks Richard,

That is the kind of thing I was looking for. And yes, it's one of the reasons 
I'm liking plan 9. Each piece does one thing we'll.

Chris

On Nov 23, 2016, at 11:06 AM, Richard Miller <9f...@hamnavoe.com> wrote:

>> I'm working on some documentation and would like to include a portion of the 
>> screen in a particular window. What's a good way to take the shot but also 
>> snip out the piece that I'm interested in?
> 
> Making a screenshot is one of those delightful examples of
> the elegant simplicity of Plan 9:
> 
>cat /dev/screen >screenshot.pic
> 
> To select a rectangle from an image you can use crop(1)
> 
> 



Re: [9fans] Partition problems

2016-11-23 Thread Sigrid Haflinadóttir
He didn't ask about 9front.

On Wed, Nov 23, 2016 at 4:13 PM, Iruatã Souza  wrote:

> 9front solved that 5 years ago.
>
> On Mon, Nov 21, 2016 at 5:20 AM,   wrote:
> > Hello,
> >
> > On Sun, Nov 20, 2016 at 11:07:03PM +, Steve Simon wrote:
> >> Hi,
> >>
> >> I run a modified labs kernel with a few bits of 9atom to support my atom
> >> Motherboard.
> >>
> >> I have added an ssd to the mirrored disks in my plan9 server.
> >> The initialisation of devfs fails without a helpful error message
> (something I will sort out)
> >>
> >> However the source of the problem seems to be boot/parts.c which fails
> to instantiate the last partition on my disks. This causes devfs to give up
> rather than continuing to retry other partitions. My kernel then cannot
> find its venti partition and dies with a panic.
> >>
> >> If I boot using a different partition structure I can bring up the
> machine, and see that this one partition is indeed missing.
> >>
> >> If I run disk/prep on the disk and rewrite the partition table
> unchanged, the missing partition appears.
> >>
> >> Anyone seen problems with the partition table generation code in
> boot/part.c?
> >> If not I will keep digging but I thought it was worth asking.
> >
> > I had a problem (and still have) with the plan9 program because the code
> > rewrites the whole partition entry, recomputing the values of the start
> > and so on even with partitions "untouched" rendering the machine
> > unbootable because the starting block was not the correct one.
> >
> > I have never found neither the time nor the incentive to correct this
> > part.
> >
> > I don't know if this has anything to do with your problem at hand.
> >
> > Best,
> > --
> > Thierry Laronde 
> >  http://www.kergis.com/
> > Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
> >
>
>


Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread hiro
can't you take something like /dev/wsys/123/window ?

On 11/23/16, Richard Miller <9f...@hamnavoe.com> wrote:
>> I'm working on some documentation and would like to include a portion of
>> the screen in a particular window. What's a good way to take the shot but
>> also snip out the piece that I'm interested in?
>
> Making a screenshot is one of those delightful examples of
> the elegant simplicity of Plan 9:
>
> cat /dev/screen >screenshot.pic
>
> To select a rectangle from an image you can use crop(1)
>
>
>



Re: [9fans] How to take a portion of a screenshot

2016-11-23 Thread Adriano Verardo

I usually run Plan9 in a vm under Win7.

Chris McGee wrote:

Hi All,

I'm working on some documentation and would like to include a portion of the 
screen in a particular window. What's a good way to take the shot but also snip 
out the piece that I'm interested in?

Thanks,
Chris






Re: [9fans] Partition problems

2016-11-23 Thread Iruatã Souza
9front solved that 5 years ago.

On Mon, Nov 21, 2016 at 5:20 AM,   wrote:
> Hello,
>
> On Sun, Nov 20, 2016 at 11:07:03PM +, Steve Simon wrote:
>> Hi,
>>
>> I run a modified labs kernel with a few bits of 9atom to support my atom
>> Motherboard.
>>
>> I have added an ssd to the mirrored disks in my plan9 server.
>> The initialisation of devfs fails without a helpful error message (something 
>> I will sort out)
>>
>> However the source of the problem seems to be boot/parts.c which fails to 
>> instantiate the last partition on my disks. This causes devfs to give up 
>> rather than continuing to retry other partitions. My kernel then cannot find 
>> its venti partition and dies with a panic.
>>
>> If I boot using a different partition structure I can bring up the machine, 
>> and see that this one partition is indeed missing.
>>
>> If I run disk/prep on the disk and rewrite the partition table unchanged, 
>> the missing partition appears.
>>
>> Anyone seen problems with the partition table generation code in boot/part.c?
>> If not I will keep digging but I thought it was worth asking.
>
> I had a problem (and still have) with the plan9 program because the code
> rewrites the whole partition entry, recomputing the values of the start
> and so on even with partitions "untouched" rendering the machine
> unbootable because the starting block was not the correct one.
>
> I have never found neither the time nor the incentive to correct this
> part.
>
> I don't know if this has anything to do with your problem at hand.
>
> Best,
> --
> Thierry Laronde 
>  http://www.kergis.com/
> Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C
>