On Mon, Jun 30, 2003, Gilad Ben-Yossef wrote about "Re: [OT?] Printing on X (was: Re: 
[Jog Offer] SGI is looking for a Xwindows hacker)":
> I understand what you're saying, but what does X has to do with it?
> 
> I mean, X isn't a desktop manager, it's a much lower kind of entity. It 

X is the communication mechanism between the different clients that
have in common the same display. The display is indeed what these clients
have in common, and what most of the X11 protocol deals with, but it
was never the only thing that the clients needed to share and communicate.
Clients always shared a pointer (mouse), a keyboard, a clipboard (the
ICCCM explains how that is done through "properties"), the "beep" sound,
and so on.

I claimed that another thing that all the clients need to share, regardless
of on what machine they are running, is a printer (as well as access to that
printer's configuration). Another thing they need to share is the ability
to produce more eleborate sounds, not just ordinary beeps. Since X-Windows
already has mechanisms for inter-client communication, there is no need
for new mechanism, just new policy. The ICCCM can say which properties need
to be read or written (or whatever) to query a printer or to send a print-job.
The Tcl/Tk "send" command (send(n)) is a good example on how this can work.

For the sound thing, I actually implemented such a protocol once (never
released it, just wrote it for my own fun). A "sound manager" client ran on
my local computer (which incidentally was the X-Windows server machine) and
waited for commands, which consisted of names of sound clips. When another
client sent such a command, it played that clip. I used it so that when
a job that I had been running on one of a dozen other computers, died,
I would hear the sound of a toilet flush :)

Without the "sound manager" I described, doing what I wanted was uglier.
How would each of the remote machines running one of my jobs know how
to play a sound on my machine? Well, it could take my DISPLAY, take the
host name out of it, and "rsh" to that machine a command like "play ...".
But this is very unportable: who said "rsh" would work in this direction?
How will the remote machine know where to take the sound files or the
"play" command? The solution I described was more flexible.

I chose the name "sound manager" here intentionally; Like a "window manager"
it is an client like all others, which takes on itself a certain job and
communicates with other clients on what to do. Both of these work because
the clients obey certain conventions - and the features of the core X protocol
just provide a mechanism for this communication.

> just a way to draw graphics on displays, in the most transpraent way 
> possible. It doesn't even bother with stuff like how windows look or 
> widgets etc etc. instead it leaves this to other protgrams. Why should 
> it be different fro printing?

It certainly shouldn't. This is why I said printing should have been added
to the ICCCM (the conventions manual), not as new protocol directives.

> Indeed, one can imagine printing handled in a very similar way to window 
> managment in X: an "X print manager" is an X programs that can, if it 
> happens to be there, "hijack" specific X windows of other apps that 
> happen to prive an applicable window hint of type "WM_PRINT" or some such.

Yeah, that's what I meant (maybe not in detail, but in spirit).

> choose to, also act as a Print manager. This is, I believe, the true X 
> way to do printing.

Right.

> The fact that people don't in fact use such a scheme, is evidence that 
> they don't knwo any better, not that X designers are wrong - X tries to 
> be simple and leave all the implmentation of other things to pther 
> programs, as it should be.

You could have said the same thing about the clipboard or window management -
X didn't have to specify any conventions on how these work, and any
application could do it differently. And obviously, they will then fail to
cooperate well and the result will be a huge mess. This is why the ICCCM
exists.

> Mind you, I have no idea if this can even be implemented with current X. 
> It sounds to me that you can, but I'm inventing this as I'm typing 
> here... it does sound an interesting concept, though? ;-)

Yes, once upon a time I was even thinking of writing such a thing myself.
But I much rather waste my time writing diatribes on this list ;)

-- 
Nadav Har'El                        |       Monday, Jun 30 2003, 30 Sivan 5763
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |A professor is one who talks in someone
http://nadav.harel.org.il           |else's sleep.

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to