Installing an all-in-one printer device in Debian

Installing an all-in-one printer device in Debian


Recently I had cause to buy a scanner. Being in a reasonably small home I was eager to save on desk-space, and so decided to upgrade my ageing inkjet printer at the same time. Having looked around I eventually went for an HP Photosmart C5180 device. This is my experience of installing it on Debian Lenny.

Interfaces

The C5180 is a scanner/ink jet printer with six-ink photo quality printout and the ability to print direct from various types of media card. It comes with a USB 2.0 and Ethernet RJ-45 socket as well. Either would have suited me and, in fact, I will eventually stick it on my home network. Tonight though I was not really in a position to do that, so I went for the USB install instead. In case you are wondering I went with this device for two reasons:

  1. I knew HP provided free software drivers for their devices.
  2. It was on special offer at the time and I saved around 30% of the regular price.

A gripe

The HP drivers do not come on a CD-Rom, unlike for Mac and Windows. This is not my gripe--as you will see installing this printer did not require a CD because the drivers were as a Debian package. My gripe is that the packaging mentions both Windows and Mac support (although noting that not all features are available under Vista) but does not mention GNU/Linux at all. Come on HP: you've outshone a lot of manufacturers by releasing free drivers; so, how about giving all those newbie Ubuntu users a fighting chance and putting a penguin somewhere on the box? The install documentation is also devoid of a mention of GNU/Linux: again, for anew user it would have been nice to see something in there.

Printing

As said HP provided free software drivers and these were available as Debian packages. A quick check of the excellent LinuxPrinting.org database revealed the the HPLIP/HPIJS drivers were what I needed. So apt-cache search hplip revealed the packages and apt-get install hplip installed them. I already have cups installed on this machine and HPLIP integrates with it seamlessly.

The installation restarted cups for me so I just needed to connect the USB port of the printer to my PC and add the printer to cups. I prefer to use the web interface for CUPS; so, pointing my browser at http://locahost:631 brought this up. I then clicked the Add printer button and followed the steps. When it came to which model/driver to use, I chose "HP PhotoSmart C5100 Foomatic/hpijs, hpijs 2.8.2.10 - HPLIP 2.8.2" from the list: cups had this already recommended and selected, so it wasn't hard to find. Printing a test page after the installation proved all was well.

Scanning

Scanning was a little more tricky. Most Linux scanning needs are met by SANE (Scanner Access Now Easy) so I installed that and the xsane frontend for it. Here I hit my first problem: SANE does not come with the relevant backend for the HP C5100 series. All was not lost though as a quick bit of Googling revealed I needed to add hpaio as a single line in the /etc/sane.d/dll.conf file. Once that was duly done, I fired up xsane to be told no devices were available. Running scanimage -L from a terminal revealed the device was there and being detected. Running hp-check (supplied with the hplip package) revealed the scanner was being detected. So why was xsane not finding it. I decided to manually pass the device URI to xsane. scanimage -L gives you the device URI so all I needed to run was xsane hpaio:/usb/Photosmart_C5100_series?serial=MY79IQ213604MK. Don't worry about the the length of the parameter, normally you don't need to enter that in at all.

Xsane reported a permissions error trying to read the device. A-ha! A solution was in sight. At this moment I slapped my hand on my forehead a few times as I remembered that both scanimage -l and hp-check were run with root permissions (sudo). USB devices are stored under /dev/bus/usb/ and so I ran ls -lR /dev/bus/usb and found the C5180 in there with an owner of lp and a group of scanner. So I added my user to the scanner group with groupadd -a -G scanner ryan. The new group would not be present until I logged in again but as it happened I had to shut down the machine shortly afterwards anyway. If you want to refresh the current users' groups without ending the session have a look at the newgrp commnand. Upon logging in again I started xsane and it found the scanner and everything worked as expected.

Conclusion

A lot of people say the learning curve for GNU/Linux is too difficult. My experience here showed that, as far as scanner go, it could be made easier. But it was by no means a task beyond a bit of Googling and one of my reasons for writing this was to collate the information I gathered into one place. HP's drivers work like a charm and the printer itself is marvelous, I recommend it. My next task will be to setup scanning over the network/. I've seen a few useful HOWTOS on that, so I'll let you know how I get on.

References

Category: 

Comments

Terry Hancock's picture

This really is a very frustrating problem. I'm not sure what the real reason for it is. It's certainly true, though: many products which have Linux support simply don't mention it anywhere in their packaging (sometimes going as far as saying it is NOT supported).

I think possibly it is simply that GNU/Linux has a reputation as being "for experts". After all, a company generally expects to pay more for someone who knows Linux (or Unix) than for a Windows user. So, they imagine that we don't need instructions, we'll "just know".

Of course, it's self-reinforcing, because the fact that they refuse to provide identification and/or support means you have to be more of an expert to use it.

Another possibility is that they're afraid they'll have to pay more for support staff who know how to install their product on a Linux system.

Or perhaps they are relying on the Windows monoculture to protect them from complexities (but I don't think that's necessarily a safe bet -- most problems have to do with hardware differences, in my experience, and there are enough different varieties and/or versions of Windows to make their "one platform" assumption break down).

rogun's picture
Submitted by rogun on

but I don't think that HP officially supports GNU/Linux, which is why there is no mention of it on the boxes. I wish they did too, but am still thankful that they've provided enough information for me to get my AIO to work *ALMOST* perfectly (it's still missing a few features, such as transferring images from the card reader, which actually works, but is painfully slow with the HPLIP drivers.)

Good thing for HP too, because I'd never buy a printer that didn't work with GNU/Linux.

Terry Hancock's picture

"I don't think that HP officially supports GNU/Linux"

This is actually why I'm annoyed: why is GNU/Linux always treated like the mistress instead of the wife?

No one expects them to dedicate extra resources to supporting Linux. It's perfectly reasonable for them to rely on community support mechanisms (after all, it's what we expect and want in our free software culture -- it's a better system).

But is it too much to ask that they acknowledge this sort of support in their packaging and advertising? Are they ashamed of supporting Linux? What's that about?

Whatever the answer is, I don't think it can be good.

Ryan Cartwright's picture

It all depends on what we mean by support. For you and me that's probably providing drivers, giving advice and help on installing them and saying so on the box wouldn't hurt either.

Their All-in-one/Linux support page says:

Linux support

The primary means of communication for the Linux community is via sourceforge.net. Linux support will not be listed on the printer box. In addition, Linux support is not delivered via standard means for our Windows and Mac customers (for example, the driver is only available via the Web, not in the box.) There will currently be no phone support. HP Customer Care will direct HP Linux customers to http://hpinkjet.sourceforge.net. There will be instructions for installing and using the driver there, as well as support resources through FAQs, Web documents, and feedback forms.

( hpinkjet.sourceforge.net redirects you to hplip.sourceforge.net BTW. )

So it seems they do provide most of what we want -- via community resources. But it seems that they are prepared to stand by their decision to not advertise this on the box, and like you I would like to know why? I can only assume they are concerned that a GNU/Linux using consumer who bought such a product might have a valid claim for support on a par with Windows/Mac.

Perhaps we can start a campaign here: "Would you like to see printer manufacturers in general and HP in particular advertise their Linux support on the packaging?" - Tony any ideas?

Ryan

tracyanne's picture
Submitted by tracyanne on

Upack the printer in this case a HP C5180, connect printer to power, connect printer to computer via USB2 cable, load printer with paper. Power printer on. Wait while Mandriva recognises printer, wait while Mandriva installs printer drivers, wait while Mandriva prints test page. Open document in OO.o select print, wait while document is printed. Boring.

Ryan Cartwright's picture

Perhaps I should have elaborated on my setup. This is a -- deliberately -- minimal install Lenny system. I did not install the desktop task which would have resulted in GNOME/KDE with the same kind of autodetect scripts that your Mandriva system uses. I've previously had a similar experience to you running KDE under Debian with all sorts of printers.

I should also mention that the printer was detected automatically when I plugged the USB cable in. It's just that on my minimal install the hplip/hpijs drivers were not installed and therefore not loaded. The main reason for this post was for people for whom the autodetect didn't work. It's all well and good having these Windows-esque we'll-do-it-all-for-you type autodetect systems but in my experience if you rely on them too much you are dead stuck when it doesn't work. Besides that, one reason I started using GNU/Linux (and Debian in particular) is because I actually like twiddling and doing it myself. I prefer to know what my system has on it and why.

So perhaps I should have named this "Installing an all-in-one printing device in Debian Lenny with a minimal XFCE4 system whilst getting my hands dirty and do it manually" :o)

To answer your question on LXer as well -- sorry can't be bothered to sign up to every site I come across -- I didn't choose Debian to test this out but rather it is the system I use on a daily basis.

thanks
Ryan

Michael Crider's picture

If they don't include Linux drivers on the CD, or include directions on installing it in Linux, they can't really advertise Linux support. With so many distros and so many different ways to install the drivers, it would be very complex to say they support Linux. A more correct statement would be that Linux supports them, even if it is with drivers they provide. I know from talking to a close friend (a Linux newbie) that if you call HP tech support for help installing a printer in Ubuntu, it takes 4 hand-offs before you get someone who has heard of Ubuntu. He could only point my friend to hplip.sourceforge.net, and then went on to ask several questions about Ubuntu and why my friend was running it. It would be nice if HP could pick a few of the top distros, get their devices working out of the box in those distros, and include directions for installing, or at least advertise that they are supported in those distros. Then again, with frequent version changes of distros such as Ubuntu, the directions may need modified more frequently. With Windows, supporting two versions (XP and Vista) will cover everything that has been available for over 6 years, and probably 90% of Windows in use today.
I'm not trying to give HP a total out, just pointing out that it is probably simpler for them, like Dell, to point people to their distro's tech support for software issues.

Ryan Cartwright's picture

HP do officially support GNU/Linux and they have written and released many printer drivers under free licences. For example the device I bought is one of many supported under HPLIP and it works excellently.

As to inclusion of drivers on CD--well actually I don't think they should do so. In fact I think this is the way manufacturers should go. Imagine if you buy a device (any device) and there's no need for a driver CD because the driver is included--or easily available--as part of your OS. HP have worked to ensure that HPLIP/HPIJS is available as a package under most GNU/Linux distros so there is no need for HP to worry themselves with CD installation programs and the like. They have space for documentation at http://hplip.sourceforge.net/ but it's very incomplete. So what they should do is:

  • complete the documentation
  • engage the community to write some howto's for various distributions (Wiki/collaborate with LinuxPrinting.org etc.)
  • advertise their GNU/Linux support on product packaging and in the computer press.

BTW, the HPLIP pages are pretty good (where they don't have holes!) and I recommend them if you are considering an HP printer. For example here is the page detailing support of the PhotoSmart C5180. It tells me that this printer will work under Debian 2.2 (Potato)--a system released in 2000. Compare that to the minimum Windows requirement of Windows 2000 SP3 (released 2002) or Mac OS X 10.2 (again 2002). And still people say Linux doesn't have good hardware support!

But, I digress..

What I am really after here is some kind of acknowledgement of GNU/Linux users as a customer base. I think that HP are well poised to gain a lot of sales from Ubuntu users and the "escape from Vista" crowd but they are missing the boat. If a new Ubuntu users walks into a computer store and looks at the printer boxes, "Linux support" on the side would be a huge selling point.

BTW : the network scanning option worked fine under Debian on the simple tests I gave it--as expected.

cheers Ryan

rogun's picture
Submitted by rogun on

Though I'm unable to find it now, I seem to remember a disclaimer from HP, on it's website, that explicitly stated that it didn't officially support GNU/Linux, despite the support given for the HPLIP drivers. I know this sounds odd, which is the only reason I think I remember it, but then again, I don't trust my own memory much these days, so I don't know why anyone else would.

tracyanne's picture
Submitted by tracyanne on

I should also mention that the printer was detected automatically when I plugged the USB cable in. It’s just that on my minimal install the hplip/hpijs drivers were not installed and therefore not loaded. The main reason for this post was for people for whom the autodetect didn’t work. It’s all well and good having these Windows-esque we’ll-do-it-all-for-you type autodetect systems but in my experience if you rely on them too much you are dead stuck when it doesn’t work. Besides that, one reason I started using GNU/Linux (and Debian in particular) is because I actually like twiddling and doing it myself. I prefer to know what my system has on it and why

I apologise, I misunderstood. I use Mandriva for three reasons,

1 I'm lazy and I like it, and Mandriva has worked without problems of almost all of the hardware I've tried it on, I can't say that of many other distros, even the much touted Ubuntu hasn't had that record for me, and if I can't guarantee that for the benefit of reason 2, I won't use it.

2 It's what I sell, primarily to middle aged and elderly women. They like it because it just works. Many of those women have had at least some experience with Windows (and opted for Linux because of viruses and fragmented file systems slowing everything down, in the main they are not interested in twiddling, they want to be able to web surf, play music, watch the occasional rented movie on DVD, write text documents, play the odd mindless game of solitaire. I can provide them with that experience with Mandriva quickly and easily, and they can do it all safely. In some cases my Mandriva systems are the first computer they've actually managed to do anything useful on.

3 I need to understand Mandriva, so I can be sure, if they have problems I can sort them out.

I guess I reacted because there have recently been so many Linux is not ready for the desktop blogs going around of late.

Ryan Cartwright's picture

No need to apolgise, your post just highlighted how easy it is to use GNU/Linux. As it happens I am inherently lazy as well but every now and then I get it into my head to "play".

Your reasons for using Mandriva are perfectly valid - for what it's worth I started on RedHat, moved to Mandrake (as it was called then) and migrated to Debian. But this highlights the real beauty of free software: it gives you and me (and your users and mine) the opportunity to have a stable, secure system which "works" in the way we want, how we want.

I guess I reacted because there have recently been so many Linux is not ready for the desktop blogs going around of late.

I guess you must be new round here then? :o)

cheers Ryan

Ryan Cartwright's picture

I've now used the web interface scanning option with some vigour and I have to say it's... okay. It works very well but the feature-set is very limited and quite frankly SANE is a better option.

To use the web scanning option you point a browser on your LAN at the IP address of the C5180 and click the Scan link under Applications. Here you can pick the size of your scanned image -- from a select few options -- and get a preview. From there you click scan and your image will appear in a new browser window for you to save[1]. You can't choose a smaller section of the document to scan from the preview and the options for resolution, colour etc. are very limited.

So the web interface is very limited but has some uses if you want a simple interface for any user on your LAN without installing client software. Beyond that you'll need something more fit for purpose.

cheers
Ryan

[1] If your browser blocks popups by default you must allow them for this "site" or the final scanned image will not be available to you.

Ryan Cartwright's picture

I spotted that one - typically - after the piece was published and once that happens only admin can edit them. It seemed a) too trivial and b) too humourous[1] to bother Tony with.

Oddly I mentioned it in a comment on another column on FSM yesterday.

I guess it'll teach me to post straight into the web form at two in the morning! I normally compose off-line and copy and paste it.

[1] In my defence I get so many queries over perfectly acceptable British spelling from Firefox that I tend to ignore the red dotted lines in there now. "Humourous" is one of them. But let's not go there. The British English dictionary add-on is not always "compatible" with my Sid-based versions of IceWeasel either so I tend not to bother with that.

Ryan
PS I've just noticed it got corrected after your comment.

andmalc's picture
Submitted by andmalc on

Run hp-setup to add the printer and to register the model under hplip for scanning and image transfer. Several other utilities are available i.e. for command line scanning or image transfer - they all start with 'hp-'.

Author information

Ryan Cartwright's picture

Biography

Ryan Cartwright heads up Equitas IT Solutions who offer fair, quality and free software based solutions to the voluntary and community (non-profit) and SME sectors in the UK. He is a long-term free software user, developer and advocate. You can find him on Twitter and Identi.ca.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!