Today’s scheduled maintenance on me.com brought at least one overdue feature: the possibility to create up to two alerts for a calendar entry. It works the same way as in iCal on the Mac or in Calendar on an iOS device.
Please see this post for Mountain Lion (OS X 10.8).
I want to use AirPrint on my iPhone or iPad to print to a PDF document on my Mac. For convenience reasons the PDF should be created on the desktop. Furthermore I don’t want to use any hacks or additional programs that run in the background all the time.
In this how-to you’ll enable AirPrint in Mac OS X (tested on Mac OS X 10.6.5), install a PDF printer using a free, open source driver and add an AppleScript which moves the PDFs printed on your iOS device to your Mac’s Desktop.
(If you’ve got the iOS SDK installed, a utility called Printer Simulator.app is available which simulates several AirPrint capable printers. You can use those to print from iOS to a PDF which will be opened in Preview. This requires that the program runs all the time which is exactly what I don’t want. It’s a great way great to test AirPrint, though.)
Only follow the next steps (at your own risk) if you have a full backup of your Mac and are comfortable using a shell (Terminal.app)!
Mac OS X 10.7 Lion users can skip this section and follow these instructions on how to use a tool called AirPrint Activator instead. Afterwards continue with the section The PDF Printer.
On Mac OS X 10.6.5 it isn’t possible to use every printer that is shared through the Mac for AirPrint. Only a few HP printers support AirPrint at the moment. Hence the first step is to enable AirPrint for every printer connected to the Mac.
A good tutorial (in German) can be found here and includes a downloadable script to do the work for you. If you want to use Terminal (or in case the site is not available) all you have to do is start
/Applications/Utilities/Terminal.app and input the following line (all in one line):
sudo bash -c "echo 'image/urf urf (0,UNIRAST<00>)' > /usr/share/cups/mime/airprint.types"
This command asks for your (administrator) password and creates a file called
airprint.types in the directory
/usr/share/cups/mime/. The content of this file is
image/urf urf (0,UNIRAST<00>).
After creating this file the Mac needs to be rebooted. After the reboot you can already use printers connected to the Mac for AirPrint. Just delete and recreate them in System Preferences → Print & Fax and share them in System Preferences → Sharing.
The PDF Printer
Once Mac OS X supports AirPrint for every shared printer, the preparations from above will most likely no longer be necessary.
To be able to create PDFs through AirPrint we first need a PDF printer on Mac OS X. The PDF button in the default printer dialog works great when creating PDFs locally on the Mac but it doesn’t help on iOS.
CUPS-PDF is a PDF printer available for many platforms. To install it, follow these steps:
- Download the Mac OS X version of CUPS-PDF
- Install it by unzipping and running the installer
- Go to System Preferences → Print & Fax
- The following illustration show the steps necessary to add the PDF printer
- Click the “+” symbol
- Select the printer CUPS-PDF (you may also give it another name)
- Select Generic PostScript Printer for “Print Using”
- Click “Add”
- Select the newly created PDF printer and mark the checkbox Share this printer on the network
Now print any document (e.g. this website) from your Mac using your newly created PDF printer. The PDF document is created in
/Users/Shared/CUPS-PDF in a folder with your user account’s name.
When printing from iOS over AirPrint the PDFs are created in the guest account’s folder under
/Users/Shared/CUPS-PDF and you won’t be able to easily access them due to missing permissions. Thus we will restrict the PDF printer to your account which results in correct permissions on the created PDF files.
- For this go to Sharing in the System Preferences
- There you select Printer Sharing (make sure the checkbox is marked)
- Select your PDF printer
- Click the “+” button
- You get a popup where — under Users & Groups — you can select your account
- Click “Select”
In the Users list you should see your account’s name and Everyone with No Access. These steps make sure that you won’t run into permission problems later on.
Now you can use AirPrint on iOS to print a PDF document to your Mac. Follow the steps in this illustration (click to enlarge), e.g. using Safari in your iPhone. When asked for your user name and password, enter the login data from your Mac OS X account (you allowed sharing of the PDF printer only with this account in the steps above).
Now your PDF document should be stored in
/Users/Shared/CUPS-PDF inside a folder with your user account’s name (as during the first test print from your Mac).
If you want the PDFs to be move to the Desktop, follow the next (optional) steps.
The Icing on the Cake
To automatically move newly created PDFs to the Desktop (which is easier to access than the
CUPS-PDF folder) we’ll use Folder Actions and an AppleScript.
You can simply create a new AppleScript by opening the AppleScript Editor located in
/Applications/Utilities/ and inserting the code from below. Save the script to
/Users/[your account]/Library/Scripts/Folder Action Scripts with a name like
move - move files to desktop. This is the script:
moves files to the desktop of the current user
on adding folder items to this_folder after receiving added_items
tell application "Finder"
set targetFolder to path to desktop folder from user domain
move entire contents of this_folder to targetFolder
end adding folder items to
This simple script (when used as a Folder Action) moves all files in the folder to the desktop. Once the script is created you can attach it to the folder where new PDFs are stored:
To do this, follow the steps in this illustration (click to enlarge):
- Right click or cmd-click on the folder
- Select “Folder Actions Setup”
- In the popup choose the move script you’ve created earlier and click “Attach”
- Make sure that the script is attached to the folder named like your account
That’s it! The instructions are a bit longer than I first expected. Also I think most of this would be scriptable, but I just don’t have the time to do this.
If you run into any problems or find errors in the instructions please leave a comment or tell me on Twitter (@gattermann).
But if you’re not embarrassed when you ship your first version you waited too long.
— Matt Mullenweg
and linking it to the still missing iOS companion of Andy Kim’s The Hit List which was announced almost two years ago got a reply by the developer himself:
I have read it. It certainly did feel like it was directed at me :)
It’s getting there folks.
– Andy Kim
Let’s hope this time it’s correct and that the release of the iOS app marks an end of the monthly extension of the Mac beta’s expiration date.
As a coincidence, I wanted to add a warning to my review of four GTD Mac applications today that The Hit List may be dead for good.
When Apple introduced Mac OS X 10.7 called Lion this Wednesday, they showed parts of the revamped GUI including iOS-like scrollbars (regarding the linked article at AppleInsider: it isn’t leaking when you show it publicly during your own event).
iPhoto of iLife ’11 already has scrollbars like this in the current Mac OS X. Although they don’t disappear like the ones in iOS or Lion — which I personally think is a better choice as it indicates that the content is longer than the current window is high.
One thing I noticed in iPhoto ’11 which I hope is coming as an OS wide change to Lion are the new tooltips; those little (often yellow) popups that appear when the mouse cursor rests over a button or other GUI element. The yellow never felt right on Mac OS X because it’s the only place I can recall where it is used. It’s inconsistent with the rest of the interface.
iPhoto ’11 (but not iMovie ’11) now uses black, translucent tooltips which match the overall appearance of iPhoto much better.
Even the file dialogs iPhoto uses received a small change:
I certainly hope these changes are permanent and another sign of a much larger GUI overhaul in Lion than what we’ve seen in Wednesday’s demo (I haven’t checked the keynote video for this change) and the screenshots on apple.com.
The fantastic Google Reader client Reeder for iPhone and iPad is coming to the Mac. Judging by the fact that the official Twitter account @reederapp was last updated two weeks ago (heavy programming sessions?), it will hopefully arrive sooner than later.
MacStories had a preview of Reeder for Mac almost a month ago which really raises the expectations for the “grown up” version of my favorite feed reader.
You should always use a passcode on your iPhone, iPad or iPod touch to protect your mails and other sensitive data. Even if you think “my data isn’t that important” keep in mind that anybody who has access to your iOS device (e.g. your stolen phone) can check where you have your mail or online shopping accounts and reset your password. The new password gets sent to your mail address which is accessible through your device. Even if the provider (a potential thief wants to reset your password at) requires additional data like the full address, your birthday or some information about your parents: you most likely lose. There is lots of data like this in your mails and address book.
Are you setting a passcode yet? Good. It’s located under Settings → General → Passcode Lock. Apple has a more thorough explanation.
While you’re at it: do yourself a favor and activate Erase Data. This will wipe your device after ten failed passcode attempts. “Just ten attempts? What if a prankster or small child has my iPhone?” I’m glad you asked:
After the sixth incorrect passcode your iPhone will be disabled for one minute. Another failed attempt afterwards and add another five minutes of waiting time. The following table lists the waiting times which are missing from Apple’s knowledge base document on this topic.
|Failed Attempts||Added Waiting Time||Total Waiting Time|
|1 to 5||none||none|
|6||1 minute||1 minute|
|7||5 minutes||6 minutes|
|8||15 minutes||21 minutes|
|9||60 minutes||81 minutes|
|10||60 minutes||141 minutes|
|11||black screen||wiped device|
After eleven failed passcode attempts (which take at least two hours and 21 minutes) your device’s screen will go black and all data will be deleted. After that you can always restore from your last backup made with iTunes — sync every day!
Getting my new iPhone 4 gave me the opportunity to try this on my 3GS; tortured in the name of science!
The spiral is produced by a binary star about 3000 light years from earth and is 3 trillion kilometers in diameter.
[…] older stars run out of available hydrogen. Eventually, they fuse helium into carbon. When this happens the star swells up and becomes a red giant […] Red giants tend to blow a lot of their outer layers into space in an expanding spherical wind […]
This is what AFGL 3068 does. Read all the details about this spiral on Bad Astronomy.
Image: ESA/NASA & R. Sahai