[H-GEN] Printer Jiggery Pokery

Anthony Towns aj at azure.humbug.org.au
Thu Oct 29 02:44:09 EST 1998


On Thu, Oct 29, 1998 at 05:04:47PM +1000, Michael Anthon wrote:
> I have a desire to do some strange things with printer devices.  What I
> would like to do is to set up a printer device that will pop up an X
> window somewhere (preferably on the X terminal sitting on my desk) and
> show whatever was printed (all nicely formatted of course).

You don't need to setup a device to do this -- just a filter that
runs gv or whatever. If you're using RedHat, the easiest way is probably
to setup a remote Samba printer and change the script /etc/printcap
refers to to one of your own creation that runs ghostview over the
incoming file. 

You probably want to be a little careful to ensure you run magicfilter
over the file first, so it is postscript, rather than a jpg or plain
text or whatever, which will probably require some fiddling.

You'll also want to be careful that X is running, and consider what 
to do if someone telnet'ed into your machine tries to print -- should
that distract you or fail silently, or do something else? I'm not
sure off hand if filter scripts run as the user or root, but I suspect
they can at least be made to run as the user.

FWIW, HTH, etc.

Cheers,
aj

-- 
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. PGP encrypted mail preferred.

``Like the ski resort of girls looking for husbands and husbands looking
  for girls, the situation is not as symmetrical as it might seem.''




More information about the General mailing list