OSX Hints

Subscribe to OSX Hints feed
Macosxhints.com RSS feed
Updated: 14 hours 15 min ago

Quickly close all tabs in iOS 7

Thu, 02/27/2014 - 15:00
As satisfying as the swipe to close feature in mobile Safari is, it becomes a bit of a chore to close more than a few tabs.

To close all tabs at once, tap the new tab icon (two overlapping squares), tap Private, and then Close All. Repeat the first two steps and tap '+' (or the screen) to get back to an empty Safari in your preferred browsing state.

I only have an iOS 7 device to test this in.

[crarko adds: I tested this, and it works as described. I also only have iOS 7.]

Screen Sharing: Drag and Drop copy

Tue, 02/25/2014 - 15:00
Maybe less of a hint, and more of a "I didn't know you could do that!"

If you have connected to a remote Mac using Screen Sharing and don't have a mounted disk, then you can still copy between the two Macs via drag and drop.

Basically, you take a file from the local Finder and drag it to a window of the remote Finder. This will automatically initiate a copy. The reverse is also true. A little experimenting shows numerous applications can act as source, but in all cases a Finder window needs to be the final destination.

[crarko adds: I've done this for ages using things other than Apple's built-in Screen Sharing program, so I don't know when this became available. Did it come along with AirDrop? The full Remote Desktop program has done this since the beginning.]

Use the Mountain Lion installer behind a Squid proxy server

Fri, 02/21/2014 - 15:00

When re-installing Mountain Lion from the Recovery Partition, the installer needs to check installation eligibility with Apple's servers. If your computer needs to access the Internet through a proxy server for whatever reason, the installer won't pick up on this; it will attempt to make a direct connection, fail, and tell you to contact AppleCare.

As per my earlier hint (10.7: Get the Lion installer to work behind a proxy server), you could simply use the networksetup command in Terminal to get around this. However, as of 10.8 Apple's software download servers appear to require additional checks to verify machine eligibility which - if you're behind a squid proxy server - may require additional configuration changes to squid itself in order for it to work. You may therefore need help from your network administrator for that part ...

Keyboard shortcuts for conflicting menu items

Thu, 02/20/2014 - 15:00
When assigning a keyboard shortcut to a program's menus in System Preferences, you can run into a problem if more than one menu item in the program has the same name.

If you describe the full 'menu path' using '->' as a delimiter between items (no spaces), then OS X will follow that path and select the correct menu item.

For instance: Font->Edit->Increase The '->' symbol seems to be used from Mountain Lion and later. Earlier systems use '>' on its own.

I don't claim to have discovered this idea myself, but the hint doesn't seem to be very well-known, so I thought it should be posted here, if it hasn't already.

Credit goes to this discussion thread on the Apple forums.

[crarko a ...

10.9: Updating SSH private keys

Tue, 02/18/2014 - 15:00
Here is a method for updating SSH private keys to work with OS X 10.9 Mavericks, using Terminal commands. cd /Users/nameofuser/.ssh cp id_rsa{,.bak} chmod +w id_rsa id_rsa.pub openssl rsa -in id_rsa -out id_rsa # decrypt in place openssl rsa -in id_rsa -aes256 -out id_rsa # encrypt in place ssh-keygen -y -f id_rsa > id_rsa.pub # regen public key chmod 400 id_rsa id_rsa.pub The source of this hint.

[crarko adds: I haven't tested this one. At least not yet. The solution seems to come from a question asked on StackExchange.]

10.9: View arbitrary number of days in Calendar

Fri, 02/14/2014 - 15:00
The behavior of this hint has changed slightly with Mavericks Calendar app from the older iCal method.

Now you first need to go to day view (e.g., by pressing Command+1) and then you can use Command+Option+(2-6) to view 2 to 6 days in the week view.

It would be nice if something like this was also available for month view (2-4 weeks) and year view (2-11 months).

[crarko adds: Not much for me to add here.]

10.9: Messages: retype last message

Thu, 02/13/2014 - 15:00
I don't know how long this has existed (or what to call it), but in 10.9.1, just as one is able to quickly retype previous commands in Terminal by pressing the up arrow key, it is possible to retrieve a copy of entire, previously typed messages in Messages.app with a similar key command.

Just press Option+Up arrow while the cursor is in the message-typing box. How many previous entries it will resurrect appears to depend on how much of the message history is currently in memory. If you scroll further up to load more of the message history, those additional messages become available to the key command.

[crarko adds: I believe we called it the command buffer in Terminal.]

10.9: iOS Keyboard Shortcuts in OS X Mavericks

Wed, 02/12/2014 - 15:00
I came across this by pure accident but did you know that all of your iOS Keyboard Shortcuts that you create are then stored to iCloud Keychain and can be used in OS X 10.9?

I was in iMessage when I accidentally typed "eag" which is a shortcut I have created to easily insert my work email in iOS. Well I typed that and pressed space and the text autofilled into the message. So then I went ahead and typed other shortcuts I actively use in iOS and sure enough, they all auto-complete very nicely. After noticing this, I went to System Preferences » Keyboard » Text and found an entire Menu that you can control this (and I assume will also sync to iCloud Keychain).

[crarko adds: I'm pretty sure I've seen this mentioned before, but in case it is a new and useful fact to somebody here it is.]

Change background and font size of Notes.app

Tue, 02/11/2014 - 15:00
I don't like paper-like background of OS X Notes.app, and the fact that, usually after syncing with its iOS counterpart, the application doesn't remember the larger font size which I've set. Here's how I fixed it to my satisfaction.

First, navigate to /Applications and Control+click on the Notes.app icon. In contextual menu, select the Show Package Contents item. Then, browse the content of the app's package to Resources, and inside that find these two files: pad.css and paper.tiff. Make a backup copy of these files in a safe place in case you want to revert back to them sometime; otherwise you'd have to reinstall OS X to do so.

Copy the former into a folder you have write permission for, and open it with any text editor. Just replace the @[FONT_SIZE] on fifteenth line with whatever font size suits you. I've bad eyes and have choosen 18px. Save the file and replace the original with this modified version.

Th ...

Change Paste key combinations for TextEdit

Mon, 02/10/2014 - 15:00
I recently switched from working in plain text files to working in rich text in TextEdit and one of the most annoying things about rich text is pasting from other types of windows. I like to use a fixed width font most of the time, such as Courier New. Unless I'm diligent and use Command+Option+Shift+V, I end up with a mix of fonts and font styles. I finally got fed up enough with it today to do something about it. This work-around will only work with pasting from the keyboard. It will not correctly paste text that has been dragged and dropped.

The solution is to use Keyboard Shortcuts to switch the Edit menu's items for Paste and Paste and Match Style. It's such a simple fix, I never thought to do it before now. After this fix, Command+V will paste and match style and Command+Option+Shift+V will paste (and keep the style the copied text was in).
  • Open System Preferences
  • Click Keyboard
  • Click the Shortcuts tab
  • Cli ...

N-Up Printing from iOS using Printopia

Fri, 02/07/2014 - 15:00
Printopia is a great tool for exposing non-Air Print printers on a local network so that you can print to them from any iOS device. But even better is that it can expose PDF Workflow to do your bidding. In my case, I wanted to do n-up printing (n pages per sheet).

To do this, open up Automator and create a Print Plugin. For the workflow, you only need to add a single Run Shell Script action with the following line: lp -d <printer> -o number-up=2 -o media=Letter "&#36;*" The details of the command will vary depending on your needs. In my case, I wanted 2-up printing to go do my default printer, so I could exclude the -d option.

To see a list of available print queues, type lpstat -a in terminal.

Once you save your Print Plugin, go to the Printopia in System Preferences and add your new plugin as an available destination for printing. ...

10.9: Configure Preview to display PDF thumbnails

Thu, 02/06/2014 - 15:00
Suppose you want to open a PDF with thumbnails displayed but the person who produced it did so with table of contents displayed.

If you change Preview's configuration for this PDF to thumbnails by selecting View » Thumbnails and then save it by selecting File » Save, the next time you open the PDF it will display the Table of Contents rather than thumbnails.

Instead of selecting File » Save, select File » Export as PDF... from the list.

In the Export sheet that displays, note that '.pdf' is appended at the end of the filename. Thus, if the file already had a .pdf extension, it now will have a duplicate extension.

Modify the filename as desired, navigate to the desired destination, and click the Save button. The resultant PDF subsequently will open with thumbnails displaying automatically.

An alternative to using Preview’s above menubar items is to use its View and Print toolbar ...

Using Flags in Mail for organization

Wed, 02/05/2014 - 15:00
Organizing your e-mail can be difficult. There are Smart Mailboxes, of course, but what if you would like more arbitrary control?

Apple's Mail app includes seven flags of indifferent colors (a bit like the old Finder labels, ahem). But what if you can't remember what each color represents? Once you have flagged a message with a given flag, you will see a mailbox for it appear under Flagged. Click on the triangle next to Flagged to see the mailbox associated with each Flag.

Each of the mailboxes may then be renamed by right-clicking on it. The new name for the flag will now appear everywhere that the flag's name appears.

[crarko adds: I assume this is Mavericks only, but I could be forgetful.]

Dismiss repeated alert windows in the Calendar

Tue, 02/04/2014 - 16:00
I recently imported an .ics file into the Reminders app, but it turned out all the events were already in there, and the Calendar app balked at them, one at a time, repeatedly. I was continuously presented with an alert window which said that the event already exists and I could either cancel, go offline, or revert to server (the default). After hitting return a few dozen times, I decided I would write a quick AppleScript, and do something else while it worked. I'm sure a number of Hints followers might balk at this strategy, but it worked for and I didn't care how crude it was.

I just wanted to select the default button (revert to server) in every alert window, so all I needed was a script that would hit the return key every second. I wrote this in script editor, brought one of the alert windows to the front, then Command+clicked the "Run" button in the Script Editor (so it wouldn't bring the script window to the front): ...

Older Core Duo Mac and Windows 8.1

Mon, 02/03/2014 - 15:00
Computers like the Intel "Mac Mini 2,1" were left behind with Snow Leopard (OS X 10.6.8) and Boot Camp 4. These restraints keep older machines from the benefits of current mac features, applications, and supported installs of Windows 8. However, these machines are well within the Microsoft system requirements for Windows 8.1 and installs are possible.

The older Core Duo Mac series cannot boot into 64-bit operating systems, and is excluded from modern versions of OS X, but Microsoft still supports 32-bit processors, giving many old Macs the opportunity to be re-purposed with a modern OS. I can confirm that if you use Boot Camp to install Windows 7 32-bit (no key needed) on a Core Duo Mac Mini, you can upgrade to Windows 8 32-bit from within Windows 7, and then do the same for Windows 8.1 (provided you have a license key for the final OS). Boot Camp 4 drivers work well for the 32-bit Windows 8.1, but I installed each one individually instead of using the BootCamp package ins ...

Move the Terminal cursor position with the mouse

Wed, 01/15/2014 - 15:00
Which Terminal gurus among us hasn't wasted too many minutes to count arrowing around the manipulate the cursor while deep within the confines of the command line?

The Terminal gurus who know this trick, I guess: Hold down the Option key and click where you'd like the cursor to move, and Terminal rushes the cursor that precise spot.

Poor Man's Text Expander

Tue, 01/14/2014 - 14:00
I use Tactor's (http://onflapp.wordpress.com/tactor/) regexp functionality to expand my custom text macros. For for example, I can define something simple like MYEMAIL => tom@foobar.com. However regexp allows me to do more interesting things as well, like creating links: wiki:MyDocumentation => http://pages.intranet.com/docstore?page=MyDocumetation?view=html.

- lauch Tactor (it is free app)
- go to preferences -> regexp
- add regexp
you can use capture groups here, e.g. wiki:(w+)

- set the 'matched key' to ACT_TEXT - this will place the result into the clipboard
- set the 'matched key' to what the resulting text should be like
you can use the regexp substitution here, e.g. http://foobae/$1

- expanding is done by selecting the text macro in a text (any text field should work) and choosing 'Expand Selected Text' from the top bar menu.

This method is kind of technical to setup but very powerful. If one is not afraid of a bit of programming, it is possible to ...

Google search from within iTunes

Fri, 01/10/2014 - 02:15
You want to do a Google search on a song from within iTunes? Press Shft-Cmd-L. Safari will open and present the results of a Google search.

I am running iTunes 11.1.3 with OS 10.9.1

Avoid a cluttered download folder by using /tmp

Wed, 01/08/2014 - 14:00
First thing I do when I get a new system is to redirect downloads from ~/Downloads to /tmp.

The advantage with this adjustment is that in /tmp files older than a week is automatically deleted (and at every restart). Almost all files I download don't need to be stored, for example:

1. Installers. Run the installer (or dmg) from /tmp and then forget about it and it is automatically deleted within a couple of days.

2. PDFs I just want to read (or possibly print) once.

3. Templates, e.g. expense reports and similar (typically .doc or .xls). I download it, fill it in, generate a pdf and e-mail to the appropriate recipient. No need to keep the original template.

4. Torrents. Download the torrent, add it to your torrent client and then there is no need to keep the original torrent file around anymore. Besides, a lot of the files I download using torrents I just "use" them once so they can be also be downloaded to the same folder as the torrent is stored in, that i ...

Applescript to work around a Finder bug in Mavericks

Mon, 01/06/2014 - 14:00
Mavericks introduced several bugs into the Finder. One of them is that in List View, the Finder frequently loses track of the column widths, and makes the Name column so wide that the other columns aren't visible unless one scrolls the window horizontally.

The following Applescript resets the column widths to something sensible. It uses a couple kludges to work around some *other* Finder bugs that Mavericks introduced. -- Reset the width of the Finder's Name column to something sensible. tell application "Finder" set thisFolder to target of front Finder window set the current view of front Finder window to list view -- In previous versions of OS X, the next line would tell the Finder to set the width -- to exactly 300. In Mavericks, the Finder uses it as a *minimum* width. set width of column id name column of list view options of Finder window 1 to 300 -- The following kludge is necessary to get the changes to "take". I got it from -- Dr. Drang at www.leanc ...