Thursday, October 28, 2010

Sound on a Debian iBook

In Debian, one of the things that didn't work out-of-the-box on the iBook G3 was sound. Forensic research reveals that it's all due to one G5 somewhere in Germany many years ago that went on the fritz when loading the PPC sound module "snd-powermac" during testing (At least this is what I remember from scanning the many forum threads and mailing lists on the subject. But I may have been stoned.). So it wasn't activated by default. This isn't a problem for people with newer PPC machines which use the "snd-aoa" module (Apparently. Again, stoned.), but for people with older Power Macs and 'Books that require the snd-powermac module, you can see how this will cause difficulties.

Luckily it's easy to load the module yourself. First open a terminal emulator and enter:

modprobe snd-powermac

Now test the sound on your Mac. An easy way is to backspace at the terminal prompt--you should hear beeps.

If you hear nothing, then I can't help you. But if you hear sound and you want to keep it functioning on reboot, simply add the line

snd-powermac

to /etc/modules and you're all set.

Also, if you're working from a minimal install, be sure you've installed the packages alsa-base and alsa-utils. Alsa is the sound driver, and it's of some importance to the above.

Monday, October 11, 2010

Speed Up Celestia

If you haven't used Celestia, the free open source astronomy simulation, you're definitely missing out. Not only can you fly all around the solar system and beyond, you can also change the dates and view the universe at any time in the past or future. Wanna see Halley's Comet but you're worried you won't make it to 2061 for its next arrival? Fire up Celestia and move forward to the date in question and see its tail flare in the night sky just as it would in the future.

However, Celestia is very mod-dependent with add-ons for planets, moons and nebulae, etc., which greatly enhance the experience and also greatly add to the system load. There's one tweak, though, you can do which can speed up certain add-ons. Say for example you install a Jupiter add-on that looks fantastic but slows your frame rates to a crawl. Well, if the add-on is a .jpg file, you're in luck. Try converting the .jpg to a .png file and you may find that your frame rates go back up to a non-stuttering rate. This may have something to do with the .png format being uncompressed and therefore less processor-intensive in rendering, making for a much smoother animation.

Either that or my computer's messing with me. And judging by previous behavior, I don't preclude that possibility for a second.

Sunday, October 3, 2010

Improve Ad Blocking in Camino Browser

The ad blocking that comes with Camino out of the box is already pretty good. It's configured through a .css file, but the problem is, as set up, it's not customizable. So what do you do if you're satisfied with Camino's ad blocking except for that one obnoxious (or worse) banner ad that it fails to catch? What do you do if your OCD won't let you move on with your life and say, "Hey, it's just a banner ad. Forget about it"?

Well, it turns out there's a way to make Camino's ad blocking customizable with a simple tweek. The .css file that governs ad blocking is actually in the package contents of the .app folder. So first, uncheck "Block web advertising" in Camino preferences and quit Camino. Then control or right-click on Camino.app in your Applications folder and choose "Show Package Contents" from the menu. Then double click on the "Contents" folder, then the "Resources" folder where you will find the file ad_blocking.css. Move this to ~/Library/Application Support/Camino/chrome and rename it to userContent.css. Now you're all set to start customizing ad blocking by opening the file in a text editor and adding new rules.

For example, if you see an image ad you want to block, find the section in the .css file where the lines start with "img" and add the domain from whence the hell spawn arises. Like if you see a banner and find by right clicking on it and choosing "View Image" that it originates from www.ad-douches.com, you add a new line to the "img" section like img[src*="www.ad-douches.com"], (don't leave out the comma at the end). Now all images from said domain will be blocked.

And that's just the beginning of it. There are more tips on customizing .css files here at Mozilla.org.

This same method also works in Firefox. You can download a popular .css file at www.floppymoose.com, but I think the one that comes with Camino is more comprehensive and up-to-date.