Dave Landers

Dave’s thoughts (such as they are)

Archive for the 'Mac' Category

Lion upgrade issues

I just upgraded my MacBook Pro to Lion yesterday – and thought I’d summarize the things I’ve found so far:

The first thing to note is that, except for some issues noted below, this was a pretty smooth upgrade.  I usually don’t like upgrades and prefer to do a clean install and reconfigure or move stuff over.  But the upgrade install itself was pretty good.

I had terrible problems with Spotlight indexing – I think mdworker crashed about 10 times yesterday trying to get through the initial indexing.  It is possible that it was colliding with Time Machine trying to backup the 9Gb or so that changed during the upgrade.  Not sure, but now that it has (eventually) finished the initial index pass, it seems OK.

I had things just plain lock up several times – usually I was trying to get my Eclipse projects refreshed and rebuilt, and maybe that was deadlocking with the Spotlight vs. Time Machine issue.  I don’t know, but it really annoyed me to reboot and have Lion reopen the very thing (Eclipse) that caused me to reboot in the first place.

Reboot (or even logout/in) should start you off clean, IMHO, not “where you left off”.  If I wanted to be where I left off, I wouldn’t have rebooted in the first place.  I should at least have an option to turn this off (globally and per-app).

I had trouble getting my work calendar (CalDAV) to sync.  I eventually fixed it by deleting all the entries for that server in Keychain.  We hit the same server for Calendar, Mail, and IM, and several of the keychain entries were accessible by Calendar, and a few of those were old – so maybe it was confused about which one to use.

Something changed in Java (other than the install location).  I have stumbled upon two issues with WebLogic Server:  First, I now need to bump up my MaxPermGen even for a basic web app to deploy – I’m now using -XX:MaxPermSize=256m (before Lion these apps were getting by with the default).  Also, WLS is now not happy with Lion’s IPv6, and won’t bind to any port unless I specify a v4 listen-address (

I don’t really want my laptop to look/act like my phone.  That’s probably why I don’t like the new look in Mail.  So it’s Classic layout (under Prefs -> Viewing), and View -> Show Mailbox List.  Then, System Prefs -> General -> Sidebar icon size to Small so my mail folders (yes, I’m old-school and still use folders for mail organization) fit in the window.

I do think I might like Launchpad – although it could sure use some tooling to help make the configuration better.  But I finally think I got it usable enough to trim down my Dock.  A couple of hints:

  • You can drag an app from Finder onto the Launchpad icon (in Dock) to add an app (outside of the Application folders) to the Launchpad.   I got Eclipse.app into Launchpad like this.
  • You can bind Launchpad to a key shortcut in Sys Preferences -> Keyboard -> Shortcuts -> Launchpad.  Check Show Launchpad and enter a shortcut.  I went with Command-F12.
  • There doesn’t seem to be a (good) way to remove icons from Launchpad, and it’s pretty cluttered with everything.  So I made several groups/folders (whatever they’re called) to hide the junk, and tossed them on the last page.

The biggest surprise for me is that I am almost used to the upside-down scrolling thing.  I thought I’d hate it, but it seems like it might be ok.

Comments are off for this post

Network Location Switching

Been quite a long time since my last post, and I am not going to try to catch things up.  But I did want to archive this information:

At work, we have an http proxy – an idea from the 18th century it seems.  So I have to have two Network  Locations (one for normal configurations, another for the work proxy).  We also use Cisco AnyConnect VPN to connect from home.

I had been using MarcoPolo for switching locations.  This worked great for home and work, but I wasn’t happy with how it worked with the VPN.  All I could do was detect if the VPN application was running or not – so I couldn’t leave the VPN app open and connect/disconnect.  Also, the process was to launch the VPN app, wait for MarcoPolo to switch the network to VPN, make sure it was stable (not switching back and forth), and then connect to the VPN. Disconnecting has to be followed by exiting the VPN else MarcoPolo wouldn’t switch things back to my no-proxy Location.

I took inspiration from this and created a LaunchAgent and a simple script to switch Network Locations.

The LaunchAgent plist file goes in ~/Library/LaunchAgents/com.srednal.netswitch.plist, and looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

The script, in ~/bin/netswitch, is something like this (names and addresses may have been changed):

#!/usr/bin/env ruby
# Test network and switch locations based on vpn and ip address
require 'ipaddr'

# see if VPN is connected
def vpn?
    connected = false
    IO.popen( '/opt/cisco/vpn/bin/vpn status' ) do |out|
        out.each do |line|
            connected = true if line =~ />> state: Connected/

# are we on work network?
def work?
    # Work IP will be within  10.345.678.00/24 - obviously this is something you need to tweak
    work = IPAddr.new('10.345.678.00/24')

# lookup local ip addr
def local_ip
  orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true  # turn off reverse DNS resolution temporarily
  UDPSocket.open do |s|
    s.connect '', 1  # IP is anything
  Socket.do_not_reverse_lookup = orig

# set network location config
def location(name)
    system "/usr/sbin/scselect '#{name}'"

if __FILE__ == $0
  # let things settle down
  sleep 2
  if (vpn? || work?) then
    location 'Proxy'
    location 'Automatic'

The script can be run manually to test things.  Then load the launch agent with launchctl load ~/Library/LaunchAgents/com.srednal.netswitch.plist.

After I got that working, I went into the Info.plist file of the AnyConnect client app, and added (to the dict element)


That makes the Dock icon go away (but leaves the icon in the status bar), so now I can leave the AnyConnect client running and just connect/disconnect as needed – the LaunchAgent and script keep my network location set right.

1 comment

Colorado Software Summit wrapup

It has been a great week – I’ve now got a lot of things to dig into more. There were things I learned directly from the sessions, and other stuff that I picked up outside the sessions themselves.

I need to try out Virtual Box to host Linux on my Mac.

I want to look at World Community Grid and maybe contribute to something useful rather than my iPhoto screensaver.

I wish I could find an excuse to build an iPhone application – there were several good iPhone development sessions this week. Looks like fun.

I have this proxy application that I wrote and have re-written several times to investigate various technologies. I have a MINA version, and so was interested in the MINA talk this week. After that talk, I think I will now have to re-write it again to wire up the MINA filters and handlers using Spring.

I need to play more with JMX to understand how to use it for configuring and monitoring. Maybe I’ll do this as part of that same MINA/Spring update.

Simon Phipps, talking about standards, asserted that standards should be about Substitutability not Interoperability. That is, if we concentrate on building a standard that lets us Substitute one thing for another we will have a more useful standard than when we focus on interop. I’m going to have to think about that one.

And on Monday morning, I plan to clear the whiteboard and grab the slides and my notes from Subbu’s REST talks – because I have a RESTful service API to build.

What a great week. I am educated, informed, inspired, reconnected … and tired.

Technorati Tags: , ,

Comments are off for this post

Colorado Software Summit – Detailed Schedule Posted

The full, detailed, daily schedule for Colorado Software Summit has just been posted.

If you are not familiar with the conference, you should take a look. One look at the full schedule and you will see that (like every year), they’ve got some world-class developers talking about some hot topics – REST, JavaScript, JSF, Linux, iPhone and Andriod development, scalability, Spring, and lots more.

In fact, this might just be the first conference to feature iPhone development since Apple has only this week lifted their NDA.

You should also note that, unlike a lot of other conferences, this one features every session three (3) times each. That’s quite a load on the speakers (I speak here from personal experience), but is a boon for attendees (again, personal experience). While there is much more content here than you can hope to take in during the week, the 3-times-each deal makes it pretty certain that you’ll be able to get to your top 10 or 15 sessions.

Some other things that make this conference different and better than the rest:

  • When you check in, you will get a CD with every single slide for every single session. So you can plan your schedule based on more than just the abstracts.
  • After you get home, you’ll receive a CD containing every single slide (again – since many speakers tweak things at the last minute), plus any example source code used in the sessions.
  • Every speaker is presenting two topics, so if you like one session, you might want to attend their other one.
  • This conference is a real community. You will (if you so choose) be able to hang out, eat lunch, etc. with the speakers (and many other smart developers). Networking, in-depth conversations, and lots of joking around are an integral part of Software Summit. If you don’t leave having made a couple of new friends, you haven’t done it right.
  • The food is absolutely fabulous.
  • The venue in the heart of Colorado’s Rocky mountains (at a major ski resort) is spectacular.

Technorati Tags: , , , , ,

1 comment

Time Machine Restore works

I just got a new MacBook Pro yesterday. I “needed” a new machine because my old one is a Core Duo (not Core 2 Duo) and wouldn’t run the Java 6 preview. And my son “needed” my old MacBook Pro for college. Yea, that’s it.

Anyway, I turned on the new machine this morning, and selected the Restore from Time Machine option. It chugged away for an hour or whatever, but by about 9:30 AM I was sitting in front of a near replica of the other machine. Pretty cool.

I did have to install XCode and Dashcode again.

And I had to re-acquaint my bluetooth phone with the new Mac. And re-authorize my iTunes music.

And for some reason, I had to reset my USB drive as the Time Machine volume (and it choose a new backup database folder, so it’s going to start over with a full backup).

Technorati Tags: , ,

1 comment

Next Page »