Macworld (USA)

Mac 911: Recover a Mail folder from Time Machine, why your photos aren’t importing

Solutions to your most vexing Mac problems.

- BY GLENN FLEISHMAN

How to get rid of a persistent macos Messages badge icon

The badge that can appear on selected apps in the macos Dock is a helpful reminder that you’ve got something that requires attention. But when the badge “sticks” and continues to remain in place even after you’ve carried out your task? It’s a persistent itch you want to scratch.

This can happen in the Messages app, as I discovered recently after texting myself a link when I couldn’t get the oh-so-reliable Airdrop to work between my phone and computer. The link arrived, but the badge wouldn’t disappear. Closing the conversati­on in the list in the left of the Messages window didn’t help. Nor did quitting the app.

I tried a suggestion many forum posters around the Apple universe of discussion boards recommende­d for stuck Dock icons. In the Terminal app, enter exactly the following and press return:

This essentiall­y restarts the Dock, and can clear stuck states. It may take a moment. This, too, failed!

The ultimate solution? I sent another message to myself from my Mac, and then read it on my iphone. The badge now disappeare­d in both IOS and macos.

HOW TO RECOVER A MAIL FOLDER FROM TIME MACHINE IN MACOS

Time Machine in macos can work within a number of apps, letting you retrieve older versions of files or even deleted email messages in the Mail app. However, if an entire folder of stuff goes away, you need to turn to the Finder.

Macworld reader Harold found himself in this pinch, because a folder that contains all his business emails disappeare­d from Mail without any action on his part that he’s aware of. He first tried to use Time Machine within Mail, opening Mail, then choosing Enter Time Machine from the Time Machine system menu item. Every time he did so, Mail quit!

If you’re using IMAP, a protocol for syncing messages with a remote server to a local app’s mailbox, it’s possible to recover it that way, assuming the deletion didn’t propagate to the server, too. You should be able to select in Mail: Mailbox → Synchroniz­e → Mail account name, and this will restore access to the messages.

Failing that, however, Time Machine can still do the trick, because it’s backing up the mailbox files that Mail uses to store messages locally.

1. In the Finder, choose Enter Time Machine from the Time Machine system menu item.

2. Go to your Home directory, then open the Library folder, then the Mail folder inside that.

3. You may see multiple folders at the next level. Look for the one starting with V that has the most recent modificati­on date and open it.

4. You’ll see several folder with long hexadecima­l (base 16) names. One of these is the folder that correspond­s to the mail account that has the mailbox you need in it. Open each in turn until you find the right one.

5. Restore the file with the name of the missing mailbox, like Small House Design.

mbox to the Desktop or somewhere, not to the original location.

6. Exit Time Machine.

7. Switch to Mail, and then choose File → Import Mailboxes.

8. Choose Apple Mail, and click Continue. (Even though the folders end with

mbox, they’re not using the standard Unix mbox format, which can be used to import

mail folders from other platforms.)

9. Select the mbox file in at this stage and click Choose.

10. All the messages under Items To Import will be selected by default, and that’s likely what you want to keep in place.

11. Click Continue.

12. You’ll see a dialog that the messages are in a folder and it tells you the name, which is typical “Import” unless that folder already exists.

13. Look in the Mailboxes view at left under On My Mac, and the Import folder should be at the bottom. Select it.

14. All your messages will appear in the summary column if imported correctly. (If you click open the folders under the mailbox name, you’ll see a whole hierarchy you can ignore.)

15. Re-create the mailbox that was deleted.

16. From the Import mailbox, select all the messages and drag them into the mailbox you want them back in. If that mailbox is hosted on an IMAP server, Mail will upload them there.

ONE WAY TO USE AN IPAD AS A DISPLAY FOR A HEADLESS MAC

Decades ago, I used to set up “headless” servers. These were computers that you stuck in a server room and accessed remotely. While terminal-based remote access for Unix systems was routine, the same approach with Gui-based operating systems, like what was then System 7, was unusual. We had to use a monitor to install Timbuktu Pro ( go.macworld.com/tpro), and sometimes even attach a dummy monitor cable afterwards so the Mac “thought” it had a display.

Remote-desktop access later became an absolutely routine part of operating systems, and macos has offered it as a built-in service for many, many years. Macworld reader Peter asks if there’s a way to examine a Mac mini without a monitor attached, if all he has is an ipad, a keyboard, and a mouse. There is, but you have to set it up with a monitor attached first, as Apple doesn’t enable remote access by default.

Technicall­y, Apple is using a variant of the Virtual Network Computing (VNC) standard for its screen sharing, tying into

the macos user authentica­tion system.

IOS doesn’t support this, but you can enable a setting that works with third-party apps for remote control.

On the Mac, in System Preference → Sharing → Screen Sharing, you’ll see a button labeled Computer Settings. Click this, and note a checkbox labeled “VNC viewers may control screen with password” and a field to enter a password. Check that box and enter a password, and then click OK.

You can choose to not enter a password, but that makes your computer vulnerable to remote access by anyone. Even if you’re behind a gateway that assigns private local addresses or have a robust firewall, attackers may be able to pierce your gateway or an infected machine on your same network could attempt to gain control of your exposed machine and relay it to someone remotely.

Once enabled, you can use any of a number of third-party VNC apps for IOS. Realvnc’s free VNC Viewer ( go.macworld. com/vncv) is a good place to start: it’s free, regularly updated, and well reviewed.

When you connect to a Mac via VNC, you see its active desktop, and can type on the keyboard of the device from which you’re connecting. However, this doesn’t disable local peripheral­s, so you can instead use a keyboard and mouse attached to the device that’s sharing the screen. That way, you could use the ipad as the “monitor,” while typing on the Mac mini keyboard and pointing and clicking with its mouse.

(VNC isn’t very secure in Apple’s backwards-compatible version, so you should only rely on it for local connection­s, and you may want to configure your broadband or Wi-fi gateway to block remote access to the VNC port ranges; check your router manual for details.)

PHOTOS NOT IMPORTING? FIGURE OUT THE CULPRIT WITH IMAGE CAPTURE

Because my wife’s Mac refused to sync her iphone’s media properly, she wouldn’t

delete photos and videos she’d taken on her iphone. Eventually, her phone filled up, and it was time to fix this problem.

She recently migrated from iphoto to Photos—based on Mac 911 emails, this isn’t a unique circumstan­ce. Photos seems to be happiest importing relatively few pictures and movies, or using icloud Photo Library. (She’s not interested in storing her personal media in anyone’s cloud.)

I recommend using Image Capture, something I’ve written about frequently in Mac 911 columns. This underappre­ciated app, installed as part of macos in the Applicatio­ns folder, handles importing and managing media on memory cards, scanners, and on attached IOS devices and cameras. (You can also access a scanner via Preview.)

You can set Image Capture via a menu at the bottom of its window with a given device or drive selected to import selected or all media to iphoto or Photos, as well as to other apps, scripts, or folders.

In my wife’s case, however, Image Capture stopped working. She tried to import all images, and it would appear to make progress, but then fail with a lengthy error message listing problemati­c images, and an incomplete state of what was imported. Image Capture doesn’t have an option like Photos for importing only new images (ones that it’s sure it imported before), but it also didn’t seem like there were rampant duplicates. (To remove Photos duplicates, the best option appears to be Powerphoto­s ( go.macworld.com/ pwph), which can work with Photos libraries directly for deduplicat­ion, merging, and other features.)

The list of failed imports was so long, it didn’t seem worth the time to try to run each of those down, and she lacked the confidence that her originals were imported correctly besides them that would lead her to delete them from the phone. (She has an encrypted online backup and regular clones of her drives, to ensure we don’t lose her Photos library.)

To figure out what the cause of the problem was, I suggested a different tactic: binary troublesho­oting, which is where you split a set of whatever you’re working in half, try to accomplish an action and, if it fails, split it in half repeatedly. This lets you drill down to the problem, while also accomplish-ing the task (like importing media) for sections of the overall set you’re working on.

With Image Capture, we attached her phone to her Mac via USB, selected it in the app, and then used the Date field to sort images in chronologi­cal order. We then selected the oldest half by finding the rough middle point and selecting from there backwards in time. Clicking Import, we watched the progress bar—and, shockingly, it succeeded.

We looked at the oldest and newest

photos in Image Capture that we’d imported and then crosscheck­ed against Photos to be sure those were imported and at full resolution. With that confirmed, we returned to Image Capture and clicked the delete button (a red circle with a diagonal slash through it) and delete that half of the images. That freed up gigabytes.

But now, working with the remaining half, we stopped encounteri­ng problems in viewing and importing. It’s possible that something had become corrupted in IOS in how it had indexed images, and delete half of them either freed up enough space or caused a rebuild operation. Regardless, the errors disappeare­d.

However, if you find yourself in a similar situation, you could continue down the binary path to identify any remaining images or videos that won’t import. You may be able to delete those, either from the IOS device or via Image Capture. If they refuse to be deleted, after making sure you’ve retrieved all the media that you can, you might consider backing up the IOS device, wiping it, and restoring it to see if that resets your device’s photo storage.

Another option? Switch on icloud Photo Library, and buy extra icloud storage if you need it for just the month, syncing everything to a Mac and making sure to download it there at full resolution. Then disable icloud Photo Library and confirm those images and movies are on the Mac. You can then delete all or some of the media from your IOS device, knowing its safely coped over. ■

 ??  ??
 ??  ?? An imported mailbox has a nested hierarchy of folders that you can just ignore.
An imported mailbox has a nested hierarchy of folders that you can just ignore.
 ??  ?? The Computer Settings dialog lets you enable standard password-based VNC remote-desktop access.
The Computer Settings dialog lets you enable standard password-based VNC remote-desktop access.
 ??  ?? Image Capture can import images, but also helps you troublesho­ot import problems.
Image Capture can import images, but also helps you troublesho­ot import problems.

Newspapers in English

Newspapers from Australia