Sunday, August 16, 2009

The joys of technology

Ever since high school, I've taken on the role of "technology guru". I've built and rebuilt PCs of all stripes, installed hardware, tweaked software, and even built network cables and jacks for work. But since building a router from scratch, I haven't been as flummoxed by a technology problem as I have been by making a Mac or Windows box access my printer (attached to a Debian Lenny Linux server) at home. Little Spoon has been waiting to print out a variety of things for the wedding for a while as I've tried in vain to get it working. Well, today I strove to make my accursed printer do its job. Click to expand the details.


I'm using Samba to let the Mac and Windows laptops see the printer that's attached to my Linux server. However, there's a problem with the way Samba handles job requests from both boxes - or at least the way Samba interfaces with CUPS, the program I use to actually print on the Linux server. Since version 1.2, CUPS has only accepted input from the UTF-8 character set. However, both Mac and Windows laptops were sending requests in the iso-8859 character set; because CUPS 1.3.8 couldn't translate the requests, it spewed 'CUPS-Get-Classes client-error-bad-request' errors in the access log and 'Unsupported character set "iso-8859-1"' errors in the error log every time I tried to print a test page.

I solved the problem by adding the following line as root to the end of the [global] section of my smb.conf file:

display charset = utf-8

After I put that line in and restarted Samba (using the command /etc/init.d/samba restart on my Linux server), everything worked just fine from both laptops. All that needs to be changed is the "display" character set in Samba; the "unix" and "dos" charsets can be left at their defaults. Test pages and graphics now print just as they're supposed to, and I now have the following output in my error log:

I [16/Aug/2009:15:46:59 -0500] [Job ???] Request file type is application/octet-stream.
I [16/Aug/2009:15:46:59 -0500] [Job 622] Adding start banner page "none".
I [16/Aug/2009:15:46:59 -0500] [Job 622] Adding end banner page "none".
I [16/Aug/2009:15:46:59 -0500] [Job 622] File of type application/octet-stream queued by "sbenning".
I [16/Aug/2009:15:46:59 -0500] [Job 622] Started backend /usr/lib/cups/backend/hp (PID 24338)
I [16/Aug/2009:15:47:39 -0500] Started "/usr/lib/cups/cgi-bin/help.cgi" (pid=24388)
I [16/Aug/2009:15:47:42 -0500] [Job 622] Completed successfully.


With these minor modifications, Little Spoon can now print out the pages she needs to complete her wedding binder, which she's worked so hard to organize and finish over the past week or so.

No comments:

Post a Comment