Re: [9fans] 9vx mk install chokes on gs
On Sat, Sep 11, 2010 at 9:59 PM, erik quanstrom quans...@quanstro.net wrote: -#define USTKTOP (0x400) /* byte just beyond user stack */ +#define USTKTOP (0x800) /* byte just beyond user stack */ shouldn't you add a 0 to that? what's wrong with giving a process 2gb of address space? fundamental 9vx limits? I figure I'll take my time. I don't know the reason for the original low limit, so I decided not to push it until I understand it better. ron
[9fans] Today's SecureNet Key
The Plan 9 manual still contains the securenet(8) manpage and several reference to this old hardware. I would like to get it, but it seems Digital Pathways (or AssureNet Pathways) products are no longer available anywhere (they would now be part of Symantec, which is not really in the business of security). Are there any other little secure token boxes that work with Plan 9 (such as SecurID)? Best, ak
[9fans] sam: mouse focus, chords
Hello, If I am right, there are some patches enabling mouse chords in sam as well as using focus follows mouse (like acme). I found some kind of the former in Steve Simon's contrib. What about the latter? Thanks Ruda
Re: [9fans] Today's SecureNet Key
when i can't use cpu and secstore to log in directly, i use netkey. there are non-Plan9 implementations of netkey. i think i've got a Java version somewhere.
Re: [9fans] docfonts problem
do you have the fonts? they do not come with plan9port, because the postscript fonts cannot be redistributed except with plan 9 itself. turns out no. Here is a sticky question (one I will likely have to write Bigelow Holmes for final clarification), but if I write a script (portage ebuild) which downloads and extracts the fonts into plan9port so all this works. Is this a violation of their license? I would not be redistributing it, but would this be considered a derivative work? where would the script download them from? whoever makes them available for download separate from plan 9 is violating that license. further, this kind of dancing on the edge of a knife approach to software licensing is not typically looked kindly upon by the distributions. i bet gentoo would object if they found out. honestly, i wouldn't play these games. bigelow holmes granted plan9port a license to distribute plan 9's lucida bitmap fonts as long as they were named something other than lucida (that's why the directories are named luc instead of lucida), and that same license explicitly excluded plan 9's lucida sans postscript fonts. they were very gracious about licensing even the bitmap fonts when there was little benefit to them other than good will. instead of violating the spirit and possibly the letter of both licenses, i would suggest that you use the postscript fonts that i substituted in their place, namely luxi sans, also by bigelow holmes. the ms macros that ship with plan9port use them if you start your document with .FP luxisans they have equally good unicode coverage and a similar look to lucida sans. if you do write such a script to pull the lucida fonts out automatically and drop them in, please don't use the name plan9port to describe the resulting software. i don't want any part of it. thanks. russ
Re: [9fans] 9vx mk install chokes on gs
On Sun, Sep 12, 2010 at 12:59 AM, erik quanstrom quans...@quanstro.net wrote: -#define USTKTOP (0x400) /* byte just beyond user stack */ +#define USTKTOP (0x800) /* byte just beyond user stack */ shouldn't you add a 0 to that? what's wrong with giving a process 2gb of address space? fundamental 9vx limits? there might not be 2gb of contiguous address space to have. this is running inside a unix process. another reason for the low size was so that it was easier to keep multiple processes mapped at the same time, to reduce context switch latency. russ
[9fans] 9vx/vx32 - Out of ignorance
Besides the issue of (not) understanding TAP and so having no access to networking, what struck me while experimenting with a very remarkable 9vx installation (9vx is impressive, not my installation thereof :-) was that if you start it as root, you retain root credentials within the sandbox, irrespective of user selection at start up of 9vx. Given that 9vx seems pretty comfortable as an arbitrary user, would it make sense for me to find a location where a switch to the specified user can take place? Admittedly, that does not correspond to the Plan 9 model where Eve has unrestricted access to devices, but in a hosted environment that can be excused (and documented). My thinking is that 9vx could start up as root to install the TAP device (nothing else so far has alerted me to a need for root permissions), then switch user to the selected one (if it exists, nobody may be needed if there is no equivalent in the host repertoire) once setting up is complete. Back to the question, then: is there any reason why I should not be looking into doing this? Another thought that struck me, in passing, is whether the TAP device should be set up in vx32 rather than in 9vx. I am not familiar with the boundary between these, so the question may seem silly to others, to me the logic seems a bit strained right now. And if anybody can arrange a short lesson on using networking under 9vx, that would also be greatly appreciated. ++L
Re: [9fans] 9vx mk install chokes on gs
On Sun Sep 12 11:45:31 EDT 2010, r...@swtch.com wrote: On Sun, Sep 12, 2010 at 12:59 AM, erik quanstrom quans...@quanstro.net wrote: -#define USTKTOP (0x400) /* byte just beyond user stack */ +#define USTKTOP (0x800) /* byte just beyond user stack */ shouldn't you add a 0 to that? what's wrong with giving a process 2gb of address space? fundamental 9vx limits? there might not be 2gb of contiguous address space to have. this is running inside a unix process. another reason for the low size was so that it was easier to keep multiple processes mapped at the same time, to reduce context switch latency. that makes sense. unfortunately, this means that any process that uses significant memory on plan 9 needs to be re-checked for 9vx. even 100mb is tiny. - erik
Re: [9fans] docfonts problem
As I said, I would ask Bigelow Holmes for final clarification before releasing anything. I am not trying to dance around the license, but get clarification on what is OK. I have made it a habit of asking people here, and elsewhere, if there they would mind if I do something in a particular way. I have even caught flack for asking 9fans before showing them the code, but it is exactly this kind of toe stepping that I like to avoid. I could go through the dance steps of how portage can download multiple source trees to build stuff, but you have made it quite clear how you feel about it. Now for the problem behind all this. I am basically required to use troff for formatting the iwp9 paper submissions. I have asked repeatedly for the a TeX macros, or the source for an acceptable macro.ms equivalents. All of these requests have been greeted with silence because someone, and I would have to guess who, is discouraging the use of TeX for these submissions. Frankly troff has been a pain, and I do not use it for anything else, and will not except for necessary plan9 related documentation. Thanks for the work around BTW, but next time I rebuild plan9port it will be blown away unless I add these dance steps to the ebuilds. See the chicken ant the egg problem? As for Gentoo, I would have to go through a formal review before having them added to any repository AND the licensing field in portage ebuilds explicitly contain all the licenses of the software used to build the programs. So, gentoo would know right off -- I would not hide it. Also, there are ebuilds for proprietary closed-source programs in gentoo, though not many. On Sun, 12 Sep 2010 11:42:13 -0400, Russ Cox r...@swtch.com wrote: do you have the fonts? they do not come with plan9port, because the postscript fonts cannot be redistributed except with plan 9 itself. turns out no. Here is a sticky question (one I will likely have to write Bigelow Holmes for final clarification), but if I write a script (portage ebuild) which downloads and extracts the fonts into plan9port so all this works. Is this a violation of their license? I would not be redistributing it, but would this be considered a derivative work? where would the script download them from? whoever makes them available for download separate from plan 9 is violating that license. further, this kind of dancing on the edge of a knife approach to software licensing is not typically looked kindly upon by the distributions. i bet gentoo would object if they found out. honestly, i wouldn't play these games. bigelow holmes granted plan9port a license to distribute plan 9's lucida bitmap fonts as long as they were named something other than lucida (that's why the directories are named luc instead of lucida), and that same license explicitly excluded plan 9's lucida sans postscript fonts. they were very gracious about licensing even the bitmap fonts when there was little benefit to them other than good will. instead of violating the spirit and possibly the letter of both licenses, i would suggest that you use the postscript fonts that i substituted in their place, namely luxi sans, also by bigelow holmes. the ms macros that ship with plan9port use them if you start your document with .FP luxisans they have equally good unicode coverage and a similar look to lucida sans. if you do write such a script to pull the lucida fonts out automatically and drop them in, please don't use the name plan9port to describe the resulting software. i don't want any part of it. thanks. russ
Re: [9fans] 9vx/vx32 - Out of ignorance
On Sun, Sep 12, 2010 at 9:17 AM, Lucio De Re lu...@proxima.alt.za wrote: Back to the question, then: is there any reason why I should not be looking into doing this? I'm kind of a go ahead and do it person w.r.t. this, and I certainly have no ownership of 9vx, so I'd say why not? The more the merrier. orn
Re: [9fans] 9vx/vx32 - Out of ignorance
2010/9/12 Lucio De Re lu...@proxima.alt.za: My thinking is that 9vx could start up as root to install the TAP device (nothing else so far has alerted me to a need for root permissions), then switch user to the selected one (if it exists, nobody may be needed if there is no equivalent in the host repertoire) once setting up is complete. The advantage of the tap device is precisely that it does not need root permissions. You need those permissions to manage the devices, but that will be normally done by tunctl or openvpn. Those are the programs that have to worry about being run as root, not 9vx. In other words: you need to be root to create the tap device, but not to use it. And if anybody can arrange a short lesson on using networking under 9vx, that would also be greatly appreciated. Inside 9vx, networking with tap devices is not different to using physical devices. At the host system level, it works as it does in qemu (there could be more bugs though). There are many qemu tutorials with sample scripts and better explanations than what I could give. The particular configuration I'm using is documented at: http://wiki.archlinux.org/index.php/QEMU#Tap_Networking_with_QEMU Based on the qemu-ifup/down scripts described there I wrote a 9vx-tap script you can find at: http://bitbucket.org/yiyus/vx32/src/tip/src/9vx/9vx-tap Probably disecting that script is the best way to understand how the bridge, the tap devices and 9vx play together. -- - yiyus || JGL . 4l77.com
Re: [9fans] Today's SecureNet Key
Is there any way to have the auth server require netkey only when connections are from outside the local network? Thanks, ak On Sep 12, 2010, at 6:49, Charles Forsyth fors...@terzarima.net wrote: when i can't use cpu and secstore to log in directly, i use netkey. there are non-Plan9 implementations of netkey. i think i've got a Java version somewhere.
Re: [9fans] docfonts problem
Now for the problem behind all this. I am basically required to use troff for formatting the iwp9 paper submissions. I have asked repeatedly for the a TeX macros, or the source for an acceptable macro.ms equivalents. All of these requests have been greeted with silence because someone, and I would have to guess who, is discouraging the use of TeX for these submissions. Frankly troff has been a pain, and I do not use it for anything else, and will not except for necessary plan9 related documentation. Thanks for the work around BTW, but next time I rebuild plan9port it will be blown away unless I add these dance steps to the ebuilds. See the chicken ant the egg problem? It's just not that hard to use the iwp9 macros with plan9port. They work fine, and if you put .FP luxisans at the top of your ms file you can get a nice-looking BH-designed sans serif font too. And then when you submit the source to them you or they can delete that one line. It's easy. Or you can run 9vx pointed at a real Plan 9 ISO image and run Plan 9 in all its glory. That's easy too. You're making things a lot harder than they need to be. Russ
Re: [9fans] 9vx mk install chokes on gs
another reason for the low size was so that it was easier to keep multiple processes mapped at the same time, to reduce context switch latency. that makes sense. unfortunately, this means that any process that uses significant memory on plan 9 needs to be re-checked for 9vx. even 100mb is tiny. it's easy to recompile. the current limit seems to work very well for people, as this is the first complaint in two years. there are still people running plan 9 on 64 MB or 128 MB machines. (and actually i thought the 9vx limit was 256 MB; maybe ron cranked it down.) russ
Re: [9fans] troff fonts with special characters
If you like the cleanliness and simplicity of troff files for writing papers, and would like to avoid the hideousness of TeX, then you might want to try Lout. I ported it to Plan 9 earlier this year and just copied it to my contrib: contrib/akumar/lout.tgz Best of luck, ak On Sep 12, 2010, at 2:25, Rudolf Sykora rudolf.syk...@gmail.com wrote: On 12 September 2010 00:18, Russ Cox r...@swtch.com wrote: That sounds about right, unfortunately. You might be better off just using TeX. It's better at math, it runs on Plan 9, and your colleagues who don't use Plan 9 will still be able to collaborate on documents with you. Russ Thanks for the answer. I've actually used TeX and LaTeX for more than 15 years. LaTeX is de facto standard for physics journals. But for private work LaTeX is a no-way for me --- plain TeX is much simpler without illegible complex macros. When acquianted with troff, tbl, eqn, grap, pic, I started to like their simplicity, smallness. And basically I can do almost all my work with them. Ok. I will have to think. Maybe TeX really is the right choice for me now. But, generally. If troff in plan9 is to be a serious tool in the future, the procedure must be simplified, I believe. I think that plan9 troff should be able to use (read metrics) from otf/t1/ttf fonts (like the Heirloom troff can). Thank you Ruda
Re: [9fans] docfonts problem
It's just not that hard to use the iwp9 macros with plan9port. They work fine, and if you put .FP luxisans at the top of your ms file you can get a nice-looking BH-designed sans serif font too. And then when you submit the source to them you or they can delete that one line. It's easy. and as far as I know you are the first to document this little gem. Thank you. Or you can run 9vx pointed at a real Plan 9 ISO image and run Plan 9 in all its glory. That's easy too. that was about to be my next step, but I haven't been using 9vx for much of anything for awhile because it does everything in a single core and I want to test how well things work on multi-cores. So, I'm trying to work with mainly one toolset -- in this case plan9port.
Re: [9fans] 9vx mk install chokes on gs
On Sun, Sep 12, 2010 at 11:19 AM, Russ Cox r...@swtch.com wrote: (and actually i thought the 9vx limit was 256 MB; maybe ron cranked it down.) I don't think so but I'll dig around. ron
Re: [9fans] 9vx/vx32 - Out of ignorance
On Sun, 12 Sep 2010 19:30:05 +0200 yy yiyu@gmail.com wrote: 2010/9/12 Lucio De Re lu...@proxima.alt.za: My thinking is that 9vx could start up as root to install the TAP device (nothing else so far has alerted me to a need for root permissions), then switch user to the selected one (if it exists, nobody may be needed if there is no equivalent in the host repertoire) once setting up is complete. The advantage of the tap device is precisely that it does not need root permissions. You need those permissions to manage the devices, but that will be normally done by tunctl or openvpn. Those are the programs that have to worry about being run as root, not 9vx. In other words: you need to be root to create the tap device, but not to use it. On a mac you don't need root perms to open a tap device. (using Mattias Nissler's tuntap package). On FreeBSD you can set sysctl net.link.tap.user_open=1 to allow a nonroot process to open a tap device. On linux you have tunctl. But I agree you don't need 9vx to plan root games. You can wrap a script around it. And if anybody can arrange a short lesson on using networking under 9vx, that would also be greatly appreciated. You have a number of choices. - If you only want to initiate connects from within 9vx to the outside world 9vx's original choice is good enough. - If you want to provide one or more services in 9vx that others can connect to, you can perhaps just setup port forwarding (like in ssh). The idea is to open a listening socket on host when a 9vx process opens a listening port. - If you want to fire up multiple 9vx instances, set up nfs or some such services the host may also provide, provide multiple network interfaces, or play with networking within 9vx, then you need a full fledged host that does its own network processing. Here you have two choices: - open a host interface in promiscuous mode and filter packets based on dest mac address (which is sort of like bridging). - use a tap device. Basically 9vx has to open host's /dev/tapN. This should map to an ether interface within 9vx. Packets sent from 9vx appear as *input packets* on the host network interface tapN. Packets output to (or relayed to) host netif tapN appear as input data on /dev/tapN. To send/recv packets to/from a real network you have three choices (to be done on the host side): - bridge to a phys device - route (the host will forward. If you need dhcp in 9vx the host must provide or relay dhcp) - NAT (the host will do address translation) Each has its pros and cons. Bridging, if it can be made to work, is the simplest. But AFAIK you can't do bridging on a host connected only via a wireless connection (at least I don't know how to do that). MacOS ifconfig man page, which seems to be cribbed from FreeBSD, talks about bridging related subcommands and if_bridge(4) but to my knowledge there is no built in bridging support in it. But vmware and VirtualBox seems to allow bridging so there must be a way *BSD and linux provide bridging.
Re: [9fans] 9vx/vx32 - Out of ignorance
On Sun, Sep 12, 2010 at 07:30:05PM +0200, yy wrote: 2010/9/12 Lucio De Re lu...@proxima.alt.za: My thinking is that 9vx could start up as root [ ... ] The advantage of the tap device is precisely that it does not need root permissions. You need those permissions to manage the devices, but that will be normally done by tunctl or openvpn. Those are the programs that have to worry about being run as root, not 9vx. In other words: you need to be root to create the tap device, but not to use it. I eventually got that far :-) I do appreciate confirmation of my understanding and I now understand the underlying processes considerably better. And if anybody can arrange a short lesson on using networking under 9vx, that would also be greatly appreciated. Inside 9vx, networking with tap devices is not different to using physical devices. At the host system level, it works as it does in qemu (there could be more bugs though). There are many qemu tutorials with sample scripts and better explanations than what I could give. I'll check on qemu, I haven't tried it with any success (or real effort, for that matter) in the past, but then I also had even less understanding than I have now. The particular configuration I'm using is documented at: http://wiki.archlinux.org/index.php/QEMU#Tap_Networking_with_QEMU Based on the qemu-ifup/down scripts described there I wrote a 9vx-tap script you can find at: http://bitbucket.org/yiyus/vx32/src/tip/src/9vx/9vx-tap Probably disecting that script is the best way to understand how the bridge, the tap devices and 9vx play together. It's very, very helpful. I would, and almost certainly will, have split the tunnel and openvpn portions into two scripts (a selector of some type might be good enough, but isn't easily justified), because I'm sure that they don't overlap quite the way the present shape of the script suggests. I found it after posting my request, I still haven't got everything working to my satisfaction, but I think the reference to qemu will help. There are still questions unanswered: (1) would switching userid be useful and practical, irrespective of the actual need for it? and (2) would it make sense to migrate the virtual network devices to vx32? I'm quite happy to entertain opinions, that's all I have to work with right now, it takes me a long time to read and understand source code :-( I know that Ron has already replied to the first of these questions, I'm hoping that those who made the original decisions will contribute their rationales as well. ++L PS: and thanks to all those who have contributed to such a superb toolkit.
Re: [9fans] troff fonts with special characters
On 12 September 2010 20:25, Akshat aku...@mail.nanosouffle.net wrote: If you like the cleanliness and simplicity of troff files for writing papers, and would like to avoid the hideousness of TeX, then you might want to try Lout. I ported it to Plan 9 earlier this year and just copied it to my contrib: contrib/akumar/lout.tgz Best of luck, ak Thanks for the idea. Actually I was considering this a while ago. I even printed out the manual.(I have lout in linux.) However, from what I read there I gained the feeling that -- it doesn't know utf (thus you can't really just write a single letter 'alpha' as you can in troff) -- it somehow seems to be an 'all together software' (as opposed to tbl/pic/eqn/...), which I don't like. -- the syntax for writing math is more complicated than in eqn. The syntax is rather closer to TeX, which I wanted to avoid, though the results, I feel, are no better than eqn's. True, I haven't actually tried the software much. May be that I am also wrong in some points. Well, don't take me wrong. I have not much against (plain)TeX. When I was about 15 and got a printed version of TeXBook, METAFONT, I was amazed. Its documentation can't be better (nothing to compare to anything). The algorithms are superior. It's not so big either (although today's distributions are horrible, 1GB [this I really hate]; but the core, as someone here is trying to put up, is fine; I mean KerTeX or what). It's only that troff is even much simpler and yet good enough. And also that the notation is much more human. Making a table with tbl or a simple graph with grap is a pleasure. Equations written for eqn can be read back from the source, without seeing millions of \\\.This is, I would say, what totally grabbed me. And the documentation as written by Kernighan is also awesome --- short, answers many potential questions right away, explains things clearly. This is why I also like plan 9, generally (though almost whatever I try doesn't work). TeX is very 'strict', precise; but you must have a good knowledge of it to talk it into something. Troff is more straightforward, simpler, and is more fun, some things are playful, e.g. traps. Thanks Ruda
Re: [9fans] 9vx/vx32 - Out of ignorance
On Sun, Sep 12, 2010 at 12:27:07PM -0700, Bakul Shah wrote: On a mac you don't need root perms to open a tap device. This is sorted out to my satisfaction, thank you. Here you have two choices: I think I lack some of the terminology to get my mind around all this, but some experimenting will definitely help me figure it out. And 9vx is very helpful in being robust and quick. Just to explain my problem, I can run 9vx as a terminal to each of two cpu/everything servers, but I can't (yet) attach the other fileserver when attached to either of them (they are configured very similarly). Somehow, in all the information provided so far I'm sure there is enough detail for me to make the final step, I just have to study what I have a little longer. So, thanks everyone. ++L
Re: [9fans] 9vx mk install chokes on gs
2010/9/12 ron minnich rminn...@gmail.com: Ah. It was 256 MB but Yiyus changed it 8 weeks ago to 64MB. Why? Sorry about that. It was after updating all the a/ files from the .ed scripts. It looks like I did not pay enough attention to mem.ed. There were other changes that could be causing problems too. I'm currently having another look at all the stuff in a/. It could take some time, but I will fix it. In the meantime, the old mem.h will probably work just fine. -- - yiyus || JGL . 4l77.com
Re: [9fans] 9vx/vx32 - Out of ignorance
2010/9/12 Lucio De Re lu...@proxima.alt.za: It's very, very helpful. I would, and almost certainly will, have split the tunnel and openvpn portions into two scripts (a selector of some type might be good enough, but isn't easily justified), because I'm sure that they don't overlap quite the way the present shape of the script suggests. I found it after posting my request, I still haven't got everything working to my satisfaction, but I think the reference to qemu will help. The 9vx-tap script is quite naive. I decided to leave it that way because its purpose is more to serve as documentation than as something you will actually use. It is the simplest script I could come up with, but can be improved in many ways. There are still questions unanswered: (1) would switching userid be useful and practical, irrespective of the actual need for it? I'm not sure why you would want to do that, but I'm with ron: if you are interested, go ahead. and (2) would it make sense to migrate the virtual network devices to vx32? Why? The network devices are actually quite simple, and I guess you could move the core to libvx32, but I don't know what you gain with that. As I see it, I like the current situation where vx32 is a sandboxing library and 9vx takes care of providing the virtual devices. -- - yiyus || JGL . 4l77.com
Re: [9fans] troff fonts with special characters
You are right in that Lout cannot handle non-ASCII input, which is something that kept me from using it much, as well. However, the overall approach to the syntax and what not is much nicer than TeX. Also, I would argue that Lout has much nicer output than both, troff and TeX. On Sep 12, 2010, at 12:38, Rudolf Sykora rudolf.syk...@gmail.com wrote: On 12 September 2010 20:25, Akshat aku...@mail.nanosouffle.net wrote: If you like the cleanliness and simplicity of troff files for writing papers, and would like to avoid the hideousness of TeX, then you might want to try Lout. I ported it to Plan 9 earlier this year and just copied it to my contrib: contrib/akumar/lout.tgz Best of luck, ak Thanks for the idea. Actually I was considering this a while ago. I even printed out the manual.(I have lout in linux.) However, from what I read there I gained the feeling that -- it doesn't know utf (thus you can't really just write a single letter 'alpha' as you can in troff) -- it somehow seems to be an 'all together software' (as opposed to tbl/pic/eqn/...), which I don't like. -- the syntax for writing math is more complicated than in eqn. The syntax is rather closer to TeX, which I wanted to avoid, though the results, I feel, are no better than eqn's. True, I haven't actually tried the software much. May be that I am also wrong in some points. Well, don't take me wrong. I have not much against (plain)TeX. When I was about 15 and got a printed version of TeXBook, METAFONT, I was amazed. Its documentation can't be better (nothing to compare to anything). The algorithms are superior. It's not so big either (although today's distributions are horrible, 1GB [this I really hate]; but the core, as someone here is trying to put up, is fine; I mean KerTeX or what). It's only that troff is even much simpler and yet good enough. And also that the notation is much more human. Making a table with tbl or a simple graph with grap is a pleasure. Equations written for eqn can be read back from the source, without seeing millions of \\\.This is, I would say, what totally grabbed me. And the documentation as written by Kernighan is also awesome --- short, answers many potential questions right away, explains things clearly. This is why I also like plan 9, generally (though almost whatever I try doesn't work). TeX is very 'strict', precise; but you must have a good knowledge of it to talk it into something. Troff is more straightforward, simpler, and is more fun, some things are playful, e.g. traps. Thanks Ruda