Creating encrypted disk image passphrase in Keychain, and strange GUID account When a user persists an encrypted disk (or disk image) passphrase in the Keychain (e.g via Disk Utility as shown here, https://apple.stackexchange.com/a/229309/5392 or when setting up an encrypted Time Machine backup, possibly on a remote device), an entry gets created in either the login (via Disk Utility) or System (for Time Machine) keychains.

Examining such an entry with security provides the following data:

$ security find-generic-password -D "disk image password" -l "A65D7474-F452-51CB-9BCC-3D594C918978.sparsebundle"
keychain: "/Library/Keychains/System.keychain"
version: 256
class: "genp"
attributes:
    0x00000007 <blob>="A65D7474-F452-51CB-9BCC-3D594C918978.sparsebundle"
    0x00000008 <blob>=<NULL>
    "acct"<blob>="17F24503-E0E2-45B9-86EA-C79D857BA2AC"
    "cdat"<timedate>=0x32303137303131303132333130335A00  "20170110123103Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>="disk image password"
    "gena"<blob>=<NULL>
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303137303131303132333130335A00  "20170110123103Z\000"
    "nega"<sint32>=<NULL>
    "prot"<blob>=<NULL>
    "scrp"<sint32>=<NULL>
    "svce"<blob>="A65D7474-F452-51CB-9BCC-3D594C918978.sparsebundle"
    "type"<uint32>=<NULL>

The account's GUID matches none of the users that can be found via:

dscl /Search -list /Users GeneratedUID

The ultimate goal is to non-interactively create the necessary entry in the Keychain for Time Machine to pick up the password and attach an encrypted, size-limited sparsebundle disk image on a Time Capsule, for which this is the missing piece.

Unfortunately diskimages-helper is not allowed to mount it (observed via Console.app) when using the following command to create the entry:

sudo security add-generic-password -a "$username" -w "${passphrase}" -D "disk image password" -s "${sparsebundle}" -T /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper /Library/Keychains/System.keychain

BTW this is on Sierra.

Additional references:

https://sliwinski.com/mac-osx-lion-secure-backup-to-time-capsule-wi/
How do I tell if a disk image (.sparseimage) is encrypted?
https://techanic.net/2012/10/14/programmatically_mounting_encrypted_disk_images_in_os_x.html
http://www.practiceofcode.com/post/749686705/encrypted-rotating-time-machine-backups-on-snow
http://hints.macworld.com/article.php?story=20080519051720677

Getting the UUID:
The account field in the keychain entry corresponds to the UUID of the encrypted disk image which can be retrieved like this:
hdiutil isencrypted example.sparsebundle 2>&1 | grep uuid | cut -f2 -d" "
Note that the hdiutil isencrypted command always prints its output to stderr for some reason which is why we must redirect stderr to stdout (2>&1) before piping it to grep. Alternately, you can use the -plist option and parse the XML if it fits your use case better.

Creating the Keychain item:
For Time Machine to automatically do scheduled backups to a Time Capsule, the disk image password must be stored in the system wide keychain located at /Library/Keychains/System.keychain rather than your password protected user login keychain.
To non-interactively create an entry in the System keychain, you can do:
$ security add-generic-password -D "disk image password" \
-T /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper \
-a `hdiutil isencrypted /path/to/your/TimeMachine.sparsebundle 2>&1 | grep uuid | cut -f2 -d" "` \
-s "TimeMachine.sparsebundle" \
-w $YOUR_PASSPHRASE \
/Library/Keychains/System.keychain

we invoke the uuid command from the previous step in a subshell here to use as the account name.
Security Concerns:
Instead of a password, the System keychain is secured using a key file at /private/var/db/SystemKey. When the system is running, all admin users have permission to access the keychain.
This isn't a security risk per se, but people often forget/overlook when enabling Time Machine that it's for the whole computer and not just their user account. Keep this in mind when choosing your Time Machine password not to use one that's very personal or private to you if you share adminship  (and, obviously, make sure you've enabled FileVault full disk encryption to prevent 3rd party access).
Another concern is that while including your password inline as an argument with -w avoids the interactive password prompt, it is also insecure as it will be saved in plaintext to your shell history (if you don't supress it) and in the output of commands like ps. And because you must specify the System keychain path as the last argument, it is very tricky to non-interactively add an item to the system keychain without exposing the password in this way.
But there is an alternate, albeit more involved solution for adding items to the user login keychain that avoids exposing your password:

Using expect to handle interactive password prompts:
Since you can't pipe the password to security directly, you can instead specify -w as the last option and omit the password. This will make it prompt for a password, and then you can use expect to handle the interactive prompts programmatically - the caveat being you cannot specify which keychain to add the item to, so it will be added to the default login keychain.
I'm not sure if this is within the scope of your question, but just in case, here's a quick and dirty expect script that allows you to non-interactively provide a password to the prompt:
#!/usr/bin/env expect -f

# Get passphrase piped through stdin
fconfigure stdin -blocking false
set PASSPHRASE [read stdin]

# get the uuid of the disk image
set IMAGE_PATH [lindex $argv 0]
spawn bash -c "hdiutil isencrypted $IMAGE_PATH"
expect {
    -re "\[A-F0-9\]{8}(-\[A-F0-9\]{4}){3}-\[A-F0-9\]{12}" { set UUID $expect_out(0,string) }
    -re "hdiutil: isencrypted failed.*" { exit 1 }
    "encrypted: NO" { exit 1 }
}

# add password to keychain
set send_slow {1 .1}
spawn -noecho security add-generic-password -a $UUID -s "[file tail $IMAGE_PATH]" -D "disk image password" -T /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper -w
expect "password data for new item:"
send -s -- "$PASSPHRASE\r"
expect "retype password for new item:"
send -s -- "$PASSPHRASE\r"

expect eof

For example on how to run it, here I save it to a file hdiutilAddToKeychain.exp and pipe it a password from an imaginary function that you can substitute for however you get the password in your workflow:
$ getPassword | ./hdiutilAddToKeychain.exp /path/to/example.sparsebundle
This should create the appropriate item in your login keychain, but the OS may still give you a GUI password prompt to allow access the first time you try to open it. I'm not aware of any way around this first time prompt.
You may also be able to use security's export and import subcommands to copy the password from your login keychain to the System keychain once it's been added this way.


What are current cross-platform disk encryption options? I just got a new 1TB USB SSD, to use as a backup drive. I need cross-platform compatibility and durability. I've used LUKS+ext4, and it seems both reliable and well-established (i.e. long-term support is likely, which is a must for me).

Unfortunately, this seems less than convenient on OS X (there's no open-source ext4 driver, as most people know). My current setup is to have a Debian VM on VirtualBox, set up to intercept the external drive at the USB level (VirtualBox can expose USB devices to guest VMs).

I have this working, and can then SSH into the VM, but it's not the most convenient. If I'm just dumping stuff there via rsync -av -e ssh it's okay, but browsing through files on sshfs is not what I'd call ideal (sshfs is notorious for hanging & refusing to unmount on dropped connections, for example).

Has anyone else tried something like this?

Related: Cross Platform GUI-compatible Encryption (but I don't care about GUIs)

I've done the Linux VM solution like yours for years on multiple platforms. But different, and depending on the specific use case, much better. (I've tried your method as well. Too many problems, particularly with USB passthrough.)

Here's what I do, roughly, using VirtualBox (not a step-by-step guide but should be enough to get you going):

I don't attach the external volume via USB intercept; I create a raw VMDK of the external drive first. This requires some script magic: You have to 1) Make sure VM is powered off. 2) Delete the VMDK metadata file. 3) Detach the virtual storage controller dedicated to the USB drive. 4) Create a new raw VMDK file for the USB drive [this part is challenging since the physical location changes; I use a script parameter to pass it in to the script]. 5) Create a new virtual storage controller for the VM. 6) Attach the raw VMDK to the new storage controller. 7) Start the VM. The drawback to this approach of course, is that the USB drive and the VM are tied together for the entire session of the VM. If you unplug the USB drive while the VM is running, it will never be valid again (until you shut the VM down and run the script again). But the benefits are huge: A) It works flawlessly, unlike buggy USB intercept. And B) The performance is near-native [since the host is handling the low-level device I/O], which you can't get with USB intercept.
I set the VM up with two network adapters: 1) NAT with DHCP for regular internet access from within the VM, and 2) Host-only with static IP for host-to-VM access. You could also just have one bridged adapter, but I've found that this approach is more ideal, as VM internet access is not tied to any one adapter.
I set the VM up to share folders via SMB. In my case, these are encfs mounted folders.
I then mount folders on the host, mapped via SMB to the guest.

The performance is pretty decent. SMB over gigabit ethernet between real hardware has a theoretical maximum of something like 120 MB/s (there is a specific number max but that's close enough for this discussion). You probably won't get that high in host-to-vm SMB traffic, even using virtio adapter with no bandwidth limit. On my fastest hardware, I've seen at best around 70 MB/s sustained. But my hardware isn't super fast, you might do better. (Although the USB and spinning disk in your solution will be the limiting factors.)

I would not bother with sshfs. The overhead is severe and throughput terrible. The only benefit to sshfs is when mounting over an unsecured network. Host-to-vm exists completely within your own computer and is therefore as secure as it gets, you don't need encryption, and the lightest-weight network protocol you can get is ideal. (SMB isn't exactly lightweight but it and virtually all hosts support all the remote file actions you could need.)

The solution I've outlined seems complex - and is. But if you document the successful process, it's trivially easy the second time. I have all this scripted in both the host and VM, so it's nearly automagic for every session, and easily set up for new hosts and/or VMs. And it's a very nice and seamless solution for daily use.

Hope this helps.


Disk Utility will not let me create new partition I am attempting to create a new partition from a 3TB Fusion Drive on Mavericks, but Disk Utility won't allow it. I successfully created a partition from the same drive last month, so I am not sure why it won't allow me to create another one. Does this have something to do with the Fusion Drive? Is there a workaround?

Thank you.

It looks like you partition the whole drive to be the Mac drive.

To undo that and create multiple partitions follow following procedure.

How to Partition A Fusion Drive
Last updated January 10, 2013

See Controlled Fusion: Partitioning for Targeted Performance.

Shown below are two partitions of the Fusion drive in Disk Utility.

To partition a Fusion drive:

Backup your stuff (two backups strongly recommended).
Boot off any working drive (e.g. one of your backup clones).
Erase the Fusion drive (because your stuff might not fit on a downsize partition).
In the Partition tab, click the + button.
Drag the slider between the partitions to size as desired.
Set a name for the 2nd partition.
Apply.
Clone your system back to the new Boot volume (if too large, move some items first to the new 2nd volume).
Copy your other data (data not going onto the Boot volume) onto the 2nd volume.
Set the startup volume to the new Boot volume, reboot.


Can iBeacon range/region monitoring trigger "dynamic"/data-based notification? Can an iBeacon range and/or region event (for an iOS app that is not running in the foreground) somehow have a "dynamic" notification send to that iOS device (i.e. a notification text that is not hard coded in the app but rather comes from a server)?

An example use case that everyone can relate to is that your local super market implements beacons and that as you walk pass the milk section you get a notification saying "Milk half price for the next half hour" (because the "use-by" date is near).

I know I can do local notification with static text (i.e. "welcome to the store") but unsure if I can so something more dynamic.

Yes, beacons with their proximity detection capabilities can directly push content in the form of notifications to the lock screen, thus allowing consumers to interact with apps without having to open one.

You can use features like cards, rules, webhooks for creating such notifications.

With Cards (Cards are small pieces of content - text, photo, video or audio - that are
to be shown based on the campaign rules), you can edit the kind of content you would want on the screen as a notification.
Rules allow you to define a set of conditions that must be satisfied in the proximity of a beacon, for actions to be performed inside the app.
Webhooks are "user defined HTTP, URI callbacks". They are usually triggered by some event and when that event occurs, the source app makes an http request to the uri configured for the webhook.

Probably the dynamic variable you are referring to here is the RSSI value of the beacon frequency which increases when you reach a beacon. Couple that with UUID-Major-Minor and you can do custom data based notifications.

You can also use various SDKs that have already incorporated these features, through something called camp-on's on a beacon and cannot only do local notifications but also call webhooks among other things, as a reference on Github.
If you are interested in learning more about how to go about building a beacon-enabled app right from scratch,  join the Online iBeacon App Development Course: Build a Beacon-enabled iOS App. It will help gain insights on location-based services and also understand terminologies like beacon ranging, background monitoring and much more.


Does the early 2014 MacBook Air use Thunderbolt 1 or Thunderbolt 2? I am considering purchasing a new MacBook Air (early 2014 edition). I'd like to drive two external monitors from the laptop.

Based on my reading the 2013 Air only supported Thunderbolt 1 and therefore DisplayPort 1.1. With the semi-model-refresh that occurred in early 2014 was the Thunderbolt controller updated to version 2 and therefore DisplayPort 1.2?

No, The Early 2014 MacBook Air has Thunderbolt 1 and therefore DisplayPort 1.1.

Source : Apple Support Page


Lost all previous notes after upgrade to El Capitan I upgraded my MacBook Pro to El Capitan (MacBook Pro, Late 2011, 16GB RAM) and the Notes app is gone! All the notes for 3 years and the App. I've spent hours on the phone with Apple techs, but it is still not resolved. Does anyone here have an answer?

My machine now freezes often. It is causing issues with corrupted files and continuity.

Here's how to recover all our notes:

Open the terminal. We find it in Applications -> Utilities -> Terminal, or simply by searching in Spotlight.
Entered the terminal, let's move to the folder where the files where there are our notes by typing cd ~ / Library / Containers / com.apple.Notes / Data / Library / Notes / followed by pressing the enter key on the keyboard.
We initiate the SQLite command shell by typing sqlite3 and pressing the enter key. At this point we find ourselves on the message screen sqlite> . Great, we are prompt in the program.
We type .open NotesV6.storedata pigiamo and the enter key of the keyboard. It should not happen anything, but everything is normal.
We type select ZHTMLSTRING from ZNOTEBODY; therefore sending. At this point you should be displayed several lines of html code containing inside all our notes.
By scrolling through the results on the screen, select all lines of code that are present from the tag  to    and clicking the right mouse button on the selection, then choose Copy.
We type .Quit to exit the SQLite shell and close the terminal.
Paste the text you just copied into TextEdit and save the file in web page format (.html).
At this point, opening the .html file you just created, we will meet within it all our dear old notes that were lost.

-- Directions retrieved from here: http://www.maccanismi.it/2015/10/06/problema-risolto-note-scomparse-da-os-x-el-capitan/

I had some trouble after copy and pasting to text edit and then saving as html. What I had pasted was html content inside of html. So when I opened the newly saved html file in chrome, it just displayed the html code. Just copy and paste the information in the webpage to a new text edit document and save as html again. Now you can open it in and it will render correctly.


Location of Account/ Login picture on Mac OS X 10.12 Sierra I used this solution -

sudo dscl . -read /Users/$USER JPEGPhoto | tail -1 | xxd -r -p > ~/Desktop/$USER.jpg

Is there any other better way to locate the filesystem storage location for this picture?

There is a terminal command that will print the path of the desktop picture on the picture itself. Using the terminal enter the following command:

defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE;killall Dock

Your desktop picture should now show the directory path to its location. When you get the location of the image you can turn this off by typing:

defaults delete com.apple.dock desktop-picture-show-debug-text;killall Dock


Can I have different audio come out of my computer and monitor? I previously had my monitor set up through a VGA cable and I was able to play music through an audio jack on my monitor — All while listening to something else through my headphones plugged into my computer. Now that I switched from VGA to HDMI, it doesn't seem to do the same thing.

Is this possible with an HDMI cable? Or is this only a VGA thing?

HDMI (unlike VGA) combines audio and visual in a single cable — VGA just does visual.

Your monitor was using the audio jack as an input, and playing sound from the source connected there (music player, etc.). Your computer was using its audio jack as an output, playing music to your headphones.

Now that you have an HDMI cable, your monitor most likely uses its audio jack as output, because it already has an input for sound — the HDMI cable. My guess would be that if you plugged in headphones to your monitor, you would hear the sound coming from your computer.

There is a way to have the monitor and computer speakers play the same output (Audio MIDI Setup), but I don't think you have have two different outputs.


Is it safe to upgrade iPhone 5C to iOS 9? I want to do it before iOS 10 launches and it becomes impossible to use 9. But I'm skeptical given the low-config nature of 5C.

Are there any known performance degradation in 5C if iOS is upgraded to 9 from 8? So far it is working good with 8 and I don't wanna ruin it. The usage is very basic, I have bought it for my Mom.

And, is it really necessary to upgrade? I mean, is it possible that some apps might not work in future because I have not upgraded?

Thanks in advance.

The iPhone 5C will run iOS 9 fine, as iOS 9 requires no greater hardware than iOS 8. My inferior iPod Touch 5th gen (comparable to an iPhone 4S, two years older than the 5C) became slow upon upgrading to iOS 8 but didn't get any slower when upgrading to iOS 9.

As always, do a backup before upgrading.


How to restore Yosemite finder sidebar icons after changing folders with symlinks After I installed on my mac a second drive I figured out it was a good idea to use the old HD for storage. So I symlinked ~/Downloads, ~/Documents, ~/Music, ~/Pictures and ~/Movies in order for them to be actually located in the old HD, while I'm using the new SSD as a startup disk.
Everything works remarkably ok, except, now the icons in the finder sidebar for those folders are the default ones:

Even though in the finder preference the icons are ok:

I already tried this answer but I was only able to restore both the actual folder icons, but not the icons in the sidebar!

It might be the case that, unfortunately, you can't do this.  See this answer:
How come Dropbox gets an icon in Finder sidebar?

and this one:
https://stackoverflow.com/questions/8380562/adding-buttons-to-finder-toolbar


How to change a PDF's title? (not file name) My question is in reference to the title shown in Acrobat Reader's tab and title bar that reads "Modern business letter."

I generated the PDF from a .docx document, and the document is generated based on a LibreOffice template (.odt) named "Modern business letter", which is where the title name comes from.

I know how to change the template name in LibreOffice, but that can cause unwanted error if I forget to change it the next time I use the same template. Im looking for other macOS options so I don’t have to struggle in LibreOffice.

How do I change the individual PDF title, either in Acrobat Reader or in Finder?

To answer the question you asked, "How do I change the individual PDF title, either in Acrobat Reader or in Finder?", you can't. Neither Acrobat Reader or Finder, by default and natively, have the capability to edit that information. It needs to be done before being exported/printed to PDF or use an app capable of editing PDF Documents.
The industry standard is Adobe Acrobat however it's an expensive app and overkill if looking to just edit that information.

If you have exiftool installed and want to do it from the command line in Terminal, use the following syntax:
exiftool -Title="New Title" /path/to/filename.pdf

To clear the Title, just use: -Title=""
Other meta-data can be changed in a similar fashion.


How to disable animations on iPhone? iPhone has many miscellaneous  animations. For example, there is a “maximize window” animation whenever we open an app, and a “minimise window” animation whenever we close an app.

On Android, we can opt to disable animations via Settings → Display → Animations → No animations.

How do we turn off animations on iPhone?

Since iOS7 there are a couple of options for reducing animations and other UI effects such as translucency:

Settings > General < Accessibility > Increase Contrast: On/Off and

Settings > General < Accessibility > Reduce Motion: On/Off


Are there any GPS recording applications for the iPhone? I was wondering if there was an iPhone application that would continuously read the GPS location and save it for later analysis. For example, I would like to be able to tell where I was at certain point of time, or how long did it take me to travel from one place to another.
Is there such an app?

There are a ton of 'em; Cyclemeter, Strava, MotionX, and many, many, others to name a few.

Most have an export option that'll spew out a gpx file (or one of a different format) that you can then do whatever you want with.

(I personally use Cyclemeter for recording and sharing bike rides -- there are many others that are more customized to other kinds of activity)


Will Adobe CS5 with Java SE 6 runtime work on 10.11 El Capitan? I am running OS X 10.10 Yosemite which happily runs my Adobe CS 5.0.  When I upgraded from 10.8 to 10.10, I had to install Java SE 6 runtime.

In parallel, I also run the latest Java, with browsers set to ask before running it. All seems to work ok.

If I upgrade to OS X 10.11 El Capitan, is Adobe CS 5 likely to continue working?

(I totally depend on my legit copy of CS 5, and I don't have the revenue stream to support ongoing Creative Cloud membership.)

Yes, you will need to install the Java version from https://support.apple.com/kb/DL1572?locale=en_US

From that link:

"Java for OS X 2015-001 installs the legacy Java 6 runtime for OS X 10.11 El Capitan, OS X 10.10 Yosemite, OS X 10.9 Mavericks, OS X 10.8 Mountain Lion, and OS X 10.7 Lion.

This package is exclusively intended for support of legacy software and installs the same deprecated version of Java 6 included in the 2014-001 and 2013-005 releases.

Quit any Java applications before installing this update."

After installing and restarting you can use the Java preferences pane in System Preferences to control which Java version you would like to use.


How do I reorganize windows in Exposé? Under Snow Leopard, sometimes a strange behaviour occurs in Exposé. I swipe four fingers down to activate it, optionally hover over another window, and swipe four fingers (I believe) again. Instead of closing exposé, the order of two windows change, with an animation.

I can't, for the life of me, figure out what I am doing to trigger this.

Any ideas?

The trackpad is not registering that second swipe as a four finger swipe.  Rather it is seeing it as a click-drag, and the machine believes you intend to reorder the windows.


Is a Macbook pro not able to use dual screen on the integrated graphics card? I have a MBP early 2011 model and when running on the integrated GPU I'm unable to dual screen. The screen is a VGA monitor running at 1400 x 900 yet it won't display so do I always have to switch to my AMD GPU to run dual screens? I'm running gfxCardStatus to switch between them and i'm just trying to save power.

No, it does not. You need the discrete GPU to run an external display.

Funny though, because the integrated GPU's of the MacBook Air can power up to a 27" thunderbolt display. But that's how Apple rolls.


Upgrade from 10.5.8 to Mountain Lion Is it possible for me with a 2007 iMac running Leopard (2.16 Ghz Intel 2 Duo and 2 GB 667 MHz DDR2 SDRAM) to upgrade to Mountain Lion? If not, is there any later version I can upgrade to? If I can upgrade to Mountain Lion, do I need to install an earlier version first? And if so, how do I do this?

Edit
As pointed out by Kent, an iMac with a 2.16 Ghz Intel 2 Duo seems to be like an iMac (Late 2006) instead of an iMac (Mid 2007).
Technical Specs for iMac (Late 2006)
Technical Specs for iMac (Late 2007)
Therefore, you can only run Lion. Unfortunately, finding a legitimate copy of Lion could be a little tricky if you haven’t already purchased it. If you search for OS X Lion in the Mac App Store you’ll only find Mountain Lion, and Apple no longer sells an OS X Lion USB Thumb Drive (part number MD256Z/A) in its online store.
One of your options is to buy from Amazon or another online retailer.
Or, get Snow Leopard.
Original Post
You have to install Snow Leopard first and then Mountain Lion.
OS X Mountain Lion system requirements
To install Mountain Lion, you need one of these Macs:
**iMac (Mid 2007 or newer)** (Yours)
MacBook (Late 2008 Aluminum, or Early 2009 or newer)
MacBook Pro (Mid/Late 2007 or newer)
MacBook Air (Late 2008 or newer)
Mac mini (Early 2009 or newer)
Mac Pro (Early 2008 or newer)
Xserve (Early 2009)

Your Mac needs:
OS X v10.6.8 or OS X Lion already installed
2 GB or more of memory
8 GB or more of available space

Your model must have a 64-bit EFI boot ROM.
An easy way to tell if you are running a K64 kernel is to use the uname command-line program. The "x86_64" in the excerpt below means that we are running a 64-bit kernel. If the output showed "i386" instead, that would mean a 32-bit kernel.
uname -a Darwin... root:xnu-1456.1.25~1/RELEASE_X86_64 x86_64
Therefore, you need to upgrade to Snow Leopard first.
Other Things
AirDrop and AirPlay will not work on your computer.
Sources
http://support.apple.com/kb/HT5444

Alternate Way
It is possible, but not necessarily legal, to install Mountain Lion over Leopard.
You can look at this.


Why is my iPhone 6 wireless working on b/g mode? My router is AirPort Time Capsule which supports wireless ac. My iPhone is an iPhone 6 that also supports ac mode.

I was looking at data in AirPort Utility and for my phone it was showing it is on mode 802.11 b/g which I think is old and slow but my iPad 3 was on 802.11 a/n mode.

Does that mean there is something wrong with my iPhone wireless?

Most routers/AP will step down to b/g when there is a device on the network that does not support N or AC. Often this is a printer, or Roku or something you have on the network. Examine all the clients and devices to determine which are causing the router to step down, and either reconfigure, upgrade or eliminate them. Also, there may be an outside device on your wireless network causing similar issues.

Alternatively, you can configure your Airport to work in N mode only. Open the Airport Utility, select Wi-fi Settings, Radio Mode and change the mode for 2.4GHz. This is also a good way to see what devices might be incompatible with the faster speeds your router supports.


Why does =$0 appear in Safari web inspector? I've been wondering about this for a while. Why does =$0 appears next to elements in the web inspector in Safari? I am using Safari 9.0.1

Here is a picture of what I'm talking about

(larger):

Or if you prefer the version to read:

<div style="height: 100px; width: 2px; background-color: rgb(255,196,122); transform: rotate(-60deg); bottom: 10px; right: 80x;"> = $0

More than likely, you've used the Inspection Tool and have an element highlighted.

  The $0–$4 variables contain the current and previous selected nodes from the Elements Tree Hierarchy.

source: https://webkit.org/blog/829/web-inspector-updates/

  Chrome, Firefox, Opera, Safari - If you have an element currently selected in your "Elements" tab, you can use the reference $0 to call it within your code. For example, to see the elements' contents you would type $0.innerHTML. In Chrome and Safari, you can call the console from any of the other tabs by pressing "Escape" so you don't have to keep switching.

source: http://www.andismith.com/blog/2011/11/25-dev-tool-secrets/


Export Data From Couple Messaging App My girlfriend and I have been using the Couple messaging app [0] to keep in touch. It has lots of texts and photos going back to the start of our relationship. They are valuable memories, but there is no way to export them.

The iOS App Store says that app hasn't been updated since 2014, and my emails to Couple are going unanswered. Their blog [1] says that they sold out to Life360, but they are also not answering my emails.

So I was wondering if anyone could help me to export my texts and photos from Couple. They have both a mobile phone app and a web app.

[0] https://couple.me/

[1] http://blog.couple.me/2016/02/12/new-home-couple/

I'm leaving the Couple app for the same reason. It's a shame. I was a huge advocate for it over the past few years.

Good news. I found a way to get all your messages.

Visit https://app.couple.me/ and log in.
Open a separate tab and visit https://app.couple.me/1/p/timeline (this may take a while to load depending on how many messages you have).

This API is how it fetches your messages while you're scrolling (but it batches it by 55 messages at a time).
Let me know if this URL doesn't work. I don't believe it's user-specific (but the number 1 can seemingly be interchanged with numbers between 1 and 31). If you want to try and find it yourself, open up the Network Inspector in Chrome and scroll until a batch of messages has to be fetched. There should be a url with the word 'timeline' in it that shows up (you'll need to strip off anything passed 'timeline' from the url to get all of your messages).

You should now have a JSON representation of all of your messages.

i.e. A lot should look like this

{
    "eventType": "text",
    "text": "A cat?",
    "pairingID": [redacted by me],
    "timeStamp": 1345602786515,
    "itemID": "[redacted by me]",
    "lID": "[redacted by me]",
    "from": "yourcouplepartnersemailaddress@gmail.com"
}

Event types of 'text' allow you to see the texts you've written. Event types of 'image' have an image url you can download.

From the File menu, select 'Save Page As...' and save the file (onto your desktop and name it couple_backup.json if you want to use the tip below).
That's it!

I'm not sure how comfortable your are with the JSON format. But all the data is there for the pickin'. In case you're not super comfortable, here's a way to get the JSON to be slightly more readable (only will work on a Mac):

Open the Terminal app.
Paste cat ~/Desktop/couple_backup.json | python -m json.tool > ~/Desktop/formatted_couple_backup.json into a Terminal window and hit Enter.

This should format the JSON to make it more readable and save that to a file named formatted_couple_backup.json on your Desktop

Maybe I'll create a Couple Exporter app one day to help people like us that could go through and automatically download all the images or something. This can work for now.


Is it possible to give/remove permissions to/from apps via the command line? Logi Options seems to forget it has Input Monitoring and Accessibility permissions frequently, so I have to go in and remove the permissions and add them back to get the scroll wheel on my MX Anywhere 2s mouse to work again.  I'd like to automate that process.  Is there some way to interact with the Catalina permissions via the command line (via sudo of course)?

The short answer is no - these are designed by Apple to be user granted, at the last moment, when you decide you wish to cede control to an app as opposed to pre-cleared and scripted. The better fix is to sort out why that App keeps changing or your OS is dropping the entitlements - you should be able to set it once.
It’s pretty easy to read the database to see what settings have been configured, not designed to change the settings directly via shell. (If you find a way, it might be worth $$ to report that to Apple - https://developer.apple.com/security-bounty/)
A longer answer is, kind-of - if you have MDM, and set up a framework, supervise the device (or opt in to the MDM automating these settings) and then craft configuration profiles that once signed and trusted, can be installed by script.
To get started on this takes quite a bit of time. Here’s a 30+ minute video that covers the basics and two pretty substantial web pages by Apple documenting the overall ideas and sample implementations.

https://www.jamf.com/resources/videos/a-rose-by-any-other-name-pppc-tcc-user-data-protection-and-you/ (The slide notes are very good to skim before you watch the video)
https://support.apple.com/en-ca/guide/mdm/mdmbf9e668/web
https://support.apple.com/guide/deployment-reference-macos/welcome/web (for reference once you’ve gotten the majority of the items in the previous two links sorted out)


missing unicode character I am searching the Unicode character &#x23FB in Apple's character table. I cannot find it, even though it has been introduced in Unicode 9. I seached the whole unicode tables on the mac.

The character looks like the power button on the Mac. When I copy it from the web, it is being replaced by a question mark.

Any ideas on how to use this? I thought unicode was accessible on all devices.

To use any unicode character not provided by Apple in MacOS/iOS, you just have to install a font which does include it.  This page gives you a couple.


Music missing from storage management I am trying to purge the stored music on my iPhone 5s after canceling my Match subscription.

I've gone to "Settings > General > Usage > Manage Storage > Music" to do so and I simply cannot find Music. Other Apple apps are showing such as Podcasts and iBooks.

I've tried:

Closing and reopening Settings
Closing and reopening Music
Shuffeling about "Show All Music" plus the above.
Restarting the phone + above.

At a loss at what to do and would rather avoid a full reset of the device if possible.

Running IOS 8.3 Build 12F70 (current latest via OTA not a dev build)

Make sure that there is no spinning wheel on top of the "Manage Storage" settings for if there is such a wheel, it indicates the loading of extra elements i.e. Music, Photos, etc. If you have lot's of Music i.e. above 4 or 5 GB, it could take time for the "Manage Storage" settings to bring the Music element on top.

As a last resort, you can simply sync an empty iTunes library with your iPhone and iTunes would do what it does best - it will wipe out the iPhone music library in no time. If you wonder how to open an empty iTunes library on your computer, see this: https://support.apple.com/en-us/HT201596


How do I change the name others see for me in iOS Game Center? I discovered that when you create your Game Center account, it will use the name on the credit card associated with your Apple ID.

Changing the name in Game Center application does not update your visible name for the other users. What sequence of steps is needed to get my new name displayed on devices that had friended me before I changed my display name?

Have you tried contacting your credit card provider?

Seriously, Apple's intention is that iOS Game Center friends are meant for "real" friends—rather than "Facebook friends"—so exposing your real name is not a threat. If you look at the issue this way, it feels more of a security enhancement than a threat. You can be sure the friend you are friending is actually the person you believe them to be.

Moreover, if you are underaged and can't attach your own credit card with your Apple ID, it is, in contrast, more secure to have the user's (kiddie's) name obfuscated.

Finally some legalese from the Game Center TOS:

  The full name associated with your Apple ID will also be shared with those users to whom you send, or from whom you accept, a friend request, such as in the Friends list, the Friends leaderboards, and the pending friends requests lists; and we may recommend games that you have played to your friends. If you prefer not to share your full name or profile with friends, you should remove that friend by tapping the “Unfriend” button at the bottom of that friend’s screen in Game Center.

For each friend's account you need to force an update, you should unfriend them and then establish the friend relationship again.


Getting AppleScript function to pass string correctly Someone please help me here and show me how to get this to work. I've checked examples on returning values from functions with this AppleScript, but something I am missing here.
I'm trying to get the function, strTest(), to pass a string that will then be printed to the BBEdit editor. If I were to replace the variable with a static string, that works. But this isn't working at all. I'm getting: "The variable theText is not defined."
Does anybody see what's going on?
on strTest()
    set returntest to "this is a test"
    return returntest
end strTest

tell application "BBEdit"
    set theText to strTest()
    tell window 1
        set insertionP to get selection
        set text of insertionP to (theText & (text of insertionP))
    end tell
end tell

If you are going to call a handler from within an application's tell block, use the my reserved word in front of the handler, e.g.:
set theText to my strTest()


Can't find public network if here's an other, password protected one I've got a weird problem with my 2019 MBP: it is not able to scan/recognize a public network XYZ, if there's also an other XYZ network that is password protected.

Practical example: when I go to a Starbucks, I know there are two networks:

a public Starbucks, where clients can connect
a WPA2 protected Starbucks network (used most likely by its employees?)

now, with both my Samsung smartphone and my work laptop, I can see both networks, and I'm able to connect to the public Starbucks one.

My MPB however isn't able at all to find Starbuck's public wifi, and only shows up the password protected one.

What should I do to fix this odd issue?

Well, as a workaround, I went to Network preferences -> Advanced , then clicked on the + button and added a new wifi hotspot named Starbucks, without security.
Clicked Ok, then Apply et voilà, MPB connected..


If I delete a paid app purchased through the Mac App Store, can I redownload without paying? If I delete an app purchased through the Mac App Store, can I download it again without paying for it again like I can with iOS? In the event of an app restore, does the app retain settings, saved progress, etc from the previous installation?

Yes. Just go to the "Purchases" tab and click "Install" by the app you wish to reinstall:

Well-behaved apps should retain settings, etc upon reinstall, as merely deleting the app from /Applications is not sufficient to remove that information from your system. This may not be the case if an app cleaner is used.


Time Capsule will not connect to the internet or back up All lights are green except for internet and server.  I can not connect to the internet.  Things were fine until after my first back up.

I would start with the Airport Quick Assist and see which steps fail you.

http://support.apple.com/kb/HT1145

You can leave this question a general. "How do I start to troubleshoot my device" or edit it to list the steps you took and the specific error conditions. I'd be inclined to start a new question once you have more details and have narrowed down the issue.


Other than MacBook Pro, do all other Apple laptops use the butterfly keyboard? Just wondering which MacBook is worth getting?  The new MacBook pro looks too bulky to me and I'm also not a fan of the price tag either.

While shopping, I just wanted to confirm two things which I found shocking:

Is MacBook pro the only current Apple laptop I can buy right now with the scissor key mechanism?

No, only the 16 inch MacBook Pro has scissor keys as of December 2019. Yes, all the rest have previous design / butterfly keys.

You can see the major releases and dates when the manuals for each model at https://support.apple.com/manuals/macnotebooks


How do I configure Camera and Microphone permission on macOS Mojave? I'm using macOS Mojave and it's preventing me from using my camera and microphone in web browsers like Firefox and Chrome, and in other applications too. How do I properly set up permissions so that my camera and microphone work in all of my apps?

Starting with macOS Mojave, Apple has added new permissions to macOS that need to be granted before an application can use the Camera or Microphone. This affects all kind of calling software, and also affects web browsers that you might use for joining online meetings.

Security & Privacy in System Preferences

You can manage permissions for Camera and Microphone in the System Preferences. However, it doesn't work quite how you would expect! By default the list is empty, as shown below. None of your installed applications are shown in the list, and there is no + button that you could use to add an app. You can't even drag an app into this list.

The Prompt

In order to get an app to show up in this list, you first need to launch the app and activate some functionality inside the app that uses the Camera and Microphone.

If you're using QuickTime Player, open the File menu and choose New Movie Recording.
If you're using Mozilla Firefox or Google Chrome, the fastest way to do this is by visiting screenapp.io (no affiliation, it just works well).
If you're using Safari, go to Google Hangouts and start a new Video Call.
If you are using Slack (paid version only):

Create a new private channel with only yourself as a member
Click the telephone icon
Press the "Share your screen" button in the call window

You'll see a prompt like "QuickTime Player" would like to access the microphone. Make sure to click OK because you'll only be asked once.

If you aren't presented with this prompt, first ensure that System Integrity Protection (SIP) is enabled on your Mac. To check, you can run csrutil status and it should say System Integrity Protection status: enabled. If SIP is enabled and the prompt still doesn't appear, you'll have to reset your privacy settings for Camera or Microphone using tccutil.

Once you've passed these prompts for camera and microphone, you should be able to use both devices in the current application. The setting is permanent, but only for one application at a time. If you want to use your camera or microphone in a different application, you'll need to authorize it again using the same procedure.


Looking for iCloud note-taking app I am looking for a note taking app with white text on a black background that works with iCloud. Apps for Mac and/or iOS will work. Any recommendation?

You should expand your requirement to iCloud and Dropbox for following reasons.

iCloud is sandboxed to only certain apps. In other words, any notes an app X creates cannot be read and modified by app Y. Dropbox allows any apps that supports Dropbox to access your notes. You may like app X now but you may want app Y later.
iCloud syncing can be useful if you have multiple iOS devices, for things like settings and miscellaneous data (e.g., scratchpad).

I have tried over a dozen note taking apps that syncs over the cloud. The app that I keep going back to is Elements (http://www.secondgearsoftware.com/elements/). It has very clean yet functional UI and frigging fast.

I do have few wish list items though: (1) tagging and/or support for moving notes to different folder, (2) hide certain Dropbox folders (I linked to the root folder), (3) default font setting (Museo Sans is very pleasant but may not be for everyone), and (4) Markdown keyboard (it fully supports Markdown but I don't remember all the syntax).


Photos App & faces sync I am using the new Photos App (Yosemite). Everything is synchronised (iCloud) but the faces.

Is this a feature or a bug?

Smart folders — including Faces — on the Mac are (for now) local only. Not only will Faces not sync with iPads or iPhones, they won't sync with other Macs either.


MacBook Pro with retina display external monitor connections Is it possible to connect two external monitors to a Retina MacBook Pro without using Thunderbolt displays?

For example, one connected with HDMI and another using Apple's DVI connector and also use the screen on the laptop.

Yes, that should definitely be possible, as both Thunderbolt ports are also mini DisplayPort ports and the other would be connected via HDMI.

See also this answer: https://apple.stackexchange.com/a/54306/14994


How do you hide the subject field of iMessages on OS X? Is there a way to hide the subject field of messages which appear in the top right corner of the screen when I receive an iMessage on my computer? I know there is a way to hide it on messages that come to my iPhone. Is there a way to do the same on Mac OS X?

I'm not sure what you mean for sure, but take a look under System Preferences → Notifications as you might find your answer here.


Time Machine Full, But Only One Backup (or, what are .RecoverySets and why do they take up so much space?) Something crazy is going on with Time Machine. I upgraded to Mavericks yesterday with no issues. After performing a final backup on Mountain Lion, I disconnected my backup drive out of an abundance of caution, just in case I wanted to use it to roll back to 10.8. I plugged it back in today and let it do its thing, and got an out of space warning. I wasn't too worried about this, since I had been getting these previously (in the past, TM didn't do the best job estimating the space required and removing old backups).

Upon investigation, I discovered that only the most recent backup (from before the upgrade) was available. I double checked this in Finder and Terminal to confirm, and it appears correct. The Time Machine preferences showed the last backup as October 6, which seemed a bit more reasonable, but I saw no evidence of those files actually existing. The only sure thing I could determine was that something was taking up a lot of my backup volume — out of a ~750 GB volume, only 50 GB was free (Time Machine is estimating 154 GB needed, although only ~140 GB are used on my boot drive).

After further digging, I discovered what was taking up all the space. The hidden .RecoverySets folder, within the Backups.backupdb folder on my Time Machine volume. In it are more than 1,200 sequentially numbered folders, each with a com.apple.recovery.boot subfolder, containing a 419 MB BaseSystem.dmg file. Based on the md5 hashes, these dmg files are all identical, and in total add up to nearly 600 GB (or, the vast majority of the space on my Time Machine volume).

tl;dr

Missing Time Machine backups after 10.9 upgrade. Don't appear in Finder or Terminal.
Lots of folders in Backups.backupdb/.RecoverySets taking up the majority of space on my TM drive.

Additional Info

2012 iMac running 10.9 (release build, no developer previews), upgraded from 10.8 via standard App Store install.
Time Machine drive is an encrypted volume, with another volume on the same drive used by SuperDuper (which appears to be unaffected).

Questions

Are my old backups completely gone? (I'm thinking yes.)
What are the folders within the .RecoverySets folder, why have they been gobbling up space, and what can I do to prevent it in the future?
What do you suggest I do now for Time Machine backups? I'm leaning towards scrapping it altogether and starting fresh, but I am concerned about running into this issue again.

I'm not terribly concerned about the data loss at the moment — I have two other separate backups — but I do want to ensure the integrity of my backups in the future. Any info you can provide would be appreciated.

Okay, so I can't fully answer this issue but I'll share what I've found out:

Yes. Unfortunately Time Machine has deleted these, so anything unique that was in the past backups is gone for good.
The contents of .RecoverySets are copies of your Recovery HD. Ordinarily Time Machine shouldn't have more than one of these but, like you, I found the folder contained nearly a thousand identical sets. My best guess is that there is something wrong with my recovery partition that is causing Time Machine to think it has been changed, but that doesn't explain why Time Machine is creating so many copies without discarding any. I've filed a bug report with Apple, and I suggest anyone who encounters the same error does the same.
You can workaround this issue with a bit of light Terminal work:

First type cd /Volumes/{Time Machine Backup}/Backups.backupdb, replacing the part in brackets with the name of your backup volume before hitting return.
Next type sudo rm -fr .RecoverySets and hit return, you'll be asked for your password so that the command can delete your existing recovery sets.
Now run a Time Machine backup as normal using the menubar menu or by entering tmutil startbackup in Terminal and hitting return again. Wait till the backup is finished, as this will recreate your .RecoverySets folder.
Now type sudo chflags simmutable .RecoverySets and hit return, entering your password again if prompted. This will lock the folder (though it may not show this in the Finder), preventing Time Machine from creating any duplicate recovery sets in future.

The above workaround has a few caveats; firstly you won't gain any new recovery sets, but that's unlikely to be an issue, but if you're worried your set may be outdated you can unlock the folder using sudo chflags nosimmutable .RecoverySets (after cd'ing to your backup volume), delete your recovery sets, run a Time Machine backup, then re-lock it again.
You may also notice errors in your console to the effect of "Could not backup OS X Recovery to…", but that's to be expected as you locked the target folder, it just means this workaround is doing the trick, so you can safely ignore these.

One further note; after deleting your .RecoverySets folder, you may not immediately see any extra free space in the Finder. The easiest way to do so is to open /Applications/Utilities/Disk Utility.app, unmount your backup volume and then mount it again, and you should see the correct free-space value, or you can just ignore it, as the free space should be there. In my case I freed up a massive 750gb by deleting my recovery sets folder, as I had over a thousand completely identical copies of my recovery partition in there (no wonder I only had 483kb of free space left!).

You may also want to investigate methods of repairing your recovery partition, but I'm not certain of the best way to do this; it couldn't hurt to at least try Disk Utility's first aid repair command.


View EXIF/metadata found in photo? Is it possible to view/dump metadata found in images using Terminal with built-in command line tools? I'm looking for something like exiftool, but native to macOS Mojave. Does such a command/tool exist?

The metadata in the filesystem is exposed from mdls but I don’t recall ever seeing exit data being parsed as that is embedded in the binary portion of the file and not stored as filesystem metadata on APFS or HFS.

Go get exif tool as a stand alone download https://www.sno.phy.queensu.ca/~phil/exiftool/ or you can use https://brew.sh to get exiftool and script extracting the data you want, subsequently saving it as metadata for mdls or spotlight.

There might be a (un)documented way to parse the database files within Photos, but since those are private, I expect they change from version to version or are going to be some work to extract. Maybe an excellent tool like Power Photos could help there parsing the data from Photos libraries: https://www.fatcatsoftware.com/powerphotos/


OS X Safari: Toggle Socks Proxy from command line I need to toggle back and forth between engaging and disengaging a socks proxy within Safari:

  Next open safari and click on "safari" in the top left menu bar to
  open the drop down menu and then click on preferences. You can do the
  same thing by pressing CMD+,. Click on the advanced tab and find
  "Proxies", click "Change Settings". System Preferences should open and
  you can now select "SOCKS Proxy". You should be setup and if you check
  google for your IP it should be masked by the address that you're
  SSH'd into. Note this is system wide and will cover all network
  communications. You can turn this off by unselecting the SOCKS Proxy.

Is it possible to perform this task with a script?  Bonus round: add button or menu item to Safari UI to execute proxy toggle.   Any feedback to clarify question is appreciated.

To turn on SOCKS proxy for the network service called Wi-Fi, run

networksetup -setsocksfirewallproxystate Wi-Fi on

Replace ‘Wi-Fi’ with the name of your network service.
Replace ‘on’ with ‘off’ to turn off the proxy.


Earphone calls instead of next song I've bought Plantronics GO bluetooth earbuds and when I double-click them (next song) it starts calling my last call.

Any thoughts what goes wrong here? plantronics replied that it are my phone settings. What did I miss?

The plus and minus keys are for next and previous song. Double clicking the middle button will start calling the last person in the "recent calls" list.


My bluetooth keyboard keeps losing connection for just a second or two My wireless keyboard keeps losing connectivity for a few seconds but then connects back fine. This happens sporadically so I can't figure out if something particular is causing this. This will happen several times in a row over a short period before connecting and staying connected for several days. My wireless mouse never loses connection. My wireless keyboard is located right in front and slightly below my iMac. I'm running Sierra with the Apple wireless keyboard. Keyboard has new batteries and shows 70% charged.

Go to system preferences, sharing, bluetooth, advanced settings.


Macbook Pro stuck on password sign in I can't log on to my 2011 MacBook Pro. It boots up ok with the chime, then goes to the Apple logo screen, then to the "enter password" screen. There I'm completely stuck as can't get past the log in screen showing my picture and it asking me to put in the password.
It " shakes its head " when I input the password. After a few experiences of this I reset the password using Apple ID but it still doesn't recognise the new password.  Tried rebooting using Cmd R and also tried Cmd S.
If I reboot with Cmd-R it goes straight to Apple logo page then sign in page and the box for the password fills up with dots as if I were typing in a very long password

Just to make this into an actual answer…
It seems very likely, after your last comment which I edited into the question body for you, that you have a stuck key which is auto-repeating as you are trying to type.
I think you may need a repair shop.


Time machine backup is very slow (new TM drive and large amount of data) I have data (mostly photos) on an external WD 2Tb drive (about 930gb)
I have just installed a 3Tb Lacie drive and want to use it as the TM drive to back up the external WD drive and the Mac HD (very little data on this)
While I expected the first back-up to take some time it seems to be running at about 1.2mb sec which seems very slow especially using USB3 etc
At this rate the system estimated 8 days to build the new TM drive
Is this reasonable or is there something I can do to improve the process speed
All comments welcome

I recently added a 4TB external drive to back up my Mac Pro.  I had about 2.4 TB of data in the initial pass of the backup with TM.  It took about 9 hours to complete.  I'm not sure the initial estimate is accurate, but it does take a very long time on the initial pass.  Once that is done though, the incremental updates are very quick.

I think in this case you just have to be patient, and don't pay too much attention to the estimate of completion time.


Can I preview iPhone photos on my MacBook display before actually importing? Background

I just took a ton of photos on my iPhone 6 in order to capture a few good ones (I'm a lousy photographer I suppose).

My MacBook Air has been chronically short of disk space for years (I'm a lousy system manager I suppose).

Question

I'd like to preview images on the large screen of my MacBook one at a time before deciding which to import to my laptop and which to delete on the phone without importing. Is this possible?

Alternately, if I import say a group of photos at a time to my laptop, then delete the ones I don't want, can I simultaneously delete the originals on my iPhone from my MacBook? Does the Photos application have a "double-delete" or "delete here and on IOS device also" feature?

I just want to do this locally using the USB connection, "sans cloude".

There is a slider for the preview images but maxed out they are still only thumbnail size, and the differences I'm looking for require a full screen mode.

Alternately, if I import say a group of photos at a time to my laptop, then delete the ones I don't want, can I simultaneously delete the originals on my iPhone from my MacBook? Does the Photos application have a "double-delete" or "delete here and on IOS device also" feature?

As far as I am aware there is not such a feature unless the photo is in iCloud (guessing it’s not) where the photo would be deleted from all iCloud devices.

I know this doesn’t use USB as you wanted but a alternative is you uploading your photos on your iPhone to an online storage service such as Google Drive which gives you 15 GB free storage (no affiliation), you can then go on to Google Drive on your Mac and view the photos without downloading them and the ones you like you can download straight from there.

I like this method as after you know which ones you like you can download them straight away without importing them again. The only negative is it might take a while to upload all the photos from your iPhone if you have a lot of the, and slow internet.

I have done this several times before.


Need to boot MacBook Pro into USB recovery mode I am trying to help someone recover data from a non-functional MBP (it was dropped).

I have the internal drive mounted in a sled and connected to another MBP via USB. I can boot off of the drive holding the Option key and get the login screen but, as the password is unknown, I need to boot the drive into the external drive's recovery partition, open up the Terminal and execute the resetpassword command.

How can I do this?

You don't need to boot from it to recover data - in fact it's probably far easier if you don't.

If you have the drive mounted from an external USB, you can just Get Info & check 'ignore ownership' - that will work unless the drive is encrypted.

If it is, you need the password.


Can I put my iPhone in quiet mode only for a limited period of time? When going to the movie or attending to a talk, how can I put my iPhone in quiet mode only for a limited period of time, like one hour?

In particular, it is mostly the case that I will forget to disable the quiet mode when the movie / talk is finished and that I would miss calls or notifications.

I tried this by settings, or asking “Siri”, but the answer was that it is not possible. This would be a great feature.

Source
Your best option is to use Do Not Disturb.

There are multiple new limited-time settings for Do Not Disturb in the Control Center, which automatically turn off after the specified time elapses.

For one hour
Until this evening (or afternoon/morning depending on the time - it's generally a few hours)
Until I leave this location
Until this event ends (if you have a timed event set in your calendar)   A single tap on the icon without selecting an option turns
on Do Not Disturb until you tap it again.


How to get list of played pdocasts in Itunes so that I select which to delete? In iTunes, I want to be able to pull up a list of played podcasts from time to time and select some for deletion.

I don't want to auto-delete podcasts marked as played as a) I share the library with my wife and don't want podcasts to disappear if only one of us has listened to them and b) I want to be able to keep some favourites.

I can get the list of played podcasts by setting up a smart playlist of media kind=podcast, but I can't delete them using that list because it is just a playlist.  I can see what I want to delete, but I then have to go back the podcast view and find and delete each one individually, which seems clumsy.

Any ideas?

Billy

Create a smart playlist with the criteria “Media kind is Podcast” and ”Plays is larger than 0”. Looks like this:


Uninstalling Teamviewer Fully I have been trying to remove teamviewer fully becuase of some leftover services trying to run the app (which've already been deleted a long time ago). I do run a find command to see what is left from teamviewer. See below;

> sudo find / -name *teamviewer*
Password:

/Library/LaunchDaemons/com.teamviewer.Helper.plist
/Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist
/Library/PrivilegedHelperTools/com.teamviewer.Helper
/private/var/db/BootCaches/FFFFEEEE-DDDD-CCCC-BBBB-AAAA000000F8/app.com.teamviewer.TeamViewer.playlist
/private/var/db/receipts/com.teamviewer.teamviewer10.bom
/private/var/db/receipts/com.teamviewer.teamviewer10.plist
/private/var/db/receipts/com.teamviewer.teamviewer10Agent.bom
/private/var/db/receipts/com.teamviewer.teamviewer10Agent.plist
/private/var/db/receipts/com.teamviewer.teamviewer10AuthPlugin.bom
/private/var/db/receipts/com.teamviewer.teamviewer10AuthPlugin.plist
/private/var/db/receipts/com.teamviewer.teamviewer10Font.bom
/private/var/db/receipts/com.teamviewer.teamviewer10Font.plist
/private/var/db/receipts/com.teamviewer.teamviewer10Restarter.bom
/private/var/db/receipts/com.teamviewer.teamviewer10Restarter.plist
/private/var/db/receipts/com.teamviewer.teamviewer11.bom
/private/var/db/receipts/com.teamviewer.teamviewer11.plist
/private/var/db/receipts/com.teamviewer.teamviewer11Agent.bom
/private/var/db/receipts/com.teamviewer.teamviewer11Agent.plist
/private/var/db/receipts/com.teamviewer.teamviewer11AuthPlugin.bom
/private/var/db/receipts/com.teamviewer.teamviewer11AuthPlugin.plist
/private/var/db/receipts/com.teamviewer.teamviewer11Font.bom
/private/var/db/receipts/com.teamviewer.teamviewer11Font.plist
/private/var/db/receipts/com.teamviewer.teamviewer11PriviledgedHelper.bom
/private/var/db/receipts/com.teamviewer.teamviewer11PriviledgedHelper.plist
/private/var/db/receipts/com.teamviewer.teamviewer11Restarter.bom
/private/var/db/receipts/com.teamviewer.teamviewer11Restarter.plist
/private/var/db/receipts/com.teamviewer.teamviewer12.bom
/private/var/db/receipts/com.teamviewer.teamviewer12.plist
/private/var/db/receipts/com.teamviewer.teamviewer12Agent.bom
/private/var/db/receipts/com.teamviewer.teamviewer12Agent.plist
/private/var/db/receipts/com.teamviewer.teamviewer12AuthPlugin.bom
/private/var/db/receipts/com.teamviewer.teamviewer12AuthPlugin.plist
/private/var/db/receipts/com.teamviewer.teamviewer12Font.bom
/private/var/db/receipts/com.teamviewer.teamviewer12Font.plist
/private/var/db/receipts/com.teamviewer.teamviewer12PriviledgedHelper.bom
/private/var/db/receipts/com.teamviewer.teamviewer12PriviledgedHelper.plist
/private/var/db/receipts/com.teamviewer.teamviewer12Restarter.bom
/private/var/db/receipts/com.teamviewer.teamviewer12Restarter.plist
/private/var/db/receipts/com.teamviewer.teamviewer9.bom
/private/var/db/receipts/com.teamviewer.teamviewer9.plist
/private/var/db/receipts/com.teamviewer.teamviewer9Agent.bom
/private/var/db/receipts/com.teamviewer.teamviewer9Agent.plist
/private/var/db/receipts/com.teamviewer.teamviewer9Font.bom
/private/var/db/receipts/com.teamviewer.teamviewer9Font.plist
/Users/<username>/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.teamviewer.teamviewer.sfl
/Users/<username>/Library/Application Support/Google/Chrome/Default/Local Storage/https_community.teamviewer.com_0.localstorage
/Users/<username>/Library/Application Support/Google/Chrome/Default/Local Storage/https_community.teamviewer.com_0.localstorage-journal

so the question is is it safe to remove all those files ( I believe so, but still need some experts' help).

If you just want to get rid of the services, removing

/Library/LaunchDaemons/com.teamviewer.Helper.plist
/Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist

is enough.

Otherwise just remove them all.


save or forward texts from an iPod touch Is it possible to save or forward texts from an iPod touch?

This is for a kid who is being bullied by a class-mate, and I want to keep a record of the texts sent.

A rather easy way is to just take screenshots of the offending messages and syncing/mailing them to your computer for future reference.


Predictive text option does not exist on my iPhone 6 The option for Predictive text has never existed in the settings of my iPhone, as shown in many different forums. When I navigate Settings->General->Keyboards to see all the options, after Enable Caps Lock there goes Smart Punctuation.

I tried typing text and pushing longer on the "globe" icon but all I get are my installed keyboards of different languages and options to make it a one-hand keyboard.

How can I enable Predictive text?

I have an iPhone 6, with iOS 11.1.


What are all of the preferences files used by iTunes X and iTunes XI? Excluding anything in the iTunes Library, what and where (or full relative path is fine) are all of externally called files including preference list files etc used by iTunes X 10.6.3? And by iTunes XI 11.2.1?

A comprehensive and exhaustive list of what files these 2 separate versions of iTunes access, excluding the iTunes Library and anything inside the application bundle is what I'm after. If they both use identical external files to store their preferences, all the better. If you can give any short explanation on each file, what is stored there, it is also appreciated.

The purpose of identifying these files is to aid in the understanding of how to go about having both versions of iTunes installed at the same time, so that I can choose (via a switcher script that may shuffle the files in and out of the correct place) which version to load for the purposes of enabling administration of older iOS devices that are no longer supported in the current version of iTunes.

This answer is in two parts. If you're after all the preference files associated with iTunes then the list is relatively short. If you want every file that iTunes accesses then the list is going to be vastly and incredibly long and also very difficult to track down. If you can offer some more context of what reason you're trying to track these down maybe I can help you isolate files related to your needs.

All of iTunes preference files:

File (Primary): com.apple.iTunes.MACHINE_GUID.plist

Located at: /Users/USERNAME/Library/Preferences/ByHost

Files: com.apple.iTunesHelper.plist | com.apple.iTunes.plist | com.apple.iTunes.eq.plist

Located at: /Users/USERNAME/Library/Preferences

Hidden File: .iTunes Preferences.plist

Located at: /Users/USERNAME/Music/iTunes/iTunes Media

All of the settings you set/change in the iTunes application are represented in the two primary preference files. The one in the ByHost folder above and the other main one called com.apple.iTunes.plist above.

Hope that helps.


How can I listen to just part of a single song, or just skip some time? Sometimes I just want to listen to part of a song.

In Youtube I can set start/end times for a particular video.  I'm listening to this song and only want to start at 2:50, and end somewhere else.

This example is a 6 minute song... but I'm sure there are other refrains/etc in pop music that could want this.

If you have access to a Mac, you can right-click the song, then go into Get Info → Options, where you can then set both Start and Stop times.

These preferences will propagate to your iOS devices next time you synchronize them to your iTunes Music Library. If you subscribe to iTunes in the Cloud (via iTunes Match or MUSIC), that will be done over the air.

This is a persistent modification that will apply every time you listen to that song (until you reset the Start and Stop times).


Scanning a QR code into a browser text input? I have a bit of an edge use-case of QR codes. I would like to be able to scan a QR code via a phones camera and have that value pasted into a browser text input.

Is this possible given any current apps or API's?

It is possible if you let's say generate a QR-code that leads to

http://www.yourdomain.com/yourpage.php?inputtext=1234

When the user scans the QR-code he will be sent to http://www.yourdomain.com/yourpage.php and then your page takes the value of inputtext which is 1234 and puts in the input field of your choice.


What is jail breaking Possible Duplicate:
  What are the benefits of iPhone jailbreak?

What is jail breaking? Why do people do it? What is the advantage and disadvantage?

IOS_jailbreaking

  Jailbreaking is a process that allows iPad, iPhone and iPod Touch users to install homebrew applications on their devices by unlocking the operating system and allowing the user root access. Once jailbroken, iPhone users are able to download many extensions and themes previously unavailable through the App Store via unofficial installers such as Cydia, Rock Your Phone and Icy Installer. A jailbroken iPad, iPhone or iPod Touch is still able to use the App Store and iTunes.

It is mostly done to escape the restrictive nature of the App Store. Once you have jailbroken an iPhone you are free to install a lot of software that apple would not normally allow. Such as modifying the lock screen to display useful information, or enabling multitasking on an iPhone 3G.


iPhone photos unidirectional sync? How can I get all new photos/movies added to my iPhone to be auto-downloaded into a specified folder each time I connect the iPhone to my Mac? (without deleting the downloaded photos/movies from the iPhone)

The "Image Capture" and "AutoImporter" apps seem to only be able to download all photos each time, which means that unless I choose the "Delete after import" option, I get many duplicates for each import.

The forum build of DropBox will do that for you. I'm not sure if you can specify exactly what folder (by default it goes in a folder called 'Camera Imports' in your dropbox folder). It will even earn you more space.

http://forums.dropbox.com/topic.php?id=57787&replies=7


This Device isn't Eligible for Requested Build restore error in iTunes So a search around Stack Exchange and days on Google hasn't rendered any solution. You guys are pretty much my last hope short of restoring my Mac, etc.

I'm attempting to restore iOS 4.3.2 on to my iPhone 3GS, currently running said version. The issue occurs on modified and legit firmwares.

Shortly after attempting to do so, I'll get a message: "This Device isn't Eligible for the Requested Build" and the restore fails. Searches show a common theme of people who have modified their Mac hosts file, prohibiting or modifying the Mac's connection to gs.apple.com. Be it a hash or removing the entire entry, neither has any effect on the issue, even following a restart or forced cache flush for the hosts file.

Since it's a system-wide modification, a new user shouldn't have any effect. I've also compared the basic entries to a known-good hosts file and nothing is missing or broken.

Hopefully you've got some answers!

I would take your phone to another computer that works well to restore devices (hopefully that exact device if possible). With so many variables in the restore process, it's nice to be sure it's not a malfunctioning iOS device before reinstalling Mac OS / iTunes.

Once you rule out the device having issues - do run through these two articles (and yes, you may have done most or all the steps). You might want to try forcing your phone into recovery mode. Power it off, plug in USB to power or a computer and hold the home button until it goes into recovery mode. This will erase everything if you restore from recovery mode.

iTunes: Advanced iTunes Store troubleshooting - covers time, firewall, hosts, etc...
iTunes: Specific update-and-restore error messages and advanced troubleshooting - covers restore mode, and other potential issues.


MacOS uninstalled after installing bootcamp during windows partioning my mac's macos was uninstalled during setting up a new partition in windows, reason is windows reformatted the partitions to its format, is there a way for me to re-install macos without losing all data on windows, which by the way doesnt even have bootcamp drivers installed
thanks!

This question if difficult to answer, because of the lack of information. The most likely answer is to boot to macOS Recovery over the internet and install macOS.

Other information that would have been helpful include the following.

The version of macOS that was installed.
The model/year of the Mac.
The version of Windows.
The Windows boot method (BIOS or EFI).
The current entries in partition tables (GUID and MBR).
The method use to install Widnows (DVD, flash drive, Boot Camp Assistant).


Shortcut to boot into different startup disk I often boot into an external startup disk. In order to do this, I need to access the Startup Manager by holding alt/option while rebooting and then selecting the disk I want to boot up into.

Since I do this so often, I wanted a more streamlined way to boot into the external drive. Is there a way to boot up into a specific external drive, without having to use the Startup Manager?

I could change the startup disk to something else, but the problem is that this is common to both disks – i.e. while I am starting up from Macintosh HD 1 and select Macintosh HD 2, when I boot up in Macintosh HD 2 the startup disk will also be Macintosh Disk 2. have to change this every single time, so I'm looking for something more like a shortcut to boot into the startup disk Macintosh HD x.

Boot to Macintosh HD 1, launch Keychain Access and create a new generic password item with the name boot_key in your login keychain with the following attributes (replace "klanomath" with your admin user name and "Passw0rd" with your admin user's password):

The password is self-evidently also klanomath's login password. security is always allowed to use the key! The exec security can be found in /usr/bin/.

Then open Automator and create a new service.

Set "Service receives" to "no input" in "any application"
Add the action "Run AppleScript" and paste the following code (replace klanomath with your admin's user name below):

on run {input, parameters}

    do shell script "security 2>&1 >/dev/null find-generic-password -gl \"boot_key\" | awk '{print $2}'"
    set myPass to (text 2 thru -2 of result) as text

    do shell script "systemsetup -setstartupdisk \"/Volumes/Macintosh HD 2/System/Library/CoreServices\"" user name "klanomath" password myPass with administrator privileges

    tell application "System Events"
        set appList to the name of every process whose background only is false
    end tell
    repeat with theApp in appList
        try
            tell application theApp to quit
        end try
    end repeat

    do shell script "shutdown -r now" user name "klanomath" password myPass with administrator privileges

    return input
end run

Screenshot of Automator:

The middle part of the AppleScript (tell application "System Events"... tries to quit all open apps gracefully.
Compile and save the service (in my example the name is change_bootdisk)
The service will be saved to ~/Library/Services
Open System Preferences > Keyboard > Shortcuts > Services, choose the service name and apply a shortcut (in my example altcmdB).

On your other boot volume you have to perform the same steps but replace the boot drive in the second do shell script:

do shell script "systemsetup -setstartupdisk \"/Volumes/Macintosh HD 1/System/Library/CoreServices\"" user name "klanomath" password myPass with administrator privileges


In Mac OS X 10.12.6, using a script with scutil to start VPN gives me an error summary:

L2TP over IPSec VPN does not start from Script in MacOS 10.12

Intro

Aloha,
this is my first question I ask here, I hope I do it in the right format.
I did some research before, but could not find any answer to my problem.

Environment:

OS: MacOS 10.12.6
VPN: L2TP over IPSec
(Meraki MX is the VPN device)

Problem discription:
I need to start the VPN in a script, because I need to setup static routes through the tunnel.
When I start the VPN from GUI (System preferences)
it works without any problem, but not with a bash script with the command scutil.

I tried to use this script from here:
https://stackoverflow.com/questions/32957121/in-mac-os-x-10-11-opening-a-vpn-connection-window-with-the-command-line-gives-m

Answer made by: https://stackoverflow.com/users/508185/adejones

   VPN="YOUR_VPN_NAME"
IS_CONNECTED=$(test -z `scutil --nc status "$VPN" | head -n 1 | grep Connected` && echo 0 || echo 1);
if [ $IS_CONNECTED = 1 ]; then
  scutil --nc stop "$VPN"
else
  scutil --nc start "$VPN"
fi

Error:
The server is unreachable. Try reconnecting. If the problem continues, verify your settings and contact your Administrator.

Any idea, what I am doing wrong?
Thanks
Marcel

I found the answer by myself.

I had a similar issue on macOS 10.12.6
Root cause was, that I also changed the configuration name of the VPN.

After removing the old VPN and creating a VPN with another name and configuration "Default",
 it works with both the command scutil and networksetup

With this I can start the VPN from shell with both scutil and networksetup


iWork'08 sumifs equivalent in Numbers Does iWork '08 have a sumifs type command? If not, how can I sum on multiple conditions? Essentially how do I fo the following:

=sumifs(A$2:A$20,B$2:B$20,"<10",C$2:C$20,"female)

many thanks!

Numbers 09 has the SUMIFS function, which operates the same as in Excel. Numbers 08 does not appear to have it, but it has SUMIF.

You should still be able to do what you are trying by combining two logical statements.

Without using the function, you could also build a new column by multiplying values by a logical statement. For example:

=A3 + A4 × (B4>2)

This will only add A4 if B4 is greater than 2...

Or in your example, make a column using AND:

=A2 x AND(B2<10,exact(C2,"female))

Then sum that column. Values that don't meet both criteria will be zero.


Does macOS Sierra support the new iMessage effects I have the macOS Sierra final beta, but I seem to be unable to send or receive the new iMessage effects.

Such as the Invisible Ink:

Is it possible to view these effects on macOS Sierra currently? And if it is, how can I enable it?

Sierra doesn't support all the effects from iOS.  I don't have a definitive list from Apple and I haven't seen one on their site.

On my Sierra I'm missing all the backgrounds and text effects.  I can see any stickers sent to me.


how can I avoid custom access permissions when copying from time machine I have recently done a clean install of El Capitan, having backed up files on Time Machine.  However, there is something wrong with the time machine backup: when I enter time machine it won't list the old backup, only the one that I did after the clean install.  (I think there's a problem with the drive I'm using.)  However, the files are all there, so I can copy them to my hard drive using the cp command in the terminal.

However, if I try

  cp -r /Volumes/TimeMachine/.../Documents/* Documents

all the files appear with today's time stamp, which is not very helpful.

If on the other hand I enter

  cp -pr /Volumes/TimeMachine/.../Documents/* Documents

I get the correct time stamps, but I also get the level of protection that Time Machine has - which is to say I can't edit anything I copied!

Does anyone know whether there's a way to preserve time stamps, but not this extreme level of protection?

Thanks

A way to copy files which can deal with interruptions etc, that is it will not copy something that has not changed is to use rsync

OS X comes with an old version and it is best to get a newer one from macports, homebrew etc. This can copy ACLs and there is a bug in the OS X one (that is in one of my other answers her or SU or SO)

The simple copy is (the directory Documents to the current directory)

rsync -rtlA /Volumes/TimeMachine/.../Documents .

-a does several other parameters (-rlptgoD ) -A copies the ACLs
-r recurses into directories, -t preservers modification times, -l copies symlinks as simlinks


Deleting Time Machine backups from external drive I have a 500GB HDD that I want to use for media storage. Currently, it's 75% full of TM backups for an ancient iMac that expired. I replaced it with a MacBook Pro. I don't need to keep any of the TM backups for the old iMac, BUT the TM backups contain a lot of iTunes music files that I want to save if I can. I spent a long time transferring my CD collection & I've no wish to start over. Ultimately, I hope to create an iTunes library on the external drive to free up space on the MacBook. There's currently little commonality between the old and new iTunes libraries, which is why I'm so keen to keep the old files.

For clarity, I don't need to keep any other parts of the TM backups just the iTunes music files.

So, do I need to delete the older backups to create space to save the iTunes files and then delete the last back up too? And if I just drag them into the trash and empty it, will that recover the space? Apart from the media files, I have no use for the backups now.

Although I'm not a tech savvy person, I can usually follow instructions quite happily. I'll be grateful for advice from any quarter.

Thank you.

Make sure you have all iTunes files on your Mac. Make one library with all music in it. You can put music back with TM from the backups to your Mac.

After you have one library you can delete the whole TM backup. And start using the external harddisk by copying the iTunes library to it.


Backdoor to Exchange server? My company took the Exchange ActiveSync server offline; they want me to use their email client instead of iOS mail (or the Outlook app), in the mistaken belief that this is "more secure."

I thought that when they took this offline, I would also lose connection through OS X Mac Mail (set up in system preferences), because I thought they would use the same protocols. But my phone apps went down this evening and Mac mail is still working.

So this makes me think there could be a backdoor? I already checked and there is no IMAP server. How does Mac Mail connect? Is there a way that I could railroad this vector to get my email back on my phone?

You can get excruciating detail from Mac mail client as follows:

open mail
select the window menu -> connection doctor
tick the log connection detail
note the wall clock time and select check again
open the log folder and look over the text logs that document exactly what mail servers are being queried, what messages are exchanged between the mac and the iOS device.

If the Mac can still connect, either your exchange setup has a director set up to point to the correct mail server (I believe Microsoft markets that as auto discovery) or it send a reconfiguration message to the mail client to update settings. Safari will also watch for you signing into web mail and offer to set up the mail client.

Best of luck taking those settings to iOS - you might be able to still connect after looking over the Mac connection details.


Apps flickering on homepage On my home screen, sometimes apps blink or flicker in a random order. Does anyone know what this means, or is it just some sort of glitch?

This is an optimization task being performed by the iOS. The app icons flicker, i.e. the icon becomes grayed and the name of the app is replaced with the word Cleaning.... iOS is removing temporary files and cached app data.


iOS's file system: where are those files that are synced with the iPad via iTune? photos, videos, etc Where are files that are synced with the iPad via iTune stored?

For example, if you sync some image files onto the iPad via iTunes, where are those image files in the iPad?

Generally, the files are stored inside the application sandbox.
The application sandbox is a folder that stores the App and its associated files.
Every App has it's own application sandbox.
If you use file share in iTunes, the files are stored in a /Documents/ folder inside the application sandbox.
It is a bit tricky to access files that are stored outside the applications sandbox.
Apple has a good and short explanation about files in it's iOS Application Programming Guide.
If you want to access on images from the PhotoLibrary, have a look at UIImagePickerControler.


AppleScript to Resize Finder Columns Weary of the Finder's sloppy, semi-legible sizing of list view columns, I'm attempting to code an AppleScript solution. Omissions and bugs in the Finder's dictionary make this (to indulge in understatement) challenging.  The goal is to have any window display a minimalist list view with a single keystroke, with all columns set to the minimum width that avoids truncation and the window itself sized to its content.  Something along these lines…

The primary difficulties I've encountered so far are in the column class of list view options of Finder window.

visible doesn't accurately reflect the columns' actual state
setting visible has no effect
width can be read but setting it has no effect

Nor does it help that the Finder's zoom button hasn't done anything sane or useful since cell phones were the size of a shoebox.

Has anyone attempted a similar project or one that overcame any of the difficulties noted above?  One hates to resort to the semi-reliable inelegance of GUI scripting.

I have tested the following script (written to address another question here-- this one--Is it possible to change a Finder List View column width in AppleScript?
tell application "Finder"
    activate
    set the_window to window 1
    set current view of the_window to list view
    set the_options to list view options of the_window
    set the_name_column to first column of the_options whose name is name column
    set the_items to name of every item of the_window
    -- get the longest name (count of characters)
    set longest_name to 0
    repeat with I from 1 to count of the_items
        --check for invisible files, which we don't need to consider
        if character 1 of item I of the_items is not "." then
            if (count of characters of item I of the_items) > longest_name then
                set longest_name to count of characters of item I of the_items
            end if
        end if
    end repeat
    -- this only works if the text size is 12. The multiplier 7.5 could be changed
    -- if the text size is something else.
    set desired_width to longest_name * 7.5
    set width of the_name_column to desired_width
    -- we have to close and reopen the window in order to see any changes.
    -- there might be a "refresh window" command but I don't know it.
    set the_target to target of the_window
    close the_target
    open the_target
end tell

That script will set the width of the Name column, in a window viewed as list, to be about as big as it needs to be in order to fit the longest name of an item in the window. It works (for me) in macOS 10.11.6 and 10.12.6.
The key is recognize that you don't "set the width of the name column of window 1." Rather, you "set the width of the name column of the list view options of window 1." That's pseudo-code but it tells the story. See the script for details.


Converting Audio to AC-3 using afconvert? I'm trying to use afconvert to convert an audio file to AC-3 format. It's 5.1 audio, having already been converted from DTS to WAV (using ffmpeg, since afconvert doesn't seem to deal with DTS).

As you can see, I've tried various parameter incantations, including trying to use a different container formats, but with no success:

$ afconvert -f ac-3 test.wav
Error: ExtAudioFileCreateWithURL failed ('typ?')
$ afconvert -f ac-3 -d ac-3 test.wav
Error: ExtAudioFileCreateWithURL failed ('typ?')
$ afconvert -f caff -d AC-3 test.wav
Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?')

I have been able to encode it to an AAC file successfully, so it's presumably something with the AC-3 encoding, but Googling those errors yields no results. Does anyone know how to properly convert to AC-3 with afconvert?

If you want to do some testing yourself, I found some free 5.1 DTS sample files here. Note that while the file extension is .wav, they're actually DTS files, not WAV. To replicate my desired workflow, decode to a WAV file with ffmpeg: ffmpeg -i input.wav -acodec pcm_s16le -f wav output.wav, then you'll have a proper 5.1 WAV file afconvert should be able to work with.

Can't you use ffmpeg? This seemed to work for the DTS WAV files here:

ffmpeg -i test.wav -ab 640k test.ac3


Shortcuts App Sleep Timer Has anyone figured out a way using the Shortcuts app to set a sleep timer? My goal is to tap a shortcut from the Sleep menu at night, have it play audio from iBooks for 15 minutes and stop. I don’t want to have to go into the app and always  click the sleep timer.

I was able to figure out how to do so by setting my timer audio to “Stop Playing” and setting a 15 minute timer in the shortcut. Still hoping there’s a way without that method so that I can use my timers normally:
https://www.icloud.com/shortcuts/910f40a4029e4fbc9d359effeb1e2885


Can a Mac enter sleep mode on schedule when a third party app tries to prevent sleep? There’s a third party software I have running on my Mac in the menu bar at all times, but for some reason it’s preventing my Mac mini from sleeping or locking the screen altogether. I contacted the company about this issue, but just in case I won’t be able to resolve it with them, is there a way I can prevent a Mac app from preventing it from sleeping, without quitting the app altogether?

No. Power manager assertions can be artificially created (e.g., via caffeinate) but they can’t be removed except by the app itself. You can, at least, view the current assertions via
pmset -g assertions

and see what kind of assertion your app has taken.


iPhone volume - ringer vs. volume? When I'm adjusting the volume on my iPhone, I've noticed that sometimes it says "ringer" as I adjust it, and sometimes it says "volume"; also, sometimes it says "volume (headphones)".  What determines when the volume buttons are adjusting the volume vs. the ringer, and what is the difference between the two actions?

Thanks!

Your ringer volume adjusts the volume of the sound coming out of the phone when it's ringing. If the phone is not playing media (i.e. no sound is coming out of it) then the volume buttons on the side adjust the ringer volume.

If you are playing media (music, video, etc) out the internal speakers, then the buttons on the side adjust the volume of that media coming out those speakers.

Finally, when you have headphones plugged in, the iPhone knows this and has a separate volume for headphones. Using the volume buttons will adjust the headphones volume when headphones are plugged in.

The reason why these are separate is because sometimes you want to mute your ringer, but still want to listen to media (or vice versa), and because the headphone and internal speaker volumes are different and need to be adjusted separately.


Why does Apple Watch keep installing apps I didn't ask it to? The iOS Apple Watch app has a setting (General > Automatic Download > Automatically Download Apps) that is described as follows

  When this is on and you have apps on your iPhone that also work with
  Apple Watch, those apps will automatically download and appear on your
  watch home screen.

But whenever an iOS app on my phone is updated to include Apple Watch support, it gets added to my Watch, even when this setting is off.

How do I prevent newly Watch-enabled apps from downloading themselves?

That setting is not working.
This is Apple's Bug.
I confirmed with Apple support.
Latest watch os 1.0.1 still Buggy.


Reinstall Mac OS X Mountain Lion before selling a Mac I want to sell my laptop (Macbook Pro late 2011).
I have erased my disk drive but it seems that I cannot reinstall Mac OS without an Apple ID.
At the origin my mac was shipped with Lion, I have upgraded to Mountain Lion and now my recovery partition contain the installer for Mountain Lion. When I try to reinstall Mac, it asks for my apple ID. Since I want to sell it, I don't want to put any of my information in it.
How do you do that?

If you happen to already have an installable copy of Lion or Mountain Lion,

back up your personal data
make a bootable thumb drive to install from
boot from the thumb drive
select Disk Utility
repartition and reformat your drive
there should be an arrow to skip the Apple ID entry and continue the install.

Either of the two ways should get you a virgin install.

The other way is to do a recovery boot by holding down COMMAND-R when powering on before your Mac chimes. It will be slow since all files load from Apple's servers. Follow the six steps above for a clean install.


Long wait to get Hotspot feature going on Verizon iPhone 4S How long does it take between calling Verizon to set up the Hotspot feature until you are actually able to use it?

Just did this the other day and it took less than 30 mins, its probably ready instantly after you add it to you account, but in practice it takes longer because it did not just start working automatically on  the phone, the phone needed to call Verizon to get updates to what it could do first. I only needed to call them so that they could tell me to do steps 1 and 2 below. Knowing that you don't even really need to call them.

The next thing you do after adding the Mobile broadband features to your account is:

Reboot the iPhone
Dial *228 and then select option 2 (the one for updating phone's mobile or roaming features)
Then you are good to go and set up the hotspot via USB, Wifi or Bluetooth.

Note: if that fails then they say:

  ... please call us from a different device at (800) 922-0204


Script to relocate the menu-bar on dual monitors set-up Is there a script that could be written to achieve this:
In System Preferences/Displays... is it possible to relocate the menu bar ...via a script?
My set-up is one monitor and a Cintiq. I either work only with the Cintiq, or I work with my 28" monitor several times a day. I always need to go to do this manually.
I really wish there was a script that can do this. I tried Automator, but it's not recording the action. :(

You can use a command line utility named cscreen to do that.  You can wrap it in a AppleSctipt script or in Automator.  You can download the cscreenIntel.dmg from the link provided. In a terminal use cscreen -h to output the internal help information.

I have a MBP and a Thunderbolt Display so in a Terminal I want to have cscreen list my displays

$ cscreen -l
DisplayID  Index     Depth     Width     Height  Refresh
5ac6fa7f       1        32      1440        900     0
 3247b0f       2        32      2560       1440     0
use -h to display all usage options
$

So to set the Thunderbolt Display to have the menu bar I run the following command:

cscreen -s 2 -p

I can then toggle it back using the same command as the Index shifts.

In AppleScript: do shell script "/<path_to>/cscreen -s 2 -p"

In Automator add Run Shell Script and add command: /<path_to>/cscreen -s 2 -p

Note:  This is a simple toggle if you only have two displays however if you have more then two you'll need to write some logic flow into the script.

You can also use, cscreen -i <DisplayID> -p, e.g. cscreen -i 3247b0f -p to code with the DisplayID which doesn't change.

This can also just be used in a Terminal as a singular command or incorporated into a shell script without using AppleScript and or Automator.


Applescript Expected “"” but found unknown token This is my code. I wanted to run an app (Game Capture HD) twice at the same time. But I get this Syntax Error: Expected “"” but found unknown token.
Appreciate if anyone can fix it
on run
    do shell script "open -n /Applications/Game\ Capture\ HD.app"
    tell application "Game\ Capture\ HD" to activate
end run

on open theFiles
    repeat with theFile in theFiles
        do shell script "open -na /Applications/Game\ Capture\ HD.app " & quote & (POSIX path of theFile) & quote
    end repeat
    tell application "Game\ Capture\ HD" to activate
end open

The spaces mess things up. Try:
do shell script "open -n " & quoted form of "/Applications/Game Capture HD.app"

Essentially, 'quoted form' is for passing text to 'do shell script'. Both the Script Editor and the shell will be interpreting the text and 'quoted form' helps manage that.
For more information, refer to the Applescript Language Guide > Class Reference > Text > Properties of text objects
Additional info can be found in Technical Note TN2065: do shell script in AppleScript