Bash Function to open man pages in new terminal window

When I’m stumbling around the command line, I usually need to keep various man pages open for reference. I always forget I can get a dedicated man window from the Help or Contextual menus. This bash function allows you to open a man page in a new window directly from the command line.

function man { if [ $# -eq 1 ] ; then open x-man-page://$1 ; elif [ $# -eq 2 ] ; then open x-man-page://$1/$2 ; fi }

Just put this function in your .bashrc file, and when you use the man command, the information opens in Terminal’s Man Page specific window setting style. If you don’t want to override the default ‘man’ command operation, you can change the function name to something else.

This function expands on OS X’s x-man-page url scheme. And of course, there are plenty of alternate ways to view man pages such as …

Source: Mac OSX Hints

  

Easily rearrange mail accounts in Mavericks Mail.app

While you can easily rearrange the order of your accounts in Mavericks’ mail sidebar, when composing a message there is no easy way of rearranging the accounts as shown in the “From:” dropdown box in a new message; accounts are listed in the order in which they were added, which, in the case of using iCloud Keychain, may be vastly different than the order that you want them in.

Fortunately, there is an easy procedure to rearrange them:

Open up the “Internet Accounts” system preference pane
For each email account, in the order you want them to appear, uncheck and then re-check “Mail”

In this way, the accounts will be removed and readded to Mail in the order that you want them to appear.

Source: Mac OSX Hints

  

Touch camera icon in lock screen to turn off flashlight

In iOS 7, suppose you trigger the flashlight via Notification Center.

After using the flashlight, you don’t have to swipe up the Control Center and tap the flashlight icon again to turn it off—no, no. There’s a simpler way.

Trigger the lock screen, and then simply touch the camera icon in the bottom right corner: The flashlight goes off.

Source: Mac OSX Hints

  

Update bluetooth service in Mavericks

I recently started having severely shortened battery life on my Magic Trackpad. It turns out the fix is pretty easy.

When researching the problem, I found the standard fix reported over the last few years was to “update service” in OS X’s bluetooth preferences. Looking for that option in Mavericks proved fruitless. Finally, out of desperation, I selected the option to disconnect the trackpad, then re-associated it. Immediately, the day-old batteries showed a 100% charge instead of the prior 10% and I’ve had no problems since.

Source: Mac OSX Hints

  

Go to a specific line in TextEdit

Light-duty coders may be a bit frustrated when a browser or compiler chucks an error that cites a line number. Yes, you can get lovely third-party editors that make it much easier to work with such things, but what if you’re keen on simple TextEdit?

Hit Command+L to open a “Select Line” dialog. (It also lives, oddly, under the “Find” sub-menu.)

Type in a line number and you’re off to the races!

Source: Mac OSX Hints

  

Change a static event to recurring

I don’t know whether this is a common issue. From time to time, I find myself changing an event in my calendar (which may have originally been recurring) that is static and that I now want to become recurring. At least sometimes, Calendar will not let me change the event from static to recurring.

This problem forces me to manually copy all relevant information into a new recurring event. I find it frustrating.This may be because this is achieved transparently in Outlook at work.

Anyway, I found somewhat of a compromise. Duplicate the event (many ways including right-click on it then select Duplicate). Open the duplicate event, and set it to the desired recurring period. Of course, don’t forget to discard the original static event.

For some reason, whereas the original static event could not be made to recur, the duplicate static event can be.

This is not elegant by any standard even the lowest but is simple enough.

Source: Mac OSX Hints

  

Mount a SanDisk Connect Wireless Flash Drive

The SanDisk Connect Wireless Flash Drive includes all the benefits of a regular flash drive plus wireless mobile access.

Sandisk gives you an app that allows you to connect to the Flash Drive’s WiFi and transfer files. You can either connect via USB on the Mac or connect using a WiFi network. But what was not very clear was how to do this if you wanted to connect to the drive and upload or download files to and from your Mac wirelessly.

I tried to do this once I had connected to the drive’s WiFi network and using a browser (as they suggest) to connect to the given URL. The address is served from the Flash Drive’s WiFi network and in turn shows you the files on the drive. But I could not see my files and realised the page was being directed via my Ethernet connection across the Internet to a SandDisk page telling me the drive was not connected.

Turning off the Ethernet connection fixed th …

Source: Mac OSX Hints

  

Shortcut when adding an email account in Mail

Here is a shortcut to the protocol selection sheet when adding a new email account in Mail in Mavericks.

When adding other email accounts in Mail (in 10.9 Mavericks, I don’t know about earlier versions) hold down the Option key to turn the Create button into a Next button instead. This saves you the trouble of entering a fake email address to get to the sheet where you can select the protocol type.

[crarko adds: This goes back at least as far as Snow Leopard (where the button changed to Continue), but new users may find it helpful information.]

Source: Mac OSX Hints

  

Restore InDesign CS5 PDF Export Progress Bar

I was attached to InDesign CS3 for a long time but had to install CS5 to test a content management system. The second thing that made me crazy (the first thing being the application frame) was the absence of a progress bar when exporting a PDF.

Okay, might be a feature for most people because you can continue the work on that or any other document while the PDF export is in progress.
But most of time I want to open the PDF in Acrobat or pass the PDF to another application after it’s created. Now you have a zero kB PDF file until InDesign is finished with the export.

The following hint works in CS5, CS5.5, and CS6 as well:

Create a new blank text file with the file name DisableAsyncExports.txt and place that file in the InDesign application package itself (right-click on the application icon and select Show package content). Then go to the sub-directory Contents/MacOS and place the new file there.

After a restart of InDesign t …

Source: Mac OSX Hints

  

10.9: Switch the SMB stack to use SMB1 as default

The new SMB2 stack deliverd with OS X 10.9 (Mavericks) often fails to connect to NAS devices or behaves strangely on server volumes, such as an inability to change file/folder names.

Some possible workarounds are:

First try using cifs:// instead of smb:// to connect to the server volumes.

If that doesn’t help, then there is a way to change all connections that use SMB1 by entering this command in Terminal:

echo “[default]” >> ~/Library/Preferences/nsmb.conf; echo “smb_neg=smb1_only” >> ~/Library/Preferences/nsmb.conf

To restore the default SMB2 you simply need to delete the newly created configuration file (nsmb.conf) with the command:

Source: Mac OSX Hints