Apple has some great code to handle adding and removing items as login items called LoginItemsAE which uses AppleEvents to talk to System Preferences. I’ve used it on a number of projects and found it to work well. That was until today. A client complained that my install code wasn’t working that added it as a login item. I couldn’t reproduce this on my Mac Mini (Intel) and I use the same piece of code in another app in the same bundle and it worked fine. After a bit of fighting with the system and remembering that sometimes Carbon framework needs to be linked, I linked it in and the problem went away. Why, oh why, didn’t I get a linker error?
Merging ReceiptWallet and DocumentWallet
After a bit of mental wrangling and taking some email to heart, I decided to merge ReceiptWallet and DocumentWallet. This means that ReceiptWallet can now open DocumentWallet libraries in addition to ReceiptWallet libraries. When you create a library, you choose for it to be a receipt or a document library. This now makes a lot more sense since multiple libraries can be open at once. The libraries still have a few things different (number stuff doesn’t make sense in a pure document library).
What does this mean for DocumentWallet? Well, DocumentWallet serial numbers will now work in the new version of ReceiptWallet. This will be a free update for all users. When this new version comes out, I will be raising the price as I have added a significant amount of functionality with the last few updates. My current price was meant to be an introductory price, but I never got around to raising it. Now is a good time to do so.
One kind of weird thing is that DocumentWallet users can’t automatically update to ReceiptWallet using the auto update mechanism because the applications are named differently and the application identifiers are different. So, users will have to download ReceiptWallet and update through that.
The new ReceiptWallet beta is available in the standard way.
Are political primaries the will of the people?
With the current heated race between Obama and Clinton, the inner workings of the primaries are becoming more public and being talked about in the paper and on the news. Prior to this year, I personally had no idea how the primaries worked. So, if you vote in the primary, your candidate may or may not be your party’s candidate, even if he or she receives a majority of the popular vote. First off, the delegates (which is OK as it is supposed to be representative of the people) aren’t required to vote for the people that they represented. Second, there are “super delegates” that can vote for whoever they want. These super delegates are random people (some important, some ordinary). Third, “the party” can make deals and put up whoever it wants (“the party” being the important people in the party). Fourth, “the party” can make up its own rules on who can vote. For instance, the Michigan and Florida Democratic primaries don’t count because they were held before “the party” wanted them held.
So, does your vote count? Got me. Yesterday when we were coming out of Target, someone registering voters said, “are you registered to vote?”. My flippant response was “unfortunately”. Why did I say that? I find it hard to believe in our political system when in this day and time, we can’t have a true democracy. How hard is it to get the total number of votes and elect someone? We could get this mess over with very quickly by letting each candidate lay out his or her plans and views, have a few rounds of questions submitted via the Internet, and then have people vote. We could do the entire election for a few million bucks and take the tens of millions spend on campaigning and help to finance the public debt or even attempting to balance the budget.
SqueezeCenter and Apple TV Take 2
I decided to take the plunge today and install the Apple TV Take 2 update on my Apple TV and attempt to get the SqueezeBox software (now called SqueezeCenter) running on it. I previously had this running on Apple TV version 1.1, but I want the ability to rent movies, so I had to update my Apple TV and decided to install the new SqueezeCenter at the same time. Unfortunately this has been quite complicated. I almost have things working.
- Following the instructions in this thread, I created a PatchStick to install SSH on my updated Apple TV. Prior to updating the Apple TV, I copied all the necessary SSH files off my Apple TV
- Pick up the latest SqueezeCenter (7.0) and the XM Radio Plugin
- Create a folder on the Desktop called SlimServer
- In that folder create 2 files. The first is called StartupParameters.plist and it contains:
{ Description = "SlimServer"; Provides = ("SlimServer"); Requires = ("Disks"); Uses = ("mDNSResponder", "Resolver", "DirectoryServices", "NFS", "Network Time"); OrderPreference = "Last"; Messages = { start = "Starting SlimServer"; stop = "Stopping SlimServer"; }; }
The second is called SlimServer and it contains:
#!/bin/sh . /etc/rc.common SERVER_RUNNING=`ps -axww | grep "slimp3.pl|slimp3d|slimserver.pl|slimserver" | grep -v grep | cat` StartService() { ConsoleMessage "Starting SlimServer" if [ z"$SERVER_RUNNING" = z ] ; then pushd "/Users/frontrow/server" sudo -u frontrow "SqueezeCenter.app/Contents/Resources/start-server.sh" popd fi if [ z"$#" != z"0" ] ; then ConsoleMessage -S fi } StopService() { if [ z"$SERVER_RUNNING" != z ] ; then kill `echo $SERVER_RUNNING | sed -n 's/^[ ]*([0-9]*)[ ]*.*$/1/p'` fi } RunService "$1"
- Tar up the folder:
cd ~/Desktop tar -cvf slim.tar SlimServer
- On a Tiger machine:
cd /System/Library/Perl tar -cvf ~/Desktop/perl.tar 5.8.6
- Mount the SqueezeCenter dmg file that was downloaded above
- From the image, copy Install Files/SqueezeCenter.prefPane/Contents/server to your desktop
- Place the XMRadio plugin in ~/Destkop/server/Plugins
- Modify ~/Desktop/server/SqueezeCenter.app/Contents/Resources/start-server.sh to add
HOME=/Users/frontrow; export HOME
before the ./slimserver.pl lines
- Replace the mDNSResponderPosix with the one from the SlimServer 6.5.4 as the one for SqueezeCenter apparently is a PPC only app and the Apple TV doesn’t have Rosetta. The SqueezeCenter developers are going to fix this.
- Tar up the folder:
cd ~/Desktop tar -cvf server.tar server
sftp -1 frontrow@appletv.local
(Password is frontrow)
put slim.tar put server.tar put perl.tar
- Login via ssh using
ssh -1 frontrow@appletv.local
password is frontrow
- Change the root file system to read/write using
sudo mount -uw /
- Uncompress the files
tar -xvf perl.tar tar -xvf server.tar tar -xvf perl.tar
- Move the Perl modules into a good spot
sudo mkdir /Library/Perl sudo mv 5.8.6 /Library/Perl
- Move the SlimServer folder using
sudo mv /Users/frontrow/SlimServer /Library/StartupItems/
- Make the SlimServer file executable
sudo chmod +x /Library/StartupItems/SlimServer/SlimServer
- Change the owner
sudo chown -R root:wheel /Library/StartupItems/SlimServer
- Disable auto updating
sudo bash -c 'echo "127.0.0.1 mesu.apple.com" >> /etc/hosts'
- Restart the AppleTV
sudo reboot
- From Safari goto: http://appletv.local:9000/
- Change the music directory in the SlimServer prefs to /mnt/Media/Media Files
- Use iTunes to change the ID3 tags to version 2.2.0 and use that option to Reverse the Unicode strings to repair some issues with my database
I’m still trying to get the XM Radio plugin to allow 2 simultaneous connections, but other than that, I’m done. This has been a torturous process, but I figure by the next time I have to do this, I’ll be able to do it in minutes 🙂
Humor in the fine print
I was surfing around and came upon Credit Karma via a link from SlickDeals. While I have no interest in the service, I was reading their FAQ and got a good laugh. In the FAQ titled “Is this safe?”, they have as the last line:
Our office is protected by a 30lb beagle.
Funny. I wonder how many people actually read that.
Simple Google to Mac syncing
I’ve been longing to easily sync my calendar with Google so that my wife and I can keep our calendars in order. I just started using BusySync from BusyMac. Previously I was using another product, but lately it just seemed to take hours to sync and it bogged down my system. I’ve known the BusyMac folks for years and they used to write Palm software. So far, it works extremely well. Make a change on either side and within 5 minutes, the other side gets the update. It is fast and efficient. Nice job!
CoverFlow view in ReceiptWallet is now complete!
My last piece in the CoverFlow view in ReceiptWallet was to add a horizontal scrollbar. This is much easier said than done. So I managed to create my own NSControl and have it act like a scrollbar. It might be a little hard to tell in this screenshot, but look at the bottom of the view and look at the scrollbar. Coo!
After a little more testing, ReceiptWallet 1.6.0 will be ready to go!
Quick script to update WordPress
I love using WordPress for this blog and that it keeps getting updates. The only problem is that installing the updates isn’t as simple as unzipping the archive and double clicking. Every time there is an update, I curse it as I have to re-read the instructions every time. Well, I finally decided to create a simple script to handle all this for me. The scripts assumes you have a backup of your database (I do this nightly, so that isn’t a problem) and that you’ve disabled all your plugins or are willing to risk things breaking. Old of my uploads, themes, and plugins live in wp-content and I don’t use multiple languages, so my script just seems to work. I’m sure someone has a better way or will point out a mistake. In any case, it was easy to put together and appears to work. Yeah, one command updates!
#!/bin/bash cd /var/www rm -rf /var/www/blog.tgz tar -czvf blog.tgz blog.gruby.com rm -rf /var/www/wordpress*.tar.gz wget http://wordpress.org/latest.tar.gz rm -rf /var/www/wordpress tar -xvzf wordpress*.tar.gz cp /var/www/blog.gruby.com/wp-config.php /var/www/wordpress/ cp -ur /var/www/blog.gruby.com/wp-content /var/www/wordpress/ cp /var/www/blog.gruby.com/.htaccess /var/www/wordpress/ chown -R apache.apache /var/www/wordpress/ rm -rf /var/www/blog.gruby.com.old mv /var/www/blog.gruby.com /var/www/blog.gruby.com.old mv /var/www/wordpress /var/www/blog.gruby.com rm -rf /var/www/wordpress*.tar.gz
Another use for DocumentWallet
Last Friday I celebrated (OK, maybe not celebrated as I’m still recovering from some stomach virus I had all week), my 35th birthday. My mom decided to give me as a gift some of my old medical records. Wow, thanks, mom! (She gave me a very thoughtful gift as my main gift; the medical records were just thrown in.) This got me thinking. What am I going to do with more paper? The first thing that came to mind is to scan them in and shove them into DocumentWallet! Excellent!
Yet another use for DocumentWallet that could prove to be (literally) a lifesaver in the future.
Bold or stupid move?
I received a letter from Sprint the other day saying that they were going to “streamline” their billing format which is an excellent and much needed move, but it goes on to say that I’ll get a new account number, I will have to create a new PIN and security question, and that if you make payments in the stores, you can’t make payments during the 4 days they are transitioning the system. Sounds like great news, but if you have automatic payment (not via a credit card), you have to re-setup your automatic payment with a new account number which is an inconvenience. I pay by credit card, so it doesn’t affect me. Now I’ll have to remember a different account number (instead of my phone number) and will any of this really make life easier?
I applaud Sprint for wanting to simplify billing, but is changing the account number and the account PIN really going to help or make for a large number of headaches at least in the short term. I’m also pleased that the PIN will be used when calling Customer Care instead of the last 4 digits of the account owner’s social security number. After some changes were made to my account that Sprint swore I made, I changed my passphrase and told them not to accept the last 4 digits of my social security number; only about half the reps honored this. With all the identity theft, social security numbers should only be used once for a credit check and then purged. Unfortunately, this doesn’t happen.
In any case, I’m curious to see what happens with this new billing system.