Thursday, November 25, 2010

HP Deskjet 3050 j610 on Debian Squeeze

HP Deskjet all-in-one printers are selling for silly prices at the moment. I recently saw a Deskjet 2050 j510 printer/scanner in PCWorld for £40 and was tempted. Then I saw the same printer in Asda for £35 and was even more tempted. Then I saw a HP Deskjet 3050 j610 wireless printer/scanner in PCWorld for £34 and almost couldn't resist- I just thought I should check compatibility with Linux.
The 2050 j510 will print with the version of HPLIP (Hewlett-Packard's Linux Imaging and Printing software) that comes with squeeze, but it won't scan (without a hack), whist the 3050 j610 will print and scan but requires the manual installation of the latest version of HPLIP from HP.
I ummed and arred for a bit. Then I checked the PCWorld web site and all the 3050 j610's had gone- Comet still had some at the same price. The next morning I needed to do a scan, so that clinched it- I went back to the Comet web site, reserved the printer, and was given a further discount, bringing the price down to £30.90.
That's a silly price because a basic HP printer is £40- no scanner, no wireless. (And also because I remember the first printer I bought- a nine pin dot matrix printer back in 1989, which coast me £220. I could seven 3050 j610's for that!)
Now the hairy part- could I get it to work?
I ran the installation wizard from the HP website, which has easy-to-follow instructions. I encountered a couple of dependency issues (well, this is a beta version of squeeze) which I thought for a while might be a nightmare to solve, but were in fact relatively simple to get around.
The first unmet dependency was for cupsys-bsd, which is not in the Squeeze repositories, but is in the Lenny repositories. The solution was to add the Lenny repositories to /ect/apt/sourses.list (just copy the Squeeze dependencies and change Squeeze to Lenny), reload Synaptic, install cupsys-bsd, and then remove the Lenny entries.
The second unmet dependency was for cups-image, which isn't in either repository. I was at a loss until I found this post, which solved the issue.
My new printer now prints and scans on Squeeze.

I haven't tried a wireless connection yet- I don't think laptop>printer is going to be supported, but a network connection via my router might be. Not really an issue as the printer with wireless was cheaper than the one without.
These HP all-in-one printers are certainly good value, and them come with full ink cartridges and a USB cable. The only problem for Linux users is that they are only supported by the most recent version of HPLIP, if at all. HP has a page to check if a particular printer is supported here. HP have made installing the latest version of HPLIP on Linux as easy as possible- I am running a beta version of Squeeze, so maybe that explains the issues I experienced. More up-to-date versions of HPLIP should find their way into Debian backports eventually, but if you're after a bargain printer now, a manual install might be the only option.

Update: Couldn't get wireless working. Had the same problem as this person.

Update 2: The printer is now connected over the network. Yipee! See link above for solution.

Update 3: I've just installed Debian Squeeze 6.03 on my laptop, and  didn't have any of the dependency issues mentioned in this post- which was for Squeeze Beta after all.

Update 4 (Feb 2012): HPLIP 3.11.12 does not currently work with Debian 6.0.4, meaning that printing won't work, with a Filter "usr/lib/cups/filter/foomatic-rip-hplip" for printer "*" not available error. If you are trying to install HPLIP via the installation wizard and automatic install mentioned in this post, check to see if the latest version of HPLP supports the latest version of Debian, or use the manual build and install for Debian. More here.

Tuesday, November 23, 2010

Return of the living dead

I've been testing Debian Squeeze beat for a while now, and I'm disappointed to find that a trio of annoying bugs that had appeared in Ubuntu just before I stopped using it are now in Squeeze.
  • Copy and paste occasionally fails to work in Firefox (Iceweasel in Squeeze) web forms.
  • Trying to safely remove USB hard drive results in a "Unable to stop drive" error message.
  • In Movie Player in full screen, the controls disappear when hovered over after the screensaver has been on for a while. (Normal behaviour is obviously for the controls to appear when hovered over.)
These bugs are irritating. They'd be show stoppers if there was any other show in town.


Update: two of these bugs (1&3) are actually the same bug in Compiz. See Return of the Living Dead Part II.

Monday, November 22, 2010

Secure that PC!

I really should change the title of this blog, as the title refers to computer security. Since buying a router and switching to Linux, I really haven't been that interested in the topic- my PC sits behind the router firewall and it's not vulnerable to Windows malware.
But today a couple of web pages caught my eye. The first was this page, a collection of anti-virus tests and and an attempt to collate the results. How useful the exercise is, is moot, but this test caught my eye. Partly because it's a review sponsored by Norton in which Norton comes out top (dubious) but mainly because it tests AV products on Windows XP SP2 with Internet Explorer 6 (even more dubious). That not even SP2 updated, that's SP2 as it was when it came out without any updates- by now as full of security vulnerabilities which can be levered to install malware as Swiss cheese is full of holes.
I would like to have seen the results obtained if the testers had used XP SP3 fully updated with IE8 or an alternative browser. My guess is that the system wouldn't have been infected even without any AV present, but that's not what Norton or any other AV company want you to hear.
Krebs on Security, the second page to catch my eye today, makes the point that it's often the non-Windows applications that are a security threat on Windows PCs:
A study released earlier this year found that the average Windows user has software from 22 vendors on her PC, and needs to install a new security update roughly every five days in order to use these programs safely.
Linux has the advantage here, because the popular Linux distros check most applications the user is likely to install on the computer to see if they are up to date; windows leaves third-party software unchecked- a nightmare until applications like Secunia came along.
(The main point of the article is that vulnerability counts don't mean anything by themselves- a very sensible point.)
The first line of defence on a Windows computer is ensuring that applications are kept up-to-date and secure, and , if necessary, avoiding applications with a poor security record, as Krebs has suggested in the past.
The second is probably ensuring users don't have admin rights, as Krebs has again suggested several times.
An AV is probably a good third line of defence. This is where those comparative tests come in. If the collation above has any merit, Panda, Avira, Avast! and AVG are the best free options.

Thursday, November 18, 2010

No webcam in Meebo with Flash on Squeeze

Meebo is an IM client accessed via a web page. As it's web-based, in theory it's platform-independent- useful for Linux users who want to chat to Windows users over the MSN network, as I described here.
Now I don't do video chat that often, in fact the last time was six months ago when I wrote that post. At that time I got Meebo working with video, but not sound (although I later fixed the sound issue).
Today I was trying to set up a video chat with the same person, and was looking forward to a straight-forward connection over Meebo with sound. But this time sound was working but my webcam just wasn't visible.
To cut a long story short, after a lot of Googling, I found a solution, and later on a reason for the problem.

[Update: the rest of this post is me working out what was going on over a couple of days, and although the solution is there, the post is somewhat confusing, so I'm going to add an update explaining the problem more clearly. This was prompted by seeing the same problem in Skype, finding a solution, and getting a clearer understanding of what's going on.

The solution to the problem is to start Firefox from a command line with the following command:
LD_PRELOAD=/usr/lib/libv4l/ firefox &
The reason for the problem is that Flash doesn't (yet) support the latest webcam interface libraries (V4L2) used by recent versions of Linux (such as Squeeze).

The command above tells Firefox to use the older video libraries (V4L1) when it starts, hence Flash is able to work with those libraries.

At some point an update to Flash will get it working with V4L2- so if your distro gets a Flash update, or you install updates yourself, and you have used this fix, check to see if Flash works without it after the update.

The rest of the post below is retained for reference.]

I'll give the reason first, found on the Ubuntu documentation site:
Old webcam which doesn't work well with V4L2
There seems to be a known problem in Ubuntu Intrepid and Jaunty (at least), due to switching from the video system V4L to the more recent V4L2. Many applications, like webcams, doesn't seem to work well (or at all) with V4L2. But luckily there is a simple workaround to avoid the problem, through installing and loading some libraries with backward-compatibility with V4L, so that Flash sees again your Webcam, as it used to do until Ubuntu Hardy.
[Update: Further research proved that this wasn't the reason my webcam wasn't working- see below for the real reason.]

Hmm, so Debian Squeeze must have switched to V4L2 as well.

I didn't use the fix described on the Ubuntu site, because I'd already found a simpler fix on the Ubuntu forum:
LD_PRELOAD=/usr/lib/libv4l/ firefox &
(In a terminal, substituting 'iceweasel' for 'firefox' in my case.)

Oh well. I guess I'll have to buy a decent webcam- this one came from the sale bin at Asda and cost £3, so no wonder it's crap.

Afterthought: my webcam works fine in Cheese, so this may be a Flash bug too. I came across this today.
Basically, Flash 9 had great webcam support – but lousy sound support. And in Flash 10 they fixed sound support, but broke older webcam support (by adding V4L2, I believe they removed V4L1 support. Or vise versa).
Update: Curiously, in gstreamer-properties, my webcam is set to use V4L2, and the test button shows the webcam produces an image, but V4L1 doesn't work.

Maybe the fault doesn't lie with my webcam but with Flash, as suggested above?

Update 2: Yep, it seems V4L2 support in Flash is poor. The Flashcam Project is dedicated to getting webcams working with Flash in Linux.
Flash 10 and updates have been in the wild for a long time now. Frankly the V4L2 support is still poor and there is still some job to do on this project to make webcams work with it.
But Adobe are working on it:
Flash 10 (aka Astro) Beta 2 is out and is supposed to support V4L2. At last! I guess Flashcam won't be useful for long on the desktop.
In the meantime, try the solution above that worked for me, or give the flashcam utility from the Flashcam Project a try.

Sunday, November 14, 2010

Debian Squeeze beta- a first look

OK, this is still a beta, so any nits found here may be fixed before release, but these are my first impressions of Debian Squeeze Beta.

The good:
  • Squeeze can use my graphics card, and I could install Compiz. I had to install some kernel firmware first, but after that there were no problems.
  • Squeeze can play my media files- in Lenny I had to install GStreamer plugins and MPlayer from before I could play some files. The movie player in Squeeze can fast forward in video files and switch to different points in the file with ease, where the player in Lenny couldn't.
  • I now have the Extra Pane option in Nautilus- no more opening two windows to try and move files around.
  • Iceweasel and Icedove (Debian's rebrandings of Firefox and Thunderbird) are recent enough for me not to miss the originals, and my extensions work.
  • Squeeze comes with Gnash installed. It seemed to play Flash videos well in Iceweasl, it sent my CPU wild, so I uninstalled it and installed Adobe Flash- now in the repositories, so no more messing about with backports to watch Youtube.
The bad:
  • There's nothing to tell new users that they need to install firmware to support graphics cards. After the installation, my laptop fan was blowing hard. Installing the firmware fixed this, but I wouldn't have known about it if I hadn't been on the case already.
  • Network Manager reports I have no network connection, and says for my wired connection "device not managed". Some applications can access the internet (Iceweasel), other's can't (Evolution). (See below for fix.)
  • Logging into a second user account, and then logging back into my account without logging out of the second user means I get logged out again after a few seconds. Disappointing- Lenny was rock solid on switching between users.
  • It's not possible (yet?) to enable a sound theme in Squeeze. Maybe not important for some.
Overall impression: Good. There's far less messing around required to get things working than was the case with Lenny. Applications are up to date and work as expected. With any luck the bugs I noticed will get fixed before release.

A fix for the Device not supported "bug".

Edit nm-system-settings.conf as described here.

(I asked myself why "managed" was set to "false" and found this. Now I don't have any understanding of network connections, but it looks like this is a feature not a bug for the moment and the final release will contain a work-around for the issue.)

Third time lucky

Following my recent abortive attempt to update Debian Lenny to Squeeze, I've increasingly impatient to try out Squeeze. A couple of days ago I decided to go for a fresh install, something I'd been reluctant to try, because my CD drive is failing.
The first attempt at installation stalled. I tried cleaning the CD drive lens with a cotton bud and some cleaning alcohol.
The second attempt stalled in the same place. I was about to give up and resign myself to having no computer for a while until I could take this laptop to the repair shop. Then I remembered what had saved me the previous time- the baby nose pump. Fortunately, it was still around, and our baby is a toddler now and doesn't use it, so it was snotty but dry.
A few blasts with the nose pump and the installation went through smoothly!
More posts to follow on Debian Squeeze beta.