CUPS to work with a script as the printer device

James Chase james at mandala-designs.com
Mon Mar 23 13:51:26 PDT 2009


I want to allow a user who is logging into our CentOS 5.2 machine via SSH across the internet to print on his local machine. My first thought would be that it is easier to setup CUPS on his machine and just share the printer across the internet BUT he is running RH3 and I don't believe he is using CUPS nor would this person probably want to install and set it up.

I found an old linuxjournal article (http://www.linuxjournal.com/article/5462) that uses a python script as the local printer which in turn starts a server for a remote client, connected through ssh, to download the job queue and print on their local machine. It seems like this would be the easiest (although a bit hacky) way to accomplish things however I cannot figure out how to setup CUPS to use a python script as a server. I tried 'lpadmin -p printer -E -i /path/to/script.ph -v /dev/nul' as well as 'lpadmin -p printer -E -v paralell:/path/to/script' just to see if it would even send information to the python script but it didn't seem to work.

Does anyone know a way to setup a printer like this? The suggest /etc/printcap file from the linuxjournal article was this:

# Remote Printer for Rory
rory
        :lp=|/usr/local/scripts/rlserver 8888
        :sd=/var/spool/lpd/rory
        :lf=/var/spool/lpd/rory/log
        :mx#0
        :sh

Any help would be greatly appreciated, or if it's not possible that would be good to know too. I don't have much (any) printer expertise so be kind, if possible.

Thanks,
James




More information about the cups mailing list