On Thu, 2004-03-04 at 10:53, Dana Baron wrote:
> Thanks for the idea. Looks promising but we're on a Unix server.
> Is there a way to refer to the local printers across operating
> systems? My SETPTR documentation refers to mode 2 and the DEVICE
> setting as sending output to the Unix special file. Can the shared
> printer be defined as a unix special file without setting up a
> network print queue?

depending on the unix system you're using you can setup a queue in the
spooler system that runs a script.  we do this on AIX and Linux
currently, but i've done it in the dim and distant past on HPUX.  things
are probably harder in uv than ud since ud just uses the underlying
spooler and doesn't get in the way as much.

the script can lookup the IP address/hostname of the user submitting the
job, and route the request to a share on that device using smbprint (got
to install samba on your server, but if you haven't done that go do it
now - samba rules!).  i add a queue for each user since our share names
are all different, but if you setup the same share on every pc you
should be able to use one queue.

e.g. for AIX (this uses a static hostname/sharename mapping, but you get
the idea):

sunset /etc> cat /etc/qconfig
[snip]
lp46:
   device = p46
   up = TRUE
   discipline = sjn
p46:
   backend = /usr/local/bin/winprint sprucetree EPSON850
lp47:
   device = p47
   up = TRUE
   discipline = sjn
p47:
   backend = /usr/local/bin/winprint balsam hp


sunset /etc> cat /usr/local/bin/winprint
#!/bin/sh

# This is a modification of the samba provided smbprint script
# changed to work under AIX as the backend for a queue. It does
# not read a config file.
#
# Variables below define the server and service. They are
# the content of the .config file when printing from
# /etc/printcap.
#
server=$1
service=$2
user="ntguestuser"
password="*******"
#
# Debugging log file, change to /dev/null if you like.
#
logfile=/tmp/${USER}-print.log
#logfile=/dev/null
#
# Some debugging help, change the >> to > if you want to save space.
#
echo "server $server, service $service" >> $logfile

shift; shift
(
        echo translate
        echo "print -"
        echo 'k2S0Tl8D'
        cat $*
        echo 
) | /usr/local/samba/bin/smbclient "\\\\$server\\$service" $password \
        -U "$user" -N -P  >> $logfile


hth,
ian

-- 
Ian McGowan <[EMAIL PROTECTED]>

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to