Saturday, August 29, 2009

Useful Linux Commands

A place to post useful Linux operations in case of organic memory failure:

Convert audio files with bitrate (-b) and sample rate (-ar) options:
avconv -i input.wav -b 64k -ar 41000 output.mp3

Determine which services are running:
service --status-all

Determine Distro Release Version:
lsb_release -a

Store a data CD on your filesystem (this is not one I forget but it pertains the following):
dd if=/dev/cdrom of=/some/dir/data.iso

Mount your virtual data CD:
sudo mount -t auto -o loop /some/dir/data.iso /mnt/vrtl-cd

Check your Linux software RAID status:
cat /proc/mdstat

Ext3 Filesystem Check
sudo umount /SomeFileSystem
sudo screen fsck.ext3 -v -f -p -D -C0 /SomeFileSystem

Friday, August 14, 2009

Stop Windows Messenger in XP Pro

Windows Messenger. So annoying. Disabling it from starting is a wonderful thing. Here's how:

Use the Group Policy (gpedit.msc) snap-in to turn on the Do not allow Windows Messenger to be run option.

  • To use the Group Policy snap-in, you must be logged on to the computer using an account that has administrator permissions.
  • This method prevents programs that use the Messenger APIs from using Windows Messenger. Microsoft Outlook 2002, Microsoft Outlook Express 6, and the Remote Assistance feature in Windows XP are examples of programs that use these APIs and that depend on Windows Messenger.
To turn on the Do not allow Windows Messenger to be run option, follow these steps:
  1. Click Start, click Run, type gpedit.msc, and then click OK.
  2. In Group Policy, expand Local Computer Policy, expand Computer Configuration, expand Administrative Templates, expand Windows Components, and then expand Windows Messenger.
  3. Double-click Do not allow Windows Messenger to be run, and then click Enabled.
  4. Click OK.
  5. On the File menu, click Exit to quit the Group Policy snap-in.
Thank you Microsoft KB!

Saturday, August 08, 2009

Pick Up The Pace

No, not the Picante sauce. I much prefer Arriba! Fire Roasted Mexican Red Salsa (gallon size!) that my wife found at Costco. Just heat it up a little in the microwave and Mmmmm! Awesome.

I made my own "fire roasted" salsa by roasting all the veggies on the grill once. It was great. A friend of mine said I should bottle it up and sell it. Guess Riba Foods beat me to the punch and they appear to be based in Texas, so of course they are authentic ;-)

Ok, where was I? Oh, no blogging in a long time. And a lot less tech blogging for a while. Lame. Excuse? No broadband at the house. No one would run cable, DSL or anything out where we moved. I was stuck with a super-expensive and quite slow (by the standards I was used to at my previous residence) Sprint "air card". It was expensive, and painfully slow but it served it's purpose (kept me on-line for work—on my dime).

But now, by some miracle (and someone in my area with connections at AT&T) we have 3Mbit DSL! Yes! No, it's not the 6Mbit I was getting at the old house (sighs heavily longing for those days) but it makes downloading Linux distros a whole lot easier! I think we are capped at 2.5Mbit as it kept dropping when we were getting 3+, disappointing but still much more usable then what we had.

Now if 4G lives up to expectations, I may return to the air card thing...

Things I want to start posting again:
  • Linux stuff: Distros, How-To posts, Reviews, etc.
  • Windows stuff: Tips, Tricks, FIXES
  • Miscellaneous Tech Items
  • Basically the things I used to post about
We'll see. For some reason I don't seem to have as much time & energy as I used to. Weird. But I'll try for the two to three people who read this blog, "thank you for your support." (Now there's an old quote, Ha! Wonder how many people would remember where it came from.)

I used to really like writing. I really don't know if I am any good at it, but you be the judge.

Saturday, July 04, 2009

String Hang

Ping... Ping... Ping...

Every time I hit the bar on my Super Strat I could hear the strings hanging up somewhere and making that awful pinging noise. I had a graphite nut installed in the neck a long time ago with the hope that it would help with whammy tuning with the stock bar—but even today with the Planet Waves locking tuners and the Wilkinson tremolo it was making that noise.

I sprayed on some GC Electronics De-Ox-Id at the bridge and nut and problem solved. The only problem I have is, how is it going to react with the graphite nut? I hope I didn't cause more problems then I solved today.

July 6, 2009
Hmm, that didn't last too long. The annoying ping came back. I will have to try something else. Graphite powder? I don't know. "Google is [my] your friend..."

Sunday, May 24, 2009

Foxit PDF Reader

I was loading up the latest Adobe Acrobat reader in Windows XP the other day—it took forever! And, it took forever to open. Total, complete bloatware! What is with that? It's just a PDF viewer—or at least it should be...

Enter Foxit Reader 3.0

Man, now that's just what I needed. A PDF reader that isn't hundreds of MBs, integrates with Firefox, opens quickly and displays properly. Get it.

Wednesday, May 13, 2009

FLAC To .ogg Vorbis

Funny how things go full circle sometimes. I initially worked on converting all of my music CDs to Vorbis files, a tedious and rather boring adventure in itself. I was reminded during a conversation on slashdot that it might be wiser to convert to FLAC first and then I could transcode into lesser quality codecs when needed. I thought it was a reasonable idea—too bad I had all my music in Vorbis format at the time! There's no way of going up in quality...

Time went by. I started another media-shift project, this time CD to FLAC, as I should have done in the first place. Now I actually have items in that collection that I need to transfer down to Vorbis! Ironic... such is life.

Enter our friend oggenc. Simple & effective, yet how to do entire directories in one shot? Fret not, there is nothing to it:

cd /dir/with/flacs
oggenc -q6 *.flac

I'm transcoding some files now that don't appear to have any tag info, so I'm not sure that transfers, but otherwise it is working swimmingly.

Here's a perl script option that might be more useful, but I haven't tried it so your mileage may vary:

# Copyright (c) 2004 - Jason L. Buberel - jason@xxxxxxxxxxx
# Licensed under the GNU GPL.
# Modified by Dax Kelson to run on a native UNIX/Linux box.

use Getopt::Long;
use File::stat;

$sourceDirPrefix = "/export/media/music/flacs";
$destDirPrefix = "/export/media/music/oggs";
$quality = 5;
GetOptions ( "source:s" => \$sourceDirPrefix,
"dest:s" => \$destDirPrefix,
"quality:i" => \$quality,
"force" => \$force );

# Commands
$oggCommand = "oggenc";
$flacCommand = "flac";

@dirs = `cd "$sourceDirPrefix" && find . -type d -print`;
@files = `cd "$sourceDirPrefix" && find . -type f -name "*.flac" -print`;

# Check to see if our find command found anything to convert.
if ( scalar @files == 0 ) {
die "Found no .flac files to convert!";

# recreate the directory hierarchy
foreach $dir (@dirs) {
$dir =~ s/\n$//;
$dir =~ s/^\.\///;

# check to see if the destination dir already exists
if ( !(stat ("$destDirPrefix/$dir")) ) {
# stat failed so create the directory
print "Creating output dir:\n $destDirPrefix/$dir\n";
$dir =~ s/\`/\'/g;
$result = `cd "$destDirPrefix" && mkdir -p "$dir"`;


# now process the actual sound files.
foreach $file (@files) {
$file =~ s/\n$//;
$file =~ s/^\.\///;

# figure out what the destination file would be...
$destinationFile = $file;
$destinationFile =~ s/\.flac*/\.ogg/;

# now stat the destinationFile, and see if it's date is more recent
# than that of the original file. If so, we re-encode.
# we also re-encode if the user supplied --force
$srcInfo = stat ("$sourceDirPrefix/$file");
$srcModTime = $srcInfo->mtime;
$destInfo = stat ("$destDirPrefix/$destinationFile");
if ( $destInfo ) {
$destModTime = $destInfo->mtime;
print "Skipping current file: $destDirPrefix/$destinationFile\n";
# if the destination file does not exist, or the user specified force,
# or the srcfile is more recent then the dest file, we encode.
if ( !$destInfo || $force || ( $srcModTime > $destModTime) ) {
$file =~ s/\`/\'/g;
$inFile = "$sourceDirPrefix/$file";
$outFile = "$destDirPrefix/$destinationFile";
$inFile =~ s/\0//g; $outFile =~ s/\0//g;
$result = `$oggCommand -q $quality -o "$outFile" "$inFile"`;


Sunday, May 03, 2009

Metamorphose File - Folder Renaming

This is a pretty cool application. Something that should be brainlessly easy under the command line in Linux—all I wanted to do was replace one character in all the filenames in one directory. Well, I ended my search when I found Metamorphose—a Windows app that would do the trick which I could run against the filenames since the directory is on a Samba share. In seconds it was all over.

It makes me unhappy when something which should be blatantly easy from the command line ends up requiring a Windows application. Well, I'm sure it is simple. I'm pretty certain I even know how to do it. If so... I forgot...

Old age or Too Much Information

Friday, April 10, 2009

Virtual CD/DVD Disks From .iso Files

Regardless of popular opinion, Linux can often be so much more user friendly then Microsoft.

With one simple command I can access an .iso file as if it were an actual physical CD or DVD disc. Why must everything in the Windows world a) be such a pain in the butt, b) usually cost extra to implement a needed feature (virtually always free in GNU/Linux) and/or c) scare away the average user who just wants things to work without playing (or paying) the geek?

First let's examine the Linux version of adding virtual CD/DVD-Rom from an .iso file. Open a terminal session. Ready? Here goes:

sudo mount -o loop some_image.iso /mnt/img

Now was that so hard? Oh, and you can use any mount point you want: /media/lazy; /mnt/disc; etc. Don't have a mount point you like? No sweat. Just add one before you issue the command above, for example:

sudo mkdir /mnt/disc


sudo mkdir /media/image

You get the idea... Once your virtual CD/DVD is ready, navigate to the mount point with a gui file manager or cli and enjoy your virtual CD/DVD. Why burn a disc if you don't have to?

You can get similar results in Windows XP, but it's just simply not as quick, easy or user-friendly as Linux in my biased opinion.

Working with an .iso as a virtual CD/DVD in Windows XP

There are a multiple commercial tools available that will allow you to virtualize an .iso file into a CD/DVD drive, but free is good too. Microsoft offers a free (unsupported) application that will provide you with the functionality to add a virtual CD/DVD-Rom drive from an .iso file in Windows XP similar to what we did above with Linux--the biggest disadvantage is that only a user with administrator rights can utilize the virtual drive. Not so under Linux.

Download winxpvirtualcdcontrolpanel_21.exe from or from Microsoft.

Log into Windows XP as the Administrator or as another user with admin rights.

Run the downloaded file to extract the files to a working directory.

Next, from the command line or the gui file manager, copy VCdRom.sys from your working directory into the %systemroot%\system32\drivers folder.

You can do this with the cli (command line interface, you know: the DOS window) by doing the following:
  1. Click Start → Click Run → Enter cmd → Click OK

  2. Enter copy %systemdrive%\Program Files\msvcd\VCdRom.sys %systemroot%\system32\drivers (all one line)

  3. Press Enter

  4. Enter exit to close the DOS window

Of course you can also copy this file with the gui (graphical user interface, you know Explorer) file manager.

Running VCdControlTool to create your virtual DVD/CD

  1. Open the winxpvirtualcdcontrolpanel_21 application from your working directory

  2. Click Driver Control

  3. Click Install Driver

  4. Navigate to VCdRom.sys or enter %systemroot%\system32\drivers\VCdRom.sys in the File name field

  5. Click Open

  6. Click Start

  7. Click OK

  8. In the Virtual CDRom Control Panel click Add Drive

  9. Click on the drive that appears in the window to select it

  10. Click Mount

  11. Navigate to the .iso that you wish to virtualize as a CD or DVD disc

  12. Select it in the File name field and click Open

  13. Click OK

  14. Click OK in the Virtual CDRom Control Panel window to close it.

You are now ready to use your virtual disc just as you would a physical CD or DVD.

Once you are finished with the virtual disc:
  1. Open the Virtual CDRom Control Panel application

  2. Click Eject

  3. You may now mount another .iso file,

    1. or to finish your session leaving the virtual CD/DVD drive assigned, simply click OK

    2. to end your session and delete the virtual CD/DVD-Rom drive, Click Remove Drive & OK
Final thoughts... Today, the Linux desktop works just as well or better then anything Microsoft is putting out. I find Linux on the desktop often outperforms the Windows desktop in resource management, stability and performance. It is unfortunate that it is not more widely utilized. Of course this article was not about the pros & cons of competing OS desktops. I just think it provides an example of how powerful and simple Linux can be (for free) when compared to the Microsoft offerings.

Note: Use the above information at your own risk. Your mileage may vary. winxpvirtualcdcontrolpanel_21.exe is a free, unsupported application supplied by Microsoft for Windows XP only. The above information is based on my usage of that application as of today only. Others may have more information about usage details and troubleshooting.

As to the Linux details, yeah, use as your own risk (blah blah blah), but don't be scared. It just plain works.

Wednesday, April 08, 2009

DriveImage XML Backup System

This has probably been around for a while without my noticing—I focus on Linux tools for the most part so I'm sure I missed it.

Runtime Software's
DriveImage XML however is extremely cool! Free for personal use. "Hot Image" backups of drives that are in use, and other really cool stuff:
DriveImage XML is an easy to use and reliable program for imaging and backing up partitions and logical drives.

The program allows you to:
  • Backup logical drives and partitions to image files
  • Browse these images, view and extract files
  • Restore these images to the same or a different drive
  • Copy directly from drive to drive
  • Schedule automatic backups with your Task Scheduler
Image creation uses Microsoft's Volume Shadow Services (VSS), allowing you to create safe "hot images" even from drives currently in use.

Images are stored in XML files, allowing you to process them with 3rd party tools. Never again be stuck with a useless backup!

Restore images to drives without having to reboot...
You can create a boot CD to run DriveImage (not officially supported--but there is a video available to show you how).

There is no support for the Personal Edition, but there is a quick YouTube How-To video that will get you started using the application in no time.

I have already backed up my Windows XP partition with this amazing software, what are you waiting for? :-)

Get DriveImage XML Today!

PS Their GetDataBack application looks pretty awesome too. My Dad could have used this when his HDD crashed a while back... if we'd only known about it then.

Wednesday, April 01, 2009

Peak Oil? We're Not Done Yet

I was looking back through a couple of old posts on the idea that the world has peaked out in oil production. Um, that's not quite the case. Not if we are willing to go after our own reserves. This according to the government's own reports:
Using a geology-based assessment methodology, the U.S. Geological Survey estimated mean undiscovered volumes of 3.65 billion barrels of oil, 1.85 trillion cubic feet of associated/dissolved natural gas, and 148 million barrels of natural gas liquids in the Bakken Formation of the Williston Basin Province, Montana and North Dakota.
If Obama will let us go after our own oil supplies, we can end dependence on foreign oil and provide him plenty of time to develop his (currently unrealistic) "green" renewable sources.

By the way, how is carbon dioxide NOT green? Plants love it! They would die without it! When did CO2 become toxic?


Saturday, January 31, 2009


So I don't forget...

flexbackup -extract -onefile ./one/two/three/dir-I-want