Developers: Prevent GateKeeper 'Damaged application' warning on Java apps

If you create an application bundle to start a Java application as a regular Mac app, you will get a message that the application is damaged when you try to run it on Mac OS Mountain Lion with GateKeeper active.
The error is caused by the fact that the Java stub application is signed by Apple, and Apple’s signature will not be valid for your application.The codesign tool will give the following message:

codesign -d MyJavaApplication.app
MyJavaApplication.app: invalid signature (code or signature have been modified)

The best solution is to sign your application with your Apple Developer key, but if you do not have one you can still sign your application with an ad-hoc key, and replace the Apple signature that will cause this message. To do so run codesign with the following options:

codesign -s – –force MyJavaApplication.app

The user will still have to allow running the application the first time by using the right-click (Co …

Source: Mac OSX Hints

  

Generate a list of Reading List URLs

Perhaps you use Safari’s Reading List feature to save various Web articles for later reading. But maybe your Reading List is so overwhelming that you’d prefer to export a simple list of URLs to keep track of—or to open in an app besides Safari.

Over at StackExchange, Rob Mathers offers up a quick Python script to do just that. Copy Mathers’s Python script into a plain text document, and name it something like readinglist.py. Next, make it executable; you can use the Terminal command chmod +x readinglist.py.

Run the script—which loops through the proper section of the ~/Library/Safari/Bookmarks.plist file where those URLs are stored—and it will generate a list of the URLs in question. If you’d like to save the URLs to a file, use a command like ./readinglist.py > urls.txt to do so.

Source: Mac OSX Hints

  

Navigate directly to recently accessed files and apps

Sometimes, an old hint is so good, it bears repeating. Years ago, we shared a hint involving the Recent Items section of the Apple menu.

Next time you’re looking at that particular section, hold down the Command key. The names of your recent apps and files—which you could otherwise select to launch as desired—will change. For example, if your Recent Apps list included Acorn, that item would change to Show Acorn in Finder. And yes, this works with documents, too.

So if you very quickly want to find specific files in the Finder that you know you used recently, the Apple menu’s Recent Items section, in tandem with the Command key, can help you out in a jiffy.

Source: Mac OSX Hints

  

How to use Command-Tab to escape screen sharing

Since OS X 10.6, when you’re screen sharing and looking at a remote Mac’s screen, you cannot successfully use Command-Tab to switch out of a screen sharing window, because the command is sent to the remote machine instead.

I recently found a way around this by using Quicksilver. With Quicksilver installed, the key combination is not sent to the remote machine, but rather to your local Mac instead—once you’ve summoned Quicksilver. When the Quicksilver window shows up, focus goes to local machine, and Command-Tab is also sent to the local machine.

Lex adds: And that’s just the tip of the iceberg. In his testing, my colleague Dan Moren found the same behavior works with Alfred; he could trigger Alfred’s shortcut while screen sharing, and the app would launch on his local Mac, and thus Command-Tab would begin working on the local Mac instead.

I’m a LaunchBar guy, though, and when I tried to trigger LaunchBar on my Mac—which I’ve set to use …

Source: Mac OSX Hints

  

Click the Apple and Notification Center menu items more easily

This hint is an oldie but a goodie, and we could only find it mentioned in comments on older hints. If you don’t know it, you’ll want to; if you already knew it, pay it forward to Mac users who are spending too much time fussing with the mouse.

The Apple menu sits at the top left of your menu bar, and the Notification Center icon sits at the top right. For years, though, OS X has made clicking menu items in either position simpler than it might appear. You needn’t move the mouse cursor to precisely the slim confines of either icon when you want to click on them. If you slam your mouse all the way to the top left corner of the screen, well beyond the perimeter of the Apple icon, and click—you’ll still successfully trigger the Apple menu.

The same trick works with the Notification Center menu at the upper right: Move the mouse all the way to that corner, fretting not about whether your cursor is actually atop the icon, and your click will still register as desired. …

Source: Mac OSX Hints

  

Hidden settings to adjust Dock animations

By Matt Swain Here are a couple of tips for customising the delay and animation speed of your Dock if you have it set to automatically show and hide (in System Preferences).

Custom delay time

You may have noticed that there is a short delay before the Dock appears when your mouse hits the edge of the screen. There is a hidden setting that allows you to adjust the delay time using the Terminal.

Start by opening up the Terminal app (in Applications/Utilities). To remove the delay entirely, paste in the following line and press Return.

defaults write com.apple.Dock autohide-delay -float 0

The changes won’t take effect until you restart the Dock, which you can do by typing killall Dock and pressing Return.

The number at the end of the command is the delay time in seconds, which you can customise to your liking. My preferred delay is 0.1, which is a bit quicker than the default. To return to the default, just use the following command:

defaults delete com.apple.Dock autohide-delay

Custom animation speed

There is a related hidden setting that allows you to customise the speed of the animation when the Dock slides onto the screen. As before, paste the following line into the Terminal and press Return.

defaults write com.apple.dock autohide-time-modifier -float 0.5

Remember to restart the Dock with killall Dock for the changes to take effect. Just like the delay, the number at the end is the length of the animation in seconds. 0 will make the Dock instantly appear with no animation. My preferred time is about 0.5, which makes things just a little snappier than the default.

To return to the default, just use the following command:

defaults delete com.apple.Dock autohide-time-modifier

Source: Mac OSX Tips

  

Use Siri to find movies with two specific actors

Sure, IMDb’s advanced search tools can you help find occasions when two disparate actors appeared in the same film. But navigating IMDb when you want to play offshoots of Six Degrees of Kevin Bacon is no fun. If you have a Siri-capable iOS device within reach, you can find movie star overlap using only your voice.

Give Siri an instruction like, “Show me movies with Jason Biggs and Woody Allen,” and the virtual assistant should suggest Anything Else a moment later. And in cases of overlap—“What movies have both Susan Sarandon and Tim Curry”—Siri provides a list of all the matching films. (In that case, it’s both Rugrats in Paris and The Rocky Horror Picture Show.)

Tap on a matching movie to see more information about the film.

Source: Mac OSX Hints

  

Adjust All My Files criteria from the Finder

We’ve previously shared a Terminal-based approach for customizing the behavior of All My Files in the Finder. But in Mountain Lion, customizing All My Files’s search criteria—or the criteria of any other similar Finder sidebar entry, is deliciously simple:

Simply right-click (or Control-click, or two-finger click with a trackpad) on the sidebar entry, and choose Show Search Criteria. You’ll see the Smart Search characteristics that power the entry in question, and you can tweak and re-save the search factors you prefer.

Full disclosure: You can’t save over the existing All My Files saved search with this approach; you’re really just saving a new search instead. But it’s quick, painless, and non-destructive.

Source: Mac OSX Hints

  

Using Finder labels for tagging files and automating actions

By Matt Swain Labels are a handy way to organise your files in the Finder by colour-coding their icons. Until OS X Mavericks is released later this year, they are a pretty good substitute for having a proper way to tag files in the Finder.

Adding a label to a file or folder is simple. Just right-click the icon and choose one of the coloured squares from the menu. Alternatively, you can select the icon by clicking on it, and choose the label from the File menu in the menubar.

If you want to use labels a bit more like tags, it is possible to choose a custom name for each label colour in the Finder Preferences (under Finder in the menubar). Once you have done this, the only limitation compared to a real tagging system is that you are restricted to only having 7 different tags.

Using labels as tags can work really well in conjunction with Saved Searches (also known as Smart Folders).

Most people will have their documents organised into separate folders for each project, and will have separate folders for work and home files. But sometimes, for example, you might want to see all your receipts from all your different projects together, or all the files that you need to print. Instead of duplicating all your receipts into a separate “receipts” folder, you can just use labels along with a Saved Search that displays all the files with that label.

To set up the saved search, start by switching over to the Finder and choosing Find from the File menu (or type Command-F). Choose Other from the left hand drop-down menu, and choose File label from the list. Then just choose the desired label, and click the Save button to add the Saved Search to your sidebar.

Power users can take this idea even further using a tool like Hazel. Firstly, Hazel can automatically add labels to your files based on your own criteria. For example, automatically adding a red label to files that have been in the Downloads folder for more than a week, or adding a purple label to files that were downloaded from your bank website.

Secondly, Hazel can automatically perform actions when you assign a specific label to a file. For example, it could import MP3 files into iTunes if they you label them purple, or resize images to 800x600px and upload them to a server if they are labelled green, or run any AppleScript or shell script you want.

Bonus tip: You can quickly change the label of a file by dragging it into the section for a different label in the folder, as show in the screenshot below. For this to work, you must have your folder in Icon View, and have the folder Arranged by Label.

Source: Mac OSX Tips

  

No Hints till Monday

It’s the Fourth of July everywhere, and that means it’s Independence Day in the U.S. We’ll have new hints on Monday.

And of course, as always, we’d love your hint submissions! Send them in, and we’ll make you famous. At least here at Mac OS X Hints!

Source: Mac OSX Hints