Setting up an HP Network Printer on Debian or Ubuntu

I’ve been running Debian 4.0 on my laptop (dual-boot with Windows XP). I had made a few attempts to connect the computer with my HP Photosmart 2610 printer, which is connected to our network. But nothing seemed to work.

Today I decided to try again. A search on Google for “debian network hp printer” turned up a page titled HP on Ubuntu on the LXer Linux news and forums site.

The answer to getting an HP network printer to work under Ubuntu (or Debian 4.0, in my case)? As user root, in a terminal window run:

hp-setup

Or, the way Ubuntu users will find more familiar: open a terminal under your regular login ID and run:

sudo hp-setup

Yup, it’s that simple! A series of input windows will pop up. In my case, my network printer was found by hp-setup immediately. I was able to simply accept the defaults and click through the input windows. The test page printed fine, proving the installation was working.

Once I deleted my previous nonfunctional printer configuration attempt and made the new installation my default printer, everything worked fine!

BlogBridge on Debian or Ubuntu Needs Sun Java

I was unable to get my BlogBridge installation to work on my Debian Linux PC. When I executed the

blogbridge.sh

command to launch BlogBridge, I received many Java-related errors.

Research on this led me to the discovery that Debian 4.0 (Etch) includes the GNU version of Java, while BlogBridge requires Sun’s Java 5.

Getting Sun Java5 onto Debian 4.0 (Etch)

A search for “java5″ or “sun-java” using apt-cache produced no results — quite a surprise!

The solution is: Sun’s Java5 is not available in the standard Debian Etch package list. To get it, you need to add access to the “non-free” packages to your /etc/apt/sources.list file.

In my case (working from the United States), this was accomplished by adding the following lines to my /etc/apt/sources.list file:

#non-free: for sun-java5
deb http://ftp.us.debian.org/debian/ etch main non-free
deb-src http://ftp.us.debian.org/debian/ etch main non-free

After saving the edits, I executed:

apt-get update

to update the packages my local Debian system was aware of.

Using apt-get to get Sun Java5

With the non-free packages now available, I was able to bring Sun Java5 onto my system:

apt-get install sun-java5-jre
apt-get install sun-java5-jdk

With Sun Java5 installed, BlogBridge runs!

With Sun Java5 installed, I returned to my BlogBridge directory and excecuted:

./blogbridge.sh

Almost immediately, I saw BlogBridge starting up! I now have BlogBridge installed and running on my Debian 4.0 (Etch) system.

The Coming Age of Parallel Programming on Windows

Microsoft’s “Parallel Extensions to the .NET FX CTP” announcement was a bit of a surprise to me. At OSCON in July, I found the presentations given by Simon Peyton-Jones (Microsoft Research) on Haskell and transactional memory to be highly interesting. I attended OSCON to participate in the launch of the Threading Building Blocks open source project, for which I serve as “Community Manager” (working for O’Reilly Media). One of the things that surprised me about OSCON was the amount of attention that was given to multicore and the parallel computing future.

Simon Peyton-Jones talked mostly about Haskell, so I assumed that Microsoft’s approach to parallel computing was going to involve Haskell. In this sense, I was initially surprised to hear about ParallelFX. “What happened to Haskell?” I wondered. But when you read the ParallelFX CTP announcement post, you see:

ParallelFX runs on .NET FX 3.5, and relies on features available in C# 3.0 and VB 9.0

and when you go to the Wikipedia C# page, you see that C# 3.0:

includes new features inspired by functional programming languages such as Haskell and ML

So, now it begins to make more sense. Indeed, at the end of his post, Somasegar calls the ParallelFX Community Technology Preview

another great example of close, ongoing collaboration between product teams and Microsoft Research.

Dawn of the age

Microsoft’s Herb Sutter wrote an interesting post titled “The Concurrency Land Rush: 2007-20??” a few weeks ago. He talks about waves of technological advancement including two phases:

  • A land rush phase during which vendors try to stake out their turf. The market sees an explosive proliferation of products trying to enable mainstream developers to work in the new paradigm and at the same time to differentiate themselves from each other. This phase always takes multiple years, and multiple major releases of many products, consumed at first mainly by early adopters and then, as products mature, broadly across the marketplace.
  • A shakeout phase as, eventually, the market sifts through the products, selects major winners, and realigns itself around them.

This makes a lot of sense. Indeed, when you think about the history of products such as automobiles, home computers, etc., it’s clear that this is exactly what happens. With operating systems and software, it happens too, though it seems to me that the virtual nature of software provides an opening for new innovation even after the marketplace reaches a mature, or even “saturated” state, that is not there for hard items we can pick up or touch. As an example of this, I’d cite Linux.

How long before the concurrency “shakeout”?

Since my main work these days is the Threading Building Blocks open source project, thinking about concurrency and multithreaded development issues is something I do every day. TBB certainly has a head start on ParallelFX, but if Herb Sutter is right then we have a very long way to go before we get anywhere near the “shakeout” phase, and many technologies that may ultimately become important have likely still not yet left the starting gate:

Expect at least dozens of major product announcements and releases across the industry, before the toolset expansion phase is fully underway and approaching some maturity. We the industry have undertaken to bring concurrency to the mainstream, and as with OO and GUIs it will take multiple years, and multiple major releases, across the industry on all platforms.

Everyone’s thinking…

With Intel’s converting its multiplatform Threading Building Blocks product into an open source project last July, and Microsoft’s release of the ParallelFX CTP (Community Technology Preview), it’s clear that the key participants are very much aware of and focused on the need for more convenient methods for developing multithreaded applications that will run on the multicore platforms that will soon be ubiquitous in offices and homes.

It’s interesting to me that many people doubt that there will be a “wash-out” where applications that don’t take advantage of multicore processors are driven out of the marketplace by competing applications that full utilize multiple cores. For example, see the comments to my “Poll: How Soon Will Multithreaded Apps Dominate?” post.

It’s true that apps that are primarily interactive (such as chat applications) needn’t be multithreaded. But the history of computer technology suggests that all available hardware power will be taken advantage of by savvy software developers in a relatively short timeframe — such that the software developers eagerly await the next round of hardware advances, so that owners of lower-end systems can run their software with decent performance.

A nice video series on parallel programming

If you want to learn a bit more about what all this concurrency discussion is about, why it’s suddenly becoming a prominent topic of conversation and research, there’s a nice series of videos at the Devx.com go-parallel site. The videos are chalk-board talks, most of them given by Intel’s James Reinders, technology evangelist, VP, and author of the O’Reilly book Intel Threading Building Blocks. Enjoy!

FreeBSD Xubuntu Dual-Boot System

I’m working on configuring my array of old computers such that I’ll be able to have many different open source operating systems running and available for testing installation packages for Threading Building Blocks that other developers are creating.

I started out tonight by installing FreeBSD onto the second hard drive on one of my systems. Installing FreeBSD was a bit different from what I’ve experienced in the past, but in my second go-round I had a successfully installed system. I let FreeBSD install its own bootloader, hoping that it would notice the Gentoo system that I had on my first hard drive, and create a dual-boot system.

When I rebooted, I found that I could no longer boot into Gentoo. But I could get into FreeBSD. That was my primary objective, since this was merely an extra Gentoo system that I wasn’t really using anyway.

Next, I decided to try installing Xubuntu (Ubuntu with the Xfce display manager) over my old Gentoo system. The Xubuntu install went fine. When it was finished, I rebooted, and I could only boot into Xubuntu. The possibility of booting into my new FreeBSD installation had vanished!

I know a bit about the GRUB bootloader (see my articles on the O’Reilly Network). GRUB is used by Ubuntu, so I did a quick search on “freebsd boot from grub” using Google. The search turned up this message, at the bottom of which I found a GRUB “equation” for booting FreeBSD.

Since my FreeBSD is located on the first partition of my second disk drive, my GRUB menu.lst entry for booting my FreeBSD installation is:

# For booting FreeBSD
title  FreeBSD 6.2
root   (hd1,0)
chainloader +1

I booted into Xubuntu, became root, added the above to my /boot/grub/menu.lst file (in the appropriate section), saved the file, and rebooted.

It worked. I now have a dual-boot Xubuntu / FreeBSD system!

Now I can try installing the new Threading Building Blocks packages people have developed for Ubuntu and FreeBSD.

Mustek DV520T AVI Files Require XviD Codec

Just a brief note for those of you who may have purchased a Mustek DV520T mini-camcorder and have found that you can’t see any video on the standard video players (such as Windows Media Player, RealPlayer, …) or bring your videos into Windows MovieMaker or similar software.

The DV520T uses the XviD codec. Go to www.xvidmovies.com/codec/ and download the XviD codec for your system (Windows or Mac OS). Once the software is installed, you should be able to view (and edit) the videos you captured using your Mustek DV520T.