11.07.2015 Views

Download issue 8 - Total Amiga Magazine

Download issue 8 - Total Amiga Magazine

Download issue 8 - Total Amiga Magazine

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TUTORIALTUTORIALWell I lied a little in my last comment,but the only thing left to do is todecide how you’re going to run SPS.If you have a printer directly connectedto your <strong>Amiga</strong> you may onlywant to run SPS occasionally, in thatcase you could either run it from ashell or create a script with an iconusing IconX. If you need help doingthis take a look at the tutorial onpage 41 of Clubbed <strong>issue</strong> 7 but usejust use the command “run rxsps.rexx” as only line in the script. Ifyou’d like SPS to run every time youput your TCP/IP stack goes on-lineyou could add it to the On-line Eventin your TCP/IP stack. If you installedSamba following theamigasamba.org tutorial then you willalready have a script running fromthe On-line event, you can add a lineto run SPS to the end of this script:run >NIL: rx sps.rexxRemember that before you try to printanything you must choose the correctprinter driver, unfortunately I don’tknow of any way to automate thisprocess, so you’ll need to do itmanually.If your <strong>Amiga</strong> has its TCP/IP stackrunning and connected to the networkat all times then you may wantto have SPS running all the time. Todo this you can run SPS in your userstartup,as it is an AREXX programyou must ensure that RexxMast isrun first. In this case you can saveyour printer settings for the remoteprinter permanently.LimitationsPrinting from the <strong>Amiga</strong> to the PCworks very well and unlike the otherway round you can print severaldocuments one after the other withoutcausing a problem, the PC willjust queue them up to print. The onlyproblem I had was when printingfrom Final Writer, I got a page with afew garbage characters printedbetween each good page. As thisdoesn’t happen with any other applicationI am tempted to think it issome problem with Final Writer andthe Turbo Print driver for the CanonBJC 240 I used, maybe I didn’t haveit correctly configured. I haven’t hadthe chance to try the printer connecteddirectly so it may not beSamba related at all.Printing from the PCto the <strong>Amiga</strong>Creating a Printer Shareon the <strong>Amiga</strong>Before we can configure Samba onthe <strong>Amiga</strong> to share a printer we needto prepare two script files, one whichwill copy the spool file received fromthe remote computer to the printerport of our choice and another thatwill return print queue information if itis requested. Two <strong>Amiga</strong>DOS scriptswritten by Gian Maria Calzolari whichdo these jobs are available onAminet in the archivecomm/net/LPx.lha. If you downloadthis and de-crunch it you will find thescripts, one called LPR and the otherLPQ. Copy these into your Samba:directory (if you don’t have a Samba:assign pointing to your Samba directorynow would be a good time to addone to your user-startup) and thenedit the LPR script as follows tomatch your system (the LPQ scriptdoes not need editing):LPRChange line 35 and 36 to point to thedirectory where you wish to keepyour Spool files, if you wish to usethe default from the scripts leavethese lines unedited and create adrawer called Spools inside yourSamba: directory. Be aware thatSpool file can be very large, especiallyif you intend to do high resolutionphoto printing across the network,so make sure there’s plenty ofspace on the partition holding thespool files. If your printer is attachedto any port other than the built-inparallel port you will need aDOSDriver so that port can beaccessed as a DOS device, some I/Ocards such as the Multiface comewith such a DOSDriver, if yours doesnot then you can use porthandler.lhaby the prolific Stephan Rupprecht(Aminet, util/sys) which has a newSettings forthe newshare inSWAT.Create anew printshareusingSWAT.You may now be asked some morequestions which are specific to thedrivers you are installing, runthrough this installation until it issuccessfully completed. Some installationsmay give error mesl:port-handlerand exampleDOSDrivers for Hypercom andIOBlix I/O cards. When theDOSDriver is set up edit line 35 ofthe LPR file so the spool file iscopied to the correct port. For examplethe DOSDriver for the parallelport on my Hypercom ZIII is calledHCPAR00: so my line 35 reads:Copy >>T:LPR.logSamba:Spools/{PName}/{SFile}HCPAR00:When you’re done save the LPRfile.Adding the new printer to SambaAs you will have seen if youfollowed the amigasamba.org tutorialthere are two ways to configureSamba, you can either edit theSamba:lib/smb.cfg file manually oruse SWAT (Samba WebAdministration Tool) where you canset up Samba using your favouriteweb browser. Here we’ll use SWATas it is more friendly than editing atext file so fire up your favourite webbrowser and go to the following URL“http://localhost:901”. After a fewseconds a web page should appearwith a Samba logo at the top, this isSWAT. Click on the Printers icon atthe top and the printers page shouldopen. We’re going to add a newprinter so type the share name youwant to give the printer (I usedHPDJ1120) into the text box at thebottom of the page and click “CreatePrinter”. The options for the newprinter appear, we need to accesssome of the Advanced settings soclick on the “Advanced View”button.Now fill in the web form as follows:comment A description of theprinter, I used “HP Deskjet 1120C”path This is the path to your spooldirectory, it must be the same asthe one you specified in the LPRfile, the default is“/Samba/Spools/%s”. Note that thispath must be in Unix notation, thefirst name after the leading “/” is the<strong>Amiga</strong>DOS device name, in thiscase “Samba:”.guest account Set this to thename of the guest account youcreated during installation, if youfollowed the amigasamba.org tutorialthis should be “pcguest”.guest OK Unless you want onlynamed users to be able to print toyour printer set this to Yes.print command“/Samba/LPR %s %p”lpq command“/Samba/LPQ %p”The above two commands assumeyou have installed the LPR andLPQ scripts in the Samba: draweras I described above, if you’re interested%s is replaced by thename of the spool file and %p isreplaced by the name of the printer.printer driver Blank this textbox or enter the name of theWindows printer driver (you won’tknow this until you have installedthe printer driver under windows,when you have it is on the “Details”tab of the printer’s propertieswindow), do not leave this set toNULL which is the default as Ifound this will stopped printingworking from my Windows machine(most frustrating!).All the other fields can be left attheir default values so you can nowclick the “Commit Changes” buttonat the top of the page to save thesettings.We now need to make a directoryinside the Spools directory wespecified to hold the spool files forthis printer, this needs to be namedexactly the same as the sharename, for example I created adirectory called HPDJ1120 in mySamba:Spools directory.With that done our printer share isnow ready for testing, the next thingwe need to do is to let Windowsknow it exists, over to the PC.Connecting to a sharedprinter from WindowsOpen the “Network Neighbourhood”icon on the Windows desktop thenfind the icon for representing thecomputer with the printer attached(in my case the <strong>Amiga</strong>3000 icon)and double click it. A new windowshould open containing icons forany shares you have created plus,hopefully, an icon for your sharedprinter.Right click on the printer icon andchoose “Install...” from the pop-upmenu. Window’s “Add Printer”wizard will now appear to guide youthough the process of installing theprinter. On the first page selectwhether you would like to be ableto print from old MSDOS applications(I believe this will mapthe network printer to a “hardware”port such as LPT1) and click“Next”. On the next page you needto select a driver, either choose oneof the drivers provided withWindows from the list or click “HaveDisk...” if you have an install disk orhave downloaded a driver from themanufacturer. If you choose “HaveDisk” use the “Browse...” button inthe “Install from Disk” dialogue boxto locate the install file which will becalled “something.inf”, for my HPDeskjet 1120C it was called“DJ1120C.inf”.NOTE: If your printer driver is onCD-ROM Windows may automaticallytry to run the installation againwhen you insert the CD, be sure tocancel this installation and continuewith the one we started above.Now the you may be prompted tochoose the appropriate driver, doso and click Next. On the next pageenter a name for the printer (thiswill be the name used in Windowsprint dialogue boxes, not the sharename) and indicate whether youwant this to be the default Windowsprinter. Finally click Finish.sages because they expect the printerto be directly connected, you cansafely ignore these errors.To check the installation has beensuccessful open the Printers window(by choosingStart/Settings/Printers), right clickon the new printer icon and choose“Properties...” from the pop-upmenu. In the Properties windowchoose the “Details” tab, you shouldsee the name of the computer andprinter share in the “Print to thefollowing port:” text box (I see\\<strong>Amiga</strong>3000\HPDJ1120). If this iscorrect choose the General tab,make sure the remote printer is online,then click the “Print Test Page”button. In a few seconds the pageshould start to print on the remoteprinter.LimitationsWhile this set up works very wellthere are a couple of limitations youshould be aware of. The first is thatyou can only print one document ata time to the <strong>Amiga</strong> printer, if you tryto print another before the first hasfinished you will get an errormessage on the PC and the printerwill be put into “Work Off-line” mode.If this happens just wait for the firstprint to finish and then right click onthe printer in theStart/Settings/Printers window andun-check the “Work Off-line” optionin the pop-up menu. One otherproblem you may encounter is thatspool files will get left behind in yourSpools directory on the <strong>Amiga</strong> ifeither machine crashes during aprint, you can just delete these filesbut be aware that they may occurand can be very large.ConclusionI hope this tutorial will prove useful,as I said at the beginning Samba’sprinting system isn’t really at allcomplex but there are so many settingsthat getting everything set justright does take a bit of doing. Butdespite, or maybe because of, thiscomplexity I got real buzz when myfirst network print worked (thenagain perhaps that’s just me)anyway good luck and may theSWAT be with you!38 CLUBBED - Issue 8Summer 200139

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!