Covered Topics

Please see the list of the topics I've covered. It's located near the bottom of the page. Thanks for stopping in!!

Monday, August 23, 2010

HP Printer Support in LINUX

Last week I got around to fixing my printer issues on my Fedora box. As mentioned in a recent post, I had problems getting the HP printing software installed and working. As I also mentioned in a recent post, before trying to install applications or plugins, one should first apply ALL available and relevant system updates. Waiting until later to do this cost me much time and aggravation. There were updates to the CUPS printing software and other parts that were needed for the Laserjet printer or Open Office to install successfully. Once those updates were in place, I was able to quickly install the HP printing software and Open Office and get on with life.

Herein I will detail how I got printing enabled on my LINUX system, including hard-to-find but critical information on getting it to work on Fedora SE LINUX.

For those of us who own HP printers, there is a third party application called "HPLIP". This stands for "HP LINUX Imaging and Printing" and allows support for both printing and scanning. The following link will take you to the page where you may download HPLIP and also verify that your printer is supported:

http://hplipopensource.com/hplip-web/index.html

The download link will take you to another page where you will select your LINUX distribution and version, the printer type and model. Once you do this you will be given the correct version for your setup.

The following link tells you in excellent detail through words and screenshots how to run the HPLIP installer and what you will see on your screen at each step.

http://hplipopensource.com/hplip-web/install/install/index.html

BEFORE Installation:
BEFORE installing HPLIP, make sure your printer is DISCONNECTED from the computer!! The installer will prompt you when to connect the printer.
You need to be connected to the Internet during the entire installation, as your system will likely need to download other stuff to resolve dependencies. You will run the installer from the command line as detailed in the installation instructions.

Ubuntu:
Since the install instructions page shows a Ubuntu installation, things should proceed as in the pictures.

Installing on SE LINUX:
Fedora is quite similar to a Ubuntu installation EXCEPT you FIRST must disable the "SE" or "security enhanced" functionality in order to carry out the installation. [Your system will give you a message on the command line to this effect - this is NOT detailed in the step-by-step procedure shown in the above link]

Do the following:
1) Select the "SYSTEM" menu at the upper left-hand corner of your screen.
2) Select "Administration" ,
3) Choose "SE LINUX Management" from the drop-down menu that appears. You will be prompted for the root, or superuser password.
4) A window entitled "SE LINUX Administration" will appear within a few seconds.
Under "Status", you will see "system Default Enforcing mode", "Current Enforcing mode", and "system Default Policy type". Under "Current Enforcing Mode", select "Permissive".
5) Under "File" menu, select "quit" to log out of "SE LINUX Administration".

Once this is done, follow the instructions at the link above. The installer should do its thing.

Completing the Installation:
You should notice a blue "HP" logo in the upper right-hand portion of your screen.

You MAY be prompted to reboot or log out, then log back in.
If that is the case, you will need to run a "hp-setup" command from the command line to finish the installation. If you are running Fedora, you may need to disable SE functionality again as you did above. At this point, a dialog window will appear. This is the configuration window for setting up your printer. You will see a form to enter the printer name, description, and location [office, lab, ...]. Your system will search for a driver and should automatically download what it needs.

Select the "Print Test Page" button - if all has gone right you should be rewarded with a printout of the HPLIP test page.

IMPORTANT Fedora SE LINUX settings for Printing
After installing HPLIP, you should go back into the "SE LINUX Administration" menu and reset the "Current Enforcing Mode" to "Enforcing". Failure to do this will leave your system vulnerable to attacks!

In order to keep SE LINUX's "Current Enforcing Mode" set to "Enforcing" and STILL BE ABLE TO PRINT, do the following:
1) In the "SE LINUX Administration" menu, select "Process Domain"
2) Find "cupsd", cupsd_lpd", and "cups_pdf" - mark those "permissive" by clicking on each one and selecting the yellow "permissive" triangle symbol right above the list.
3) Click on the "file" menu, slect "close" so that the settings are saved and you are logged out of the "SE LINUX Management" menu.
4) Open a text file on your system and try printing it - it should print now even with "Current Enforcing Mode" set to "Enforcing".

Sunday, August 15, 2010

Mouse Movement Emulator - An Automated Test Fixture


A while back, I posted a blog entry detailing a serial relay control fixture for automated testing. That device contained 48 relays that were individually controlled by RS-232 commands. A PC running LabVIEW software issued the control signals in the proper sequence, and collected and logged all data. One of the peripheral devices the serial relay fixture controlled was the mouse movement emulator described herein.

I designed this mouse movement emulator prototype - as seen in the picture - to generate signals for mouse movement, "left button clicks" and "right button clicks" without any human intervention required. The fixture consists of an optical mouse, two "dip" type relays, a vibrator motor to shake the mouse, and a resistor to reduce the current from a 12 volt supply to a safe level for the vibrator motor - which is rated for only 3 Vdc. The relays came from "in-house" parts stock; the vibrator motor, resistor, and aluminum chassis box were all bought from a local electronic supply house. A ceramic disc capacitor, visible in the picture, is connected across the motor's terminals. This capacitor, in conjunction with the current limiting resistor, forms a low-pass filter and helps supress electrical noise from the motor brushes.

The motor and relay control signals are transmitted through a 5-conductor cable which I made from separate pieces of hookup wire twisted together using an electric drill. The mouse signals are transmitted via the original gray colored shielded mouse cable. I threaded these two cables through a length of woven sheathing to keep them neat and tidy. A small section of the sheathed cable is visible in the lower left hand side of the picture. The cable is terminated in a male D-SUB connector which plugs into the serial relay control fixture.

Together with the serial relay control fixture and a PC running LabVIEW software, this device successfully exercises the mouse functions of the units under test (UUTs) WITHOUT a human being present to observe the test and/or operate the mouse.

Benifit for the project I was working on:
This unit made possible FULL automation of engineering design verification tests as well as manufacturing testing.

Verifying Checksums for LINUX Downloads - Part 2

On August 6, 2010, I posted an entry on how to verify checksums for downloaded LINUX CD .iso files. Herein is my own refinement on using the md5sum command.

The md5sum command:
For verifying the md5 chscksums [for Ubuntu 10.04, in this case], here is the basic command:

md5sum ubuntu-10.04-desktop-i386.iso

This generates an output like this to the command line:
d044a2a0c8103fc3e5b7e18b0f7de1c8 ubuntu-10.04-desktop-i386.iso

You then visually compare this to a similar string of letters and numbers taken from the md5 checksum file you downloaded along with the CD .iso file itself. Reading and comparing lines of gibberish like this can make you crosseyed. There IS a simple way to do this without spending a bunch of time or driving yourself crazy.

The way I do it:
As I pointed out in the August 6 post, I like to paste the output to a text file, along with the contents of the md5 file. To make this easier, I use the > symbol for UNIX redirect as follows:

md5sum ubuntu-10.04-desktop-i386.iso > sumcheck.txt

This creates a text file called "sumcheck.txt", then redirects the results from the md5sum command to it, rather than outputting to the command line as normal. You could actually use whatever name you want for the text file as long as it doesn't conflict with (and possibly over-write) something else on the system. I just happen to like the descriptive name "sumcheck". UNIX/LINUX allows you to forego using the .txt extension; I just do it to help when I'm looking at a directory listing from the command line.

Open "sumcheck.txt" in your "gedit" text editor wondow - you should see the output string generated by md5sum. Then, open the md5sum file you (hopefully) downloaded when you downloaded the cd .iso image. Copy the string seen there and paste it into your "sumcheck.txt" file on the line below your output string. Doing this results in the following:

d044a2a0c8103fc3e5b7e18b0f7de1c8 ubuntu-10.04-desktop-i386.iso
d044a2a0c8103fc3e5b7e18b0f7de1c8 *ubuntu-10.04-desktop-i386.iso

The top line was the output generated from the command I listed above.
The second line, the one with the asterisk, was the line copied and pasted from the downloaded md5 checksum file. See how at a glance you can quickly and easily compare the two strings?

After I'm done and am satisfied the files are not corrupted, I DELETE "sumcheck.txt" so I can use that filename again in the future.

Internet Radio for LINUX Users

As a longtime Internet radio fan, being able to continue listening was critical when I decided to switch to LINUX for my online activity. When I installed LINUX, I installed Adobe Flash, MP3 support, and other plugins for streaming media. With these I was able to access many, but not all sites I listened to/watched. Several radio stations I listen to require you to use a plugin called "Silverlight".

Silverlight is a microsoft browser plugin that many Internet radio stations use for their streaming media. It also supports graphics, multimedia, and interactive content. Windows users may use it with several browsers including Firefox; mac users can use it if they have Firefox.

Open Source to the rescue - again
For us LINUX users, there is "Moonlight". Moonlight is the open source option for LINUX/UNIX users. Check out these sites for the scoop on "Moonlight".
* Moonlight's Website - http://www.mono-project.com/Moonlight
* Moonlight Wiki - http://en.wikipedia.org/wiki/Moonlight_(runtime)

I got mine here from their LINUX Download site:
http://www.go-mono.com/moonlight/download.aspx

What To Do and What Happens:
Once on the site, click the download link to install the plugin. You will very likely be prompted by your system to enter the root (superuser) password. The download and install should proceed from there. As the Wiki page points out, the plugin does NOT include the actual codec, but the next time you navigate to a page that requires Silverlight, you will be prompted to download the codec FREE from Microsoft. Again, you will likely be prompted to enter the root password. Both downloads took less than 30 seconds at 300+ kbps speeds.

With Moonlight I was able to access those Internet radio stations which require the Silverlight plugin.


If you want more information on Silverlight, check out the following sites:
http://en.wikipedia.org/wiki/Microsoft_Silverlight
http://support.spacialaudio.com/wiki/Silverlight

Tuesday, August 10, 2010

Home Garden Update - Alfalfa in Bloom



Regular readers of this blog may remember the earlier post regarding home gardening. For the past several years I have grown container gardens. This year I decided to experiment with some plants I had never grown before. These were yellow onions, cilantro, alfalfa, and romaine lettuce. I tried lavender last year but none of them germinated, so I tried again this year. I sprouted the lavender in some paper towels so I could see if they germinated. Once they sprouted, I moved them to potting soil.

My cilantro and lavender seeds germinated and produced some 1/4" shoots, but for whatever unknown reason these withered and died after about 3 weeks. I kept them watered and in what I thought was the right amount of sunlight. Same with the romaine lettuce - fortunately there is time to try that again before the cold season. I might try broccoli as well.

One of the items I had planted, mainly as an experiment, was a few alfalfa seeds. I did these in a small sweater box. They germinated and produced the plants seen in the picture above. I thought the blue flowers were cool and might be of interest to anyone who, like myself, had never grown alfalfa before. The plants appear "stretched". I think they probably need more sunlight then they get. This is problematic where I am located - due to the site geometry the plants are in shade most of the day. I may simply be unable to get decent results with certain crops due to the lack of direct sun.