The Gray Matter
Not The Dark Matter
Sign Up!
Login
Welcome to The Gray Matter
Saturday, September 04 2010 @ 05:33 AM EST
Share View Printable Version

Drive bay fan mod

Technology

 I was having some worrying cooling problems with my server at home.  The hard drives running around 60C, CPU and Case temps not that far behind.  Summer is ramping up here in Oz and I thought I should go and make some case mods to try and cool things down a little.  Here's the first problem; the machine has 2 SATA2 500GB 7200RPM drives, 4GB (2x2GB) 1066MHz RAM, a Quad Core Phenom (9650) running at 2.3GHz....and it's all jammed into a slim desktop case mounted vertically under a desk!  What in the name of all things good can I do?  Then I remembered the 5.25" drive bay with nothing in it.  Bliss.

The next problem was sourcing a BLACK cooler/fan module for it.  Found one on eBay but the colour (according to the seller) is "random"...WTF?  So screw that idea.  Off to Jaycar for a trio of 40mm fans, scavenge an old removable drive caddy (to be sacrificed to the jigsaw).  Add a soldering iron and a little elbow grease and VOILA!

Okay, it's ugly...but I can make it pretty with some anodised stainless steel or aluminium to match the case...so shaddup ok!  Now all this ugliness would be of no use unless the precious internals were now hanging with the cool kids right?  I offer you the pudding...containing the proof:

Share View Printable Version

Finally - automatic old message deletion in Apple Mail

Technology

 For quite a while it's bugged me that there was nothing in Apple Mail that allowed you to delete messages automatically older than a certain number of days.  For me this is a big problem as I subscribe to a number very high volume mail lists and having to muck around with "Smart Mailboxes" to find the old messages and then delete them manually was a royal pain.  Well, I decided to get in a New Year's resolution early and put in place a more elegant solution.  My solution (click "Read More" below) is built on the shoulders of "tw" whose original work can be viewed here (opens new window). Please see their explanation on how to create the rules etc in Apple Mail. "tw" also has some good examples of other message finding techniques that can be incorporated into my script.

Share View Printable Version

The Simple Things

Technology

 Sometimes the simple things are the things that irritate you the most, or are the most poorly implemented solutions to a simple problem.  Take OSX's lack of a countdown timer - for me, a major pain in the butt.  However, a simple dashboard widget does a stellar job of implementing this feature in an unobtrusive, elegant way.  I give you (drum roll please): 3-2-1 - no, that's not the countdown for the drum roll...that's the software's name!

 

Simple name, simple software - GREAT result.  Kudos to the devs.  Punch in a time, hit the green square and return to your desktop.  When the timer runs out, dashboard takes focus and sounds a little (customisable) sound.  Voila.

 

So why the hell would someone need a countdown timer?  Simple - the next time you tell your wife, "I'll be about 10 minutes" then emerge from your office, with bloodshot eyes, sore hands, a crick in your neck and a bad odour several hours later, you'll remember this article and download the freaking software! :)  Or in my case, avoid the situation in first place...honest.

 

Share View Printable Version

Internet Censorship

Technology

Ordinarily I don't make a big song and dance about stupid decisions made by politicians - I've come to understand the average polly has the intelligence of a lobotomised amoeba...but I digress.

Many have heard me lament the short-sighted, wasteful policies implemented by various Ministers for Communication (particularly Senator Alston) under the previous regime in Canberra. I hate to say it, but the incumbent administration has truly exceeded even my worst imaginings. Everyone on this list knows the Internet, and has come to rely on it one fashion or another so I think it prudent to at least make you aware of the level of stupidity the current government has stooped to.

The run down of what is proposed

Read it, and make your own choices. Take it from me, being someone who has worked at the ISP level for a company that hosted all of Telstra's wholesale ISPs and hosted all of TransACT, AAPT and Telstra-Clear NZ, this is a bad policy for all Australians. Even if you ignore the policy, or moral standpoints, the technology to implement this simply does not exist. The outcome will be millions of tax payer dollars wasted on grand ideas, with questionable motivations, to attempt something that can only be achieved under the draconian levels of government oversight and intervention seen in places like China, Burma and North Korea.

I always thought we lived in a democracy populated by intelligent people able to make their own decisions. I DO NOT need the Australian Labour Party, or any other political party, to dictate what is and isn't appropriate for my children or myself.

Please read the link above and if you are motivated to do so, please contact the minister with either your support or objection to his proposal. I have added a block that is persistent across my site to drive as much traffic as I can to the fight against this policy. If you are in a position to do likewise, please consider it.

Share View Printable Version

Compiz + Emerald in Kubuntu (Hardy 8.04)

Technology

I've seen a lot of posts about how to get Compiz+Emerald working together in Kubuntu that involves a lot of poking around and creating scripts etc. However, there is a "better" way that is from what I can see, the K/Ubuntu preferred method. First some background. Like may others, I wanted to get Compiz and Emerald all singing and dancing on my desktop system at work but was frustrated by the lack of integration with GUI management tools - specifically with regard to getting Emerald to start at login. The general sequence of events goes like this:

  1. Install restricted drivers and "nvidia-glx-new" package (or the closed ATi driver package).
  2. Install every *compiz* package available (including ccsm)
  3. Install every *emerald* package available.
  4. Turn on desktop effects in KDE and specify to use a 3rd party config tool.
  5. Configure Compiz to your taste with "ccsm"
  6. Run "emerald --replace" to get rid of kwin/metacity

Lovely! Kudos to the package maintainers for making it this easy :) However, when you log out (reboot etc) and back in again, the compiz compositing manager starts, but not emerald! Why? Well the simple answer is that Emerald was never ASKED to start. So the better question is; why wasn't emerald asked to start? The answer to which is buried in a wrapper at /usr/bin/compiz-decorator. Basically this script is called by compiz when it starts to start your preferred window decorator (have a look in the "Window Decorations" configuration in CompizConfig Settings Manager, ie, "ccsm"). A few posts I've seen have suggested replacing this "compiz-decorator" with "emerald --replace" but this removes some of the fall-back/redundancy provided by the bundled script. This got me thinking - there must be a way to tell "compiz-decorator" to use Emerald...and there is!

If you open /usr/bin/compiz-decorator (it's a shell script, so any old text editor will do) and scroll down a little, you will find this block:

# start a decorator
if [ -x $emerald ] && [ "$USE_EMERALD" = "yes" ]; then
    DECORATOR=emerald
elif [ -x $gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then
    DECORATOR=gtk-window-decorator
elif [ -x $kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]; then
    DECORATOR=kde-window-decorator
elif [ -x $kde4-window-decorator ] && [ x$KDE_SESSION_VERSION = x"4" ]; then
    DECORATOR=kde4-window-decorator
fi

Notice the check to see if "USE_EMERALD" is set to "yes"? Well, scrolling back you will find a section like this:
if [ -z "$XDG_CONFIG_HOME" ]; then
    test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager
else
    ...etc...

Ok - so now we have the two pieces of the puzzle; firstly why Emerald isn't being to start and what files are read to get the instructions in the first place. So the final resolution is dead simple. All we need to do is create a file "$HOME/.config/compiz/compiz-manager" and populate it with "USE_EMERALD=yes" like this:
echo "USE_EMERALD=yes" >> ~/.config/compiz/compiz-manager

Voila. Log out and back in again and you'll see Emerald start :) Best bit is this modification will make the start-up consistent across upgrades of K/Ubuntu, and will work regardless of your choice of Gnome/KDE/XFCE etc. In other words, it's desktop environment neutral which is what makes this approach a little different to most of the others I've read online that seem specifically geared to one window manager/desktop environment or another. Also note, you can over-ride any of the variables in "/usr/bin/compiz-decorator" using additional declarations in the local ~/.config/compiz/compiz-manager file. This could be handy if you want to play with development versions of Emerald.

Share View Printable Version

The CPU - where to from here?

Technology

Modern computers have at their heart a piece of equipment commonly referred to as the "Central Processing Unit" (CPU). This is common knowledge and regularly used as the final determinant factor in a computer's performance. The reality of a machine's performance, however, is a much more complicated equation. Like many devices, the overall performance is a measure of the sum of parts that compose the system. Similarly, a single poorly performing component can undermine, or even negate, the performance of the other components. Using blindingly fast CPU's in a system with very slow memory will result in a computer that is well below accepted standards. However, fast components are becoming very cheap and offer other advantages beyond the initial design goals of the component in question.

For instance, most people are unaware that their video card has a highly specialised processor call a "Graphics Processing Unit" (GPU). The GPU, unlike the CPU is designed for a set of very specific calculations; usually matrix transformations using arbitrarily precise floating point numbers - usually double precision floating points, but not always. The GPU typically runs at a slower clock speed than the CPU and uses a very fast, purpose-built memory subsystem of its own too. Combined, the video card's GPU and memory are capable of some truly mind-boggling calculations. Here's where things get interesting; many facets of science and "non-graphic" mathematics use exactly the same type of calculations the GPU was designed for. In fact nVidia has even released a programming framework (called CUDA) to leverage their GPU's for doing things other than playing games. Researchers in Belgium at the University of Antwerp, have now been able to build a system, capable of super-computer speeds, using commodity graphics cards totalling eight GPU's!

For quite some time now, I've considered the role of the general purpose microprocessor, aka CPU, rather limiting. As stated before, a single component doesn't in itself determine how fast a machine will be, but a single component can certainly determine how slow a machine will be. I believe the time is coming when to move beyond current performance limitations, the computer industry will need to utilise specialised processors for specialised tasks. Given the generalist role a CPU must undertake, by design it is a compromise to balance performance across a broad set of tasks, consequently it will never excel at any specific task. However, if the CPU could offload particular tasks to other, external, processing units specialised for that particular task the overall performance of the system would increase significantly. We have already seen this in limited ways with the advent of hardware-based storage controllers, dedicated graphics processors and I would argue the advent of the northbridge for direct access to various busses that link the core of the system together. Prior to the separation of the CPU and northbridge, all input and output (I/O) to any device was forced to go through the CPU. With northbridge controller the CPU could be freed up and many devices are capable of direct communication and data transfer.

In conclusion, I look forward to future of the CPU; whether it's a Intel "Core", IBM "Cell" or any other processor. However, what really interests me, is the rise of the specialist processor and how we as programmers and system engineers can find new and innovative ways to implement them to augment and enhance overall system performance in specialised ways.

Credits:

Share View Printable Version

The Grays go Gigabit!

TechnologyIt's taken a while but the cost for gigabit ethernet is finally down to a point that I considered justifiable. So I lashed out (sic) and bought a 5 port Dlink gigabit switch. This then connects to my 8 port 10/100Mbps switch/router and ultimately the Internet. The machines on the Gbit switch are simply my home server, Nat's desktop, and my Mac Mini. I've also run a patch cable for my Macbook Pro for the odd occasion I need better-than-wifi speeds. The wireless access point hangs off the 8 port 10/100 switch as it will never do better than 54Mbps, so there's no reason to waste a gigbit port on wifi! All in all it's been a relatively straight-forward transition except for Nat's desktop. Her machine would only sync at 100Mbps on the 5 metre CAT5e cable between her and the new switch. So I went out today and bought 6 metres of CAT6 from Dick Smith Electronics (AUD$10 all up) and crimped the ends myself. For a similar pre-made CAT6 cable, they were asking around double what I paid (thieves!).

The results have been what I expected. Loading photos and large files from the file server is now a LOT faster. I especially noticed the difference when browsing the file server in "thumbnail" mode; it was as fast as it would be if running locally. The Time Machine backups for my Mac Mini are now super fast to the file server too which is great as the system (the Mac Mini) bogs down a little while it does the backup. Basically, with the consumer-grade hard drives in my server, I am now limited by the speed of those drives and the CPU power in the clients far more than the network fabric. It's nice to know that as I develop this network any gains in the server speed will pay off for the clients on my LAN.

Share View Printable Version

Southern Cross Cable Damaged

TechnologyI've just received an e-mail from an ISP we manage at work that the Southern Cross Cable has been damaged due to storm activity. So if anyone notices a slow-down between Australia and the USA, this would explain it. I will be curious to see if InterNode's investment in bandwidth via Asia to the USA shields their customers from this most recent Southern Cross dilemma. Internoders.....comments??
Share View Printable Version

24 hours in OSX Leopard + iLife '08

Technology

I'm not going to bore everyone with stuff they've read elsewhere. This is purely my first impressions for the sake of posterity. So with no more intro, here it is, my top five new features in Leopard/iLife '08 I can't live without:

  1. Spaces. Some people hate them, I can't live without them. Organise my work spaces into logical areas in a virtual space. Make sense? No? Tough. Get a Mac!
  2. iPhoto '08. Nothing revolutionary in the product but a nice evolution from the '06 iteration I've been used to. The interface is a lot more intuitive and polished. Now to find another plugin that will allow me to upload directly into the galleries here at the Gray Matter and I'll be set.
  3. Tabbed terminals. We've all (by now) seen tabbed browsers and Unix environments (KDE/Gnome/Enlightenment/et al) have had tabbed terminals for a long time. It's so good to have the same functionality in OSX. Now I can open one terminal program and run many shells without cluttering up my work space. W00t.
  4. Apple Mail. The new RSS integration is superbly done and well integrated. I can now read my RSS feeds just as easily as my e-mail. This totally kicks butt.
  5. Speed. It's faster than Leopard from a purely subjective point of view. Applications open faster, switching between apps is snappy without significant lag, boot up and shutdown is not painful. All round, even with all the eye-candy, the whole system feels faster.

Another noteable mention is the "stacks" feature which greatly reduces clutter in the dock. Don't know what I'm talking about? Then get a mac :P Seriously, you wont regret it.

I'm not going the end with "insert non-Mac system here" bashing, but I will say that in terms of intuitive interface, usability/features out-of-the-box, speed and overall "polish" Leopard makes the other offerings in the market today look decidedly dated. Vista looks good, don't get me wrong, but damn(!!) could BE any slower? Linux (the desktop distributions) are fantastic for out-of-the-box features and productivity tools but compatibility problems with new and/or exotic hardware can make getting going non-trivial, especially for the new Linux user.

Compatibility is really a moot point on OSX; if you don't own a Mac then you can't install it (without some serious hacking). That in a lot of ways is what so good, and at the same time bad about OSX - Apple never have to worry about obscure hardware combinations, but if you don't like their hardware, there aren't a lot of options to modify specifications greatly. If they didn't build it, you're on your own. Microsoft and Linux are in a totally different world of pain having to ensure support for all manner of different components, and then having to make sure they all play nice together, which we all know is easier said than done. I'm not convinced that Vista would be selling as well as it is if it weren't for the OEM market bundling deals that Microsoft have done - regardless of the legality or "fairness" of those deals (I'm not going into that...most people know my thoughts).

But I digress. Leopard is everything we were promised for the next iteration of OSX; Apple did not disappoint. However, initially the annoucement was OSX and iLife would be bundled and not be separate products once Leopard hit the market. This didn't happen. My only guess is that after seeing what was on offer in Vista, Steve Jobs decided there was no good business or marketing reasons to bundle the two cash-cows for Apple to remain competitive. Who knows. Even so, the purchase price for OSX+iLife is still significantly less than a comparable Vista bundle and you get arguably the best desktop operating system available, period. I'm one very happy Mac user.

Share View Printable Version

The curse of old software

Technology

After spending a fair amount of time yesterday getting my Mac Mini rebuilt as my desktop machine (it has spent the last 18 months of its life faithfully as the Gray Matter mail, web and everything-else server) I was most disappointed this morning when I couldn't get Apple Mail to stay up long enough to read a single message. After about an hour of googling I decided that none of the fixes seemed to be applicable to my situation.

So I decided that rather than try and let someone else solve the problem, I'd try and think it through. Being a new installation, less that 24 hours old, it's not too hard to go back in your mind through the step you made in building the system. So one at a time I started mentally trying to pinpoint the moment when everything went pop. Then it dawned on me. Before I put the mini to sleep last night I installed Growl. Even though their site simply advises you need OSX 10.4 or better (I have 10.5.1) there are evidently some problems with Growl 1.1.2 and OSX 10.5.1; specifically Apple Mail. In short, the mail plugin for Growl will cause Apple Mail 3.1, as shipped with OSX 10.5.1 to completely fail with a segmentation fault. After disabling the Growl mail plugin, all of a sudden all my e-mail came back to life.

Like most new software platforms, OSX 10.5, Leopard, is a steady evolution of its predecessors. However, this introduces a number of compatibility concerns for third party developers and OEM's. Given how Apple took an open source project called "Cover Flow" and integrated into their base operating system (and now made it even more pervasive in Leopard) it seems odd to me they haven't done a similar thing with Growl. It seems every Mac user I know has Growl installed if for nothing else than for mail and IM notifications. So get with it Apple, either built your own notification framework and user-space applications, or take Growl and do your Apple magic with it :)

James' twitter