[9fans] plan9port fossil

2020-03-09 Thread kim . lassila
Does anyone run fossil from plan9port? Is it stable? I am thinking of setting 
up a fossil + venti fileserver on Linux that Plan 9 terminals and cpu servers 
can connect to. Any recommendations for/against this?

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T5df913730c26a8d5-Mcc0aca92074fa3c7b7000936
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan9port fossil

2020-03-19 Thread Kim Lassila



> On Mar 18, 2020, at 5:37 PM, Steven Stallion  wrote:
> 
> http://9p.io/sources/contrib/stallion/venti/. 
> 
> I've been using this configuration since 2013 without any data
> loss/corruption that I'm aware of.  

Thank you Steve. Your mkventi script and the attached notes are very helpful, 
and good to hear fossil and venti have been stable for you. I configured p9p 
venti for a Plan 9 playground on a MacBook yesterday. Works like a charm. 
Finally I have fossil (served by the 9pccpuf kernel from 9legacy), venti 
(served by macOS), and 9front (served by fossil) working together. I am hosting 
the 9front file tree inside fossil. 9front distribution does not have fossil, 
therefore I came up with this mixture of 9legacy (on the file server) and 
9front. Fossil+venti gets me file system snapshots every 15 minutes and daily 
archival dumps. Life is good. Never lose a file again.

If anyone wants to learn more about this setup, please reach out. I am building 
a playground so that people new to Plan 9 can get a productive environment up 
on their laptop quickly. The medium term goal is to increase the population of 
the Plan 9 community. The long term goal is world domination...

Kim


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T5df913730c26a8d5-M38ff83258e3fb934c4b7d333
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] changing the mac address of an ethernet device

2020-03-21 Thread kim . lassila
How can I change the MAC address of an ethernet device? For example e1000 or 
virtio driver.
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T6406761c5c309c4b-Mf5f5affd575997599ee76d8a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] Plan9 on virtual machine in Mac os

2020-03-25 Thread Kim Lassila
On Mar 25, 2020, at 3:32 AM, Mark Everett  wrote:
> 
> Does anyone know of a virtual machine running on current Mac OS that hosts 
> plan9?  Preferably one that isn’t too difficult to set up….

Hi Mark,

I run both 9front and 9legacy on macOS with Qemu. The installation of qemu 
4.2.0 was a breeze via Homebrew:

Mac % brew install qemu

The Plan 9 file server VM boots off a virtual disk image that has 9fat, nvram, 
and fossil. I launch it with the following command:

Mac % cd $HOME/plan9/fs &&
qemu-system-x86_64 -m 512 -name 'file server' \
-nographic \
-no-reboot \
-drive 'if=none,id=hd,file=fossil.raw,format=raw' \
-device 'virtio-scsi-pci,id=scsi' -device 'scsi-hd,drive=hd' \
-device virtio-net-pci,netdev=n0,mac=52:54:00:09:09:02 \
-netdev user,id=n0,hostfwd=tcp::564-:564

The Plan 9 terminal boots directly off a 9front kernel supplied on the command 
line. I launch the VM with this command:

Mac % cd $HOME/plan9/terminal &&
qemu-system-x86_64 -m 1024 -kernel 9pc64 -initrd plan9.ini \
-name terminal \
-no-reboot \
-device virtio-net-pci,netdev=n0,mac=52:54:00:09:09:09 \
-netdev user,id=n0,hostfwd=tcp::8080-:80 2>&1 | grep -v 'multiboot knows VBE'

I was testing a simple web server written in Go on the terminal and that’s why 
I am forwarding tcp port 8080 into it. 

It took quite a lot of iterations to get these commands right. Hope this helps.

Kim


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Ta7f245368d4d10b8-M8bab0704a25927fd5adeee93
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] iOS drawterm

2020-03-25 Thread Kim Lassila


> On Mar 25, 2020, at 8:19 AM, Anthony Sorace  wrote:
> 
> With iOS getting first-class mouse pointer support, I’m looking at the iOS 
> drawterm port again. Has anyone touched this since the old GSoC project bit 
> rotted out?

Drawterm is quite slow at reading and writing pixels on the screen. I learned 
this when I started recording screen in Plan 9 
(https://github.com/9d0/screencast ). 

Instead of porting drawterm to different platforms I would like to see vncs 
improved to support the latest version of the Remote Framebuffer Protocol (RFC 
6143). This would allow a standard VNC client to connect to a Plan 9 terminal, 
support screen resizing, local mouse cursor, and deliver all key strokes and 
mouse chords accurately. VNC is optimized to work over a large variety of 
different networks including high latency links and it will therefore offer a 
better user experience than drawterm, especially over wireless. 

Kim


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T69dec3540d033863-M0322b1152190d9107a821115
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] iOS drawterm

2020-03-25 Thread Kim Lassila
On Mar 25, 2020, at 14:42, Jeremy O'Brien  wrote:
> 
> http://man.9front.org/1/vnc ?
> 
> Unless you're talking about legacy Plan 9?

Yes, I have tested vncs and vncv in 9front. They were written for the old 
protocol version 3.3 which does not support local mouse cursor or resizing the 
screen. It would improve the usability quite a bit if support for the latest 
protocol was added to these programs. Mouse cursor drawn by vncs is red, choppy 
and lags the real hardware cursor. It would be a lot better if vncs supported 
the local mouse cursor extension available in the newer protocol version.

Kim
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T69dec3540d033863-M391c5a31be730b57831a38b9
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] plan9port fossil

2020-04-04 Thread Kim Lassila
On Apr 2, 2020, at 4:23 AM, Jeremy Jackins  wrote:
> 
> I hacked it a bit to make it work for me. I don't remember if there
> was a problem with the normal setup or if I just wanted different
> ergonomics.

Thanks to your words of encouragement I have been successfully running both 
venti and fossil natively on macOS since yesterday, serving a Plan 9 terminal 
that runs via QEMU. I keep this MacBook running 24/7, and this morning I found 
fossil in a busy loop eating all CPU time according to htop. The busy loop 
never happened when the file server was a Plan 9 virtual machine. Other than 
this one issue, fossil starts a lot faster as a macOS binary than as a VM and 
also the Plan 9 terminal boots faster. This probably has to do with the 
sluggish user mode networking in qemu. I spent a couple of days trying to get 
tap+bridge working on a Mac to speed up virtual machine networking, but 
eventually gave up when I couldn’t find anyone who has successfully configured 
this on a Mac.

Kim


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T5df913730c26a8d5-Ma985c4001d163a23a0e31cb1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] a simple graphical application in Go?

2020-04-04 Thread Kim Lassila
Has anyone written a graphical application in Go on Plan 9? How would the Go 
equivalent of black.c (thank you fgb) look like?  

- - - clip - - -

#include 
#include 
#include 

void
main(int, char *argv[])
{
Rectangle   rect;
Image *black;

fmtinstall('R', Rfmt);
if(initdraw(nil, nil, argv[0]) < 0)
sysfatal("initdraw: %r");
rect = screen->r;
black = display->black;
draw(screen, rect, black, nil, ZP);
flushimage(display, 1);
sleep(5 * 1000);
closedisplay(display);
print("rectangle was %R\n", rect);
exits(nil);
}


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-M9cbad5709834cc595acc4061
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] a simple graphical application in Go?

2020-04-04 Thread Kim Lassila
On Apr 5, 2020, at 12:37 AM, Chris McGee  wrote:
> 
> You can try this Go library by mischief and some examples in the cmd package:
> https://bitbucket.org/mischief/draw9/src/default/ 
> 
Thank you, thank you! Here is the Go version of black.c:

package main

import (
"bitbucket.org/mischief/draw9"
"fmt"
"image"
"log"
"time"
)

func main() {
disp, err := draw9.InitDraw(nil, "", "black")
if err != nil {
log.Fatal(err)
}
screen := disp.ScreenImage
rect := screen.R
black := disp.Black
screen.Draw(rect, black, nil, image.ZP)
disp.Flush()
time.Sleep(5 * time.Second)
disp.Close()
fmt.Println("rectangle was", rect)
}

One minor issue: the window is white after the program exits. Text doesn’t show 
until I hit the up and down arrow keys.

Kim
--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T0d490c91935dc74b-Mafdc841624250ef10fd67459
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription