Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add network printer manualy

Status
Not open for further replies.

gregor weertman

Programmer
Sep 29, 2000
195
NL
Hello,

How can I add a network printer (jetdirect) without
using the jetadmin tool

regards Gregor

Gregor.Weertman@lycos.com
 
Try "sam" - just type sam on the commandline
There just browse through the menu-structure
Printers and Plotters -> LP Spooler -> Printers and Plotters -> Menue Actions : Add Networkprinter

Greetings
 
# This way you can add printers in batch mode.
#

#!/usr/bin/sh
PATH=$PATH:/opt/hpnp/admin/

PERI=$1 ## Ip address
QUEU=$2 ## Que name
MODEL=$3 ## Printer model Like dumbplot_printer or net_lj5x
[ -z "$QUEU" ] && exit 1
[ -z "$PERI" ] && exit 2

lpstat -p$QUEU > /dev/null
[ $? -eq 0 ] && exit 3

export ECHO=echo
export HPNP=/opt/hpnp
export Header=:
export INTFDIR=/etc/lp/interface
export LOG=/dev/null
[ -z "$MODEL" ] && MODEL=dumbplot_printer
export MODEL
export PERIPHNAME=$1
export PERIPHTYPE="a b"
export PRINTERCFG=/opt/hpnp/admin/printers/9991.cfg
export SPOOLNAME=$2
export TMP=/opt/hpnp/tmp
export SPOOLNAME=$2
#now add the printer
addptrtoq "HP-UX"
exit 0

Gregor.Weertman@lycos.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top