installing wine on Snow Leopard

For the most part Snow Leopard was an almost seamless upgrade from Leopard for me. Whenever there’s a major OS X update, some things take a little while to catch up. So I have some understanding when lower level tools require some extra steps to get working.

Wine took a bit of debugging and googling to figure out. Maybe this will help someone else.

Steps:

I pretty much followed these instructions, with a little variation at the end: http://davidbaumgold.com/tutorials/wine-mac/ Here’s a summary:

  1. install the Xcode dev tools from the Snow Leopard DVD. These are not installed be default. Make sure you select the X11 tools to be installed
  2. Install or upgrade MacPorts: http://www.macports.org/install.php
  3. Install wine with MacPorts:

>> sudo port install wine-devel +universal

Now that should work. However, I didn’t do it that way. I did it without the ‘+universal’ switch and that’s where my troubles began. If you are now in a place where you’re getting this error:

>>sudo port install wine-devel
Password:
---> Computing dependencies for wine-devel
---> Extracting wine-devel
Error: You cannot install wine-devel for the architecture(s) i386
Error: because /opt/local/lib/libexpat.dylib only contains the architecture(s) x86_64.
Error: Try reinstalling the port that provides /opt/local/lib/libexpat.dylib with the +universal variant.
Error: Target org.macports.extract returned: incompatible architectures in dependencies
Error: Status 1 encountered during processing.
You need to figure out what port uses that lib and force a universal upgrade. Here's how:
>>port provides /opt/local/lib/libexpat.dylib
/opt/local/lib/libexpat.dylib is provided by: expat

So expat is the culprit. Now lets get it upgraded:

>>sudo port upgrade --enforce-variants expat +universal

I ended up doing this about a dozen times, once for each of the wine dependancies that wine complained about. I eventually got wine installed.

I suppose you could script this by getting all the Wine deps and doing some copy and pasting. That would probably be quicker.

Update:

Here’s a post I found that streamlines the process a bit.

Mac Tips and Tricks – part 1 – Handy apps and utils

This is the first installment in a series I will be posting about how to get the most from your Mac. I run into a lot of switchers and often get questions about how to do stuff on the Mac. So instead of copying, pasting and updating the same email repeatedly, I can now refer them to my blog 😉

Let me know if there are any specific areas that you would like me to cover in the future.

Disclaimer: The opinions expressed in this article (and my whole blog for that matter) are mine and mine alone. Additionally, I have not received compensation related to any of the software mentioned here.

Part 1 – Handy applications and utilities

OS X 10.5.x (leopard) has a pretty nice set of built-in features and applications. But there’s always room for improvement. The following is a list of free, shareware and commercial tools that I recommend.

System Utilities
LaunchBar – A keyboard driven launcher, navigator and general productivity tool. This is the first thing I install on any Mac that I use. Shareware. An alternative to quicksilver, very similar, but some feature differences. Quicksilver is free and will probably work just fine for you. They’re charging a bit more for the latest version of LaunchBar (24 euros – about $31) and it’s probably a bit too much. I got the first version for $12 and have been upgrading since.

Growl – system wide notifications, lots of supporting apps – free

MenuMeters – all your machine’s vitals in configurable displays in your menu bar – free

Adium – All-in-one instant messaging client. Supports a ton of different protocols in a highly configurable app. Free

Google Notifier – If you use gmail or google canendar, I highly recommend this.

Default Folder – Simply brilliant. Besides remembering where you last opened files from on a per app basis and giving hot keys to specific locations, this will allow you to mouse-over a Finder window and have your open/save dialog goto that directory. Just try it or let me demo if for you. Unfortunately, the latest version is a bit expensive at $35.

Network and File utilities:

Chicken of the VNC – handy VNC client for your remoting needs – free

RDC – Remote Desktop Connect. Open a VNC-like network session with a windows box, only faster. The best Mac app that M$ has released, evar.

Parallels – Virtualization for when you have to foray into other OS’s locally. Latest version has coherence and supports most USB devices (even ones not supported by OSX). Commercial.

Toast – CD/DVD burning app. Commercial.

muCommander – General purpose file manager with excellent network features, based on Norton Commander. Free.

Cyberduck – Handy s/ftp app – if you do that sort of thing with a GUI. Free/Nagware.

Laptop Specific stuff
SlimBatteryMonitor – big improvement over the one built into the OS , and free.
Note: I used to have more of these, but the MBP and Leopard have incorporated their functionality.

Dev tools
TextMate – A fantastic editor and IDE. Configurable, scriptable, pluggable. BBEdit is a fading memory for me. Commercial, $54.
iTerm – Replacement for Terminal.app – tabbed interface, uses Linux compatible keyset, bookmarks. – free
CocoaMySQL – GUI for management of your MYSql DBs – free
svnX – GUI for SVN. A little rough around the edges, but stable and useful – free

Data management and prodctivity:

Dropbox – Secure, remote file storage and syncing. I use this for application specific data files and small backups. Free for your first 2BG, pay for more.

Evernote – My current favorite tool. This is the data management solution that I have been trying to find/hack/create for years. It’s a personal wiki/cms with rich formatting, tags, categories and easy importing from email and web. But what really sells it for me are the client apps with syncing and offline use. There are clients for Mac, Win, iPhone and others. They all keep synchronized with each other and allow offline editing. I can’t tell you how much time I’ve spent trying to solve this problem for myself with combinations of web apps, Mac apps, scripts, etc. Finally I have one place to put all my data where I can access and update it whether I’m at home, work, on the bus or at a coffee shop. The first 40MB a month are free – which is plenty if you’re mostly storing text, like me. You can pay for more.

VoodooPad – A wiki wrapped up in an application. Great for notes, lists, reference, etc. However I think Evernote will soon completely replace this for me. Shareware.

1Password – Secure, encrypted login/password/data storage with excellent browser and iPhone integration. $40, but you can often find it discounted or even free bundled with other apps.

Things – A well designed todo list and task manager, one of the best I’ve ever used. It’s based on GTD, but you don’t have to use it that way. Has an iPhone app that is useful independently and well integrated, but costs additional also. $50 for the Mac, $10 for iPhone.

Skitch – Uber-screenshot tool. Capture screens, edit the images, share them on the web, all-in-one. Free.

Entertainment/social/audio/video

Twitterific – Handy twitter client. Free with ads, pay to get rid of them.

VLC – Plays just about any video you throw at it. Can be controlled by the IR remote that comes with your MBP. Cross platform. Free

Graphic Converter – Reads and writes most ANY graphic format. Does decent editing and even has some automation/script-ability. Also a quick image browser. Shareware. If you want something free that does a bit more than iPhoto, try Seashore.

GimmeSomeTune – iTunes extension with great hotkey functionality and some other nice features.

That’s my current list. I’d be interested in your opinions on these. What apps do you use and like?

Mac System info on your desktop

There are a small handful of windows apps that I think are pretty useful and don’t have better Mac equivalents. bginfo_ss.jpg BgInfo is one of these. It used to be an independent freeware app, but microsquish thought it was cool enough to acquire – at least it’s still free (for now). What is does is simple: it aggregates a bunch of different bits of information about the system it’s running on and merges it with the desktop background. This may not seem very useful to most people since most people only use one or two different computers and don’t really care about things like their Default Gateway or MAC Address. However, for those who work in a dev/IT environment where they switch between a bunch of different machines or better yet, have a lab of boxes that they don’t use regularly – this is extremely handy.

Now I could not find a utility that does what BgInfo does for the Mac – at least not specifically. Then I remembered about GeekTool. GeekTool is the Shopsmith to BgInfo’s hand drill. I plan to write another post dedicated to Mac utilities where I’ll go into more detail on GeekTool, but for now we’ll just get started. If you know of something else that does what BgInfo can do on the Mac, please let me know – I’m not totally addicted to big hammers.

Here’s what you do:

  • Install GeekTool
  • Paste the following ruby code into a text file and save it somewhere like ~/scripts or ~/Library/Scripts as sys_info.rb:
@user = `whoami`
@system = `scutil --get ComputerName`
@ip = (`ifconfig en0 | grep netmask`).split
@vers = (`sw_vers | grep ProductVersion`).split
@hw_info = `system_profiler`
@up = (`uptime`).split(',')
 
if @vers[1].include?('10.5')
  @hw_name = 'Processor Name'
  @hw_speed = 'Processor Speed'
else
  @hw_name = 'CPU Type'
  @hw_speed = 'CPU Speed'
end
 
puts "User: #{@user}"
puts "Computer: #{@system}"
puts "IP: #{@ip[1]}"
puts "OS Version: #{@vers[1]}"
puts @hw_info.grep(/#{@hw_name}/).to_s.strip
puts @hw_info.grep(/#{@hw_speed}/)[0].to_s.strip
puts @hw_info.grep(/Memory:/)[0].to_s.strip
puts "Uptime: #{@up[0].strip}"
  • Open the GeekTool preference pane and add a new entry. Select Shell from the pop-up menu.

sys_info.jpg

  • In the Command box, enter: ruby ~/scripts/sys_info.rb (change to your path and file name)
  • Set the refresh for 300
  • Now you should see a box somewhere on your desktop and it should have 8 lines of juicy info.
  • Play with the other tabs to set the font style and background.
  • You can drag and resize the box to wherever you like.

I know this works on OS X Tiger and Leopard and it should work fine on Panther. BTW – GeekTool works great on Leopard.
If you have any suggestions, changes or additions to this, please share.

How to get a Belkin USB-Serial adapter to work with OS X (Panther)

I just got a new GPS for geocaching and I wanted to hook it up to my Mac. Now since the companies who make these devices virtually ignore the Mac community, I had to get one with a serial interface (read: older and not USB). You see, Garmin’s implementation of the USB interface is so non-conforming to the standard that it will require a change to OS X to make it work (do a search in the Groundspeak forums for more info). Then I needed a serial to USB converter to make the final link.

Anyway, I dug up this old Belkin F5U103 USB to serial adapter that I figured would be just what I needed to get my Mac and GPS talking. Well, unlike most random USB devices that I have plugged into Panther, this one did not have a driver built-in. It showed up in System Profiler just fine, but when I tried to communicate with the GPS – nothing. Of course Belkin has pretty much dropped support for this device – the most recent drivers are for OS 9. I pulled down several different Mac apps that can connect to GPS devices and none of them worked. I did some hunting around the usual places and eventually found a beta home-brew driver on sourceforge. The documentation was thin, there was no installer and it didn’t really work. But after some more digital sleuthing, I got it working – Woo Hoo. Here’s how I did it:

Get the driver:

Download it from sourceforge, here. As of this writing, the only version available was 20030914. You will get the file: ubsa-kext.tgz which will expand into BelkinF5U103Driver.kext.

Tweak the driver:

It turns out there is a bug in the driver related to the baud rate of the connection. I tried the driver without this tweak and it wouldn’t work with the apps I used. The bug was reported by David Griffiths with a work-around – I’ll restate it here with some added detail:

You need to hex edit the binary. I looks like you can also edit the source, but then you have to build it, so this seemed like the easier option. I used Resorcerer. You could use any hex editor.

  • Launch Resorcerer and open this file inside the package: “BelkinF5U103Driver.kext/Contents/MacOS/BelkinF5U103Driver”
  • Open the “<Data Fork>” You will get a window with the Hex Data.
  • Select the Find/Replace/Goto option from the Hex menu – or type cmd-F
  • In the find field, type 03600084 and hit return
  • The hex view should scroll to the one location where this number is found
  • In the replace field, type 07600008 and hit return
  • Close all the windows saving at each prompt

Install the driver:

You now need to copy the driver to the correct location and then set the owner and group correctly. I found out how to do this in a thread in alt.video.ptv.tivo. Here’s the link, it’s the 3rd or 4th entry – thank you C.J. Here’s the steps:

  • Copy BelkinF5U103Driver.kext to /System/Library/Extensions/
  • Change owner and group

cd System/Library/Extensions

sudo chown -R root BelkinF5U103Driver.kext

sudo chgrp -R wheel BelkinF5U103Driver.kext

You may also need to do this:

sudo chmod -R ug+x BelkinF5U103Driver.kext

Now load it. This will load the driver without rebooting. It should tell you that it was successful.

sudo kextload BelkinF5U103Driver.kext

Try it out:

  • Plug the adapter in. Take a look in /dev You should now have 2 new files in that directory:

cu.F5U103BL6143

tty.F5U103BL6143

Run an app that talks to your GPS or the serial port and you should see a new option/port to connect to:

F5U103BL6143

Now you should be all set. Happy Geocaching, serial porting or whatever you’re using it for.

Pismo Powerbook repair

I just figured this out and wanted to share. I should probably post it to a relevant message board, but this is quicker (note to self: post this to a relevant Mac message board).
One of the IT guys at work came by the other day with a Pismo Powerbook (500mhz, firewire) that wouldn’t boot. It had been sitting in storage for at least a year and a half. We plugged it in and I tried the usual key combinations without success. I tried holding the power button, hitting the reset button on the back and variants of that. I tried inserting a charged battery. I tried unplugging everything. I checked to make sure that the RAM and processor board were seated tightly. None of these worked. One page was suggesting some pretty serious things at this stage.
I decided to dig into it a bit since these laptops tend to be pretty robust and there was no obvious reason for it to not at least power up. I did several Google searches using keywords like: pismo powerbook boot power. After a couple ancillary searches I determined that the problem probably has something to do with the PRAM battery. With the help of this page I figured out where the PRAM battery is located. I went ahead and unplugged it, hit the power button and voila…it booted up!
After booting and then shutting it down again, I plugged the PRAM battery back in…and it still boots. Woo Hoo. This page suggests that you need to replace the PRAM battery, but so far everything seems happy.
I told the IT guy that I had resuscitated the PowerBook and he gave me a couple more that were in the same state. I tried the same trick with the next one an sure enough it worked also.
I hope this helps someone out there with a seemingly dead Pismo. Please leave a comment if this helps you.

I’m a big fan of recycling but this is silly

main.jpg

Found this on BoingBoing. A guy has put together a 5 disk RAID using USB floppy drives and an old iMac running OS X. Check it out..