Archive for the ‘Professional’ Category.

New Safari 3.2 Feature: Secure Website Identification

Here’s a quick tip that slipped through the blogosphere (at least none of the Mac blogs I subscribe to featured it): in Safari 3.2, released last week, Apple’s added a feature from Firefox 3’s “awesome bar”: when you’re on a secure website, such as a bank’s, that has identification information, it’s displayed in green (though in Safari it’s at the top-right of the title bar).  A screenshot:

 

Safari 3.2 adds secure website information to the title bar.

Safari 3.2 adds secure website information to the title bar.

Along with a phishing filter, it looks like Safari is stepping up to the plate as a secure browser.

Use DVD Player in Fullscreen Mode on an External Monitor

By default, DVD player will exit fullscreen mode when it’s not the active application.  This is a problem if you want to watch a movie on an external monitor while working on a primary monitor.  To get around it, go to Preferences in DVD Player (DVD Player -> Preferences… or command + ,), switch to the “Full Screen” tab, and ensure that “Remain in full screen when DVD Player is inactive” is checked.  This should achieve the desired results.

Source: MacRumors.com Forums

Prevent Mac OS X Leopard from Prompting You to Start Synergyd Every Time You Use SynergyKM

So here’s an annoyance.  Having just installed SynergyKM, a great front-end for the awesome command-line utility Synergy, launching it would result in the following prompt:

The promt you get when launching SynergyKM

The promt you get when launching SynergyKM

To fix this, you need to remove the extended attribute com.apple.quarantine that’s on the file.  Fire up Terminal and enter the following commands:

sudo xattr -d com.apple.quarantine /Library/PreferencePanes/SynergyKM.prefPane/Contents/Resources/Synergyd.app
sudo xattr -d com.apple.quarantine /Library/PreferencePanes/SynergyKM.prefPane/Contents/Resources/Synergyd.app/Contents/MacOS/Synergyd

That will remove the flags and prevent the prompt.

Normally, you’d only see this prompt once, but since installing it for all users changes permissions such that your user account can’t remove the attribute, it isn’t removed.

Note: This is assuming that you’ve installed it for all users.  If you’ve installed it for one user, it’ll be in ~/Library, not /Library.

Update: I’ve submitted a patch to SynergyKM’s SourceForge page, so if they accept it this will no longer be an issue.

Computers are Disgusting

I recently wrote a script to automatically install firmware updates for our Macs. The problem with them is that for some, you have to hold down the power button to finish the installation after the machine has turned itself off. Now I don’t know about you, but I sure as hell don’t want to go around to 900 or so Macs and hold down their power button after installing an update. This script, while it can’t hold down the button for me, does allow student staff to automate the proces up to that point. I don’t have to give them a password they could use to break the system, they can do the update for me, everybody wins. It’s a beautiful system.

Well, today, I was testing the script out. The problem with testing it is that you can only test a given computer once; once the firmware update is installed, it won’t show up as needing to be installed anymore. So, I packed up my stuff and went to our biggest computer lab to do some testing. My test subjects were some “CyberStations,” computers we have with basic web-browsing and e-mail loadsets. They’re relatively unused during the summer, so if I broke any it wouldn’t be a big deal. I went up to one, ran the update, and waited. That’s when smoke came out of the back of the computer as the update ran. Oh shit, I thought, this thing is on fire!

Let’s go back a minute to my description of CyberStations. Their loadset consists of a vanilla Mac OS X Leopard install with some applications taken out, Firefox, Thunderbird, and Adium. Basically, it has the Apple-provided web browser, e-mail client, and IM program, as well as the leading open-source alternative for each. Nothing on these computers is too taxing. As a consequence, the fans never need to run too heavily, as the computer never really gets too hot.

Back to the smoking machine. I was sure it was on fire—where there’s smoke, there’s fire, right? Well, the student employee to whom I was demonstrating the script wasn’t too sure. He placed his hand on the back of the computer (an iMac G5, not that it matters) and didn’t feel any heat. So, if it wasn’t smoke, what was it? That’s when I realized what had happened. The fans, never having been run too hard, hadn’t been blowing a whole lot of dust around. When they ran full speed during the firmware update, dust had come flying out of the computer’s vents. A white, puffy cloud composed largely of the dead skin cells that had fallen off of our users’ skin for years. It was coming out of the bottom, out of the back, and even where the screen met the case. I quickly held my breath and stepped back.

I’m really glad that we have student staff to do the rest of this.

Use Your MacBook Pro with an External Monitor Without Sleeping

So, in a similar vein as to what pushed me to write my Applescript to resize windows, I’ve been looking at what to do about going from using the LCD on the MacBook pro to an external monitor.  Now, everyone knows that in order to use an external display, you have to connect the display adapter while the notebook is closed, plug in an external keyboard (and your power supply), and press a button, and boom, you’ve got external display action at your monitor’s native resolution.  But what if you don’t want to wait the ten seconds or so it takes to go from awake to asleep?  Messing with it, I was happy to note that the following procedure seems to work:

  1. Plug in the external display, your keyboard/mouse, your power supply, etc—with your notebook open.  The external display will mirror your notebook’s LCD, at its resolution (if supported by the display.  If it isn’t, you’ll get the highest common denominator, I think).
  2. Close your notebook cover so the display turns off.
  3. Immediately open the notebook cover, then close it just as soon, then push a button on your keyboard.
  4. Presto! Your MacBook Pro should see the display and change the resolution how you want it.

I’ve only tested this on my machine, so let me know in the comments if it works/doesn’t work or if you have a better way.

Waiting For My iPhone

Maybe it’s the two-hour infomercial in California I attended. Maybe it’s the half-dozen times each night last week where one of us would say, “If I only had an iPhone, I could look up…” Maybe it’s all the cool iPhone applications that are going to come out. Or even the $200 price tag. Whatever it is, I really want an iPhone.  Watching Steve Jobs’ Keynote address (from an overflow room, as I hadn’t spent the night outside Moscone West in order to secure a good seat), I held out hope for him to say, “…and it’s available now!”  Alas.  Not only could I not get one at WWDC, but Apple has deigned not to allow Internet pre-sales.  I can’t even say that I will get an iPhone when the new version comes out, as I have to go to the store to get one, and they might be sold out by the time I get there.

More news also recently cropped up lately, saying that AT&T might not deliver on the $200 price point for people (like me) currently in a regular AT&T contract before the 2-year phone replacement cycle is over.  That’s pretty bad news, and it raises one obvious, but absolutely vital, question: how much is it going to cost me?  Inquiring minds want to know.

WWDC Impressions, Day 1

The big thing at WWDC is always the keynote address. Steve Jobs inevitably riles up the crowd (mostly composed of Mac geeks) by some groundbreaking announcement. This year’s keynote, while not as feature-rich as previous years’, at least gave me a month to wait for the iPhone 3G that I’ll inevitably have on pre-order as soon as that’s an option (does anyone want a black Razr?). The other big announcement at the keynote, aside from all the presentations by iPhone software engineers, was Apple’s replacement for .Mac, “MobileMe”. I’m of two minds about this service. First, I think the idea of the service is great. I sync my iCal, Address Book, etc. with Google right now through Spanning Sync; MobileMe is more expensive but also does photo albums and a 20 GB iDisk. I imagine I’ll try the 60-day trial and either not use it or enjoy it enough to subscribe. The part I don’t like is the name; Apple’s marketing department is usually top-notch, yet the logo for MobileMe is eerily reminiscent of Windows ME. Hopefully the two products won’t have the same “success” stories.
Time to go to my first session (which I can’t legally talk about here).

Updated: Resizer AppleScript

After looking at my AppleScript to resize windows, I’ve decided to make a few updates.  Instead of manually doing the math for each resolution, I’ve created a new variable, desired_width, which is exactly what it sounds like: how wide you want your windows to be.  I’ve also made the other variable names more human-friendly: _nl and _nr are now left_bound and right_bound, respectively, for example.  After adding iTunes to my script, I noticed that it was being resized behind the menubar, so instead of setting the upper bound for all windows at 0, I’ve defined the variable top_bound, which defaults to 22 to account for the height of the menu bar.  If you find that this setting is incorrect (e.g. if you’ve enabled some accessibility settings that change font sizes and therefore the size of the menu bar) you may need to change it; I haven’t found a way to get the height of the menu bar in AppleScript yet—so far I’ve only found it in Java—so if anyone knows feel free to leave a comment.  Finally, after seeing this post by Jamie Matthews, I added some functionality to automatically set bottom_bound to the height of the Dock.

After all of these updates, the script now takes a desired width and moves applications that support AppleScript such that they range horizontally to your desired width, centered on the screen, and stretching from the bottom of the menu bar to the top of the Dock.  In the future, I’d like to make a separate application, perhaps AppleScript-based, that will allow for user customization of how the windows are arranged, allow for custom application settings, and perhaps Spaces integration.

Resize Your Windows Automatically for Different Resolutions

I use my MacBook Pro in a few different scenarios: by itself, plugged in to a 21” Apple Cinema Display, or plugged in to a 24” Dell 2405FPW.  I’m also rather OCD; I prefer my Firefox/Safari, Mail.app, and Vienna windows to be centered, stretch from the menu bar to the top of my Dock, and be a certain width.  I created a small AppleScript to auto-detect my resolution and size the windows accordingly:

tell application "Finder" set screen_resolution to bounds of window of desktop set screen_width to item 3 of screen_resolution set screen_height to item 4 of screen_resolution end tell tell application "System Events" to tell process "Dock" set dock_dimensions to size in list 1 set dock_height to item 2 of dock_dimensions end tell set desired_width to 1400 set side_space to screen_width - desired_width set left_bound to (side_space / 2) set right_bound to left_bound + desired_width set bottom_bound to screen_height - dock_height set top_bound to 22 (* for the menu bar *) try tell application "iTunes" activate set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound} end tell end try try tell application "Firefox" activate set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound} end tell end try try tell application "Mail" activate set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound} end tell end try try tell application "Vienna" activate set the bounds of the first window to {left_bound, top_bound, right_bound, bottom_bound} end tell end try

With that in place, I saved it as an application in ~/Applications, and put it in my Dock. Now, whenever I change resolutions, I just click the button and everything is how I like it.

To change the script, you should be able to add any application with an AppleScript dictionary that supports moving and sizing the window.  The numbers I’ve used make the windows 1,400px wide, and the height that you want will depend on the size of your Dock. The script moves windows to the center, desired_width wide, and from the menubar to the Dock.

Note: I have had some trouble recently; sometimes when I change my resolution the AppleScript doesn’t pick it up.  To combat this, I told the Displays System Preferences pane to keep its icon in the menu bar; when my script uses the incorrect resolution, I change my screen resolution then change it back, which is enough for the script to detect the change.

Update 2008-05-28: Made some usability changes. Details here.

WWDC

I’m really looking forward to WWDC this year.  It’ll be the very first time I’ve been sent anywhere on a business trip, and I plan on not only learning a whole ton, but also having a great time and meeting cool people.  Apple just posted the schedule, so I’ve been mapping out an itinerary filled with mostly the IT track stuff (since, obviously, I’m in IT).  Unfortunately, the developer sessions that I’m interested in are mostly offered during IT sessions that I’m interested in and are also directly relevant to my job, so I’ll probably go to the IT ones and watch the developer ones on video—I believe WWDC tickets come with free video downloads via iTunes.

Being in San Francisco should be fun, too.  I might hit up a Giants game while I’m there, and I’m going to try not to eat at the same restaurant twice (hotel breakfast bar excluded).  Any good suggestions on things I should do or food I should eat while in town?  Leave a comment!