ronniek@cs.tamu.edu (Ronnie Killough) (03/24/90)
Oh, boy. What a BRILLIANT piece of work by those lame-brained NeXT folks. Why, why, why, why, why, why, why, why, why force someone to have a default printer when they don't want one? My problem is this. I recently changed the name of a NeXT printer. From experience I knew (thought I knew) that the oh so wonderful NeXT machine HAD to have a printer named Local_Printer or it, or one of the applications would (like the PrinterTester or PrintManager, I don't know) would edit the hated NetInfo printcap database and ADD a printer named Local_Printer. Also, in order to be able to print with lpr <filename> (without specifying -P<printername>, it had to be Local_Printer). So, I named the printer Local_Printer, only to find out that some people still could not print to the printer using just lpr <filename>. In one case, for example, it insisted on using a non-existant printer named netnp. Where it got this, I don't know. So, recently I changed the name of another NeXT printer in another network, and called it Local_Printer with alias next521. Previously, it was called Local_Printer with alias x521. I loaded this into (yes, the hated) NetInfo database, so that NO WHERE (I thought) was there a record of the name x521. When I tried to print using lpr <filename>, it says, No printer x521. That almost got that NeXT tossed in the trash (oh, glory day). Out of curiousity, I grepped the .NeXT/.NeXTdefaults.L file or whatever it is called in my home directory, and sure enough, the name x521 appears. I opened Preferences, nope, no printer setting there. So, I opened WriteNow, selected the Print menu, Choose, and clicked the new printer name. Quit WriteNow, did lpr <filename>, and sure enough, it print. This is absurd. I can see saving the default printer for each application, but forcing this to be the default everywhere is absurd. If that is to be a feature, it should be in Preferences. I am fed up with trying to figure out thousands of these type problems that seem to crawl out of the cube constantly. You guessed. My worst enemy...NetInfo. Question - does anyone know how to prevent the NeXT from doing this? Does the NeXT really have to have a printer named Local_Printer? How does the NetInfo printcap file get modified periodically when I am the only one with the root password? Any ideas? Thanks for listening to my crap. Ronnie Killough
mdixon@parc.xerox.com (Mike Dixon) (03/24/90)
there's no requirement to have a printer named Local_Printer (i don't have one, and netinfo never gives me grief about it). there's a global default printer, and (like all other defaults) it's stored in the preferences database (under keys System/Printer). to set the default printer from a shell, say dwrite System Printer <printername> to see what your default printer is, say dread System Printer if you say lpr <filename>, that's the printer it will go to. if you have no System/Printer entry in the preferences database, it uses Local_Printer. the Preferences application probably ought to give you a hook into this; i guess the rational is that you don't want to set the printer unless you're printing something, if you're printing it through appkit you get a button, and if you're mucking with lpr you're probably the sort who would rather use dwrite than Preferences. -- .mike.