Showing posts with label CUPS. Show all posts
Showing posts with label CUPS. Show all posts

Wednesday, December 11, 2013

Climbing Glass Walls

You may have heard that the Apple Mac is supposed to "just work" without a lot of muss and fuss. Largely, this is true. When you need to do something on a Mac, all the commands are straightforward and clear.

Yet, beneath that beautiful face that Apple shows to the world is a beast. It's like you learn that the cute blonde cheerleader is also a vampire hunter.

And not lame pursuer of sparkly metrosexual vampires. A hard-core sort who'll drink Professor Van Helsing under the table then go on to stake the most powerful vampire on the continent.

My latest brush with the beast in cheerleader clothing happened this evening when I went to print a draft of "Gallows Pole" a story in my upcoming anthology Grimm Futures. I didn't want to print using my Ink Jet printer, and I had a Laser Printer I wanted to use.

So, I queued up the print job and nothing happened.

I kicked the printer and it was happy and healthy. The Wireless Print Server less so. Somehow its DHCP settings got bolluxed up so I couldn't set it on my network. This unit has been a pain since I bought it years ago. I tried a factory reset and couldn't get it to talk to my Mac, my work PC, or an ancient XP laptop.

He's dead, Jim.

So, I went googling for a solution. My first stop was a USB to Parallel port cable. It might work, but Apple warned of compatibility issues preferring I use a network printer. I googled network adapters that had a parallel port and I saw my solution on the web for sale at $230. But, hey, I recognize that device in the printer, someone gave me one a few years back and it's sitting in my junk box.

Then I went about finding the darn thing's power supply. It took some looking.

I got everything hooked up and managed to ping the print server.

Then came configuring the thing. When you print on the Apple, you use something the Unix boys put together years back called CUPS. It's a very powerful printer management tool. And Apple doesn't want you to see it, so they hide it in the attack like an autistic savant who embarrasses the family. But I have the knack.

I goto CUPS and it tells me that Apple has shackled, and where the key to the handcuffs are. So, I unlock the CUPS Web Interface. Ah, yes, I remember you old friend from configuring my Linux boxes a decade ago.

Five minutes later, I've created a new print queue, and moved the print job I'd started four hours earlier. And the print job comes out. Huzzah.

The lesson is that all that hard Unix stuff lies beneath the OSX surface. Apple does a good job of hiding all the really powerful--and dangerous--functionality. But every once in a while, particularly when configuring a 20 year old printer with a 15 year old print spooler, that Unix stuff is invaluable.

Thursday, January 3, 2013

My 2013 Mac

You must remember I'm as old as dirt. And I've forgotten more about computers than young whipper snappers like you will ever know... he said shaking his cane. The Macintosh computer was invented by Apple so that geezers like me can quietly pass into senility without any need of any of that useless information we've got rattling around our noggins.

The thing about a Mac is that it has a learning curve that is nice and gently sloped upwards until it terminates in a sheer ice cliff. You want to go further than that? Get your crampons and climbing gear. Beneath the friendly, happy bunny face of Mac OS X "Mountain Lion" is a snarling, feral Unix kernel and all its attendant terrors for the uninitiated.

When you buy a new MacBook Air like I did after Christmas, it has this wonderful Migration Assistant that I cannot praise highly enough. It is as smooth as silk and everything you'd ever want when migrating all your stuff from one machine to another. You just hook the two machines together, answer some prompts and wait for all the files to go over from old to new. Walla!

When I went to check how things did, the results were impressive. I couldn't find anything that hadn't been successfully migrated. Bravo Apple. I went on thinking the migration had been flawless until just a little while ago when I went to print something.

It didn't migrate my printers. OK, I can click thru dialogs and redo the printer setup. The two HP inkjet printers that I'd bought in this century were happily configured in mere moments and ready to go.

But then came my HP LaserJet 4. It dates back to when I rebuilt Unix kernels for a living. And it's hooked up to a wireless print spooler that's somewhat less than user-friendly. Set it up perfectly, and all is perfect. Do otherwise, and you are in deep kim chee.

I hadn't sold my old Mac, so I expected to just copy by hand the settings from one bunch of dialogs on the old machine to the same dialogs on the new one. Simple, right?

Well, those printer setup dialogs show all the parameters except the ones you need when you're adding a printer via IP. You need the IP address of the print spooler. You know, the set of numbers you should write down on a sticker and put on the spooler, except you didn't. And you can't see the IP address on the old Mac's dialogs. Grrrr.

The answer was to get out the ice-climbing gear and start stabbing the problem with my ice-axe.
  1. First I went into terminal. 
  2. Then I went into google to find the right conf file in the CUPS subsystem. It wouldn't show me /etc/cups/printers.conf. 
  3. Then I remembered sudo cat /etc/cups/printers.conf | more

Joy of joys, the DeviceURI is lpd://192.168.1/101/L1

Back to my new machine, add IP printer address shown above, and the L1 queue.

That didn't work. Cycle power on printer. That didn't work. Ping 192.168.1.101. No response. That's a clue. Cycle power on spooler. Wait. Ping starts responding. Try to print again. Walla!

So, people say that Unix is not user-friendly. This is not true. It is just very selective about who its friends are.



Those more worthy than I: