Archive for the 'Linux' CategoryPage 2 of 2

LM Sensors

I knew something was wrong with Turing, my Linux desktop, as soon as I walked into my office this afternoon. There was a new noise that I’d never heard before — a bad sign. With the exception of that time a capacitor exploded, every hardware failure I’ve ever had the pleasure of enduring has been perpetrated by something mechanical.

I was briefly worried that it was a hard disk, but the system was working fine, so I turned my attention to fans. I didn’t even have to open the box to know that it wasn’t a CPU fan. Thanks to LM Sensors, I could tell right away that both CPU fans were humming along at the proper RPM. It also showed me that the temperature of both processors was normal.

At this point, I was pretty sure it was one of my 3 case fans. If I was busy today, I could have just left the whole mess for later.

The LM Sensors project is pretty damn cool.

BTW, it was indeed a case fan, which I pulled out. I’m not even sure I’ll bother replacing it.

Linux Mouse Acceleration?

One thing I miss from my Windows days were the Logitech mouse drivers. Their acceleration curve was a thing of beauty.

The idea behind mouse acceleration is pretty simple. Normally, cursor movement is based only on the distance which the mouse moves. With acceleration, cursor movement is based on both mouse speed and distance. The basic idea is to maintain accuracy for slow movements, yet make it possible to get around without requiring a giant mousing surface. The tricky part is that the acceleration curve has to be so natural that you don’t notice it.

Mouse acceleration on Linux has always been crap. The first problem is that there is no single entity modulating the mouse coordinates. You’ve got to configure X, gpm, SVGAlib, etc. separately. The next problem is that Linux acceleration curves are totally unnatural. They feel horrible. I’d be surprised if anyone used them.

Bah. I need to stop whining and write some code.

ALSA Stereo Channel Swap?

I’ve got the left and right channels reversed on my computer speakers. Moving the actual speakers is too much of a pain. If anyone knows how to instruct ALSA to swap the channels, I’d love to hear about it.

Linux streaming video with MPlayer

Ever since MPlayer came around, video playback on Linux has been a dream. To put it simply, the thing can play freaking anything. MPEG, DVD…check. WMV, AVI, ASX…check. QuickTime? RealVideo? Believe it or not, check. It leverages avifile so it can actually use Windows codecs.

Oh, and if you can watch a streaming video with MPlayer, you can always save it. Just add --dumpstream to your command line.

Sometimes, it requires a teensy bit of manual labor to get things going. MPlayer doesn’t understand complex HTML pages with JavaScript and ActiveX controls (well, technically Linux doesn’t understand ActiveX controls, but that’s a feature).

For example, today I wanted to watch Herb Sutter’s OOPSLA ‘04 keynote on C++/CLI. Check it out here.

This is one of those annoying pages that tries to embed WMP in your browser window. Screw that. All one needs to do is find the actual link to the video. First, I wget’ed (wgot?) the url, using the --user-agent= switch to masquerade as Internet Explorer. Buried in the output was a link to the ASX file. After wget’ing that, I had a nice link to the WMV itself.

mplayer mms://foo.com/bar.wmv

It’s moments like this when I remember why I use Linux for fun and Windows to pay the mortgage.

wget

“wget –mirror” is officially my favorite method of “leeching”. It even works on ftp sites.




Creative Commons Attribution-NonCommercial 3.0 United States
Creative Commons Attribution-NonCommercial 3.0 United States