Jawbone ERA vs. BlueAnt Q3: a podcast-oriented comparison

It’s been over two years since I posted here and I just wanted to assure you, dear reader, that I’m still alive. You can see some more frequent signs of life on my Twitter feed. Mostly I complain about computers, though the majority of my life is taken up by medical school these days.

To avoid this being an entirely content free post, I will discuss something I’ve got a lot of experience with but never wrote about: Bluetooth headsets. I listen to podcasts almost exclusively through Bluetooth headsets, and have for about the past three years.  I wear a headset for probably an average of an hour a day, sometimes more like three or four on the weekends when I’m cooking, cleaning and doing laundry. My right ear is stretched compared with my left ear as a result. I almost never talk on the phone with my headsets, so if you’re looking for a comparison of call quality, look somewhere else.

I have, over the years, owned 6 mono headsets and 4 stereo headsets, not counting the Plantronics headset I got for my father. While most are so bad they don’t bear mentioning, my favorites have been the Jawbone ICON and ERA. I bought the ICON in June 2010; it worked perfectly reliably until I accidentally washed it in September 2011. Newly clean, the LED still came on to indicate the battery was charging, but it never showed as fully charged and wouldn’t power on any more—I don’t blame it! I bought an ERA shortly thereafter, which worked fine until about a week ago when the volume started spontaneously dropping. I think this is simply a loose connection to the speaker as I can often restore the volume by changing the headset’s position. The headset took quite a lot of abuse including several drops so, again, I don’t really blame its design or manufacture. Earlier this week, instead of getting another ERA (left), I bought a BlueAnt Q3 (right), which I haven’t decided to send back yet.

Jawbone ERA vs BlueAnt Q3, inside

I thought about making a comparison table, but then I realized how much I hate comparison tables, so here are some bulleted lists instead.

Things I really liked about the Jawbone ICON and ERA:

  • A2DP support. Without this, it’d be pretty useless for listening to podcasts.
  • The power switch is a slider (the extent of my hatred for the Apple aluminum Bluetooth keyboard power button is not printable in this forum).
  • The status LED is on the inside of the headset, and is a ring of moderate brightness rather than a pinpoint of extreme brightness.
  • Jawbone includes a wonderful shape-holding micro USB cable for recharging. For a while, it was infuriating to try to connect the device to the cable by feel given the odd angle at which it sits, but I eventually realized that the curve on the cable more or less matches the curve on the inside of the headset, and all was well.
  • The headset only has one button, whose function is relatively easy to determine: one tap either performs call control functions (if the phone is ringing/off hook) or speaks the approximate remaining talk time. Holding it triggers Siri, if nothing is playing, or cycles the volume if something is.
  • Mac software lets me do things including renaming the headset, upgrading firmware, configuring the button behavior, and installing experimental features like (originally) A2DP support.
  • You can monitor battery life from the iPhone display.
  • The device shows essentially no wear after heavy use for years, aside from the JAWBONE text rubbing off slightly.
  • Charging status is easy to see: red pulsing ring for charging, white for charged.

Things I found useless or annoying on the Jawbone ICON and ERA:

  • There’s no audible feedback for the first few seconds when turning on the headset. Startup is slow — total time from power on to pairing with an iPhone 4S is about 5 seconds.
  • About once a month, the headset would power on, far away from any computer or USB port, and decide that it was waiting for a software update. The headset would feel the need to remind me of this mantra (“Please wait while new software is being installed. Your headset will restart when it’s done.”) every few seconds for a minute. This would play over the top of any audio. There was no way that I could find to abort this process and, you know, use the headset immediately.
  • Volume control requires you to hold down the button while audio is playing (otherwise, it triggers Siri, the way I have it configured), and inevitably causes me to overcorrect and/or trigger Siri.  It’s hard to figure out whether the volume is increasing or decreasing, as it alternates after it “bounces” off the extrema.
  • Related to the above: triggering Siri requires holding down the button, hearing 2 beeps from the headset, then waiting a while before hearing Siri’s acknowledgement.
  • You’re supposed to be able to trigger various actions by tapping or shaking the headset. These never worked reliably for me.
  • I have to carry around two earbuds: one is comfortable to wear for hours when listening to audio, but it puts the headset so far away from my mouth that the phone call quality — or, more relevantly for me, Siri — is essentially unusable. The other earbud I use for phone calls, very infrequently. There’s also an ear hook, but it does not attach securely and has been awkward to the point of uselessness in my experience.
  • Sometimes A2DP would drop until I power cycled the headset, though the phone would think it’s playing. This may very well be Apple’s bug, as iOS Bluetooth has certainly had its share.

The BlueAnt Q3 shares quite a few of the Jawbone headsets’ features (A2DP, iPhone-visible battery life, power slider) and will hopefully be an adequate replacement.

Things I like better about the BlueAnt Q3, thus far:

  • Startup and connection is substantially faster: under three seconds versus 5 for the ERA. Audible feedback on startup is a battery report (unfortunately just as a level like “high”), rather than a chime, and is essentially immediate.
  • A2DP is supported when two devices are connected simultaneously. The Jawbone ERA will connect to two devices at once, but only the first-connected device streams audio to the headset. The Q3 announces “There are two phones connected” when the second device connects.
  • While fewer earbuds are supplied, and none are designed to sit inside your ear canal (unlike on the ERA), the smaller-size, simpler-design earbud fits me pretty well and — crucially — still allows me to use Siri with good accuracy. No more adding surreal shopping list items while I’m cooking! There’s an ear hook that attaches securely and works well unless I’m deliberately shaking my head (in which case the earpiece moves, but doesn’t fall off).
  • Incoming calls play the caller’s name through the headset, rather than just the phone number. I believe synthesized names are synced from your phone via PBAP.
  • Volume control is a 1D slider (self-centering, like a joystick) which works whether or not audio is playing. If no audio is playing, you get feedback via audio clips such as “Volume up” or “Minimum volume”. Beeps indicate the extremes of volume if audio is playing.
  • There’s still only one button, excepting the volume control, and absolutely nothing requires you to hold it down.¹ You either tap once and say one of a small set of voice commands to the headset (report on both headset and iPhone battery life, pairing, redial, etc.), or tap twice to trigger Siri.
  • There are more thorough and well-designed voice prompts; for example, on an incoming call, there’s help on what buttons to push to answer or ignore it, carefully timed so it doesn’t bother you if you know what to do. Audio pairing help is extensive, unobtrusive and well-done.
  • It’s possible to trigger a connection attempt from the headset (tap the button and say “Am I connected?”), a wonderful thing if you’re using iOS with its obnoxious refusal to provide fast access to Bluetooth settings.

Things the BlueAnt Q3 doesn’t have, or which I find worse than on the Jawbone ERA:

  • There’s an annoying click at the end of each voice prompt audio clip, perhaps when the speaker is getting power cycled. This should really be eliminated.
  • One of the voice prompts is just wrong. “Your BlueHead headset is connected.”
  • I get a loud noise in my ear, probably from compression of the earbud, when I try to push the button if I don’t hold the headset still with my hand.
  • The button offers too much resistance to pressure, feels flimsier, and is oriented vertically rather than horizontally.
  • There is no Mac software or ability to rename the headset (“BlueAnt Q3 V1.35”), though a firmware upgrade tool is coming.
  • Obnoxious flashing LED is obnoxious — bright, and on the outside. At least I don’t have to see it.
  • The grille (decorative?) is already getting things stuck to it after an hour — bad design.
  • It comes with an ordinary micro-USB cable, and the headset is difficult to connect to it by feel. It’s possible to use the Jawbone cable, but you don’t end up with a very secure fit.
  • The range and interference robustness are substantially worse — not usually an issue when I have the phone in my pocket. I should quantify this at some point.
I can’t discern any difference audio quality-wise, but keep in mind I listen to spoken word content. The BlueAnt headset does seem to get louder. I really wish iOS permitted control of non-iTunes audio via Siri. Play/pause would be enough! I guess we’ll find out in a few weeks if anything will change in iOS 7.

Some comparative photos I took are here.

For further information, I find iLounge’s reviews to be consistently accurate (Q3 and ERA). There is an iPhone 5-specific issue — related to wideband audio, and looking like Apple’s fault — with the Q3, which is discussed in the review and acknowledged on BlueAnt’s Web site. There’s now a special version of firmware 1.41 to work around the issue. As discussed above, a Mac updater is not yet available (it’s promised for a few months hence) but the Windows updater worked fine in VMware Fusion.

¹Actually, a few features do require holding the button and/or volume slider, but I would never use them daily as I would with Siri on the Jawbone ERA. One swaps the behavior of volume up/down so it makes sense in your left ear, some others handle call waiting/conferencing, and one resets the headset.

Free

Finally moved everything off PBXes today. (Of course, I can’t delete the PBXes account until it expires.) I feel quite a bit better to no longer be trusting my phone service to a company like that.

I replaced it with Yate and FreeSentral running on a VPS. I can’t say setting up Yate was easy or the documentation was great, but the software seems robust and I like the architecture. Particularly, I was impressed that I was able to use FreeSentral where it worked, but able to override routing where needed without modifying FreeSentral.

A Yate troubleshooting tip: run with -vvvvv and read the entire log file. Just because something appears to fail in a particular place doesn’t mean it has (i.e, that you’re reading the log correctly), or that the failure was at that place. It could have been much earlier, such as during module loading. Knowing this would have saved me many a wasted hour.

pbxes.com (PBXes, i-p-tel): horrendously bad customer service

Since my posts to their forum keep getting deleted, I’ll post here.

Here’s what happened:

August 10: I created a free account (nriley).

August 12: Happy with the service, I created another free account for my father (griley).

Because I liked the service so much, I decided to upgrade to a paid service—supporting automatic failover and more features.

August 27: I created an account the two of us could share (riley) and attempted to upgrade it to paid, after which I planned on deleting the individual accounts, so there was no interruption in service. Despite this thread, which makes it pretty clear their customers are asking for additional payment providers, the only choice is PayPal.

Only after attempting to pay via PayPal, I got an email that PBXes required my PayPal account be verified (that is, linked with a bank account). I’ve never had any other payee require I have a verified PayPal account, but I imagine they’ve had their share of fraud, so I understood. I don’t trust PayPal with my primary bank account information, so I ended up using a separate bank account for the purpose. This took a few weeks as I had to get the bank account set up for online access so I could observe the PayPal deposits.

While PBXes ordinarily provides absolutely no way to contact them without paying them money (via PayPal) first, PayPal does require a contact email address be included in the transaction receipt; I emailed this address asking about other payment methods, but received no response.

Over the intervening weeks, PBXes “discovered” that I had multiple accounts created and began to automatically disable them for TOS violations.

  • August 31: Received an email that griley would be disabled (same name/email/postal address as riley).
  • September 1: Received an email that riley would be disabled.
  • October 1: Received an email that nriley would be disabled (different name/email/postal address from griley and riley).

Keep in mind the riley account had never been used (except for my abortive attempt to pay for it). The original two accounts, nriley and griley were in use by two different people (myself and my father) so they didn’t violate the TOS at all. If I really wanted to violate the TOS, do you think I would have used the exact same, valid name and address information!?

Here’s what the account blocking email looks like:

we noticed that you created more than one account at PBXes.
That is welcome but also creates considerable load on our servers.
Better would be to stay under a single account as written in our
Terms of Service.                                                               

You can delete or upgrade the additional account                                

riley                                                                           

to paid within the next 5 days. Otherwise we are going to disable it.
Thanks for your cooperation.

What is not clear from this are some properties of a “disabled” account:

  • If you try to call a phone number associated with this disabled account from another PBXes account, the call does not go through, even if the call would not ordinarily be routed through PBXes.
  • You can’t reuse any SIP trunk associated with this disabled account in another account.
  • You can’t view or edit any settings associated with the disabled account to remove this trunk or copy the information to another account.
  • You can’t even delete the account.

So, not only was my father’s account blocked, but I was unable to call his phone number from my PBXes account.

Eventually I got the bank account added to PayPal, and the shared account paid for, then PBXes had its own verification which took a further few days, which thankfully happened in time for me to cancel nriley and move over to riley without any interruption in service. My father had no such luck; as you can see above, he was without phone service for nearly a month.

After getting the paid account set up, I made three requests via messages on PBXes’ forum (since there was no other way to contact PBXes short of paying for support, and several other similar account-related messages were responded to, for example this one).

  • On Friday, I asked if my father’s account could be unblocked so I could copy the settings out of it. This post was initially locked to replies without a response, but remained in the forum.
  • Today, I asked if my father’s account could be deleted so the trunk could be accessible to my account. This post was deleted without a response several minutes later.
  • Finally, I posted a longer version of the second post, which made it clearer my purpose was simply to make use of the account I had already paid for, as well as including conciliatory statements such as “I’m not trying to make any trouble” and expressing my frustration about the hoops I had to jump through. This post was deleted immediately, then shortly thereafter Friday’s post was deleted too with no relevant explanation.

So, my only choice was to pay for an account I did not intend to use, just for the “privilege” of deleting it.

Note at no point in this saga have I been personally addressed by any representative of PBXes/i-p-tel; just sent automated messages and left to wonder about their motivations, which at this point seem at best bizarre; at worst, malicious, bullying and extortionate (you must pay us more money to use an account you have already paid for). Certainly, it’s their company and their right, but I’d never treat a customer like this in my life.

All I can do is recommend other people stay far, far away from PBXes’ service. Of course, PBXes doesn’t offer refunds, so I’ve got to pay for a year of their service regardless, plus a month of service on griley just so I can delete the associated trunk.

Android venting

I became so incredibly frustrated with Android last night that I had to vent somewhere. Sorry for all of you who have heard this before.

With the hiptop, it seemed that there was some considerable effort expended in asking “what is annoying about using devices on a flaky cellular network?” The OS and applications incorporated all kinds of wonderful features, from aggressive buffering and queuing to a standard “this hasn’t been sent” indication (italics) to the “your web page is done” notification—it all worked well and was a source of enjoyment and delight even when the network was broken.

With Android, this doesn’t happen. Not at all. Standard Android applications (particularly Market) do an astonishingly atrocious job of handling network drops, download failure, etc. A modal dialog telling you “THE SERVER IS DOWN” is completely useless and user-hostile. Operations that seem like they should not require a network connection (like seeing the list of installed applications) load in multiple undefined stages that make you wonder if something broke. Asynchrony seems to be in all the wrong places.

A very obvious example of the difference is the data connection icon. As maligned as it was thanks to T-Mobile network failures, the 3-dot connection icon on the hiptop was wonderful; it was clear to both technical (for whom the dots had actual meaning) and nontechnical users that the process of connecting to a cellular data network had several stages, and that it was quite possible to have a data connection without an operable Internet connection over it.

Oh look, Google Voice just failed to download. The notification says “Download unsuccessful.” So helpful. When I tap on that notification, it lets me stare at a “Loading…” spinner for 30 seconds before I get “Attention: A network error has occurred. Retry, or cancel and return to the previous screen.” I’ve got 3G data with 4 bars.

The words that came out of my mouth at this point are not fit for posting on this blog.

Pester 1.1b8 released

Get it.

Pester 1.1 has been a long time coming. It’s been my own personal battle with the second-system effect. 1.1b8 is a big step towards finishing, though.

-rw-r--r--  1 nriley  users  295049 Oct 14  2002 Pester-1.0.dmg
-rw-r--r--  1 nriley  users  428727 Jan  7  2003 Pester-1.1b2.dmg
-rw-r--r--  1 nriley  users  524911 Apr  9  2003 Pester-1.1b4.dmg
-rw-r--r--  1 nriley  users  749389 Nov 25  2007 Pester-1.1b5.dmg
-rw-r--r--  1 nriley  users  746933 Nov 27  2007 Pester-1.1b6.dmg
-rw-r--r--  1 nriley  users  756428 Nov 28  2007 Pester-1.1b7.dmg
-rw-r--r--  1 nriley  users  881197 Mar 25 23:34 Pester-1.1b8.dmg

The list of new features and bug fixes since 1.1b7 is substantial. Among them:

  • Customizable alert sounds—the most requested feature. It uses QuickTime, so you’re welcome to pick a movie or even a bitmap or PDF to use as well. I’ve used the latter to display stretching exercises on a regular basis, for example.
  • Selectable sound output device and volume for alert sounds. If you have your headphones and speakers accessible as separate output devices, as I do (e.g. if you have a Mac Pro or an external audio device), it’s useful to have the alert sound audible when you’re away from your desk. Change the output device from Preferences. (Note: Pester doesn’t yet respond to audio devices being connected/disconnected while it is running, although you should always get audio output somewhere.)
  • Baseline, ICU-based support for non-natural language dates and times is much more robust (for example, simply “20” or “8p” works to specify 8:00 PM).
  • Support natural-language dates in non-English languages via Date::Manip. I uncovered some bugs here, which the author of Date::Manip is working on fixing, but Catalan, Danish, Dutch, French, German, Polish and Russian should work fine. The date popup is limited to the days of the week, but that’s easily remedied (see below).
  • Optionally wait until you stop typing or moving the mouse to display a message. This is quite helpful so you don’t start typing into the Snooze box when you want to be typing into another document. The feature is disabled by default; enable it in Preferences.
  • Handle time zone changes, many more time zones, and more reliably determine the time zone.
  • Autocomplete common natural-language dates—my favorite new feature.
  • Simplify tab order. I previously tried to do something very complex with the tab order, which confused Cocoa and could cause you to get “stuck” in some area of the window.
  • Better save and restore focus when you’re working as an alarm goes off; will no longer bring unwanted windows to the front.
  • Open the Set Alarm window in the current Space when triggered with a keyboard equivalent or the Dock menu.
  • Switch to tomorrow automatically if necessary when tabbing into “on”. This is a feature I first implemented in Pester for hiptop, which I’m actually happier with than desktop Pester (see the aforementioned second-system effect). The upshot of this is that if you specify a time that’s already passed, while the specified date is today, simply tabbing into the date field will switch the date to tomorrow. It’s easier to use than to describe, really!
  • Allow intervals up to 999 weeks.
  • Display “today” and “tomorrow” in the bottom left corner of the Set Alarm window in case you can’t remember what day it is.

Note that the natural language date’s language is determined by the date format, as specified in System Preferences → Language & Text → Formats.

If you speak Catalan, Danish, Dutch, French, German, Italian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish or Turkish, it’d help if you could translate the date popup contents:

/* Date popup */
"today" = "today";
"tomorrow" = "tomorrow";
"in 2 days" = "in 2 days";
"next «day»" = "next «day»";
"next week" = "next week";
"in 2 weeks" = "in 2 weeks";
"next month" = "next month";
"in 2 months" = "in 2 months";
"in 1 year" = "in 1 year";

Feel free to put the results in a comment or email them to me (pester at sabi.net).

If you’ve got any bug reports, comments or feature requests, please let me know. If you’re looking for things to test, read the release notes in the Read Me (Help menu) which summarize the changes since 1.0.

For now, the main thing that needs finishing for 1.1 is documentation (help wanted!). The latest source is on GitHub.

Enjoy!

NCIDpop 0.9.16 released

NCIDpop is a client for the NCID (Network Caller ID) server. See previous posts for more information on my work with NCIDpop.

New in this version:

  • Optional Growl notification support.
  • Formats phone numbers using Address Book preferences.
  • Skip leading 0s for Address Book lookup (useful outside the US/Canada).
  • Fixed saving of reverse lookup URL when you click the “Set” button (was broken due to this Cocoa misfeature).
  • Made networking code significantly more robust. One side effect: you should see much less log spam when the NCID server is unavailable, because the connection process is now interruptible.

There’s now an active Windows maintainer and with the source code moved all the way from CVS to Mercurial, collboration should be significantly easier in future. The settings trigger is a bit tricky so I do plan on providing an easier alternative in a later version; that said, I’ve also got another 4–5 open source projects clamoring for my attention.

Android thoughts, part 2

I was going to write a longer Android post, but really, just go read this. Android might be a bit more tolerable if I hadn’t actually used better handheld devices, in the form of the hiptop, iPod touch/iPhone, early Palm OS and the Newton.

If you really do want to read what I was going to write, here are my notes. (Everything up to “Six months later:” refers to my experience with the G1 in July; afterward, with the Nexus One.)

Android thoughts

The rather anticlimactic conclusion to my mobile phone dilemma in June was the G1. I didn’t like it at the time and still don’t; however, the writing was on the wall for the hiptop, finally drained of life by Microsoft, and it was the only viable choice for smartphone-with-keyboard at the time. (Have you tried typing on a Palm Pre?)

Since I started using the G1, it’s received one minor OS update (1.5→1.6) and a few truly useful apps (Google Voice and Google Maps Navigation). The phone is still slow and unwieldy, with such poor battery life that I must carry multiple batteries and sometimes a charger around with me.

Today Google introduced their new phone, the Nexus One, running Android 2.1. It’s not bad, but I doubt I’ll be buying one.

The Nexus One fixes the biggest problems with the G1: speed, storage, battery life and the lack of a real headphone jack. It adds a decent design and beautiful screen. For me, however, it also removes a major reason to use Android over the iPhone: a physical keyboard with a decent layout. I’m able to work around the awful Android Gmail app by using Mutt in a SSH client; I couldn’t do that on the Nexus One. (Soft keyboards are fine for typing text, not so much for interacting with a Unix system.)

The largest remaining problem with Android is the navigational UI. It:

  1. hides most options behind the context-sensitive Menu button
  2. fails to adequately expose hierarchy and the behavior of the Back button
  3. fails to adequately expose multiple running applications (“activities”)

The first two aren’t issues with the iPhone UI, and the last has been adequately addressed by webOS’s card model. It still surprises me, for a company whose Web applications are known for speed and efficiency, that the Android UI came out so badly.

Applications that try to innovate with UI on Android, of which the two that stick out most in my mind are the otherwise-terrific Locale and the Android 2.1 Gallery, tend to confuse more than they help. For example, Gallery uses a double-tap on the Menu button for multiple selection, then arbitrarily checks the bottom center photo to start. If you uncheck the photo as (not surprisingly) you may not want to do anything with it, Gallery exits multiple selection mode; instead, you have to check another photo before unchecking the bottom center one. In Gallery, the presence of a single selection is necessary to maintain multiple-selection mode; the iPhone’s ubiquitous “Edit” toggle button doesn’t have this problem.

So after six months, my situation is much the same: wait for a future Android device or a future iPhone. I doubt Palm is going to produce a device with the capabilities I want any time soon. Palm’s application ecosystem is much smaller than even Android, so it’s right out.

(I have a much longer Android post in preparation…if the above doesn’t make sense in places, let me know so I can clarify.)

NCIDpop 0.9.15 released

Last year I worked on NCIDpop, a network caller ID client originally written by Alexei Kosut. I recently spent a day or so doing some further hacking on NCIDpop to fix problems I and others had noticed. My changes have now been incorporated in an official release.

What’s new:

  • Address Book reverse lookup support: NCIDpop will display the caller’s name, phone number label (e.g., “mobile”) and picture instead of the caller ID if the information is available in the Mac OS X address book. Also, when you double-click a caller entry in the call log, it’ll open the corresponding Address Book card rather than doing a reverse lookup.
  • Don’t reformat non-numeric 10-digit numbers (e.g., turning Vonage’s click2call into (cli) ck2-call).
  • A few small memory leak fixes, thanks to the Clang Static Analyzer.
  • Updated reverse lookup URL list (some providers had consolidated or changed their URL format).
  • Bug fix: handle NCID servers specified by IP address instead of hostname.
  • Bug fix: properly reconnect to the NCID server on wireless network changes (SCNetworkReachability behavior is…interesting, and I had only tested 0.9.14 with wired networks).

Once again, if you’re wondering “why use NCID when I already have caller ID?” If you have SIP service (e.g., Vonage) at home, NCID/NCIDpop gives you caller ID on the first ring on every computer display in the place, which can save a lot of unnecessary running around to try to find the phone.

Of course, it’s just in time for me to consider giving up phone service at home as I’ll be spending much less time there in the fall. I’m overdue for a new mobile phone, but I can’t decide between an iPhone 3G S, the Palm Pre or perhaps waiting for a future Android device. I haven’t played with the Palm Pre yet; that’s on my schedule for next week.

Also: Jython 2.5 (final) was released today! It’s been a long while coming. We’ve still got a lot of work to do, particularly on performance and Java integration.

Maintaining Kerberos and AFS credentials in Screen

If you use a persistent screen session on a machine running OpenAFS, you’ve likely experienced long delays and confusion when your tickets and tokens expire.

The Screen and Kerberos patches will create a credentials cache for your screen session and automatically renew tickets. That’s a start, but your tokens still expire.

A relatively simple modification simply runs aklog after renewing your tickets. The patch for this is here; Debian packages for acm-screen, incorporating Kerberos and AFS patches, are here.

However, this still leaves a problem when your tickets exceed their renewable lifetime. For that, I wrote a zsh function which wraps screen and re-kinit/aklogs if there is less than a day remaining before they expire for good.

screen() {
  # note: this breaks if you have >1 screen session
  cc=(/tmp/krb5cc_scr_$(id -u)_*(N[1]))
  [[ -n $cc ]] && (( ${#@} )) && {
    local princ=$(klist -5 $cc | awk '/Default principal:/ { print $3 }')
    [[ -n $princ ]] && {
      local expiry
      zmodload zsh/datetime
      strftime -r -s expiry '%D %X' \
        "$(klist -5 $cc | awk '/krbtgt/ { getline ; print $3 " " $4 ; exit }')"
      (( expiry - EPOCHSECONDS < 86400 )) && {
        kinit -r7d -c $cc $princ && screen -X screen aklog || return 1
      }
    }
  }
  =screen $@
}

Enjoy.

Next Page »