My Favorite Screenshot Tool – SnagIt

I’ve been using Techsmith’s SnagIt for years for taking screenshots. It started as a Windows-only product but then a Mac version came out. It’s extremely simple to use and has most everything I want for a quick image including cropping, border effects, transparency, and annotations like arrows and text.

What’s your favorite screenshot and annotation tool?

Easy Mac to Mac Screen Sharing

Screen sharing over iMessage is not a terribly well-known feature of Mac OS X – but it’s incredibly awesome and easy to use. The only requirements are the person needs a relatively new Mac OS X install (Yosemite or higher) and iMessage enabled on their Mac.

  1. In Messages, find your existing conversation (or create a new one with the user).
  2. Click the Details button up top and click it.
    2015-11-02_19-09-28
    2015-11-02_18-50-29
  3. Find the little icon that looks like two squares with an offset between them and click it.
    2015-11-02_18-53-03
  4. Select Ask to Share Screen.
  5. The other person should get a notice and they can accept it.
    2015-11-02_18-54-08
  6. Once you’re sharing you are in view-only mode – you have to click the icon in the upper left to request control of their desktop.

Pretty simple! I’ve had some issues in the past with the notifications never coming through for screen sharing but it seems to be resolved with Mac OS X 10.11 (El Capitan).

View Apple’s Support Documentation on screen sharing in Yosemite

Recording Your iOS Device with QuickTime Player

The Task

You need to record your iPhone or iPad’s screen to show someone a bug or demo a feature to your customers. In the past the only method available was to use a program like Reflector to emulate an AirPlay/Apple TV and then record on your machine. This works fairly decently although the quality over WiFi isn’t very good leaving you with a less-than-crisp recording. Reflector also isn’t free which makes it difficult for users in the wild to record bugs.

Enter iOS 8 & Yosemite

Apple introduced the ability to record the screens of iOS 8 devices with QuickTime Player in Mac OS X Yosemite. You may have already been familiar with the ability to do a screen recording with QuickTime but now those screens includes any of the iOS 8 devices you have connected with a cable. The implications of this new feature include:

  • High quality video recording – the video is going over the wire instead of WiFi
  • Capture audio from the device or your computer
  • Easy access to QuickTime’s built-in exporting tools
  • No new software to install – Yosemite and iOS 8 are the only requirement

The Steps

  1. Connect your iOS 8 device to your Mac OS X Yosemite (10.10) computer with the USB to lightning or dock connector cable.
  2. Launch QuickTime Player (inside of /Applications in Finder).
  3. Click Done on the file browser window that appears by default when QuickTime launches.
  4. Click File > New Movie Recording. A window will appear typically picking your built-in FaceTime camera by default. Smile.
    QuickTime File New Recording
  5. Click the little arrow next to the red recording button.
    QuickTime Recording Inputs
  6. Under Camera select the iOS device you wish to record.
  7. Your iOS device’s screen should appear on your Mac.
  8. Optionally select your device under Microphone as well if you want to record the audio from the device rather than your computer’s microphone.
  9. Click the red record button when you want to record, clicking it again when you’re done.
  10. Export the video under File > Export picking an appropriate resolution.

Notice that Apple took the time to replace your device’s status bar with one being carrier-free and fixed at 9:41am.

QuickTime Sanitized Status Bar

Nice touch.

Limitations

There are only a couple limitations that I’ve found so far. Finger tips are not shown in the video, so it can be hard to demonstrate things. My suggestion is to talk through the issue or provide a list of things you tapped if its not obvious. Secondly if you’re trying to demonstrate something that involves going full screen (like watching a video on the phone) then the recording will not capture the full screen presentation (it’ll go black). Lastly there is a little bit of lag when you’re recording so make sure to watch the actual device screen and not your computer. If you record audio from your microphone, QuickTime does a good job syncing it up afterwards. This process also works a bit better on newer devices.

Next Steps

Sharing the video you’ve recorded can be a challenge since these videos tend to be of a very very large size in a matter of seconds. Exporting in 480p can definitely help. If you’re providing a demonstration of a bug then you may wish to clip the beginning and end of the movie to only show the actual reproduction of the bug. Follow Apple’s instructions on how to clip a video here.

Reflector is still a great program and very useful. Simple things like being able to add a fake iPhone or iPad frame around the video makes a big difference for demo purposes. I will still continue to use Reflector especially since it’s still the only way to record iOS 7 devices.

Oh My Zsh Error About Battery

I recently got a new work computer and instead of using Time Machine to restore, I decided to install everything fresh.  I installed Oh My Zsh (which is fantastic by the way) which I used on my previous machine.  My favorite theme is Candy Kingdom.  After switching and relaunching Terminal I noticed the following error after every command prompt display:

zsh: command not found: battery_time_remaining

Turns out it was a simple problem – I had to enable the battery plugin in my ~/.zshrc config file:

plugins=(git battery)

Finding the solution wasn’t straightforward and its been forever since I installed Oh My Zsh.  Now I know and you do too.

 

 

Mac OS X Server Time Machine Volume Filling Too Fast

I’ve been noticing on my Mac OS X Mavericks 10.8 Server I have running in a data center has been filling up its Time Machine volume way too quickly.  The backups are continually huge and only about a week fits on the second hard drive inside of the Mac mini.  Every time the machine backed up it was taking up so much room that previous backups had to be deleted.

I searched everywhere and couldn’t find an issue.  I looked in console logs for Time Machine and couldn’t find anything definitive as well but it looked like it was something in /Library/Server.  I realized that it must be a file or set of files that are always being written to so they’re always backed up every hour or so.

I had tried some command-line tools like “du” but the usage was so many levels deep it was hard to pinpoint.  Finally I grew a brain and installed DaisyDisk on the server to see what I could find.  Within minutes I found the pinch point.  See all of the repeated pattern in the third layer from the center?

2014-08-21_07-53-41

Turns out the file /Library/Server/Xcode/Logs/xcs_proxy.log was huge and never rolled over by the logging utility.  I had been using Xcode on this server to run Bots but had since turned it off.  I still need to figure out WHY this file is being written to without the Bots service running.  Because the file is always being written to, the entire thing is backed up every single hour.

Solution:

sudo rm /Library/Server/Xcode/Logs/*

If I find the solution to the xcs_proxy issue, I’ll follow up.

Mac OS X 10.9 Mavericks Calendar + Google Sync Problems

On occasion my Calendar on Mavericks gets hosed when syncing with Google.  If I look in the console, I see errors like the following mentioning “An error exists on principal”:

6/5/14 10:05:00.337 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [iCloud]]
6/5/14 10:05:00.338 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Time Off]]
6/5/14 10:05:00.340 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Events]]
6/5/14 10:05:00.341 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Launch]]
6/5/14 10:05:00.341 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Conferences]]
6/5/14 10:05:00.342 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Some Team]]

Hitting Command-R in calendar results in it sitting on Updating for some time (minutes?) and then an exclamation point appearing next to the calendars in question.  I finally found a solution to fix it until the next time it happens.  I’m not sure what the actual cause is but this can get you back up & running.

  1. Close the Calendar app.
  2. Go into System Preferences.
  3. Click on Internet Accounts.
  4. Click on the Google account (if you have multiple you may have to do this for each).
  5. Uncheck “Calendars”.
  6. Click Show All or close preferences.
  7. Open Terminal.app (Applications > Utilities)
  8. type: killall -9 CalendarAgent
  9. type exit or close the window.
  10. Go back into System Preferences and turn Calendar back on for the Google Account(s).
  11. Start up Calendar and hit command-R – everything should refresh properly.

Let me know if you have questions!

Mavericks USB Hub Oddities

I have the strangest glitch happening with Mac OS X Mavericks and I can’t find anyone else describing the same issue.  I have a D-Link DUB-H7 USB 2.0 hub connected to my Thunderbolt Display which is in turn connected to my retina 15″ MacBook Pro.

USB Hub

If I cold boot with this hub connected to my Thunderbolt Display, both the USB external keyboard (not connected to the hub) and the built-in keyboard have a number of keys that do not function.  I, J, M and a few others I know of offhand that don’t work.  As soon as I disconnect the hub, both keyboards work perfectly.  Also, after I log into Mavericks, the keyboards work fine regardless of the hub being connected or not.

WTF

 

Mac OS X – Adding a loopback alias

I do a lot of local web development on my MacBook Pro.  Frequently I had multiple tiers of servers running – a Jetty instance running the web tier and a JBoss/EJB server doing the business tier behind it.  The problem is JBoss opens up so many ports on a particular network adapter and trying to get JBoss and Jetty to share a single IP is a nightmare.  So the easier way is to just create a new IP or alias your localhost (127.0.0.1) into something like 127.0.0.2.  When you start up Jetty, you pass in the binding IP of .2 and then JBoss and Jetty place nice with each other.

The Mac OS command (at least 10.6) to create an alias is:

ifconfig lo0 alias 127.0.0.2

and to delete:

ifconfig lo0 -alias 127.0.0.2

This is not persistent – the alias will not survive a reboot.  I don’t need the alias often even to require it to be permanent.  If you’re curious how to keep it permanent, let me know and I’ll post that.  This is the hacker way to do it on the command line.  There is a much easier way to do it through the GUI but this way doesn’t stick around on the reboot, which is one of my requirements for my project – no retaining traces. 🙂

Installing MySQL 5.5.8 on Mac OS X Snow Leopard

Installing MySQL should be a no brainer on any operating system, especially with how mature of a product it is.  Apparently that assumption is incorrect.  I tried installing the most recent GA release of MySQL on my new Snow Leopard machine, and found I couldn’t start the blasted server.  I’ve become lazy the older I get – I don’t want to screw around with shell scripts, hacking this tweaking that.  If I’m provided a Mac-based installer I WANT IT TO WORK.  So, if you’re like me and are frustrated as all hell with not being able to get MySQL to start via System Preferences after installing the 64-bit version (maybe 32-bit as well), do the following:

  1. Drop into Terminal.app
  2. Type: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /usr/local/mysql/support-files/mysql.server
  3. Find the line starting with basedir and datadir and replace with:
    basedir=/usr/local/mysql
    datadir=/usr/local/mysql/data
  4. Save the file
  5. Start MySQL using the System Preferences pane button.

I’m amazed this is the fix and that the MySQL team overlooked the configuration change in their packaging.  Very irritating.  Enjoy.

Mac Screen Sharing (VNC) & White Screen

I’ve had problems connecting to my Ubuntu 9.10 server via Mac OS’ built-in VNC client, “Screen Sharing”.  Frequently when I connect, I get a white screen with no indication that the connection is working.  If I type characters or click the mouse, it does actually send those events to the remote side.  My only option was to use Chicken of the VNC (which sucks) to connect to my server.  Finally, I did some digging and found the solution/workaround.

  1. Open a new Finder window.
  2. Click “Go” and then “Go to Folder” (or hit Command-Shift-G).
  3. Type in “/System/Library/CoreServices” and hit enter.
  4. Find the “Screen Sharing” application, click once to highlight.
  5. Click “File” and then “Get Info” (or hit Command-I).
  6. Find the checkbox labeled “Open in 32-bit mode” and check it.
  7. Close the Info window and Finder folder window.

That’s it!  Apparently there is a bug in the application only when running in 64-bit mode.  I don’t really care why it fixes it, I’m just glad its fixed and I thought I’d share.

Thanks to the anonymous user on Mac OS X Hints!