I updated to OS X Lion a couple of days ago, and for the most part it was a smooth transition.

This is the first upgrade where Apple is using their App Store concept to distribute the OS, so it was a bit scary to hit “Purchase” and watch nothing happen for half an hour while Mac OS X 10.7 downloaded in the background.

There’s no real indication of anything going on unless you happen upon the “Purchase” tab in the App Store App (seems a bit redundant, doesn’t it?):

App Store purchased items
After the long download, there was a typical OS install (well maybe not that typical, since it just worked) that ran for nearly an hour. Once that was done there were a couple of minor housekeeping items (like loading Java again separately for some reason), but all in all not much looked different than before.

I was happily exploring features like “Launchpad” and “Mission Control“, when I stumbled on a weird problem. My mouse wheel was scrolling the browser in reverse. That is, it was working in the more natural direction: scrolling the wheel up moved the text upward, and down moved things down.

At first I thought I had some weird virus, but when I upgraded my other Mac, I found the same issue. So I did a couple of quick searches on the Apple site, and found some mentions of the issue.

Apparently somebody at Apple decided the way things scroll has been backward all this time, and made the mouse default the other direction. There were some how-to fix it, but they showed screen shots from a Mac with an Apple mouse, which has a few more settings than what I saw:

Default Mouse Settings

While set this way, moving the mouse wheel up made the scroll bar go down, which was confusing to me, since that was what I always thought the wheel was tied to. But it did make the text scroll in the direction of the mouse wheel.

After a very short period, I got used to scrolling that way, but soon realized I’d be in trouble if I had to go to a Windows machine, so I simply unchecked the “when using gestures to scroll or navigate move content in the direction of finger movement” and I was back to “normal”.

Mouse settings

I’m sure at some point I’ll probably be sorry (like when I get an actual touch-screen Mac), but hopefully by then Apple will have a setting that will just make my mouse act like it does in Windows, and allow touch to act the way it should.

And then after all that, there is no DVD, no physical device in case something crashes. The theory is there’s a recovery partition (just like the old PC days), so you don’t need that.

Me being the old IT guy, I don’t trust that, so the next time I downloaded the Lion upgrade, I burned a DVD. The store will let you download the purchase again, but 4Gb still takes a long time, so media is king.

When traveling and trying to use the hard wire at a hotel, you may find that the provided Ethernet cable won’t work. This is because hotels typically have a very outdated infrastructure and are still running at 10Mbps.

Most new computers are set with network speed set to auto detect, but this relies on the hardware being able to handle that detection, which older, cheaper network boxes aren’t able to do.

In the lower right corner of your screen, you should see your network icon that will look something like:

The network connection is the one that looks like a pair of computer screens ().

The ).

When you are connected to a hard-wire, the tray should look something like:

The icon for the network connection will flash as network activity occurs.

If you don’t see the icon for the Ethernet connection, right click on the one for the Wi-Fi to get the context menu and choose “Open Network Connections”:

This will bring you to the network connections, which will list all of the available network options that have been configured on your machine:

If the connection shows “Limited Connectivity” instead of “Connected”, you most likely don’t have an IP address.

Right clicking on the “Local Area Connection” (or whichever one is associated with your Ethernet card) will give you a similar context menu that should let you check your connection by choosing “Status”.

This will show you a more detailed status of the connection:

You can try clicking the “Repair” button to force the connection to restart, but this typically won’t work in the hotel scenario. So going back to our context menu for the Ethernet connection, choose “Properties”:

This will bring up the property sheet for the connection:

Click on the “Configure” button next to the adapter to get to the settings. This will bring up the properties:

Go to the “Advanced” tab to change the link speed to 10Mbps:

Click “OK” and the adapter should reset and you’ll be good to go.

I’ve been working with the VA on a large project, where I was recently issued a laptop. Due to security concerns, they only allow VA government furnished equipment to connect to their network.

It’s the first time in a long while where I’ve had a setup where I didn’t have an adminstrative account, and some of the restrictions surprised me. The work I’m doing is for a group in Austin, Texas (located at the AITC), which means the computer was set up in the CST time zone. By default, Microsoft restricts setting the time to the administrator account (I think because it affects all users of the computer, although for a laptop that really shouldn’t matter), so I can’t change the time zone without desktop support.

While trying to see if there was a workaround in Outlook, I learned that you can set up a second time zone there, which helps you see the difference more easily.

Step 1: Go to Tools/Options from the menu:

Step 2: click the Calendar Options button:

Step 4: Add a label to the current windows time zone (CST unless you’ve had desktop change it for you).

Step 5: Check the box that says “Show an additional time zone”, and add the PST zone.

Step 6: click OK, and you’ll see both zones in your calendar.

Note:  Some web searches I’ve done have suggested that it is possible to create a policy  to allow a restricted user to change the time zone. (Computer ConfigurationPoliciesWindows SettingsSecurity SettingsLocal PoliciesUser Rights AssignmentChange the time zone), but without that you won’t be able to change the time zone as the computer is restricted to only allowing administrators to change the system time (Computer ConfigurationPoliciesWindows SettingsSecurity SettingsLocal PoliciesUser Rights AssignmentChange the system time)

On the first day of 360iDev, I was in a session to learn about programming an iPhone, and somebody mentioned that a friend of theirs had updated their iPod firmware, and couldn’t figure out how to reset it back to the prior version. Since I had recently done this, I thought I could write this walk-through.

Apple uses the iTunes application to upgrade your operating system which does a nice job and for the most part protects you from doing anything too terrible by automating the process. On the iPhone, iTunes will give you an alert about the availability of a new operating system, and ask you if you’d like to upgrade, and tell you that if you have problems you will have the option to restore from a backup.

The interesting thing about the backup piece though, is that it doesn’t really restore the firmware, only the settings. For most users this is fine since the reason for needing to go through the “restore” process is actually because of a problem with the firmware, and the “restore” does all the work required to get your phone back to working with the new firmware and your old settings.

If however, you need to go to a prior version of the firmware, the process is not so obvious. Until recently I didn’t even think this was possible for somebody to restore to the prior version unless they were a developer.

After I updated my firmware on my iPhone recently, I noticed that my hard drive was getting to be very full, which prompted me to search for what was using up my disk space. This led me to find that the old version of the firmware gets saved by iTunes when you do the update.

Firmware files have an .ipsw extension and can be found at the following locations:

On Windows:
Documents and Settings\Application DataApple ComputeriTunesiPhone Software Updates

On Mac:
~/Library/iTunes/iPhone Software Updates

Sotware updates on my Mac

To restore the firmware to the prior version, do the following:

  1. Launch iTunes (with your iPhone connected)
  2. Click the button that says “Restore” while holding down the “Option” key (use the Shift key on Windows). Note: if you get a prompt asking if you want to back up your phone, you probably weren’t holding down the key when you clicked, and you’re actually going through the restore process.

Alternatively, if you’re an iPhone developer, the XCode Organizer can also drive this process of selecting a version to install on your phone.

Organizer

In either case, the actual firmware change is done through iTunes. Now you should see the firmware file being extracted:

extracting firmware

Your phone will be reset, and you’ll see the firmware being validated in iTunes:

validate firmware

Next you’ll see the update message:

Restoring

At this point your phone will be reset back to factory settings for that prior version of the firmware. You’ll probably get the prompt that tells you an update is available, which you can cancel.

Finally if you want to restore your settings, pick the backup you want to use (you can also tell it to set up as a new iPhone, which just means you won’t have any of your settings from before).  This will restore all of your apps and setting, although you may end up with a message that tells you about applications that won’t work if you have any that are for a newer version of the firmware (in other words if your backup contains an App version that wasn’t available for the firmware you reloaded).

App warning

After all of this, iTunes will probably ask you if you want to upgrade your firmware to the current version, which is how you would go back to the current version when you are ready to do so (or you can go through this whole process again to go to a specific version). You may want to turn off the automatic update checking if you are going to switch to other versions very often.

Note that your “problem” applications from the prior message will work once again after you are on a version of the firmware that is current enough to support thos applicatons.

I recently was seeing a few weird problems with Entourage and synching, so I decided to check and see if it was up to date.

I have a copy of Entourage 2008 that I got from an Exchange hosting service that I use for email with one of my partner companies.

Looking at the Entourage/About Entourage, I saw that I was running version 12.1.3,which was a couple of revs back from the current version (12.1.5). So I picked Update from the Help menu in Entourage:

Entourage Help/Update

I saw that I have my Autoupdate set to Automatic and check weekly, so I’m not sure why it wasn’t up to date.

Entourage Update

I clicked the “Check for Updates” button, and answered the questions so that the update started. Everything looked fine until it got to the page where it wants to install the update. The part that inspected the disk took a really long time, my CPU spiked, and I could hear my machine heating up. After a minute or two, the screen updated with a message telling me that it couldn’t find the right version to install this update.

Entourage Update Disk SearchEntourage Update Fail

So now it was off to scour the Mac sites for help with the problem. My guess was that this should be easy to find, I couldn’t be the only person ever to have installed Entourage from a hosting provider (meaning just Entourage, and not the rest of Office 2008 is installed on my Mac).

After many Google searches, and then a direct search at the Mactopia forums, I found a thread entitled “Cannot install 2008 update 12.1.4 or 12.1.5” and about halfway down the page was a post by dbsierra that explained how to do a workaround for this issue, which was to do the following steps:

  1. Download the Office 2008 update .dmg file.
    1. Mount the .dmg file on your desktop by double-clicking it.
    2. When the Office 2008 update window opens, drag the icon for the update to your desktop, it will take a sec to copy over. Close this window when it is done copying and you see Update file on your desktop.
    3. Unmount the .dmg file by either right-click on .dmg file, choose “Eject …”, or eject/unmount in Finder.
  2. Right-click on the Updater file on your desktop and choose “Show Package Contents”.
    1. Navigate to Contents folder, then Resources folder. Find the file named: package_updatable.
    2. Highlight the package_updatable file and right-click, choose “Get Info.”
    3. When Info window pops open, click on padlock in lower right corner (Note: you may need to expand the “Sharing and Permissions” section to see the lock icon).
      1. . Another window asking for your admin. password will pop up, type in your admin password and padlock should unlock with that satisfying open vault sound!
      2. In Info window click on gray triangle to show Sharing & Permissions. You need to change Privilege for your Admin. account from “Read only” to “Read & Write,” click on up/down triangles to do this.
      3. Click on padlock to lock file and close window
    4. Highlight the package_updatable file and right-click, choose “Open With” then “Other …” Click thru (ignore) the warning about opening Unix files. The Application folder in the Finder will be open, scroll down and choose TextEdit.
      1. TextEdit will have opened the file. Scroll down to find the following lines and delete them:if not found_valid_version:
        sys.exit(48)
      2. In the File menu of TextEdit, choose Save. The file should close. Close the Finder.
    5. Double-click on Office 2008 update file on your desktop. Follow on-screen update instructions as normal and hopefully that’s it.
    6. Re-boot, open up Office 2008 Apps and get on with your life!

I was able to force the update by doing these steps, although I did get an odd error in the middle (I’m guessing because it was trying to update Word or some other Office program that I don’t have installed), but it continued through, and now I have the “right” version (12.1.5).

I have been running my development for VolunteerCake with a database on my Windows box which sits in my office with my Mac. I went to meet some people at a coffee shop, and realized that I couldn’t show them the app running on my MacBook because I was no longer on the same subnet with my Windows box, so I decided to move the database to the Mac to allow me for this.

Since I had everything in place to run Cake on my Mac except for MySQL, the first step was to install MySQL. This turns out to be pretty painless. Just grab the DMG from the MySQL site, and voila, new MySQL running on my Mac. Checked everything out using the MySQL administration tools, and it all looks good (I can access the DB, set up users, etc.)

Next I need to put the data in the database, so I just do a quick export from the phpmyadmin page on the PC. I end up with a file that is the SQL needed to replicate the entire database on my Mac. I run this SQL into the Mac MySQL, and now I have an exact copy of the database on my Mac.

After that, I go to the SQL administrator tool and make sure I have the user set up to give access to that database and make sure the username and password are the same as I was using on the PC (if I were more of a DBA, I’d probably have done this with command line MySQL, but I like GUIs, especially for things I don’t do every day, and the MySQL tools are pretty cool).

Then I need to change my database.php to point at the local database in order for VolunteerCake to get the data from the Mac. This should be as easy as changing the name of the host name to ‘localhost’ from ‘monet’ since I’ve set up the user and access to the database exactly the same as what I had on the PC.

Finally, all that’s left is to fire up the same URL that I have established for my app on my Mac (http://test.lctd.org/VolunteerCake) and … wait, that didn’t work. It says it can’t find the table acos for the Aco model …

Weird, the table is there, I can connect just fine, what could this be? A quick trip to the IRC channel, and I get the suggestion of clearing my cache. OK, try that … But hit the URL again and no change.

OK, now I’m confused, so I try running ‘cake bake’ … Now something interesting: I get an error that tells me that it was unable to connect to /var/mysql/mysql.sock – what does that mean? I thought I was connecting with a TCP socket, why does it want a file? Is this some sort of file permissions issue ?

Back to the IRC chat for some guidance, thinking maybe it’s a common problem, a permissions issue or something, of course they tell me to do exactly what I’d tell somebody else to do: verify that you can connect from PHP first. Good idea – so I whip up a quick connection test page, and get the same error. So now I’ve confirmed that it’s a PHP problem, and not a Cake issue.PHP can connect to a remote DB, but not the one on my local Mac …

Now it occurs to me that I often have problems that end up being related to the open source software that came bundled with the Mac, so I do some Google searches on PHP connection to MySQL for Mac OS X, and with the connection error messages. Eventually I find what looks to be the issue: for some reason the MySQL configuration sets the socket file to /tmp/mysql.sock but the PHP that comes with the Mac is looking somewhere else (at /var/mysql/mysql.sock to be specific). So I basically have three choices, edit the php.ini, edit the mysql config file, or build symlinks to make the file accessible at both locations.

I decide to change the php.ini file, which turns out to be another excercise in hunting, since Mac OS X likes to hide the files you’d expect to find in the /etc directory. After some more Google searches, I find that the PHP5 install that comes with Leopard puts the php.ini file into /private/etc, so I edit that file, changing the part of the file that looks like the following:

To be:

In order to have PHP find the mysql.sock in the location that MySQL is actually creating it. Check my URL again, and voila, everything is working !!!

So, to make a long story even longer, I relearned that mixing actual open source with vendor open source is often problematic. It was suggested by at least one person (Mark Story) on the IRC channel that the best way to set up for Cake development on the Mac is to use MacPorts, since then you end up with matching versions of the software all in a “normal” open source location.

Enhanced by Zemanta