Went crazy and bought a Mac: Thoughts
Well, after reading about the new features in OS X 10.5 (aka Leopard) (they f’ing ported DTrace to Mac!), as well as seeing that superficially, the new Macbook Pros are perfect for Linux; Intel chipset, Atheros wireless, and nVidia video. That and with the Intel VT extensions that come with the Core 2 processor and VMware Fusion, I can run all three operating systems with absolutely no problem! Well, turns out there are a lot of problems – I’m sure I’ll resolve them eventually but right now my setup is pretty broken right now.
The Good:
- Mac OS X is pretty polished, their animation and widget library is really nice and the icons and fonts are really nice
- Mac’s bootloader, rEFIt looks better than GRUB and is fairly easy to get working – it also has a “fix my GPT” tool built-in
- Spotlight and Quicksilver make using the OS much better – I don’t even have to remember where stuff is anymore whereas Beagle is often too slow / doesn’t show enough to be usable
- Mac’s got a halfway decent terminal, and rsync+ssh still works like gangbusters
The Bad:
- I hate window management on OS X; I can never make the windows do what I want with the keyboard – maximize does this strange “I’m not really maximize” behavior and it’s really annoying.
- The solution for getting actual command-line tools on Mac is via MacPorts, but you have to build all your programs from source. Am I back in Gentoo again? You also have to add all these command-line flags too
- XCode looks cracked out, but it could be just because I’m not used to it.
The Ugly:
- Despite this machine looking as if it would run Linux really well, it in fact is far too new to run anything properly. The nVidia driver displays a completely black screen when it tries to use the nVidia 8600M, even the current Gutsy kernel doesn’t support the CD-ROM drive, and in general everything is far too new to successfully run Linux on the actual hardware. Looks like I’ll be using a VM and running the
- I still haven’t figured out a solution to sharing filesystems / what-I’m-going-to-put-where; supposedly the HFS+ driver sucks for Linux and despite being built on FreeBSD, Mac OS X doesn’t support any Linux filesystem, even ext2. Why? FreeBSD 7 will have ZFS support as well as Leopard (for which I have come into possession of the WWDC preview which I’ll install), so I might be able to create shim virtual machines that will take care of these problems.
Conclusion
Well, until I can figure out a solution, my laptop setup is pretty much in flux until I can find a setup I like. I’m really excited about all of the cross-platform possibilities that the Macbook can do, as well as seeing how Mac people do development.
Native PulseAudio with Flash 9 – fix video crashes
I spent some time and appeared to fix the video-related crashes in the Flash 9 plugin when you use Revolution Linux’s libflashsupport.so to use PulseAudio with Flash 9. I suspect this library is somewhat buggy, but this fix makes it skip the buggy sections (at least for me, I couldn’t get it to crash). The changes to the source file are in this diff file if you’re curious; basically we change around the order that the plugin tries to access sound backends – skipping ESD and ALSA since if you try to use ALSA while Pulseaudio is using it, there’s a mess, and falling back to OSS (which can also work decently if you use padsp)
Ubuntu Package
Install this file using sudo dpkg -i libflashsupport_1.0~2219-2_i386.deb
- libflashsupport_1.0~2219-2_i386.deb
- libflashsupport_1.0~2219-2.dsc
- libflashsupport_1.0~2219-2.tar.gz
- libflashsupport_1.0~2219-2_i386.changes
Other files if you’re interested:
Essentials 2007
Inspired by Mark Pilgrim’s Essentials 2006, here are my essentials. As I was reading the article, I find that Mark and I agree on most of these things so I try to leave out the things that I completely agree with. Check out his list too cause it’s pretty awesome.
- Ubuntu – The big advantage to me of Ubuntu is that it’s Debian-based, up-to-date, and it’s easy to find other people who’ve posted solutions: all you’ve got to do is google “
Ubuntu HOWTO” and you’ll find how to fix such-and-such. While some of their packaging decisions aren’t the best, it mostly gets things done. - gVim – It always seems like the really cool kids use Emacs but vim is for people who are f’ing metal. There, I said it. And my Ctrl key still works.
- del.icio.us – You don’t know how much you need this plugin till you install it. At first, I thought “bookmarks, who cares”, but once you can bookmark everything and search through it really fast, and it saves your keyword searches so ‘wp something’ always takes me to Wikipedia
- Pidgin – Does IM without nonsense. Like the new icons.
- KTorrent – Quick, doesn’t do dumb stuff, and its DCOP extensions means I can add torrents remotely
- sshfs – It’s like network mapping a drive in Windows, only without having to map it on the remote machine first. With SSH keys, you don’t even put in a password and as long as you’re not trying to do anything crazy, is fast enough (I can play movie-quality video over wireless on it).
- F-Spot – Really quick tagging and it uploads to Flickr (albiet badly). The maintainer is buried though, and doesn’t really keep up with development well though. Schade.
- Unison + rsync – I use these to keep my data consistent. Unison is great for keeping your documents in sync between two machines, i.e. you often make changes and edit stuff on either machine.
rsync -avlzp --deleteis great for keeping stuff backed up, ie the target machine doesn’t modify the files at all; think of rsync as a quick version of “cp -Ra”. Unison is pretty quick, uses SSH so you don’t have to set up a “server”, and generally doesn’t do dumb stuff. - Tomboy – I keep random information in here that I have to remember, like routing numbers, or my water company account number. You can also grep through
~/.tomboyin a pinch. - NoMachine NX – While this program is annoyingly buggy, if they’d fix all the nonsense bugs it’d be an awesome, cross-platform VNC. The saving grace for this program is that it’s really fast; it blows anything else (with the possible exception of RDP on Windows) out of the water.
- apt-get source – Leverage the fact that everything is open-source when you’re coding
Stop WordPress from turning double-dash into long dash
As an aside, WordPress has this handy “feature” that automatically converts two dashes (‘–’) into an emphasized dash (‘–’, U+2013). While nicer typographically, this completely breaks code samples of any kind, as people will copy-paste it and get very confusing errors. I can’t believe the WordPress coders wouldn’t get bit by this themselves. Alas, here’s how to fix it. Open up wordpress/wp-includes/formatting.php and find these lines near the top of the file, in wp_texturize
$static_replacements = array_merge(array(‘—’, ‘ — ‘, ‘–’, ‘xn--’, ‘…’, ‘“’, ‘’s’, ‘”’, ‘ ™’), $cockneyreplace);
Comment out the first four elements of both arrays, so that it looks like this:
$static_replacements = array_merge(array(/* ‘—’, ‘ — ‘, ‘–’, ‘xn--’, */ ‘…’, ‘“’, ‘’s’, ‘”’, ‘ ™’), $cockneyreplace);
This fix applies retroactively too, so you don’t have to go back and edit old entries, all of them will be updated automatically
The cleanest, easiest way to fix XOrg-related problems in Ubuntu

The scourge of the Ubuntu novice – the dead X server
First off
XOrg problems seem to be the most vexing problems for new Ubuntu users for a number of reasons – why it hasn’t been solved is mostly due to political nonsense, lack of developers who know about X11, and being hamstrung by proprietary video drivers. If you’re stuck and can’t get to the login screen (probably), hit Alt-F2, then log in as the regular user. You’ll be dropped at a text-only prompt where you can enter these commands. PS: Make sure for `uname -r` that those characters are backquotes, i.e the character below Tilde (~) on US keyboards, not the apostrophe (‘).
For nVidia:
sudo nvidia-xconfig
sudo /etc/init.d/gdm restart
For ATI:
sudo aticonfig –initial
sudo aticonfig –overlay-type=Xv
sudo /etc/init.d/gdm restart
For Intel:
sudo dpkg-reconfigure -phigh xserver-xorg
sudo /etc/init.d/gdm restart
Make Wine and PulseAudio get along
I got a Joost invite the other day, and I tried to get the client program working with Wine, the Linux implementation of the Win32 API. Sadly, it was a no-go; I couldn’t get it to work without skipping. However, it’s not all lost: here’s what I learned, the “best” way to get sounds working in Wine, at least until a native PulseAudio driver gets written.
First, we need to set up Wine correctly. Run this command to set up Wine:
The padsp part is important, it makes a virtual OSS device that will talk to the PulseAudio daemon. Next, go to the Audio tab and make sure the settings look like this:
Update: It seems I’ve lost this picture, go to the Audio tab and set the OSS device.
While my initial leaning was to use the ALSA or ESound driver as they would both theoretically work better, ALSA wouldn’t work at all and ESound had issues with skipping (either it’s naively coded or difficult to do in Wine, not sure; I’d guess the latter). So we can use the OSS driver, yet have full mixing and no weirdness due to using the virtual device. Next, to run the program (in this example, we’ll use Starcraft
)
You should have sound playing without any problems – I don’t know if this method would stand up to a lot of stress though, it uses emulated DirectSound but I had no problem with SC.
Linux users often have a very skewed opinion on what “easy” is
While wasting time on teh Intarnets today, I came across this article on Linux Mint, an “improved” version of Ubuntu, mostly just adding in codecs and theming it a bit. A lot of people make these kinds of “hack” distros, which is okay too – it’s cool that anyone can make their own version of what they think is awesome in Free software. However, the author of the article has this to say, with accompanied image:
Another nice configuration tool that Linux Mint comes preinstalled with is mintDisk that allows easy mounting of various partitions on your computer. (Emphasis mine)

Fig. 1
This dialog is by no means “easy”. Hell, it isn’t even in the ballpark; this dialog is one step above editing /etc/fstab directly (and the dialog even mentions the file in the text). People have no idea what this is saying, and this tool is meant for a pretty common use-case for novices, using their Windows formatted devices. A lot of this dialog is simply bad programming, but it underlies the mindset that a lot of technically-minded people have.
“Huh, you don’t get it?”
Computer people don’t notice when they have to do something technical, especially Linux people who are used to mucking around with system internals to get it to work. So, when the computer people go to write software, it’s worse than “they don’t consider the end-user”, I think that computer people are unable to see things in this fashion anymore. Of course, this isn’t a new idea, the designer of Visual Basic wrote a book about it, appropriately called The Inmates are Running the Asylum.
Always think about the audience!
The solution to this problem is to always consider the audience. Ask any comedian, jazz musician, or someone who’s decent at presentations and they’ll tell you they’re always paying attention to their audience’s reactions as they’re performing. Software has to be designed this way too – focus on what they want to do, not on trivialities. This dialog shouldn’t even exist, the user wants to plug in a device and have it work. It’s the OSs job to figure out what that means. However, you can also go too far over like GNOME sometimes does, and make everything “simple”. Sometimes when the job itself is specific and technical, it’s inappropriate to simplify it – the user is expected to be technical so they want to hear it in a language they’re familiar with.
Remember This:
Flouting Mr. Tufte for people who are too lazy to read, here’s the points you should remember, in bullet form:
- Don’t ask the user for stuff the machine should do itself
- Keep in mind what someone wants to do with this program
- Don’t take the above two points to mean “everything should be simple”, remember who you’re dealing with or else Linus will take you down a peg
gnome-format 0.3: Full volume support
gnome-format SVN now has the ability to write a full partition table for devices, so it’s now usable for its major design goal – formatting USB pendrives. Encryption is still in the works, as well as pulling in the original floppy support (shouldn’t be too bad, since the code is already written, but I have to track down a machine with a floppy drive or deprecate the code; a third option would be to include gfloppy and gnome-format separately – no sense in wrecking an existing program that works).
So basically, encryption is the only major challenge left, as well as fixing HAL/GTK+ bugs, testing, and the volume icons – I’ve read something about GTK+ adding this in the development version, so perhaps this will be solved easily.
gnome-format 0.2: This one actually does stuff
After reworking a lot of the code, I’m at a point where this program is actually worth showing to people. As of revision 67, gnome-format can now correctly format a volume that already has a partition table. I feel as if this project is finally getting off the ground now, it’s really exciting to finally see it start to come together. For those of you who don’t remember, here’s the basic idea:

Formatting USB disks, don’t do try this at home
Now here’s the disclaimer, and it’s a big one. Warning: this is prerelease code that is designed to format disks. It may go crazy and trash everything you love. Here’s how to get the code, build it, and run it:
cd gformat
./autogen.sh
make
./src/gnome-format
The main thing that is much different from my original, KDE-like plan is that instead of coming up with this “formatting backend” abstraction like I was originally going to in anticipation of HAL adding formatting support, I instead went with a script-based approach, similar to how HAL does its suspend/resume options. The primary advantages being that it is much simpler this way, and it allows distros to tweak the program without resorting to patches.
What’s left in the TODO list:
- Rewrite table and format
- Ask HAL to remount the new partition
- Make sure everything is unmounted before we trash drive
- Clean up info display, make sure (null) isn’t displayed
- Fix GTK errors
- Fix HAL problems regarding automatically updating device dialog
- Write floppy formatting support, most likely code taken directly from GFloppy
A call to arms!
I’m really looking for people to go through the code and fix anything wrong they see, if we get enough people working on this, it can be included in GNOME 2.20 (and by proxy, Gutsy Gibbon). Build the code, fix stuff up or add stuff, and send patches to paul@paulbetts.org. I’m especially looking for someone handy in Python to improve the mkfs script (I’d write it in Ruby, but I’m sticking to GNOME-supported languages). GNOME dev community, impress me!
Autotorrent = (no longer) broken right now
It appears that Mininova / Torrentspy has changed their site a bit, I need to fix Autotorrent to reflect the changes. Thanks to the people who sent in bug reports (although I need to make my debugging output more useful!)
Update: Fixed. There was a bug where Mininova wouldn’t be used at all (even though it would succeed), and Torrentspy implemented some sort of caching mechanism that breaks Net/Http. Download 0.6.1 via KDE-Apps.org
