Sunday, July 19, 2015

Airmail 2, Postbox and Mailbox for OS X access to Gmail -> I'm back to mail.app

I think OS X Mail.app for Yosemite is a pretty good Gmail client. The one big problem is that one must download the entire archive, though there is an option to omit automatic attachment download. That’s fine for my primary machine, but I don’t want to burden my 256GB SSD with 20+ GB of Gmail archive. So I went looking for a Gmail client.

I used Sparrow years ago and liked most of it — except the obligatory threading and conversation views. If an app is going to do that, it has to let me quickly delete all the emails I no longer care about. Sparrow didn’t.

Sparrow’s gone of course. More recently i used Airmail with some success, so I tried Airmail 2. That was … frustrating. I ran into multiple bugs and UI issues when I migrated from Airmail 1, so I tried again with a fresh start. This time while sending an email I got an authentication failure. No problem — I quit and fixed the error (I think). I then went looking for the stalled email and … it was nowhere to be found.

I deleted Airmail 2. (That was money wasted.) I then tried Mailbox.app — forever in beta, mostly abandoned, and you can’t delete individual messages, you can only delete an entire conversation. Deleted Mailbox.app. Next up - Postbox.

Postbox doesn’t support Google OAUTH2. I read the documentation on enabling “Access for less secure apps” and … I deleted Postbox.

So I’m back to Mail.app. I disabled automatic download of attachments in preferences, but I guess I’ll just sacrifice the disk storage. I considered enabling Google’s IMAP folder message visibility limits, but of course that would apply to my server too. I think in past Mail.app had some control over message downloads, but that’s gone now.

The bright side is I don’t mind Mail.app. Just hate the lose the storage...

Update 7/18/15: With ‘automatically download attachments’ off, selecting Inbox and choosing Account Info from the Context menu tells me that 80,309 messages are using 4.35GB. I can live with that.

Friday, July 17, 2015

So you want to actually restore from that Time Capsule backup? Do you feel lucky punk?

Yeah, I know he actually said “Do I feel lucky?”. But you get the point.

By now even the most hard core Apple apologist must have moments of existential doubt. Waking at 3am thinking, if only for a moment, that maybe Tim Cook really is the antichrist. 

The rest of us are moodily throwing darts at Apple stickers, wondering if Atari [3] might reconsider the personal computer market.

Time Capsule is typical of the 2015 Mac. The problems have been around for years, hope has all but vanished, and it’s possible things are even getting worse. On the other hand, there aren’t a lot of great choices for network Mac backup. Retrospect, which I loved in the days of DAT tapes and SCSI drives [1], effectively died years ago [2]. The best alternative may be Code 42’s Crashplan cloud backup, but that requires serious bandwidth (up and down) and a lot of confidence in a remote corporation. Also … java (ugh).

So I use Time Capsule for most of the machines in the house, but keep data on a server that’s also Carbon Copy Cloner cloned nightly [4]. 

This is what I do when I need to actually restore from Time Capsule [5]. If I don’t follow these steps restores will often hang and fail.

  1. Shut down every machine on my network.
  2. Power cycle my Time Capsule.
  3. Gbit ethernet connect the target machine to the Time Capsule and restart that machine.
  4. Log into my Admin account and start Time Machine.
  5. Choose a date/time as needed. Set an 5 minute time and walk away. (Trying to interact immediately will be immensely frustrating.)
  6. Navigate as desired until UI stops responding. Set an 8 minute timer and walk away.
  7. Return, select a file, and complete the Restore.

Yeah, Time Capsule has a scaling problem — restore times seem to have a non-linear relationship to the number of files on the source machine and the number of backup versions.

It’s good to have a way to proceed though. Just in case Carbon Copy Cloner isn’t enough.

Update 7/19/2015

app.net@martinsteiger writes: “Time Capsule NAS is slow and unreliable, it shouldn't be used for backup. With a NAS up to par, even with a 2-drive model from Synology like the DS21n+ models, Time Machine works fairly well.” Installing and configuring a Synology NAS isn’t terribly hard, but it’s definitely geek-realm. I agree that whatever scaling and reliability issues Time Machine has, the root problem here is mostly likely that Time Capsule is grossly underpowered for its primary function.

Update 10/20/2015

My Time Capsule’s WiFi function died, so I took the opportunity to buy a Synology and I’m testing Time Machine backup. There I read that enabling Synology’s native encryption will dramatically reduce performance. I have been using Time Machine’s native encryption for the backup of my 2009 iMac — a machine that probably lacks dedicated encryption hardware. I wonder if the awful restore performance is encryption related...

- fn -

[1] Ok, so SCSI is a good reminder that the golden age had nightmares too.

[2] I tried Retrospect again a few months ago. Wasn’t pleased. My guess is that it’s architecturally a poor fit to OS X.

[3] Atari died in 1983. They were an early competitor to the Mac and Amiga, pre-Windows.

[4] With CCC versions are archived separately. A pain to recover but it can be done. CCC can backup to a network image, but OS X Mavericks and beyond use SMB2, and SMB2 doesn’t support sparsebundle mounts. You have go through some gyrations to do an AFP mount instead. I am trying this out. I rotate my CCC backups off site across 4 encrypted drives, so I always have at least 5 backups of my data using two different technologies.

Actually, I also do Aperture backups to a local high capacity drive using Aperture’s build in backup tech. So for Aperture images I have 6 backups using three different technologies. And I know that won’t be enough ...

[5] I’ve never had to use Time Capsule for a real emergency. I’ve always been able to use my CCC clone, but I periodically test Time Capsule to see if I can make it work.

Thursday, July 16, 2015

How to view OS X hidden (unix) folders using TextWrangler

I thought there was a way to view hidden OS X Unix folders like bin, etc, home, Network, private, sbin .vol etc using Bare Bones Software's free TextWrangler but I couldn’t figure out how to do it. I wondered if this now required BBEdit, but the comparison chart didn’t mention anything.

It’s in the manual. Yeah, TextWranger, which is free, not only has Help file, it also has a (superb) manual:

Opening Hidden Files Turn on the “Show Hidden Items” option in the Open dialog to display hidden files (including both files whose invisible attribute has been set, and those whose names begin with a period) or files from a folder which is normally hidden by the system.

Screen Shot 2015 07 16 at 11 28 17 AM

When I turned it on I had to navigate the folders to force a refresh, but then they all showed.

I’d been hunting around for a preference settings, but it’s part of the Open dialog. I’ve gotten so used to utterly undocumented applications that I didn’t think to look for a manual. Google was no help … but maybe it will be after I post this.

Wednesday, July 15, 2015

Photo slide show screensaver on Mac - network share and Yosemite's reversion to default. A workaround.

I have never been happy with how OS X handles anything to do with file shares, I think Windows does a much better job.

Which, if you know anything about Windows network services, must mean I’m a raving loon. How could OS X be worse than that?

I can’t explain it. My experience is that, for no good reason, when requesting a file or folder from an OS X server, things often fail. Disabling sleep and hard drive rest helps. [4]

So it’s not surprising that using a server based photo collection with the OS X Photo Slideshow screensaver has always been problematic. I’ve really only had good success with local stores, or using local Aperture or iPhoto as the source.  I assume something hangs and OS X switches to the default photo slideshow (national geographic) screensaver, losing all memory of the screensaver you want to use.

This isn’t new, but with Yosemite it’s seems to have gotten worse [1].  Every time I opened my brand new MacBook Air on 10.10.4 I was back to National Geographic. Which is pretty, but I’ve come to hate it.

Happily, this problem is aggravating enough that there’s now a fix, which is best described in an AskDifferent post by “Flavin” (he found bug in 10.10.1, he both asks questions and answers it. I love when people return to add their answers.) The process goes like this:

  1. Set up your screensaver as desired.
  2. Run a terminal command to see the preference file values:
    defaults -currentHost read com.apple.ScreenSaverPhotoChooser
  3. Copy values into a script to write them back, where script is of the form
    defaults -currentHost write com.apple.ScreenSaverPhotoChooser … 

This is what my script looked like based on Flavi (emphases mine):

#!/bin/bash
defaults -currentHost write com.apple.ScreenSaverPhotoChooser CustomFolderDict -dict identifier \"/Volumes/ss/ss\" name ss
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath \"/Volumes/ss/ss\"
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 4
defaults -currentHost write com.apple.ScreenSaverPhotoChooser ShufflesPhotos -bool true

My images are in a network share /ss/ss [2]. Note in a Bash script like this quotes are escaped with slashes, hence \” to contain the string.

At this point I had the fix, but I got stuck with following the usual practice of storing it in OS X’s hidden unix file structure. TextWrangler wouldn’t show them to me [3]. So instead I put the script into a standard OS X Folder (Documents\Bash is my name) and used my favorite tip of the year: How to run a Unix shell script from the Mac Finder | alvinalexander.com. I changed the .sh extension to .command and now it’s double-clickable. No need to wrap it in AppleScript or death with BSD Unix PATH, etc.

THEN I discovered my script only worked when the remote network share was mounted. If it wasn’t mounted OS X wouldn’t mount it for me; the script would run as above but OS would fail to find the volume (“ss”) and would return to the dreaded Nat Geo. So I revised the script to mount as needed (I had a devil of a time getting mount_afp working because I didn’t understand I had to create a directory first in Volumes to be the mount point/node), and I added code to set Screensaver to Photo Slideshow borrowed from another reference.

#!/bin/bash

## Mount remote volume if not already mounted
if [ ! -d /Volumes/ss ]; then
mkdir /Volumes/ss
mount_afp afp://Thunderpaws._afpovertcp._tcp.local/ss /Volumes/ss
fi

## Set Screensaver to Photo Slideshow
/usr/bin/defaults -currentHost write com.apple.screensaver 'CleanExit' -string "YES"
/usr/bin/defaults -currentHost write com.apple.screensaver 'PrefsVersion' -int "100"
/usr/bin/defaults -currentHost write com.apple.screensaver 'idleTime' -int "300"
/usr/bin/defaults -currentHost write com.apple.screensaver "moduleDict" -dict-add "path" -string "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver"
/usr/bin/defaults -currentHost write com.apple.screensaver "moduleDict" -dict-add "type" -int "0"
/usr/bin/defaults -currentHost write com.apple.screensaver 'ShowClock' -bool "false"
/usr/bin/defaults -currentHost write com.apple.screensaver 'tokenRemovalAction' -int "0"

## Set location of photos
defaults -currentHost write com.apple.ScreenSaverPhotoChooser CustomFolderDict -dict identifier \"/Volumes/ss/ss\" name ss
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath \"/Volumes/ss/ss\"
defaults -currentHost write com.apple.ScreenSaverPhotoChooser LastViewedPhotoPath \"\"
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 4
defaults -currentHost write com.apple.ScreenSaverPhotoChooser ShufflesPhotos -bool true

## Removes the .plist LaunchAgent from inside the User Launch Agent Folder.
## rm -f ~/Library/LaunchAgents/set-screensaver.plist
## killall cfprefsd

exit

Eventually I may take app.net@jws’s advice and use Watchman to fully automate a fix, but I kind of like firing this script off every time Yosemite zaps my slideshow of 100 years of family pictures.

- fn -

[1] Maybe related to this Mavericks change? It’s not the only thing that’s gotten worse over the past 1-2 years of course. My current explanation for the Hot Mess that is Apple software 2015 is that during the Jobs era and shortly thereafter Apple incurred massive technical debt and they are slowly and painfully trying to fix it, while shedding expertise like water off the proverbial duck’s back. An even more worrisome possibility is that Apple is now a typical corporation.

[2] Why the redundant ss? Historic reasons. The network share is a thumb drive sticking out of the back of a Time Capsule, so there’s no authentication needed.

To get the path of a folder just drag the finder icon into Terminal and the path will render.

[3] I’ve run into this before I think, but I can’t remember if there’s a setting I’ve missed or … what. Maybe it’s a BBEdit only feature, but it doesn’t show up in the TextWranger vs. Bbedit comparison page. Google was no help at all.

[4] I wonder if it’s because OS X often stores references to “mount points” (Volumes/…) but mount points have to be associated with network addresses, and those are not stored. Note my script should really check for the network access, not the existence of the Mount directory, but I don’t yet know how to do the former.

References

 

iOS 8.4: Spotlight not showing Bing results? Your email index may be corrupted.

Recently Spotlight stopped offering me Bing results (or Wikipedia). Power cycling the phone didn’t help. I tried the usual Spotlight fix in Settings:General:Spotlight of turning off all search results, exiting settings, confirming searches return nothing, then turning them back on. Didn’t work this time.

After a bit of experimentation I found Spotlight worked as long as I didn’t include mail search. Not unexpectedly, when I tried searching within Mail.app search would hang for at least 30 seconds (when I gave up). 

The fix was to remove all of my email accounts entirely - it wasn’t enough to simply turn mail off. I then restored them [1] and now search works within Mail.app and also within the Spotlight UI — including Bing results.

I assume Spotlight performs searches in sets, and when it got to the set containing Mail it got hung up, returning nothing and blocking returns from later sets in the execution pipeline.

I decided I don’t like getting Mail results back in search anyway, so I turned them off. I do like being able to search Mail, so the fix was important.

My spotlight enabled searches are, in order:

  • Applications
  • Contacts
  • Events (I use Calendars 5.app primarily, but I enabled Google Calendars in Calendar.app to support Event search. Sadly iOS still needs Google’s ugly SyncSelect hack. OS X doesn’t need it, so I blame this one on Apple and their (assumed) monstrous technical debt problem.)
  • Spotlight Suggestions
  • Bing Web Results (also Wikipedia)

I only use iOS Reminders for short term things (use ToDo.app) so I omitted that. Similarly I only use iOS Notes for transient items, so I omit that too (use Simplenote.app, despite it’s #$@$@ tag limitations). Messages, Voice Memos, Music, Podcasts, Videos and Audiobooks never made sense to me as items to include in Spotlight search.

[1] I had to redo my settings of course, including digging into preferences to make Google Delete when it damned well should Delete. I set it only save the last two weeks of email to reduce burden on the evidently unreliable indexing engine.

Sunday, July 12, 2015

Facebook event sharing - July 2015

Facebook Events (calendar items) exist in some sort of Facebook twilight zone. Neither completely abandoned, nor entirely useful. You can, for example, subscribe to an Event stream in Google Calendar. That’s a useful move.

Even public events are rather hard to share however. Facebook’s limited (usually obsolete) official documentation suggests copy and paste the URL. As of today this also works...

  1. View Event and choose Join.
  2. Look for the (mislabeled) Invite drop down - select it.
  3. Choose Share Event.

Monday, July 06, 2015

iOS - apps showing multiple times in search?

This is an easy one.

Do an iOS Spotlight search, see an app multiple times… means Spotlight needs to be rebuilt.

Go to Settings for Spotlight, uncheck all. Exit. Try search - nothing happens. Now add back applications, etc.