Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Making Juniper Network Connect use Keychain Network
Password managers are a good thing, as they encourage you to maintain strong passwords. Just the sort of thing you’d want if you were opening every port on every computer on your enterprise network. Unfortunately, Juniper doesn’t see it this way. This can be resolved with some crafty scripting.

First, we need a scripting addition called Useable Keychain Scripting. Download it and copy it to /Library/Scripting Additions. You'll need to type your password to do this.

Next, you need to be able to connect to your VPN, so do this, then disconnect. Network Connect should retain the address of your server (e.g.

Now create a password item for the server (, and grant access to Usable Keychain Scripting. Or not, your call.

Now fire up the script. It will get the address of the server from Network Connect, get your username and password from Keychain Access, and log you in.

Modified from
property appName : "Network Connect"

on main()
	tell application "Network Connect"
		if connected then
			sign out
			delay 5
			tell application "System Events"
				-- Recover the name of the VPN from Network Connect.
			set myAddress to value of combo box 1 of group 2 of tool bar 1 of 
				window appName of application process appName
				set ASTID to AppleScript's text item delimiters
				set AppleScript's text item delimiters to "://"
				-- Get just the server address
				set vpnName to (text items 2 through -1 of myAddress) as text
				set AppleScript's text item delimiters to ASTID
			end tell
			tell application "Usable Keychain Scripting" to tell current keychain
			-- Recover the username and password from the login keychain
				set myPass to password of first internet password 
					whose name contains vpnName
				set myAccount to account of first internet password 
					whose name contains vpnName
			end tell
			connect to vpnName
			delay 5
			tell application "System Events"
			-- enter the account name and password in the dialog box and click 'Sign In"
			set value of text field 1 of group 7 of UI element 1 of scroll area 1 of 
				window appName of application process appName to myAccount of
			set value of text field 1 of group 10 of UI element 1 of scroll area 1
				window appName of application process appName to myPass
			click button "Sign In" of group 14 of UI element 1 of scroll area 1 of 
				window appName of application process appName
			end tell
			-- Could launch an application here if it's scriptable.
		end if
	end tell
end main

Lex adds: I haven't tested this one.
  Post a comment  •  Comments (4)  
  • Currently 2.00 / 5
  You rated: 3 / 5 (5 votes cast)
[6,021 views] Email Article To a Friend View Printable Version
Avoid triggering Hot Corners accidentally Apps
The truth is, our old friend Rob Griffiths posted a version of this hint years ago. But that one was enough incarnations of OS X ago that we felt it's worth a refresh.

Many of us use Hot Corners (accessed from System Preferences -> Mission Control or System Preferences -> Desktop & Screen Savers) to trigger various actions. On my Mac, slamming the mouse to the bottom right corner reveals the desktop; the bottom left corner triggers Mission Control. You can also use the corners to trigger things like Notification Center, Launchpad, starting a screen saver, or putting your display to sleep.

But anyone who uses Hot Corners (which OS X refers to interchangeably as Active Screen Corners) triggers those mouse-controlled shortcuts accidentally sometimes. The solution is this: When you're choosing a Hot Corner setting from one of the drop-down menus, hold down your preferred modifier key or keys. You'll see the options change from, say, Mission Control to Option Mission Control" instead.

From then on, your corner will only work when you're also holding down the modifier key(s) you specified. Now, trips to the Apple menu won't trigger your Hot Corner shortcut—unless you're pressing your selected modifier key, too.
  Post a comment  •  Comments (17)  
  • Currently 4.10 / 5
  You rated: 5 / 5 (10 votes cast)
[12,045 views] Email Article To a Friend View Printable Version
Prevent a Mac from sleeping from the command line UNIX
We've run a number of hints about preventing a Mac from sleeping, such as this and this.

I came across another really simple way to do this, using the pmset command. Just run this command in terminal:

pmset noidle

Terminal will display the following text:

Preventing idle sleep (^C to exit)...

To allow the Mac to go back to sleep, according to its current Energy Saver settings, just press Control-C.
  Post a comment  •  Comments (4)  
  • Currently 3.14 / 5
  You rated: 4 / 5 (7 votes cast)
[11,339 views] Email Article To a Friend View Printable Version
Quickly spot-check your laptop battery's health System
Though it's come up in a comment in the past, we've never specifically called out a handy, quick way to check how healthy your Mac laptop's battery really is.

If you hold down the Option key before you click on the battery status icon in the menu bar, an additional entry appears in the menu: Condition. You're hoping to see "Condition: Normal." (The Condition line won't appear if you hold down Option after you've already clicked on the menu.)

The other options besides Normal are Replace Soon, Replace Now, and Service Battery, which reflect progressively more serious battery woes. In each of the two Replace modes, your battery is still functioning normally, though it holds less charge than it used to (or significantly less, in the case of Replace Now). But even in Service Battery mode, which may not impact how long the battery lasts but could indicate other under-the-hood problems, you can continue to use your laptop's battery without fear of causing long-term harm.
  Post a comment  •  Comments (2)  
  • Currently 3.29 / 5
  You rated: 1 / 5 (7 votes cast)
[9,278 views] Email Article To a Friend View Printable Version
Hide apps on the Apple TV Apps
As the Apple TV gains new apps, some users may find that the device's home screen is getting a bit cluttered. For example, I don't care to watch sports on my Apple TV, and it'd be nice if I didn't have to see those apps.

David Chartier, writing on Finer Things in Tech, has pointed out an easy way to clean up excess apps. Go to Settings > General > Parental Controls, turn on Parental Controls if it's not already activated (you'll be asked to enter a 4-digit PIN), then scroll down and click on the apps you want to hide to toggle their visibility.

David also points out, in his article, how to move apps around on the Apple TV's home screen. We posted a hint about this last year.
  Post a comment  •  Comments (2)  
  • Currently 4.29 / 5
  You rated: 5 / 5 (7 votes cast)
[7,090 views] Email Article To a Friend View Printable Version
Install OS X 10.9 Mavericks Developer Preview on a virtual machine System
If you have an OS X developer account, and want to work with OS X 10.9 Mavericks, you may prefer to do so using a virtual machine, in Parallels Desktop or VMware Fusion. However, you won't be able to create a new virtual machine in either of these programs using the Mavericks installer.

John Martellaro, on The Mac Observer, posted an article with links to Parallels knowledge base articles explaining how to do this. You'll need to update Parallels Desktop, then create a snapshot of an existing virtual machine and install Mavericks on that.

For VMware Fusion, the process is quite simple: take an existing virtual machine, running 10.7 or 10.8, duplicate it in the Finder, then launch VMware Fusion. Choose File > Open, then select the duplicate virtual machine. Rename it, then launch it. Fusion will ask if you moved or copied the virtual machine; click I copied it.

After you've launched the duplicated virtual machine, run the Mavericks installer from within that virtual machine.

Note: as always, we will not be publishing hints about using OS X 10.9 until its release.
  Post a comment  •  Comments (9)  
  • Currently 4.33 / 5
  You rated: 5 / 5 (6 votes cast)
[20,412 views] Email Article To a Friend View Printable Version
How to repair damaged disks that crash Disk Utility and DiskWarrior Apps
Some damaged disks do not show up with Disk Utility and DiskWarrior, and may hang and crash such repair utilities. Yet, there is a trick to repair such broken disks using Disk Arbitrator.

1. Open Disk Arbitrator and select "Activated - Block mounts." This prevents the damaged disk from crashing the repair utilities and allows such disks to be displayed by these utilities.

2. Connect the damaged disk.

3. Open Disk Utility or DiskWarrior. The damaged disk should show now and it should not crash the repair utility.

4. Deactivate Disk Arbitrator (uncheck the Activated box). This allows the repair utility to handle the damaged disk properly (mounting it once repaired).

5. Run Disk Utility or DiskWarrior.

Then, the utility should repair the disk, or at least, mount a Preview disk (DiskWarrior), allowing you to inspect and even copy or backup some files or the full disk, reformat it and restore it.

[kirkmc adds: Well, I guess I'm fortunate that I can't test this. If anyone has any severely damaged hard disks around, and wants to try, feel free to post in the comments whether or not this works.]
  Post a comment  •  Comments (12)  
  • Currently 3.55 / 5
  You rated: 3 / 5 (11 votes cast)
[31,226 views] Email Article To a Friend View Printable Version
Another Dropbox permissions errors problem, and fix Apps
Some time ago, I posted a hint about fixing Dropbox Permissions Denied errors. This fix works in many cases, but I came across another, similar issue this weekend which Dropbox couldn't fix.

In addition to using Dropbox to sync files across two Macs, and access them from iOS devices, I back up my home folder (with the exception of my media files). I have a selected of folders in my home folder that back up: these include my Documents folder and others, and only parts of my Library folder. I back these up because of settings that would be useful to have in case of local data loss.

Recently, I found that there were some files that couldn't sync. The Dropbox menu showed a Permissions Denied error, so I tried the solution in the above-mentioned hint; it didn't work. Not only were these files not syncing, but Dropbox was in an endless loop trying to sync them.

After much searching, I finally found the culprits. I use Acorn for image editing, and this app creates a folder in ~/Library/Application Support with a number of files. in the ~/Library/Application Support/Acorn/Acorn Actions folder are several aliases to iPhoto, Mail and Preview. It turned out that these were not syncing, because Dropbox follows aliases to copy the original files. Apparently the apps were getting sent to Dropbox, and the permissions issues were caused by this.

The moral of the story, then, is to look for any app aliases that may be getting synced. But it's also worth noting that Dropbox doesn't sync aliases, but rather their targets, and this could also lead to issues in the amount of space you use in your Dropbox folder.
  Post a comment  •  Comments (0)  
  • Currently 3.80 / 5
  You rated: 4 / 5 (5 votes cast)
[6,513 views] Email Article To a Friend View Printable Version
Access old Dropbox menu with Option-click Apps
You can access the older version of the Dropbox menu by Option-clicking the Dropbox icon in the menu bar. This saves you an extra click, because with the newer version, you have click on the gear icon on the lower-right corner of the new menu to access the same information.

[kirkmc adds: I do find myself accessing that information at times, and it's nice to know that there's a one-click way of doing it.]
  Post a comment  •  Comments (3)  
  • Currently 4.10 / 5
  You rated: 5 / 5 (10 votes cast)
[5,887 views] Email Article To a Friend View Printable Version
Send selected text to Evernote Apps
A colleague asked if anyone knew how to migrate his vast collection of Mac Stickies notes to the cloud. I suggested he get an Evernote account while I did some quick research. I didn't find any existing solution, so and I came up with an Automator workflow that copies the selected plain text into a new Evernote note.

Launch Automator, and create a new Service. Set "Service receives selected" to TEXT in "any application". Drag the Run Applescript action into the main part of the window. Paste this code in that window:
on run {input}
	tell application "Evernote" to activate
	repeat with selectedText in input
		tell application "Evernote"
			if (not (notebook named "Stickies" exists)) then
				make notebook with properties {name:"Stickies"}
			end if
				create note with text selectedText notebook "Stickies"
			end try
		end tell
	end repeat
end run
Save as Send selected to Evernote.

Now, when you highlight text in any app (including Stickies), right-click and select Services > Send Selected no Evernote, it will copy the plain text into a new note (with a title of "Untitled Note") in the Stickies notebook in Evernote.

The nice thing about this Automator service/action is that it will work with plain-text in any application.
  Post a comment  •  Comments (7)  
  • Currently 3.50 / 5
  You rated: 1 / 5 (6 votes cast)
[5,518 views] Email Article To a Friend View Printable Version