Articles tagged with mac
A couple months ago I expressed my frustration about iTunes not letting me move podcast files into my library. Several people commented with suggestions, such as converting the ID3 tag to an older version, re-importing the track, and then converting the ID3 tag back to 2.4. This is definitely better than the solution I had found, but still a pain.
I tried to find a scriptable solution, but iTunes doesn’t expose, though AppleScript, the ability to change the ID3 tag version or the mystical ID3 tag attribute that tells iTunes that it’s a podcast.
So, I’ve turned to Ruby. Though a little introspection and experimentation with ID3lib-ruby, I’ve figured out that it is the CTO (Content Type) ID3v2 tag set to “Podcast” that iTunes is using to put the files in the Podcasts folder. Clearing the CTO tag and readding the track in iTunes will move it into the Library.
So, with RubyOSA, I’ve written a little script that will loop through the selected tracks in iTunes and clear the CTO ID3 tag.
require 'rubygems'
require 'rbosa'
require 'ID3lib'
itunes = OSA.app('itunes')
itunes.selection.get.each do |track|
if track.is_a?(OSA::Itunes::Track)
location = URI.decode(URI.parse(track.location.__data__('furl')).path)
tag = ID3Lib::Tag.new(location)
tag.content_type = nil
tag.update!
end
end
There are a few remaining problems that I would like to tackle:
- I can’t figure out how to delete and add the track through RubyOSA. There is a delete method on the track, but doesn’t appear to do anything.
- I want the script to display a dialog confirming the actions about to take place.
- I want to be able to execute the script from the Scripts menu in iTunes, which appears to involve installing OSA Components.
Overall, this has been a fun experiment (and a reason to play with RubyOSA). I’m looking forward to Leopard when this is all built in!
I came across a fun browser bug this morning that I thought I would share. You can’t have a semi-transparent element cover a Flash animation Firefox on the mac.
I had a popup menu that used CSS opacity to make the menu semi-transparent. It was working fine, but then we threw in a Flash header and the Flash would hide any time you moused over a menu item.
Here are some screenshots that demonstrate the bug. The first is how it looks in Safari, the second demonstrates the bug in Firefox, and the third shows Firefox if I remove the opacity attribute from CSS.



The solution: for now, I’ll just have to live without semi-transparent menus (but they looked so good).
I would venture to guess that this is intentional behavior by Firefox. Since Firefox isn’t a native Cocoa app, it doesn’t have access to all the fancy OS X rendering, so it can’t render transparent elements over elements that it doesn’t have control of (Flash), and it just removes the Flash.
Sadly, OS X doesn’t come with a way to create or open encrypted Zip archives, even from the command line (hopefully this will change with Leopard). The man pages for zip say that it supports it, but when you pass the -e or -P option, it complains:
zip error: Invalid command arguments (encryption not supported)
Fortunately, MacPorts (formerly DarwinPorts) to the rescue! There’s a version of the command line zip utility in MacPorts that works as advertised.
Install MacPorts, and install the new command line zip utility:
sudo port install zip
Move the old /usr/bin/zip out of the way, and then create encrypted Zip archives to your hearts content.
zip -re myarchive.zip mydir/
Enter password: ********
When I bought my MacBook Pro back in March (wow, I’ve been a Mac user for almost a year now), I was cheap and just went with 1GB of RAM. I’ve never really had any issues with performance until lately, when I’ve been needing to do more intensive tasks like working in Photoshop, using Aperture, and testing in IE (via Parallels). Running any one of those apps required closing pretty much everything else.
So Last week I ordered an extra GB of RAM. It finally arrived today, so I installed it and have been doing a bit of informal testing. For the record, 1GB of RAM makes a HUGE difference. I was able to open Photoshop, Aperture and Parallels at the same time, and the performance was better than it was before with just one of them open.
posted by brandon
| updated March 20th 09:55 AM
I’ve been posting a lot about GPG and public key encryption lately, so I thought I should at least give some pointers for how to set it up on the Mac. This post is based off of directions written up by Daniel Morrison and Matt Slack, so kudos to them.
Getting up and running with GPG on the Mac is quick and very easy. Everything you need is available from the Mac GPG project on sourceforge:
- GNU Privacy Guard (currently version 1.4.1) installs the command-line tools.
- GPG Keychain Access is a simple GUI for managing and creating keys.
- GPGPreferences is a System Preferences panel for managing GPG from the GUI.
- Optional tools such as GPGFileTool (encrypt/decrypt files) and GPGDropThing (drop text to encrypt/decript) are available at the project page
After you have those installed, you need to generate a key pair. Open GPG Keychain Access and select “Key->Generate…”. Of all the options you are presented with, the only one you should need to think about is the key size. While 1024 is secure, 2048 or 4096 are obviously better. Larger sizes can slow you down if plan to encrypt large files, but are unnoticable for email. Note: the larger the key, the longer it will take to generate (one-time process only), so go grab a cup of coffee if you do 4096, unless you have a shiney new MacBook.
Install plugin for Mail Clients
Plugins for your mail clients will allow you to encrypt, decrypt, and sign messages in Mail. Since email is (probalby) the reason we want GPG, it makes a lot of sense to install them.
If you have commercial PGP installed it is best to uninstall before installing an email plugin. Apple Mail, for example, will not work with both. You can uninstall just the PGP email plugin by deleting it from your /Library/mail/bundles directory.
Use It!
What’s the point in having it if you aren’t going to use it? Upload your public key to one of the key servers. Get your friends and coworkers to generate public keys and start sending eachother secure mail (if you don’t have any friends or coworkers, feel free to download my public key and send me an encrypted email).
I’m reinstalling OS X right now. 2 hours and 7 minutes remaining.
My (new) MacBook Pro started acting up this afternoon, so I did the only thing I know how to do on the Mac—I rebooted it. Bad idea! It wouldn’t start back up. It just sat there taunting me with the apple logo and the little spinner, trying to make me think it was actually doing something. I gave it a hard reset and started it in verbose mode (command+v). After a bunch of startup messages, I was greeted by the following message scrolling up the screen…repeatedly…indefinitely.
hsf_swap_BTNode: invalid forward link (0x08003003)
node=220 fileID=4 volume=Macintosh HD Device=/dev/disk0s2
I don’t exactly know what it means, but can’t be a good thing. The only reference to any part of that error is from a C source file hsf_endian.c, which appears to be some low-level filesystem driver.
After many failed attempts with the Disk Utility reporting “Underlying task reported failure”, I discovered fsck_hfs from the bottom of this article. I ran it with -r to rebuild the catalog, and many runs later, it finally reported no more errors. I rebooted again, only to find that OS X still wouldn’t boot up.
I then came across this article about the Disk Utility error I was getting, with this notice:
If you have Adobe Photoshop CS2 or Adobe Illustrator CS2 installed, try removing the following files:
- /Applications/Adobe Photoshop CS2/Legal.localized/Tiếng Việt.html
- /Applications/Adobe Illustrator CS2/Legal.localized/Tiếng Việt.html
Ironically, I was running Photoshop CS 2 when I first started having problems. A little more searching revealed this forum discussion about Photoshop CS causing filesystem errors. Most the people there seemed to have more luck than I did, because there systems at least still booted. Fortunately, I just did a full backup of my home directory two days ago, and I was able to copy new files from the last two days from the console on the Installer.
update: Since OS X makes it so stinking easy to install over the top of an existing installation, I’m back up in no time (well, two and a half hours, but you get the point). Now, do I install Photoshop CS2 again?
At the end of March, I paid $2499 plus tax to became one of Apple’s beta-testers. In exchange, I got a first-generation MacBook Pro.
This is my first Mac, and while I’m hooked on Apple software, it has not been a good experience with their hardware and support. Within the first hour of opening up my expensive new beta product I noticed the annoying whine when the CPU was idle and the excessive heat. Over the past few weeks, I’ve had a few more unpleasant surprises. The finish on the palm-rest has slowly started flaking off. At first I though it was just dirt, but then I realized that it was indentations, and rubbing it with my hand made it worst. Not long after, a rattling noise began coming from one of the fans. Annoying, but not consistent or too loud, I decided to put up with it—mainly because I didn’t want to go without a laptop notebook for 10 days.
The latest trick my expensive beta product performed is that with about 40% battery left, it just shuts off (unfortunately, I discovered this after working on a design in Photoshop for an hour and a half without saving it).
So this week I finally called Apple support, and after explaining all my problems to two different people—and two hours later—their conclusion was to just take it to the Apple store where I purchased it. Thanks, you could have told me that in the first 15 minutes.
So last night I went in to the Apple store (40 minutes away) and told them of my troubles. The Mac genius recommended that we send it in for repair and it would be back as soon as next Friday. That’s what I expected, but that sucks! I asked if there were any other options and told him that some of the blog posts that I read that said that some of the Apple stores where just doing exchanges for these problematic MacBook Pros. He said he couldn’t do that and that they don’t even have the a matching configuration.
So, as he was filling out the stuff to send my computer in for repair, I pulled out the trump card. I started telling him about how this is my first Mac and it hasn’t been a great experience. I told him about Dell’s support and how whenever I called or emailed them with a problem, they would show up at my house the next day with the replacement parts and fix it for me. A few minutes later, he asked me to wait and he’d be right back.
After being gone for about 10 minutes, the genius came back out and informed me that Apple really wants to make sure that I have a good experience, so they’re going to exchange my faulty laptop with a new one. And since they don’t have the same configuration, I get bumped up from the 2.0GHz model to 2.16GHz. Sweet!
So, even though Apple’s support sucks, the story still might have a happy ending. I’m going to pick up my new MacBook Pro when the store opens this morning.