Find and Identify Device ID’s

If you help fix people’s computers you will come across devices that windows will not have drivers for or you may be having problems downloading them from the machine manufacturer site, here is a quick way to go about it.

Go to Device Manager right click on unrecognised device there will be an exclamation mark on it click Properties ->Details and select Hardwae ID’s from the property drop down list. VID_ and VEN_ are used to identify vendors and PID_ and DEV_ identify Product ID. The HEX value following Product ID “PID_/DEV_” or Vendor ID “VID_/VEN_” is what you use in your search to identify the device.

Now go to pcidatabase.com enter your product or vendor id to such for your device.

Code 39

I was trying to work on a computer the other day, it would not recognize it’s DVD drive and switching with another dvd drive did not make a difference. The error message provided was
“Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)”

To solve this Code 39 error, follow these instructions:

1) Close all open programs

2) Click on Start, Run, and type REGEDIT and press Enter

3) Click on the plus signs (+) next to the following folders

  • HKEY_LOCAL_MACHINE
  • SYSTEM
  • CurrentControlSet
  • Control
  • Class
  • {4D36E965-E325-11CE-BFC1-08002BE10318}

4) This folder is the DVD/CD-ROM Drive Class Description in the registry. Look for any of the following names in the right hand column.

  • UpperFilters
  • LowerFilters
  • UpperFilters.bak
  • LowerFilters.bak

5) If  any of the above keys shown in step 4 are listed, right-click on them and choose Delete
6) After deleting the keys, close the Registry Editor
7) Reboot your computer
8) Open My Computer and check to see if your CD or DVD drives have returned. You may also want to open Device Manager and verify that the yellow exclamation and error code on the CD or DVD drive is gone.

I got this info at this site and they even tell you other things you can do with drive errors.

get Junit4 working on Centos5

Like most people I prefer to use centos supplied apps from their repos as it just makes keeping things updated easier. So I use the eclipse supplied by centos which does not have Junit4 if you would like to enable it here are the steps I followed:

1.Download eclipse from there site the .tar version

2.Extract folder org.junit4_4.5.0.v20090423 and file org.eclipse.jdt.junit4.runtime_1.1.0.v20090513-2000.jar and copy them to folder /usr/share/eclipse/plugins/ download file junit-4.1jar and place it in folder org.junit4_4.5.0.v20090423

3.Restart eclipse and you should be set. Happy Testing!!!!

NB: Depending on the eclipse version you download the numbers on the folders and files may be different, and incase the new versions require a different file than junit-4.1.jar eclispe will tell you the new version needed.

the Junit-4.1.jar I used is here or you can google it if you want.

Is Linux Ready fo the Desktop

I have read hundreds of articles with the above headline but it wasn’t until I read this article that I realized just how far Linux has come, the fact that it can compete toe to toe with an advanced os like OS x is just insane let alone come out ahead. I can’t wait to see in the years ahead how Linux evolves, I have been using it for the last 5 years and am still impressed and always learning new things about it.

Find files larger than * in linux

I found this neat cmd to use when trying to find files larger than certain sizes e.g

find / -type f -size +200M

If you want files less than that size you can do

find / -type f -size -200M

For other ways to use the cmd check out this post where i got the info from.

This other cmd finds files larger than 10M and calculates their sizes too.

find / -size +10240000c -exec du -h {} \;

Remember in all cases to change “/” to the location you want to search for the files e.g “/home/username”.

Play music with Gtkpod and xmms

By default Gtkpod uses xmms to try and play songs from your Ipod, a few linux distributions come with xmms. If yours came installed with it first remove it as it does not play music from your Ipod. Then go ahead and install
xmms-mp3

You should now be able to play music from your Ipod with Gtkpod. Although xmms is not the latest player I like it because it’s small and lightweight.

Remove spaces from filenames

Removing spaces from filelemanes can be archived using various methods. The command below uses sed to do this, before running it make sure you are in the folder containing the files whose names you want to change.

for file in *; do mv "$file" `echo $file | sed -e 's/  */_/g' -e 's/_-_/-/g'`; done

Which is easier to install win or linux

I was just reading this article and I just remembered going through the same last week as I cleaned out a windoz box for a friend. Rebooting like 20 times after an update of this or that, and that’s on new hardware. I could not even compare the experience to when I do installs on my Linux test box, most installs are done in less than thirty minutes and you are up and running. Installing Linux is such a breeze I don’t even have to think that much about it, while for windoz i have to plan for it and make sure I have enough time to just sit there and watch precious time being wasted.

I had to install the base OS and each service pack separately and restart some more, now on linux you might have to reboot only if there is an upgrade to the kernel, but generally updates don’t require a reboot.

Convert wma/mp3 to ogg

Had a few wma’s I needed to convert to a different format as I was having trouble streaming them over the net with my internet jukebox. I decided to go with ogg since I don’t have a decent hardware setup, GUI converters did not give me the best output. I tried both oggconvert and soundconverter both are great apps, but my hardware didn’t do them justice, but the command line came to my rescue. To convert the wma’s to ogg I used this cmd

find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \;

This will convert all wma’s in the folder and subdirectories to ogg and you don’t have to take out empty spaces in the file names, it handles them ok.
All the new files have a name “track name.wma.ogg” to rename them to “track name.ogg” I was given this handy scripts by my friends at LinuxQuestions.org.

for file in *.wma.ogg; do mv "${file}" "${file%.wma.ogg}.ogg"; done

and

for file in *.wma.ogg; do mv "${file}" "${file/.wma.ogg/.ogg}"; done

This last one is a more general solution that keeps the first part, and the last part, regardless of the extensions used

for file in *.wma.ogg; do mv "${file}" "${file%%.*}.${file##*.}"; done

just change your variable to suit whatever you are working with.