9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] For first ONLY a laser printer in this resource meaning
@ 2012-03-13 18:14 V-CA ! Christoph Paschke
  2012-03-13 18:18 ` Lyndon Nerenberg
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: V-CA ! Christoph Paschke @ 2012-03-13 18:14 UTC (permalink / raw)
  To: 9fans

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

@Nemo

Ok, I just want start with a very easy constellation:

1.) I installed octopus on top of my MacMini (newest version) at my televison in living room, he running also Mac-Server
2.) I got the terminal started at an older MacBook
3.) I have a HP Envy 100 WLAN Inkjet printer / Scanner integrated in WLAN, working at all my Macs
4.) Now I want to write a limbo program to print a page at that printer

As I understand you, I cannot nativly run it by the P9 idea of device = file ... because the HP printer itself has no firmware to support such file based streaming, right?

Therefore I need root through to mac a Mac sytem call to can adress the printer.

As I understand, this is NOT the idea of a good Plan 9 / Limbo program? In my understanding: If I now write a small program that prints out for example a list of addresses, I need communicate with my printer in a streaming way and not by system calls, right?

If I'm wrong, could you explain me, how I get my printer working.

And, if it is to difficult with this HP printer and the system only can support old Epson ESC/P code for needle printer, just exlain me how I get that ESC/P printer working in the "Plan 9 ressource way"?

For me it is most important that I can realize what is promised from that operting system according "all resources, also devices are a file" and that this idea is more than a theory!

You understand what I ask?

- Chris

[-- Attachment #2.1: Type: text/html, Size: 1848 bytes --]

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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 18:14 [9fans] For first ONLY a laser printer in this resource meaning V-CA ! Christoph Paschke
@ 2012-03-13 18:18 ` Lyndon Nerenberg
  2012-03-13 18:55 ` Nemo
  2012-03-13 19:56 ` John Floren
  2 siblings, 0 replies; 8+ messages in thread
From: Lyndon Nerenberg @ 2012-03-13 18:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 2012-03-13, at 11:14 AM, V-CA ! Christoph Paschke wrote:

> For me it is most important that I can realize what is promised from that operting system according "all resources, also devices are a file" and that this idea is more than a theory!

This only applies if you're running native Plan 9.


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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 18:14 [9fans] For first ONLY a laser printer in this resource meaning V-CA ! Christoph Paschke
  2012-03-13 18:18 ` Lyndon Nerenberg
@ 2012-03-13 18:55 ` Nemo
  2012-03-13 19:00   ` Lyndon Nerenberg
  2012-03-13 19:56 ` John Floren
  2 siblings, 1 reply; 8+ messages in thread
From: Nemo @ 2012-03-13 18:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think in the octopus we have a print device that used the underlying default printer.
It should be in /mnt/print or /mnt/terms/yourmachinename/print

Take a look to the start scripts to see if print is starting or printing some diagnostics.

So, cp afile.pdf /mnt/print
should print it there.

Ah, if you don't see
/mnt/print/ndb

then you don't have a printer running and mounted at /mnt/print.


What Lyndon said is also true, btw. I'm not saying it's not.
Only that you can also wrap non-native devices with little
file servers, as in this case.





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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 18:55 ` Nemo
@ 2012-03-13 19:00   ` Lyndon Nerenberg
  2012-03-13 19:03     ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: Lyndon Nerenberg @ 2012-03-13 19:00 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 2012-03-13, at 11:55 AM, Nemo wrote:

> What Lyndon said is also true, btw. I'm not saying it's not.
> Only that you can also wrap non-native devices with little
> file servers, as in this case.

It's just very confusing knowing how P9 concepts apply in an emulated environment. It's frustrating even for those of us (okay, me) who have been tooling around with P9P (and the like) for years.  Every day a new surprise ... :-|


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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 19:00   ` Lyndon Nerenberg
@ 2012-03-13 19:03     ` erik quanstrom
  2012-03-13 19:07       ` Lyndon Nerenberg
  0 siblings, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2012-03-13 19:03 UTC (permalink / raw)
  To: 9fans

> It's just very confusing knowing how P9 concepts apply in an emulated environment. It's frustrating even for those of us (okay, me) who have been tooling around with P9P (and the like) for years.  Every day a new surprise ... :-|

p9p's raison is to get along with the local environment, rather than
importing plan 9 concepts that don't fit.  this naturally puts it somewhat
at odds with itself.

- erik



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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 19:03     ` erik quanstrom
@ 2012-03-13 19:07       ` Lyndon Nerenberg
  2012-03-13 19:10         ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: Lyndon Nerenberg @ 2012-03-13 19:07 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


On 2012-03-13, at 12:03 PM, erik quanstrom wrote:

> this naturally puts it somewhat
> at odds with itself.

Sadly, I think that's what turns people away from Plan 9: they only get to see a pale shadow of its worth :-(


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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 19:07       ` Lyndon Nerenberg
@ 2012-03-13 19:10         ` erik quanstrom
  0 siblings, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2012-03-13 19:10 UTC (permalink / raw)
  To: lyndon, 9fans

On Tue Mar 13 15:08:48 EDT 2012, lyndon@orthanc.ca wrote:
>
> On 2012-03-13, at 12:03 PM, erik quanstrom wrote:
>
> > this naturally puts it somewhat
> > at odds with itself.
>
> Sadly, I think that's what turns people away from Plan 9: they only get to see a pale shadow of its worth :-(

its a plan 9 wraith.

- erik



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

* Re: [9fans] For first ONLY a laser printer in this resource meaning
  2012-03-13 18:14 [9fans] For first ONLY a laser printer in this resource meaning V-CA ! Christoph Paschke
  2012-03-13 18:18 ` Lyndon Nerenberg
  2012-03-13 18:55 ` Nemo
@ 2012-03-13 19:56 ` John Floren
  2 siblings, 0 replies; 8+ messages in thread
From: John Floren @ 2012-03-13 19:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Tue, Mar 13, 2012 at 11:14 AM, V-CA ! Christoph Paschke
<c.paschke@me.com> wrote:
> @Nemo
>
> Ok, I just want start with a very easy constellation:
>
> 1.) I installed octopus on top of my MacMini (newest version) at my
> televison in living room, he running also Mac-Server
> 2.) I got the terminal started at an older MacBook
> 3.) I have a HP Envy 100 WLAN Inkjet printer / Scanner integrated in WLAN,
> working at all my Macs
> 4.) Now I want to write a limbo program to print a page at that printer
>
> As I understand you, I cannot nativly run it by the P9 idea of device = file
> ... because the HP printer itself has no firmware to support such file based
> streaming, right?
>
> Therefore I need root through to mac a Mac sytem call to can adress the
> printer.
>
> As I understand, this is NOT the idea of a good Plan 9 / Limbo program? In
> my understanding: If I now write a small program that prints out for example
> a list of addresses, I need communicate with my printer in a streaming way
> and not by system calls, right?
>
> If I'm wrong, could you explain me, how I get my printer working.
>
> And, if it is to difficult with this HP printer and the system only can
> support old Epson ESC/P code for needle printer, just exlain me how I get
> that ESC/P printer working in the "Plan 9 ressource way"?
>
> For me it is most important that I can realize what is promised from that
> operting system according "all resources, also devices are a file"
> and that this idea is more than a theory!
>
> You understand what I ask?
>
> - Chris

So, here's what we did when we wanted to make Android
hardware/services accessible to Inferno--and this should work for you
too.

All of your Macs can print to the printer, presumably by using a
command something like "lp -d<printername> <filenames>". That's nice,
because you now have a reasonably simple abstracted interface to the
printer, which allows you to submit print jobs, check the queue, etc.

Now, write a device in Inferno which presents files like /dev/print or
whatever you want to call them, and executes commands on the Mac side
to actually do the work. Thus, if you write a file into /dev/print,
your driver should do something like run "lp" and feed it the file on
standard input.

You can take a look at
https://bitbucket.org/floren/inferno/src/75008e7031e1/emu/Android/devwifi.c,
specifically the wifiinit function, to see one crude example. The idea
there was to initialize Android's wifi device when the Inferno devwifi
device is initialized. Another example of translating actions in
Inferno into actions on the host system is
https://bitbucket.org/floren/inferno/src/75008e7031e1/emu/Android/devphone.c,
where we took commands written to the device files and translated them
into appropriate RIL (Android's radio daemon) commands to send out
over a socket on the Android side.

Once you figure out how the devices work in Inferno, it should be
pretty easy to write code that will link your file operations in
Inferno to the printing framework on the Macs.


John



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

end of thread, other threads:[~2012-03-13 19:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13 18:14 [9fans] For first ONLY a laser printer in this resource meaning V-CA ! Christoph Paschke
2012-03-13 18:18 ` Lyndon Nerenberg
2012-03-13 18:55 ` Nemo
2012-03-13 19:00   ` Lyndon Nerenberg
2012-03-13 19:03     ` erik quanstrom
2012-03-13 19:07       ` Lyndon Nerenberg
2012-03-13 19:10         ` erik quanstrom
2012-03-13 19:56 ` John Floren

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