Geeky Stuff

Pretty It Up

If you don't know, I use Linux on my work desktop. Ubuntu to be exact. It's pretty awesome, but there are still a few applications that just run better on Windows. And some are plain not available for Linux (gee thanks Google developers).

So for Windows machine I am particularly happy to show off this delicious piece of programming pie.

John's Desktop background switcher 

It has many options for switching your desktop backgrounds, but my favorite is the RSS feature that pulls photos from my favorite Flickr photos. Every 5 minutes I get a new set of photos:



Anyway, if you're looking for something new, you may want to check this out. It's free for all you Windows lovers out there.
By anxiousdog on 20 Jan 2009 | 0 comments

How to Capture Sound in Ubuntu Hardy Heron

I remember that I had to search high and low for a simple-ish solution to my need to record sound from my computer. My specific example is due to the podcast that I record remotely. Others may want to record a movie clip, or a song to convert into a ringtone. Either way, Hardy Heron doesn't make this as easily as I'd like.

I use Audacity for all of my podcasting and music mixing. There are other free options out there, but for the sake of this blog we're going to record sound using Audacity.

First, double-click the volume control icon found in your top panel. In my install it is on the top right of my main screen.

Go to Edit > Preferences and make sure you have a check mark by the following: Master, PCM, Line-in, Line-in Capture, CD, CD Capture, Microphone, Microphone Capture, IEC958 Output, PC Speaker, Mix, and Duplicate Front. I'm not sure you need all of these, but this is how I got it to work. :)


Next make sure that you have unmuted all of the options except the PC speaker. Increase the volume as well. Here's how mine looks:


Next click on the Switches tab and check Mix as well as IEC958 Output and close the window. Again, not sure if you need IEC958 Output, but this is what's working.

Next you'll want to go to System > Preferences > Sound. Change all of the devices to use ALSA - Advanced Linux Sound Architecture except the Default Mixer Tracks. That one should be VIA 8237 (Alsa Mixer). Click Close.



Now one final step before you can test!

Open Audacity and click on Edit > Preferences. You should see two options for the Audio I/O. Make sure that the Playback device is ALSA: default and Recording is ALSA: VIA 8237: VIA 8237 (hw:0,0) and click OK.


Now you can test! The easy way to test this is to fire up your music player and play a file from your computer. Open Audacity and click the Record button. You should see the blue line jumping up and down as it captures sound.



Hope this helps someone out there. I know I may need to come back to this blog should I ever rebuild or need to help someone else.
By anxiousdog on 16 Oct 2008 | 1 comment

Turn Off Backgrounds In Drupal Emails

This  post is probably more for me than 95% of my blog readers, so bear with me here. I had a seemingly small issue with my comments and contact form emails. Every email that Drupal sent to me would have my website background as the background of the email. If you have ever used my contact form, you may have noticed this when you received an auto response from me.

I searched several places on how to turn this option off, but I didn't seem to find anything. I dug down into the Contact and Comment modules and nothing. Finally I started looking into the Mime Mail module that I use to send the actuall emails. That's when I noticed a little piece of code that was causing my issues:

functiontheme_mimemail_message($body,$mailkey=null) {
 $output='<html><head>';
 $output.='<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';

 // attempt to include a mail-specific version of the css.
  // if you want smaller mail messages, add a mail.css file to your theme
 $styles=path_to_theme() .'/mail.css';


As it turns out, the Mime Mail module allows you to create a style sheet called "mail.css" and style your emails. If it doesn't see that lovely file, it pulls the tags from your main style sheet. In my case it would pull the body tag which looks a little like this:

body { background: url(bodybg.gif) repeat; color:#555; }

I now see that's why the emails had that background. I could have changed the module to exclude  the html output, or the CSS files altogether, but I really hate to hack a module and then when I upgrade I forget about it (and the hack I made), or just break it altogether. My down and dirty fix was to create a file called mail.css in my theme folder. I left the file blank until such a time that I decide I'd like to style my emails.

So there you have it, just a quick little reminder to myself and anyone else who may run across this problem.

By anxiousdog on 10 Oct 2008 | 0 comments
login | register