Leopard Restraint

I’m as excited as anyone about Leopard. In particular, Time Machine and Spaces. Time Machine because backups have to be automated and I’ve never investigated the options. Spaces because virtual desktop is the one thing I really, really, miss from Linux. I also have hopes that Spotlight will actually be worth using. And I know there will be tons of the little things which seem pointless in isolation, but make a superb impact overall.

However, I will not be upgrading until at least the first significant patch. Leopard early adopters suffer for the rest of us. I salute you guys for your assistance in making the platform more stable. Me, I’m going to continue using Tiger until the “blue screen” problem is a thing of the past, Skype works, and MOST IMPORTANT, Rails works without the hassle I went through on Tiger when it first came out (it wasn’t very funny).

Apple and Google both have a policy of secrecy, which has been highly successful in an era where the common mantra is openness and transparency. It works fine for both of them, but it’s better for Google, where the barrier to usage is low. For Apple, there’s always a risk of charging hundreds or thousands for something that turns out to be seriously broken. They’ve been fine to date, mostly due to the zeal of the Apple crowd, as well as what must be some very savvy development and testing processes. While it works fine for Apple, I as an individual user make sure to protect myself from the risk of early releases.

The sweet spot for me and Apple is being a late Early Adopter – that’s the right balance between the increased productivity from new features and the loss of productivity from using an OS that’s been sent into the wild sans beta test. I may be a fanboy, but you won’t see me queuing up in Regent St for a week. I’ve gotten by without Leopard for the some decades; I can wait another month.

How to share your Mac desktop (OSX 10.4 – Tiger)

I had my first remote desktop sharing experience on a Mac yesterday. I needed to run a demo on my Mac for a remote user, and it turned out to be not all too challenging, once I worked out what software was required. All of it free and painless to set up for both parties.

Here’s how you do it. “You” are the one sharing your desktop, i.e. showing what’s on your screen to someone else on the net. “The Viewer” is the someone else viewing your desktop.

Enable Remote Desktop Sharing on your Mac

Fortunately, this is free and built into Tiger – you just need to be enable it.

  • System Preferences | Sharing | Apple Remote Desktop. Tick this option.
  • Click on Access Privileges
  • Tick “Observe”, “Show when being observed”, “Guests may request permission to control screen”, and “VNC viewers may control screen with password”
  • Enter the password next to the last of these options, e.g. we’ll assume it’s “easy2guess”.

Set Up Port Forwarding on your Mac

You’re probably running this behind your router, so log into your router and forward incoming TCP port 5900 to your PC.

Port forwarding is a whole topic in itself and if you don’t know anything about it, you’ll need to read up. Very briefly, it means that when a request comes into your router which sits at the front of your LAN, the router knows which PC to send it to. To set up port forwarding on your router, you’ll need to know: (a) how to log into your router and change port forwarding options; (b) the local IP number of the machine you want to share – run ipconfig or ifconfig and look for a number like 192.168.something or 10.0.something, or look at your router’s output; (c) the port number – I just told you that. (It’s usually configured as a range, so just use 5900-5900.)

Well done. Your machine is now ready to be shared.

Viewer Installs a VNC Client

The Viewer will need to install a VNC client. If they’re using a Mac, may I suggest Chicken of the VNC, a fine open-source product whose merit extends beyond its moniker. Worked for me anyway. Detailed chicken review here. As with most reviews though, it doesn’t say much about the big picture and what happens on the server, hence the article you’re reading.

Pass on your External IP Number to Viewer

Just prior to connecting, pass your external IP number to the Viewer by phone or email. Fastest way to determine it is to visit WhatsMyIP.org. It’s also in your router app somewhere.

Viewer Connects to Your Machine

The Viewer runs the VNC client and enters your IP number (with chicken, run Open Connection from the connection menu). They’ll also need to enter the password you set up earlier (which we made “easy2guess” above). And now they can see your site.

Tweak Settings

If it’s slow, the Viewer will hopefully be able to tweak the options of the VNC client they’re running, e.g. reducing the resolution or the number of colours.

Shut it Down

When your session is finished, remember to turn sharing off, which you can do via the System Prefs again or the toolbar.

Final Caveat

VNC isn’t encrypted by default, so be aware that what you share with the Viewer is as vulnerable to third-party access as email and other internet traffic. The fact you use a password may give some people a false sense of security.

Tabbing, Terminals, and Apple’s Popup Bug

Popup Bug

The most annoying thing about programming in OSX has now been fixed, finally. For years now, every time I want to switch tasks to an XTerm (under X11), it doesn’t work the first time. I have to choose it in the task switcher, then go back to my app, then go back to the XTerm (Alt-Tab,left a few times,Alt-Tab,right,Alt-Tab,left a few times) Many others have had this problem in the past too (Mike Kruckenberg, Crazy Bob). Some have reported it fixed in the past too, but it never worked for me, until today. THANKYOU!

Well, some of the annoying, tedious, tasks become subsconscious after a while, but not this one. It was way too frustrating to morph into a neurological shell script. I am now 10% more productive and 100% more satisfied with programming in OSX. And more so once I switch my Rails dev over from Eclipse (+Rail plugins) to the shiny new IntelliJ Rails setup. (IntelliJ+Rails+OSX==Could it get any easier?)

Terminals

Actually, I’d like to be using Multiterm – tabbed terminals makes so much more sense, and it would also have overcome the crippling popup problem that no longer cripples. But, like Apple’s own ITerm, it’s dog-slow. Very odd to have a visible delay on a terminal in 2007, as if you were hammering a VT100 in 1977, but yes that’s what happens. L..e…t..t.e…r..s s…h…o.w… …u..p ..t…o..o ..l..a.t….e :..-…). You can read here about the slowness of OSX terminal apps that is as astounding as it is frustrating.

I will also take this opportunity to start using the “screen” utility, a command-line shell switcher. I just now realised why I’ve always overlooked it: It was banned years ago at uni due to resource constraints. That’s when I started working with Unix, so I always ignored screen, but it seems to be the only realistic way to run multiple sessions in a single term window, on OSX.

Tabbing

The Diggnation guys were joking a while ago about how just saying something has a “tabbed interface” makes it cool nowadays. Fact is, tabs are pretty cool and applicable in many situations. Here’s an example. I have a new phone – Orange SPV M700 (which is about anything you could ever ask for in a smartphone, awesome!!!) – and installed Opera as it renders better and more reliably than IE. One extra benefit is tabbing – yes, this mobile edition of Opera has tabs, standing out from other mobile browsers just like its grandaddy on the desktop years ago (which was then bolted onto Moz/FF/Safari and finally IE7). Well, I was surfing the web while on the tube, browsing DiggRiver, and about to lose signal as the train went underground, but no worries, open up 5 or 6 new tabs in a few seconds, they all loaded, and I had enough content away from the signal. Windows Mobile has a nice popup menu feature where you hold down the stylus a second or so, so you hold the stylus down on a link and Opera gives you a popup menu for that link, including Open in New Tab. Sweet.

powered by performancing firefox

OSX Screenshot Script

Let’s say you wanted to capture a few images for a fade effect, which means you need a sequence of rapid screenshots. Here’s a script I’ve been using:

i=0 ; while [ 1 ] ; do i=expr $i + 1 ; screencapture -C $i.png ; sleep 0.1; done

Hit ctrl-c to kill it, then view the sequence with gqview or something. Then use the very cool Flysketch to grab the same position each time. Caveat: The 0.1 millisecond interval is optimistic, the powerbook seems to handle only about 3 pics per second.

The camera sound effect helps a lot as you know precisely which instant got taken and also creates the requisite fashion shoot ambience.

Here’s a sequence with a fade effect (One-Second Spotlight) from Everybody’s favourite fade effect website.

Image Hosted by ImageShack.us
Image Hosted by ImageShack.us

Image Hosted by ImageShack.us

The alternative would be to record it as a screencast and pick out the frames. I was using Wink under Linux, but haven’t looked into OSX tools, any suggestions?