[cups.general] How to redirect the ps output from CUPS?

Jerome Alet alet at librelogiciel.com
Wed Apr 13 11:06:24 PDT 2005


On Wed, Apr 13, 2005 at 01:59:59PM -0400, rende at cs.orst.edu wrote:
> This is my problem: I have a printer on the campus network and 
> want to print to it from my laptop (running OS X). All servers on 
> campus network accept no connection other than ssh. So the only way 
> I can print now is to generate a PS file, then "ssh xxx.xxx.xxx lp < 
> xx.ps". 
> So I am thinking if there is any quick and dirty way to set up a 
> printer in CUPS so that the generated PS file is sent to a script so 
> that the print would work like a normal printer. 
> As I said, I just want a quick and dirty approach to make it work, 
> not to want to spend too much time writing a backend or something :P 
> Any suggestions will be appreciated!

Download Tea4CUPS from :

Install this software.

Now in tea4cups.conf, put the following lines :

--- CUT ---
tee_ssh : /bin/cat $TEADATAFILE | /usr/bin/ssh $TEAUSERNAME at xx.xx.xx.xx lp
--- CUT ---

Now from CUPS web interface ensure that 'yourqueuename' is managed
by Tea4CUPS.

And I think that's all you have to do.

NB : Of course you have to ensure that the user the command will
be run as (root by default) can connect as the user who prints
locally on the remote SSH server. If this is not the case, just
modify the command (you can even use 'su' there if needed) to
better fit your own configuration.


Jerome Alet

More information about the cups mailing list