Michael Loßin on Tue, 5 Mar 2002 09:39:44 +0100 (CET)(envelope-from owner-apsfilter-help@apsfilter.org)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: pass through printing


On 05-Mar-02 John Fabiani wrote:
> Hi,
> Does apsfilter support pass-through printing?  What I am attempting to 
> do is the following:
> 
> Allow a user to login via telnet.  The IP address is NOT static. 

You definitely don't want to use telnet. Get ssh instead.

>  Therefore I can not use standard remote print setup in the printcap. I 
> then want to run a script (aspfilter) that redirects the print job not 
> to a printer but to the user's terminal.  The simple script would go 
> something like this:
> 
> printf "\033[5i" && cat && printf "\033[4i"

Sounds kinda weird. Maybe you'd also want to have a look at
the RAW_PROLOGUE and RAW_EPILOGUE variables which seem to
work the way you expect (the printf stuff).

> The problem is that I can't figure out how to get the print job back to 
> the terminal. No matter what I do I get a permissions error when I 
> attempt to write to the terminal.  The reason of course is that the user 
> owns the tty - crw------- username tty 7,2 etc.....

I still don't know why you actually want to do that, but
"aps2file" is your salvation. Try "man aps2file" and see
if you can handle it.

> If I change it as root (chmod 777 tty) of course the filter will then 
> print to the tty.  However, when the user logs out and logins again the 
> permissions return to the normal crw-------.  

Which is perfectly normal, since your tty is not to be used
by everyone -- they could easily spy on you otherwise.


HTH
Michael