From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,d69cd448deeffbac,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1995-03-27 13:52:07 PST Path: nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!Germany.EU.net!howland.reston.ans.net!pipex!sunic!sunic.sunet.se!news.funet.fi!news.csc.fi!news.helsinki.fi!not-for-mail From: yxiao@umabnet.ab.umd.edu (Yan Xiao) Newsgroups: comp.os.linux.announce Subject: netlpr: A utility to print to Novel network Followup-To: comp.os.linux.setup Date: 27 Mar 1995 16:04:00 +0300 Organization: ? Sender: wirzeniu@cc.helsinki.fi Message-ID: <3l6d40$jjr@klaava.helsinki.fi> NNTP-Posting-Host: klaava.helsinki.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Keywords: lpr, printing, Novell, network I decided to release my own utility of rerouting lpd jobs to the local Novel network. Included is the shell script, which contains instructions. Yan Xiao, U. Md @ Balto. -----------Cut here --------- /usr/local/sbin/netlpr ----------- #!/bin/sh # netlpr (ver 0.2): A utility to print to Novel network # Yan Xiao # # Use at your own risk; no warranty whatsoever. # Postcard-ware. # # ##-(0)-####################### README #################################### # Yan Xiao , Mon Mar 20 10:15:03 1995 # Dept of Anesthesiology # 10 S. Pine St., Rm 534 # U. of Maryland at Baltimore, Maryland 21201 USA # # netlpr: to route lpd jobs on LINUX to the local Novel network's # printer. # # Requirement: # 1. DOSEMU 0.53pl49 # (obtained from tsx-11.mit.edu: # /pub/linux/ALPHA/dosemu/Development/pre0.53_49.tgz # 2. LINUX kernel 1.2 # 3. root access to the linux system # 4. root access to the Novel server. # 5. The console is in X-window when the printing request is made. # 6. Novel server captures all printing jobs # # Instruction: # 1. Have DOSEMU running # 2. Test Novel server access (refer to step (4) below for hints); # do a manual printing test: copy prn /b. # 3. Setup an account on the Novel, called it "UNIXPRINT" # See step (8) and (5) below. This account must NOT have # any menu prompt, and it should ONLY do the following # things in a row: login, run a batch file, and then logout. # 4. Follow the 8-steps below. # # # ##-(1)-######################## /etc/printcap ############################# # # Automatic detection # # Choose appropricated filter as indicated by APSfilter # lp|LaserJet:\ # :lp=/dev/null:\ # :sd=/usr/spool/lpd:\ # :lf=/usr/spool/lpd/log:\ # :af=/usr/spool/lpd/acct:\ # :if=/usr/lib/apsfilter/filter/aps-ljet3-letter-auto-1:\ # :mx#0:\ # :sh: \ # :sf: # # # # The following is the printer connected to the local Novel. # # Note all the data conversion has been done (ie for LaserJet # # printer, the data is in PCL; for PostScript printer, the data # # is in PS.) # remote|dos-lp:\ # :lp=/dev/null:\ # :sd=/usr/spool/lpd/doslpd:\ # :lf=/usr/spool/lpd/doslpd/log:\ # :af=/usr/spool/lpd/doslpd/acct:\ # :if=/usr/local/sbin/netlpr:\ # :mx#0:\ # :sh: \ # :sf: # ##-(2)-################ Modification to APSfilter ########################## # #Entry modified in /usr/lib/apsfilter/filter/aps-ljet3-letter-auto-1 # # (Towards the end; modification labled with <===== MODIFICATION # #...........................A B B R E V I A T E D...................... # # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / # # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / # # M A I N ( ) # # / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / # # # # Here we choose between the general print method # # file type auto-recognition or force ascii_printing # # # # # modification: pipe it to remote printer # ( # <===== MODIFICATION # case $METHOD in # ..........................A B B R E V I A T E D....................... # esac # ) | lpr -Premote # <===== MODIFICATION # ..........................A B B R E V I A T E D....................... # # ##-(3)-#################### /etc/dosemu.users ############################### # lp # bin # ##-(4)-#################### /var/spool/lpd/dosstart ######################### # pdipx # netx /ps=anesthlab # J:login ANESTHLAB/unixprint < e:\netpass.pas # ##-(5)-#################### /var/spool/lpd/netpass.pas####################### # # ##-(6)-################### C:\CONFIG.SYS in DOSEMU ########################## # rem this sets up the redirector to look at the Linux root directory. # rem this is probably not a good idea once you have dosemu installed # device=c:\emufs.sys / # device=c:\ems.sys # files=20 # LASTDRIVE=I # ##-(7)-################### C:\AUTOEXEC.BAT in DOSEMU ######################## # @echo off # echo "Welcome to dosemu 0.53pl49!" # path c:\;d:\dos\dos;d:\dos\sys;c:\automenu # set temp=c:\ # prompt $p$g # lredir e: linux\fs\${home} # e:\dosstart # ########################################################################## # ##-(8)-############# Startup batch file for Print Account on Novel ######### # call e:doprint.bat # logout # c:exitemu # ########################################################################## umask 0000 HOME=/var/spool/lpd PATH=/bin:/usr/bin:/usr/sbin:/sbin dormlen=30 export HOME batchfile=/var/spool/lpd/doprint.bat FILE=$$.lj cat - > $HOME/$FILE # exit ###################################################################### # First wait for the previous jobs to clear, but it opens for deadloop while [ -f $batchfile ] do sleep $dormlen done echo "copy e:$FILE prn /b " > $batchfile echo "del e:$FILE " >> $batchfile /usr/X11/bin/rxvt -display unix:0 -ic -T DOS -n Printer -e /usr/bin/dos mv $batchfile /tmp/oldbatch.$$ ---------------Cut here------------------------- -- Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember Keywords: and a short description of the software.