Archive for November, 2006

Firefox and virtual desktops

Thursday, November 16th, 2006

One thing I like about Konqueror is its ability to recognize virtual desktops (load a link in the current desktop’s Konqueror if it exists, otherwise open a new window on the current desktop). Unfortunately, Firefox doesn’t have this ability natively, so I’ve created a wrapper.

Scenario:
kontact (mail app) on Desktop 1. Surfing for a new car on Desktop 3 . New mail comes in, switch to D1, it has a link, I click. Natively, firefox opens the link in my D3 window, ruining my task-oriented desktops (and making me switch to D3 just to see the opened link). What I would have liked is a new window of firefox to be opened in D1, at which point I can decide to move it to another desktop (extremely quickly with my bound keyboard shortcuts), or if it’s a quick task, do it on D1 and be done with it.

This depends on wmctrl (debian/ubuntu: sudo apt-get install wmctrl).

Put this file somewhere (I chose /usr/local/bin/firefox-wrapper.sh) and tell your WM to have it as the default web browser (for KDE: kcmshell defaultapplication).

firefox-wrapper.sh

Put that SPDIF out to use! (as an HDD or network indicator)

Monday, November 13th, 2006

Apple decided we don’t need an LED indicator for disk activity. I decided we do. Using the SPDIF out, we now have one!

I put together a quick little script that’ll poll the proc filesystem and toggle the SPDIF out accordingly.

Check it out: MacBook LED

Both headphone sensing and microphone fixed for Linux on MacBook!

Monday, November 13th, 2006

The current (2006/11/12) state of ALSA for the MacBook (and MBP, ..?) is pretty strange: If you’re using a vanilla kernel, chances are your headphone sensing works (when you plug in headphones, your internal laptop speakers mute and you hear audio from your headphones). If you’re using a mactel-patched kernel (or the generic Ubuntu kernel, maybe other distros that prepatch with mactel), chances are your microphone has the ability to work (you have to toggle between Line-in and Mic on the ALSA mixer for it to work), but your headphone sensing doesn’t (when you plug in headphones, you hear audio from both the internal speakers and the headphones).

After screwing around with the ALSA driver source code, the Windows driver files, and the Microsoft and Intel spec sheets, I’ve found a solution that allows for both the microphone and the headphone sensing to work! Read more in the Linux on MacBook section

Hamachi nicknames to hostnames

Thursday, November 9th, 2006

If you have a set of machines (or friends) and you’re not using Hamachi, you should! Creating a VPN is as simple as joining a room (think IRC, except you’re VPNed with all though in the room). Pretty amazing.

They support many platforms (at least Windows, Linux, and OS X), but one problem I’ve found on the *NIX is there isn’t a way to translate from the nicknames of those in your room to IP addresses without having to refer to the list. I’ve created a bash script to parse the list of Hamachi users in your rooms and place them into your hosts file (/etc/hosts typically).

The general naming convention I use for my Hamachi nicknames are [computer owner’s name]@[computer name], or sometimes even just the [computer name]. An example of the former nickname style would be jason@mooBook (where mooBook is my laptop’s name), and the latter mooMedia (where mooMedia is my media server–like the moo theme?). So, my script will take the [computer name], tack on the room name, and map that newly created hostname to the VPN IP of the machine. Suppose both of these machines are in the room mooNet. I can now ping moomedia.moonet (case insensitive) or moobook.moonet. I’ve tacked on the room name to prevent adversarial behavior (although if you’re in the room com or net or any other TLD, you’re screwed ;).

You only need to run hamachi2hosts.sh once initially and when more users join your rooms. It creates a section in your /etc/hosts for the automagically mapped Hamachi hosts. Please be sure to change the settings near the top of the file. Also, it assumes you’re logged in when you run it.

Here you go: hamachi2hosts.sh

Wii!!

Wednesday, November 8th, 2006

I had a pretty amazing surprise waiting for me during my NY visit this past weekend–the public debut of the Nintendo Wii! We had to wait in line for about an hour and a half for 5 minutes with the Wii, but it was definitely worth it. There are plenty of reviews online, but I’ll add to that saying I’m REALLY looking forward to the release. I’m glad Nintendo keeps up innovation (at an amazingly low price tag) while the other companies grow in realism and graphics.

We waited in line for Wii Sports (the packaged game with 7 different sports), and it was pretty darn cool. I played tennis and baseball, both which were fun at first, but could lose their appeal after constant playing. BUT, the concept is amazing, and from what I could tell, the hardware definitely has capability to capture precise movements (Wii Sports was overly simplified, I couldn’t throw a ball even if I tried. I still got my ass handed to me in tennis, heh). The controller felt pretty natural, and the graphics weren’t that bad from what I could tell (and taking the price into account).

I hardly ever think about buying brand new consoles, but the Wii is REALLY tempting.

VMware raw partition booting

Wednesday, November 8th, 2006

VMware is amazing due to one outstanding feature: the ability to run a virtual machine from a raw partition. I mention this in Linux on MacBook page, but I highly recommend this for everyone running Linux.

What this lets you do is have a single XP installation, that is able to be booted natively (for games, etc.) and in the virtual machine (from Linux for random things, mostly turns out to be opening Office files that don’t load cleanly in OO).

I’ve updated the Linux on MacBook’s VMware section with detailed instructions on how to achieve this. On the MacBook, I had issues with XP BSODing on boot, so I’ve noted how to fix this.