Friday, December 23, 2011

# mount -o loop mycool.iso /mnt/cdrom

So I know Windows XP is really REALLY old, but when I'm forced to use it, I miss the ability to mount ISOs oh so simply in Linux. Luckily I can install software like WinCDEmu that almost makes up for this gross oversight. :). Free, open source, right click and mount your ISO.

Tuesday, December 20, 2011

My mother-in-law's linux mint laptop

My mother-in-law's laptop died recently. When I examined it, I found the hard drive completely dead. Unfortunately no-one listens to the tech guy regarding backups, but she wasn't too bothered. Bought a new drive, installed it and since we couldn't find the recovery dvds (don't ask) I decided to install Linux Mint 12 (64-bit) on her HP Pavilion dv6-2170us laptop.

All went well except for one hiccup; the webcam. My mother-in-law loves to Skype and at the very least I had to make sure that was working. After googling around a bit I found directions to install the Video4Linux control panel to tweak the camera settings and for some reason a script to launch Skype with a specific library preloaded.

#!/bin/bash
#LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so /usr/bin/skype

I had tried the first library and it didn't work, so the second attempt I left. Still didn't work. Then I noticed something. When I installed Cheeze (so I could test the webcam without having to call someone on Skype), the camera wouldn't work until I did a preview in the Video4Linux control panel.

I had no idea why this was, but in an effort to get this working, I decided to automate it. Gnome3 is nice, but ALL of the advanced controls for anything you want to do is GONE. Ok, I might have overstated that a bit but it was a bit frustrated being familiar with Gnome2. At least the Gnome Shell Extensions in Mint made it easier to use.

After investigating how the Video4Linux control panel did its preview I wrote the following script named "initialize.camera.sh" and set it to executable (sudo chmod a+x initialize.camera.sh).

#!/bin/sh
mplayer tv:// -vo test.mpg

What the script essentially does is grab a frame from the camera and directing the output to a file. Something is wrong with my mplayer syntax, but it works, so I'm good. Fight the battles worth fighting and all that.

After I confirmed the script was working, I had to add it to the startup when she logged in, so from a terminal I ran gnome-session-properties, added it as a startup application, did a reboot test and voila!