Configuring a Solaris 10 client to print to a network printer

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

For weeks now, I’ve been trying to configure my Solaris client to print to a network-attached HP LaserJet 2200dn printer and I finally got it working today. It’s probably really easy for an experienced systems administrator but there were a few gotchas that caught me out – hopefully my experiences will help someone else out.

In many ways the Solaris Print Manager makes setting up a printer easy, but there were some important settings I needed to use (I found some of this on an HP support document, but there was also a lot of trial and error involved as I don’t think the advice in HP’s document applies to Solaris 10 x86):

  1. For an HP LaserJet 2200, the recommended printer driver was Foomatic/Postscript – I didn’t use this but selected Foomatic/hpijs instead.
  2. The destination is more than just the IP address or hostname of the print server (i.e. the LPD service on the printer’s JetDirect card) – I needed to append :RAW (LPD queues can be configured through the printer’s own web administration console).
  3. The protocol is BSD (not TCP as I expected).

One really handy feature is the ability to show the command line console, on which all the commands issued by the print manager will be displayed. Using this, I was able to determine that the commands to configure my printer (now saved as a shell script) were:

lpadmin -p hplj2200dn -v /dev/null -A write -n /usr/lib/lp/model/ppd/system/foomatic/HP/HP-LaserJet_2200-hpijs.ppd.gz -i /usr/lib/lp/model/netstandard_foomatic -o dest=printer1:RAW -o protocol=bsd -I postscript -u allow:all
lpadmin -p hplj2200dn -D "Laser printer in Mark's Den (duplex/network)"
lpadmin -d hplj2200dn
enable hplj2200dn
accept hplj2200dn

These will, of course, vary by model. Note that the first (very long) line will wrap on this web page – each of the first three commands should begin with lpadmin.

Don’t be put off by error messages after the enable and accept commands:

UX:enable: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.
UX:accept: ERROR: Can’t establish contact with the LP print service. TO FIX: Either the LP print service has stopped, or all message channels are busy. If the problem continues, get help from your system administrator.

These fooled me for a while but I think the problem was just that the printer had not yet been established when I tried to enable it. By waiting a few seconds and re-issuing the last two commands, everything jumped into life.

I don’t know why there is a postscript reference in there – as far as I know this is a PCL printer, but it seems to work.

Finally, the commands to remove the printer (also now saved as a shell script) are:

reject hplj2200dn
lpadmin -x _default
lpadmin -x hplj2200dn

Configuring a Solaris 10 DHCP client to register with a Windows Server 2003 DNS server

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Last week, I wrote about configuring a hostname for a Solaris 10 DHCP client. Alan Thompson very kindly left a comment on that post about using DHCP to set the hostname on the network (i.e. in the DNS) and I’m pleased to say that it works a treat on my Windows network.

I have a Windows Server 2003 server which acts as my domain controller, DNS server and DHCP server. DHCP is configured to update DNS (always dynamically update DNS A and PTR records, discard them on lease deletion, and to do this for clients that do not request updates) and this was working well for my Windows clients but although my Solaris client (laptop3) had been retrieving IP information from the DHCP server, the DHCP console showed no name for the lease (and so couldn’t update DNS).

By following Sun’s instructions for enabling a Solaris client to request a specific hostname, DHCP was able to register the client’s name in DNS, using the fully qualified domain name as set in the DHCP scope options (option 015 DNS Domain Name).

I tested this using the nslookup laptop3 command, which returned:

Server: dnsserveripaddress
Address:
dnsserveripaddress#53

Name: laptop3.domainname
Address:
laptop3ipaddress

It’s worth pointing out that Sun’s instructions are not quite correct for Solaris 10 x86, as step 1 is not necessary (the comments in the /etc/default/dhcpagent file explain that, by default, the DHCP agent will try to request the hostname currently associated with the interface performing DHCP); however the other steps were spot on (add inet hostname to /etc/hostname/interface, flush cached DHCP data using pkill dhcpagent and rm /etc/dhcp/ interface.dhc, then reboot), meaning that my Solaris client now participates in my Windows network name resolution.

Checking how much power a USB device requires

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I have a number of USB-attached hard disks that I use for portable mass storage, backups, etc. Very occasionally, Windows XP will report that there has been a power surge on the USB port and that it has been shut down. This can happen when the total number of devices attached to a USB hub (internal or external) exceeds the total power available. I’ve always treated that as a minor annoyance (and as these disks have two USB connections and a Y-shaped cable, I can simply use two ports) but then a few days back I noticed something I’ve never see before – the ability to view power details for (or more precisely current drawn through) a USB root hub:

USB device power draw

As can be seen in the example above, my scanner is using the full 500mA on its port, but there is still a port available which could potentially provide another 500mA. To view this information, open Device Manager from the Computer Management MMC snap-in and expand the Universal Serial Bus Controllers node. There will normally be a number of controllers listed, along with some devices and USB root hubs. Each USB root hub should have include power details within its properties.

Checking my IEEE 1394 (FireWire/i.Link) controller doesn’t seem to offer the same facilities, presumably because it doesn’t have the same concept of a root hub.

A business case for an iPod?

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Ever since the Apple iPod Nano was launched last September, I’ve been saying that I would like one (but can’t justify it because I only bought my iPod Mini in May last year).

Then, a few days back, I met up with a friend who is a professional photographer. He showed me his iPod with video and now that’s the one I want. I was always suspicious of how good a 2.5″ screen could be, but it really is clear and bright (even in daylight). My friend explained that by putting his portfolio onto his iPod he has already got two new commissions, meaning that it has effectively paid for itself already!

Now if only I could build a case for an IT Consultant to sell services via an iPod…

Windows XP service pack 3 delayed until after Windows Vista

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

We all know that Microsoft will have to pull out all the stops if they are going to meet their target of shipping the much hyped and severely delayed Windows Vista this calendar year. Well, it seems that desire to get a new version of Windows out is at the expense of existing Windows XP customers and Windows XP service pack 3 will not be here until late 2007 – that’s a full 3 years after service pack 2 was released.

As reported by Paul Thurrott in his Windows IT Pro magazine network WinInfo Daily Update, Microsoft’s Windows service pack roadmap states that service pack 3 for Windows XP Home/Professional Editions is currently planned for the second half of 2007 (preliminary date). Service pack 2 for Windows Server 2003 is still shown for the second half of this year (maybe Microsoft views server customers as more critical to it’s continued growth?).

That means that, based on the current published schedules (which I will concede are not always the most reliable source of information), Windows Vista will be here before the next Windows XP service pack! I know that Microsoft is disappointed at Windows XP service pack 2 adoption rates but for those of us who did get with the program, what happened to regular service pack releases? The fully-patched Windows XP machine on which I’m writing this post already has no less than 50 post-SP2 hotfixes, updates and security updates for Windows XP installed so how many more do I have to install before they get rolled up into a service pack?!!

Standalone QuickTime installer

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Apple QuickTimeI have Apple iTunes installed on the PC where I synchronise my iPod. I don’t need it anywhere else, but for some reason if you try to download Apple’s QuickTime, it comes bundled with iTunes. Thanks to a Tech-Recipes Internet tip, I found the standalone QuickTime installer. Now all I need is for Apple to realise that I don’t want to install an English (United States) version – if there’s only one English option available, then please call it English.

Is Microsoft still a monopoly?

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

I spent a lot of time in the car yesterday, which means I got to catch up on some of my podcast listening – this time I was mostly listening to Slashdot Review. One of the items I picked up on was an interesting discussion on whether or not Microsoft is still a monopoly.

My view is that Microsoft probably does have a monopoly (in the legal sense) over the PC operating system and office productivity suite market (although that’s weakening rapidly, as major OEMs consider offering non-Microsoft operating systems on new PCs), but in many other markets they are just an also-ran. Not everyone agrees and the real issue is not really whether Microsoft is a monopoly (nothing wrong with that), but whether they abuse a position of power to restrict competition. My observation is that Microsoft is a company who are “damned if they do and damned if the don’t”. By that I mean that consumers and critics are constantly asking for new security features within the operating system, but if Microsoft dares to bundle any such middleware within the operating system, competitors cry foul.

Migrating e-mail from Mozilla Thunderbird to Microsoft Outlook

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Since the end of November, I’ve been using the Mozilla Thunderbird client for my personal e-mail. It’s quite good (and in many ways better than Microsoft’s Outlook Express, which is no longer being developed), but it lacks many features that I used daily in the full Microsoft Outlook client (and quite frankly, Outlook was doing a better job of filtering out spam). The biggest drawbacks for me were a lack of calendar functionality, no longer being able to send SMS messages from within my e-mail client and that the address book only has space for two e-mail addresses per contact.

Anyway, sometime this afternoon, my laptop is due to be collected for repairs, so I needed to get my e-mail data out of Thunderbird and into a format that I could use on my work PC for a week or so (i.e. Microsoft Outlook personal folder – a .PST file).

Finding the Thunderbird data was easy enough – the Thunderbird FAQ pointed me to %appdata%\Thunderbird\Profiles\randomstring.default\; however, Thunderbird uses the standard Unix .MBOX format whilst Outlook Express uses proprietary .DBX files (but understands .EML, which are plain text files) and Outlook stores messages in binary proprietary .PST files.

Outlook can import data from Outlook Express, and Outlook Express claims to be able to read Eudora data (which is also in MBOX format); however I couldn’t get Outlook Express to read my Thunderbird files, instead displaying the following message:

Import Message
No messages can be found in this folder or another application is running that has the required files open. Please select another folder or try closing applications that may have files open.

A Google search turned up some anecdotal evidence of successful conversions using Eudora as an intermediary, but this was based on Eudora v5 (v7 is the current version available for download). After digging further, I found two articles which used third party utilities to convert the .MBOX data to .EML – one from Robert Peloschek (aka. Unic0der), and the other from Broobles. The principles are the same:

  1. Compact folders in Thunderbird (optional, but prevents conversion of deleted messages).
  2. Back up Thunderbird mail data (a simple file copy is fine).
  3. For each Thunderbird file without an extension (e.g. Inbox – but not Inbox.mfs), convert this to a series of .EML formatted files, for example using the Broobles IMAPSize utility (this is what I used) or Ulrich Krebs’ Mbox2eml (which relies on a Java runtime environment being present).
  4. Drag and drop the resulting files from the file system to Outlook Express.
  5. Import Outlook Express data to Outlook.

It worked for me, with one caveat – messages I had sent, but that were filed in locations other than in my Sent folder, all have the date stamp set to yesterday. I’ll live with that (after 2 hours of converting the data in each individual folder to a series of .EML files and the dragging and dropping them to the appropriate locations in a new folder structure, I’m just glad to have my data back where I want it) but I did read that this can be controlled by changing the sort order from received to sent before the file conversion and import.

So, that’s my Thunderbird experiment over. I’ll probably try out the e-mail and calendar client on my Solaris box soon (so will be back to .MBOX format I guess) but for a long while now I’ve been meaning to set up a mail server at home so that I can keep the mail there and use IMAP to access it online from whichever client I choose.

When blog spam goes wrong!

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

A few weeks back, I wrote about a device (called Diesel Guard) that I’d been told to fit to my company car to help prevent accidental mis-fuelling. A couple of weeks later, someone posted a comment on the post about an alternative product (called MagneCap). At the time, I thought of it as a bit of friendly advice and I didn’t think anything more of it, but now it looks as if the comment was blog spam (which, incidentally, is specifically mentioned as prohibited in the rules for comments on this site).

The thing is, that at the time of writing, this blog has a higher Google page rank than the official site for MagneCap. That means that if you search Google for MagneCap, what comes back is not what the owners of the MagneCap site would like to see:

Google search results for MagneCap

(especially as, out of context, the quote reads as if it’s MagneCap that’s the embarrassing product, rather than Diesel Guard!)

Yesterday afternoon, I received an e-mail asking me if I had any ideas to correct the “incorrect heading” but there is absolutely nothing I can do about Google’s index (which is quite correct in quoting the title of the page and a couple of lines from the blog spam comment). Either I, or the author, could remove the original blog spam comment (in which case I would also remove the following two anonymous comments, which I also suspect are blog spam as the timing is remarkable at 45 and 50 minutes after the e-mail asking for help…) but Google’s cached version will still be available online. I also suggested that MagneCap take out a paid ad so that their site appears above Google’s standard search results. Because I genuinely believe that this was simple product placement and not malicious in any way, I’m also writing this post, so that hopefully Google will pick this up as the next entry and it might become clear that MagneCap was not the embarrassing device which I originally wrote about.

Just like Aesop’s fables, there is a moral to this tale… if you feel like engaging in a bit of product placement on someone else’s website, ask them first. Or at least make sure the blog spam gives the message you want if only a few words are quoted out of context by a search engine.

New toys from Nikon

This content is 18 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Although this is mostly an IT blog, one of my hobbies is photography and the two fields are getting ever-closer to one another.

Nikon 80-200 f2.8 IF-ED

I’ve just picked up my latest toy – an AF-S Zoom Nikkor 80-200 f2.8 IF-ED lens for my Nikon cameras. It’s second hand, but it’s a really good lens, bought from a professional photographer friend who has switched from Nikon to Canon.

Actually, for the last few weeks I’ve been getting very excited by a new DSLR camera body from Nikon that I’d really like – the D200.

Nikon D200

Like all Nikon DSLRs, the D200 uses an APS-sized (DX) sensor, as Nikon do not produce a body with a full-frame image sensor and seem to be relying on us all upgrading to DX lenses to make the most of the tiny image sensor (it seems to me that more professionals are defecting to Canon, leaving Nikon with just consumers and prosumers like myself); however the D200 offers a number of improvements over the D70 that I bought just over a year ago with a 10.2 million pixel image sensor, ISO range from 100-3200, improved autofocus, remote cable release and a massive 2.5″ LCD display.

Sadly, I’ll have to wait a while for this as, at about £1299 for the body only, I’d need to sell both my F90x and my D70 – and secondhand values are really not very good at all.

Oh well, I’ve finally managed to upgrade my most-used lenses to Nikkor models, the D200 body will just have to go on my wishlist.