How to print to a print server from SCO Unix 507

Posted on 2007-10-13
Last Modified: 2013-12-05
I'm running SCO OSR 5.0.7 and my server IP is , I want to setup a printer using a print server module Dlink DP-301P+, I setup the print server to be IP
How can I create a printer on the SCO unix that prints to that IP address ?
Question by:henry007
    LVL 40

    Accepted Solution


    Author Comment

    It gave the idea and I fine tune it using netcat so it prints on a epson by copying the model epson to /usr/spool/lp/admins/lp/interfaces/model.orig (I use the name of the printer instead of "epson")  from the /usr/spool/lp/model   then I just created the /etc/host entry as rmain and added the printer using a /dev/null and then this has to be at /usr/spool/lp/model

    Author Comment

    here's the script  that I was talking about in the previous comment :

    #      @(#) hpnp.model 62.2 97/03/03
    # $Header: hpnp.model,v 1.9 91/11/14 10:44:35 pma Exp $
    #      Copyright (C) 1991-1997 The Santa Cruz Operation, Inc.
    #            All Rights Reserved.
    #      The information in this file is provided for the exclusive use of
    #      the licensees of The Santa Cruz Operation, Inc.  Such users have the
    #      right to use, modify, and incorporate this code into other products
    #      for purposes authorized by the license agreement provided they include
    #      this notice and the associated copyright notice with any such product.
    #      The information in this file is provided "AS IS" without warranty.
    # (c)Copyright Hewlett-Packard Company 1991.  All Rights Reserved.
    # (c)Copyright 1983 Regents of the University of California
    # (c)Copyright 1988, 1989 by Carnegie Mellon University
    #                          RESTRICTED RIGHTS LEGEND
    # Use, duplication, or disclosure by the U.S. Government is subject to
    # restrictions as set forth in sub-paragraph (c)(1)(ii) of the Rights in
    # Technical Data and Computer Software clause in DFARS 252.227-7013.
    #                          Hewlett-Packard Company
    #                          3000 Hanover Street
    #                          Palo Alto, CA 94304 U.S.A.
    # HP-UX Network Peripheral Model Script
    # This script invokes the original model script
    # from the subdirectory model.orig and pipes its
    # output to hpnpf.
    # Hpnpf does not exit on signal 15.  Thus, the
    # original model script can catch the signal,
    # echo a string and exit.  Hpnpf will exit when
    # its standard input is closed.

    MODEL=`basename $0`
    REALMODEL=`echo $0 | sed -e "s%$MODEL%model.orig/$MODEL%"`

    # This name may be initialized when the script is
    # installed in the spooler.  If not, use the name
    # of this script ($MODEL) as the peripheral to contact.
    if [ "$PERIPH" = "" ]

    echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG

    # Remove the log file if job is cancelled
    # or the scheduler is shutdown.
    trap "rm -f $LOG $LPLOG; trap 15;kill -15 0;exit 0" 15

    while :
        # Save the stderr messages in a temporary log file
        # and discard stdout which is the peripheral output.
        rm -f $LOG
        if $REALMODEL "$@" | $HPNPF -h $YOUR_PRINTER_OR_IP -p $PORT  2> $LOG > /dev/null
          # If the transfer is successful, remove
          # the log file and exit.
          rm -f $LOG $LPLOG
          exit 0
          # Added the request ID to the stderr message
          # and store it in the lp log file.
          # Only record the first $LOGTRIES errors.  If
          # the spooler gets in a loop retrying a job, the
          # disk won't fill up with spooler log error messages.
          if test -s $LOG -a $ERRORLOGS -lt $LOGTRIES
              echo "$1\t`cat $LOG`" >> $LPLOG
              ERRORLOGS=`expr $ERRORLOGS + 1`
          if test $ERRORLOGS -eq $LOGTRIES
              echo "$1\t$LOGTRIES errors logged for $1; errors no longer logged" >> $LPLOG
              ERRORLOGS=`expr $ERRORLOGS + 1`
        if [ ! -s $LPLOG ]
          rm -f $LPLOG
        sleep 10

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now