Activity Monitor is a great utility on the Mac to monitor what applications and services are chewing up CPU cycles, energy hogs, and other things that might slow your Mac down. in this tutorial, I’ll show you how to engage a version of Activity Monitor to track your iOS device. My particular interest in using Instruments was to see if I could figure out why my iPhone was chewing up battery while it was asleep. With Instruments I was able to monitor my device and it’s processes while it was sleeping.
Prerequisite: Download and install Xcode first from the Mac App Store: https://itunes.apple.com/us/app/xcode/id497799835?mt=12
Note that this download is more than 2GB.
David Bogdan sent in our Dumb Question for this week. He wrote:
Hello Bart and Allison,
Hello from Japan. It’s been awhile, though I’ve been listening to you on podcasts and it sounds like the two of you are doing well.
I wanted to ask another dumb question regarding security. Recently, I’ve been getting occasional popups such as the one below which ask me whether I want push notifications sent to me from the website.
The popup is incredibly intrusive and worries me. You can’t close the tab or quit Safari. You have to either click on the button or resort to force quitting.
Bart says these aren’t typical popups, which are really websites sending you somewhere else. This is Safari asking permission to send you notification (it’s a feature!) not a true popup. The good news is that we found the checkbox in Safari that stops this behavior. In Safari Preferences, Notifications tab, at the bottom uncheck the box that says “Allow websites to ask for permission to send push notifications”.
And of course I created a step by step tutorial using Clarify on how to get Safari to quit annoying you!
Many websites recently have started causing Safari to pop up a window offering to send you push notifications from that site. This is a new feature in Safari that allows websites to do this, and it’s turned on by default. If you like it, great! If you find it annoying and intrusive, then follow these quick instructions developed by Allison Sheridan and Bart Busschots.
After the Heartbleed OpenSSL vulnerability was exposed, Donald Burr of otakunopodcast wrote up instructions on how to verify the version of OpenSSL we’re running, and how to update it. Here are his instructions:
If you run the command:
port deps openvpn
it will show you what other MacPorts ports that openvpn depends on. If openssl is *not* in that list, then that means MacPorts used the Apple-included version of openssl when building openvpn, and so you’re fine.
If, however, openssl *is* in that list, we now need to check what version of openssl was used. Run the command:
port installed openssl
This command will list out what version of openssl is installed.
If it is version 0.9.8, or version 1.0.0, then you are fine. If, on the other hand, it is version 1.0.1a through 1.0.1f, then you are using the vulnerable version of openssl and you must upgrade. This vulnerability was fixed in openssl version 1.0.1g, so if that version (or a later version) installed then you are also fine.
If you need to upgrade openssl, then follow these steps. First thing you need to do is update the MacPorts ports tree by running the command:
sudo port selfupdate
You may see an error about MacPorts base, you can ignore that. After this is done, we need to check what port upgrades are available. Run this command:
and look for a line similar to this:
openssl 1.0.1f < 1.0.1g
This indicates that an upgrade to openssl is available. (In fact I understand that the MacPorts team have released an upgrade to the non-vulnerable version of openssl.)
Finally, to upgrade the openssl port itself, run:
sudo port upgrade openssl
Now you can rerun the command:
port installed openssl
And you should see the new version of openssl with the word (active) next to it, and the old version as well. You should uninstall the old version via the command below (assuming your old version is @1.0.1e_1).
sudo port uninstall openssl @1.0.1e_1
At this point you will probably want to re-generate all of your VPN certificates and keys. Just follow Allison’s clearly written ScreenSteps tutorial 🙂
Start at the step “SECTION 6 Donalds Nifty Scripts of Doom”
I have been running a VPN server on my Mac for a while now, per Donald Burr’s most awesome instructions here. One day while out and about I tried to use my VPN from my Mac and iOS devices only to discover that while I could connect and get an IP address internal to my network, I could not get outside to the Internet. I described the problem to Donald and he sent me the following instructions to restart IP forwarding on the VPN server. This fixed my problem in a snap, hope it helps you too.
Try running the following commands in terminal on the VPN server. You’ll have to do this when you’re next at home obviously. Note: replace “INTERFACE” with “en0” if your machine is hardwired (ethernet) or “en1” if it’s on wifi.
sudo sysctl -w net.inet.ip.fw.enable=1
sudo sysctl -w net.inet.ip.forwarding=1
sudo natd -interface INTERFACE
sudo ipfw add divert natd ip from any to any via INTERFACE
If you’ve installed a VPN server on your Mac using Donald Burr’s most awesome instructions but for some reason want to uninstall the server, here’s an uninstall script along with text-based instructions from Donald:
Download the script here:
Find the place where you downloaded the script (probably in your Downloads folder), keep a finder window open and off to the side. Open a Terminal window, and type:
chmod [space] +x [space]
DO NOT press return yet. In the Finder window, drag the script into the Terminal window, it should insert its path in the command line you are currently typing. Then press return.
Finally type this:
Again DO NOT press return, but drag+drop the script from Finder into the terminal, then press return. The script should run now. When it’s finished reboot your machine.
The Problem to be Solved
Apple’s Contacts application can easily create address labels, but it’s harder to create a bunch of labels of the SAME address for return address labels. Basically we’re going to replicate your home address card as many times as you have on one sheet of labels, and then print them all on one sheet.
If we only have one card with our address, it looks like this when we try to print our labels:
Select Your Contact Card
We’re going to replicate our home address card 19 times. First select the card.
Copy the Contact
Paste the Contact
Now You have Two Identical Cards
Repeat Until You Have 20 Identical Cards
Select all 20 cards.
Print All 20 on One Sheet
Style = Mailing Labels
Page is set to the exact label type you bought (most show the Avery Standard equivalent)
Note home many labels on on one page – in the example Avery 5161 has 20 labels
Take it Up a Notch And Add a Graphic
Plain text not fancy enough for you? Let’s add some flair!
- Click on Label
- Click on Set next to Image
Select a Tasteful Graphic
Now Your Labels Have Flair!
I highly recommend that you print a test page and hold it up to a light with the labels behind it to ensure your printer is going to align everything perfectly.
Final Step – Don't Forget to Delete the 19 Duplicate Cards!
Problem to be Solved
You’ve got a great backup of your OSX computer, and you need to get something back from the Library folder, say something in the Application Support subfolder. These instructions will show you how to do unhide the User Library folder on the external drive or even on a second Mac.
Credit goes to Steve Davidson for teaching me how to do this.
Let’s Start with a Remote Mac Because the Syntax is Simpler
On the remote Mac, enable Remote Login (https://www.podfeet.com/blog/how-to-set-up-a-mac-for-remote-login/) and use the ssh command to Secure Shell into the remote Mac. In this example, our local machien name is Podfeet-rMBP, and our remote Mac’s name is Core-i7-4.local.
I have the same user account on both but I used the allison@ the beginning to show you how to enter your user name if it’s different on the other Mac.
What Problem are We Trying to Solve?
If you have a machine that’s got a bad monitor or locked up in some way that you can’t directly control it, you might have some success if you could connect in via the Terminal. In these few quick steps we’ll show you how to set up the target Mac so that you can connect to it over the network using just the Terminal.
Set Up the Target Machine You Want to Control
Open System Preferences and click on Sharing.
Click the Lock to Make Changes
Enter your administrator credentials in the pop up window.
Check the box for remote login. If you want to restrict remote login to a subset of the users of the machine, click on the radio button for Only these users, and then click the Plus button below that window.
Add Users to the Access List
In this example I’ll add allison and then click Select.
Click the Lock to Prevent Further Changes
- Click the lock to prevent changes
- Note at the top it says the name at which your computer can be accessed – write this down! In my case, the name is Core-i7-4.local and be sure to note that this name is case sensitive
On Another Mac Connect to the First Mac
Open a Terminal and type in ssh followed by the name you recorded for the target Mac.
You will be prompted for your password. In this case I only authorized the account allison, so there’s only one option here.
Note that the prompt has changed to Core-i7-4 so we know I’m logged into the target Mac.
From here you can list files, copy files, move files, whatever you can do in the Terminal if you’d been sitting at the target Mac.