Time Machine in El Capitan installer In the El Capitan installer splash screen, it says, "To repair your disk using disk utility, restore your computer from a Time Machine backup, or perform other tasks using utilities, choose an option from the Utilities menu."

However, Time Machine is not an option in the Utilities menu! Is there a way around this? I want to restore directly from a Time Machine backup, but my device (2008 iMac) does not support Recovery Mode.

The necessity for this is very limited. Here's the situation it will help with:

You don't have a working Recovery partition.
You have a bootable drive that boots to the Finder.
You don't want to—or can't—simply install a fresh copy of macOS onto your drive and restore from there.
You have a complete Time Machine backup (from which you did not exclude system files).
That Time Machine backup does not come with its own Recovery partition, as with a Time Capsule.

In order to do a Time Machine system restore on a drive without a (working) Recovery partition without installing macOS first, follow the following steps:

Obtain a macOS installer. You can download one from Apple's support site, but that didn't work for me. I was able to make this work with the version of El Capitan that's downloadable from the App Store.
Get access to a recovery partition. There are a few options:

2.1 Attempt to install macOS onto your computer. After it reboots, don't continue the installation; instead, restart into your bootable drive (TechTool eDrive, USB key, whatever you have).

2.2. Alternately, use Recovery Partition Creator (MacWorld has instructions).

2.3. Lifewire has another method. I've discovered that you can run Disk Utility 13 (that has the option of the Debug menu mentioned in the Lifewire article) in El Capitan if you hack it first.
If one of these options results in a working recovery partition, great! Boot into it and use that (in my experience option 2.1 will boot, but will not allow you to restore from Time Machine—at least in El Capitan). If not, continue to the next step.
Open the recovery partition. You can use the Debug menu in Disk Utility 13 or earlier (instructions in the Lifewire article above) to select and then mount it, or mount a disk image of the partition.
Use Tinkertool or some other method to show hidden files in the Finder.
On the Recovery HD (that you should have mounted on your desktop in Step 4) there is a folder called "com.apple.recovery.boot." In it is a hidden disk image named "BaseSystem.dmg." Mount that (I had to hit Command-O for some reason; double-clicking did not do the job).
A disk image called "OS X Base System" will appear on your desktop.
Launch Terminal.
Paste the following command, hit Return, then input your password when prompted: sudo -b /Volumes/OS\ X\ Base\ System/System/Installation/CDIS/Time\ Machine\ System\ Restore.app/Contents/MacOS/Time\ Machine\ System\ Restore (The reason for this is that Time Machine System Restore must be launched as root in order for it to properly restore your permissions.)
Follow the instructions to restore your system from your Time Machine backup!


Checking for folder/file changes using Automator? Is there there a way to check a folder/file for changes (includes adding files, deleting files, changes in files,...). The 'Folder action' in Automator is only checking if any files are newly added.

You can add a "Run Shell Script" action with the command:

find <directory> -newermm <reference_file>

This will give you all files and directories inside <directory> that have changed since the last change of <reference_file>. Just make sure you modify the <reference_file> each time you run the Automator script.

Also give a look to the find manual page (enter man find in the terminal) for more options. Find is very powerful and further refining your search is usually a matter of a couple of additional options. E.g. to search only for directories modified after <reference_file>:

find <directory> -type d -newermm <reference_file>

If the version that ships with OSX is not enough, you can also try the version that comes with findutils (brew, macports etc) which should have slightly more features.


USB adapter stops working after deleting NetworkInterfaces.plist TL;DR: I have an external USB wifi adapter on a MacBook Pro which was working fine before I deleted my /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist file without making a copy. Is there a way of fixing it?

The problem with my MacBook Pro 2014 started when it took a water damage. The only ostensible casualty was the wifi function, and apple told me it was caused by the breaking down of the wifi airport card. There is apparently other hardware damage, but no other symptom that I can see. But to fix the whole thing will cost almost as much as a new machine, so I decided to buy a USB adapter (http://www.tp-link.com/en/products/details/cat-11_Archer-T4U.html) to regain the wifi function.

The external adapter was working fine for a week, the only problem being that I cannot log in to the appstore, with the error message "An unexpected error occurred while signing in, Your device or computer could not be verified". So I followed the advice here and deleted /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist. Stupidly, I did not make a copy. After a reboot, the status bar looks perfectly fine, and shows me connected to the network (itself fine, too), but there's just no connection to the Internet. I've tried restoring the preference file from a month ago and re-installing the usb adapter driver, but no improvement. I am eliciting your help for any ways to fix this, or any suggestions of what to try.

System Preferences > Network

If you can see your USB adapter in the list unplug it, Delete the entry using the "-" button bottom left of list of devices.

Then plug it back in, if it fails to auto detect then press the "+" button and add your USB adapter.

If it doesn't show your adapter in the list:
then press the "+" button and add your USB adapter.

Only do this if the option above don't work, it could be the permissions have gone awry  on the directory to NetworkInterfaces.plist , in which case use disk utility to repair permissions on your hard drive, select the Volume such as "Macintosh HD" not the physical drive when you do this.
If you are on El Capitan you will need run from teh Terminal

csrutil status

If System Integrity Protection is enabled (which it should be in most cases), then the command output will indicate so. Being enabled will in turn indicate that permissions have been checked and maintained.


Are you using a Sharp PN-K321 at 60Hz with a Late 2013 Mac Pro? According to Apple's KBase article on "Using 4K displays", the Sharp PN-K321 monitor is supported at 60Hz in MST mode if you're connected via mini DisplayPort to DisplayPort.

I've ordered a StarTech mDP-DP cable as Amazon's comments indicate that it works well (or well enough), just wondering if anyone has any experience with this or similar products.

Namely, do you have problems waking the Mac Pro from sleep?  Does the display properly wake up?  Do you notice any flickering or lag using Photoshop or any other 2D or 3D applications?

The Pro is already updated to OS X 10.9.3; haven't checked yet whether the Sharp display is on the latest firmware (v11301118).

The StarTech cables work perfectly, all that was required to enable 60Hz was to use the display's onscreen controls to enable MST mode.  Restart the display and voila.

Definitely noticeable improvement in scrolling through large Photoshop and Illustrator files.


Preview does not find words correctly I recently updated my OS to Sierra. The new Preview seems to have some serious bugs for searching words inside a document.

1st problem: certain words are not found despite Adobe acrobat reader is perfectly able to find them.

2nd problem: the bar to the right displays the pages where the word has been found. The pages are arranged in an apparently random order.

Is there a way to fix these issues?

EDIT

Actually I solved the second problem. Results where sorted by search rank instead of page order. I still have the first problem though.

EDIT
I am quite surprised this post has received so little attention. I use the find utility really often, and I have now had to switch to adobe as the standard program to open PDF.

I've also tried reindexing the spotlight but it did not fix it.

I found the solution for this in some apple related blog.

In the top left corner of Preview click on View and select "Table of Contents".
That will produce the results of the search.


XBMC green lines on 10.7.4 After upgrade my system to 10.7.4, the XBMC Eden (latest version) shows green lines all over the screen.

Does anybody have this issue?

turning off hardware acceleration (VDVDecoder) seemed to fix it


Keychain does not show passwords after El Capitan upgrade When I click on "Show password:" and enter password then click "Allow" button,
then my cursor just keep loading and password does not show.

(source: shoespost.com)
Keychain looks like it's frozen, only "Deny" button works which will close the window. Same problem with old and new saved passwords.
This happened two months ago after I have upgraded to OS X El Capitan.
New Keychain and reset did not help.

I had the same problem when using my wacom tablet with the Keychain. When using an actual mouse the problem does not occure. I found the following post that explained this problem in detail:

  With the 10.11.1 update, Apple introduced a "security fix" that disabled the ability for non-physical devices to interact with the Keychain. You can see the details of this "fix" here (scroll all the way to the bottom of the page and look for CVE-2015-5943 for a full description):

  About the security content of OS X El Capitan v10.11.1 and Security Update 2015-007 - Apple Support

  You can confirm this being the issue with your machine if you view the system logs via the Console.app. When you click on "Always Allow", you should see the following in the logs:

Ignoring user action since the dialog has received events from an untrusted source

  Basically, your click is being registered as a "synthetic click". In my case, this was because I was using Apple Remote Desktop (I also tested various other remote apps I use, like TeamViewer and iTeleport Connect, and all resulted in the same error in the logs).

So a solution to this problem is to use a physical mouse to interact with the Keychain.


iCloud holiday calendar appeared in Calendar app I opened up Calendar this morning and a new calendar appeared under "Other"

The calendar is Mexican Holidays and it is a calendar subscription from iCloud. I didn't add it nor do I live in Mexico. I have seen this on a few Macs in our office all running 10.9.x

Calendars include Mexican Holidays, Canadian Holidays and Hong Kong Holidays.

Is anyone else seeing this behaviour?

Managed to confirm this with a few admins in NZ/Aus. The Show Holiday Calendar is on and for users in NZ there doesn't seem to be a NZ Holiday calendar so we are getting results such as Hong Kong, Canada and Mexico...

Users in Australia are seeing the correct Australia Holidays calendar.

However we aren't exactly sure what triggered the calendars to show in the first place...


Will it work well to use a .dmg as an encrypted folder? I have a folder containing files including Wills, Trusts, personal financial statements etc. Most of these files are word docs, excel spreadsheets, PDF's and jpegs. I would like to protect this folder from prying eyes.

If this info was housed in a .dmg, it would seem pretty straightforward to click on the .dmg, enter my password, mount the drive, access the information/folder and when finished, eject the disk image knowing it is closed and protected.

Am I missing something? Any pros/cons of this idea?

Your use case is exactly why encrypted DMG were created. The external file name can be different than the actual name of the filesystem can be obfuscated while the drive is not mounted.

The only con (which kind of is a Pro) is that spotlight can't search within an unmounted image and you may want to disable spotlight entirely on that volume just in case you don't want any extra caches / extra access that isn't necessary.

Alternatives to this is storing text in a keychain secure note, especially if you keep alternate keychains for more secure information. I also find myself storing more things in 1Password when I don't need a self-contained archive for things like certain client data or certain data I wish to be doubly encrypted. (I use FileVault on most Mac these days so that everything is encrypted at least once.)


Change drive "block size" to 4096 I just bought a 4tb hard drive and enclosure and attempted to encrypt it with truecrypt. I errored with a message saying the block size must be 4096 bytes for >2TB drive.

How do i alter the drive to have that block size?

Currently it says block size is 512

diskutil info /dev/disk2s2|grep "Block Size"
   Device Block Size:        512 Bytes

Format the drive using Disk Utility. Find out what disk identifier the drive has (/dev/disk0, /dev/disk1, /dev/disk2, etc…). You can do so in Disk Utility.

Then use the command line tool newfs_hfs to create a new HFS file system on the disk. The command below is taken from here.

newfs_hfs -v HFS_VOLUME_NAME -b 4k /dev/rdisk2s1

This creates a HFS volume with name "HFS_VOLUME_NAME" and a block size of 4k on the device with identifier disk2s1.


Permissions errors after weird Time Machine restored backup I made a time machine backup of everything that was in /Mac/Users/MYUSER/ and nothing else.
I then erased my drive and reinstalled MacOS.
When I tried to restore from my Time Machine Backup, it made a directory /Mac/2020-09-05-185317/ and did not place the files in the correct places, but instead put the file hierarchy inside /Mac/2020-09-05-185317/ so all my files were in /Mac/2020-09-05-185317/Mac/Users/MYUSER/. There are not a lot of files, so I decided to start moving them from that directory to their proper places manually myself.
Now when my ~/Music dir finished moving, I tried to open iTunes and I get "The folder “iTunes” is on a locked disk or you do not have write permissions for this folder.".
I've checked the permissions in the finder and the iTunes permissions says "MYUSER | Read & Write, staff | Read only, everyone | Read only". I then tried to rename the /Mac/Users/MYUSER/Music/iTunes directory and when doing so, it asks for my root/user password, which I thought was weird/unusual. After renaming the dir, I then opened iTunes and it created a new /Mac/Users/MYUSER/Music/iTunes directory so I compared an ls -la of the newly generated iTunes directory and the renamed copied directory and they matched/were the same.
I've read a few guides and see now that I did not copy over the /Mac/Users/Shared directory with my backup, and I cannot go back and grab it since I wiped my computer. Is this the problem?
I've also tried following This guide, and this guide but nothing has helped.
How do I fix the permissions problem?
NOTE: I am running Mac OS Sierra 10.12.6

It ends up that you need to use the Mac Finder UI to set the permissions of the whole user home directory and not just the Music directory. I was able to fix the issue using the following steps:

Opening Finder, navigate to my user/home directory (/Mac/Users/MYUSER) and show the "Get Info" pane
Open the "Sharing and Permissions" drop down
Clicking the Lock Icon and entering the User password
Clicking the Gear Icon and selecting "Apply to enclosed items..."

This fixed all permissions issues I saw and iTunes was able to view and play music again.


Applescript voice control I'm trying to create an app to toggle voice control on and off, as for some reason Catalina removed the link between dictation and voice control thus ridding itself of the ability to use a keyboard shortcut for voice commands. I'm trying to ad that back by creating an app. Am ridiculously disabled (think one step below paralysed) and for my setup this functionality had become very useful.

Here is what I have so far, but unfortunately its not working:

tell application "System Preferences"
    reveal pane id "com.apple.preference.universalaccess"
    delay 1
    tell application "System Events"
        tell window 1 of application process "System Preferences"
            select table 1 of scroll area 1
            delay 0.1
            select row 12 of table 1 of scroll area 1
            delay 0.1
            click checkbox "Enable Voice Control"
        end tell
    end tell
    quit
end tell

It highlights the correct row in the accessibility options but doesn't quite get as far as clicking the checkbox. Results in this error:

The action “Run AppleScript” encountered an error: “System Events got an error: Can’t get checkbox "Enable Voice Control" of window 1 of application process "System Preferences".”

System Events got an error: Can’t get checkbox "Enable Voice Control" of window 1 of application process "System Preferences".

Could someone please offer some direction on where I'm going wrong?

Thank-you!

Seems like this sorted it:

tell application "System Preferences"
    reveal pane id "com.apple.preference.universalaccess"
    delay 1

    tell application "System Events"
        tell window 1 of application process "System Preferences"
            select row 12 of table 1 of scroll area 1
            delay 0.1
            click checkbox "Enable Voice Control" of group 1
        end tell
    end tell
    quit
end tell


Using command line to create bootable OS X USB drive I am trying to create a bootable USB flash drive. I need help understanding this command in details.

sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction

The "Install OS X Yosemite.app" (5.73 GB) is currently on an external HDD and I don't have enough space on my Mac because I ignorantly installed OS Yosemite on only 15 GB of partitioned system drive. This is the current state now.

Now, I think I need to make changes to the command line to change the directory since I cannot copy the "Install OS X Yosemite.app" back into the Flash storage "OS Yosemite" and run the command. But I don't know how and help will be much appreciated.

sudo /Volumes/MacBook/OS\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Volumes/MacBook/OS\ OS\ X\ Yosemite.app --nointeraction

Will this do?

The copy/paste bits are fine, but you got your app path wrong...

sudo /Volumes/MacBook/OS\ OS\ X\ Yosemite.app
should be
sudo /Volumes/MacBook/OS/Install\ OS\ X\ Yosemite.app

To be certain you have the correct path, Terminal allows drag & drop.

Type sudo, then space.
Drag your Installer app to the Terminal
Hit backspace once [terminal adds a space to your dropped path]
copy/paste the rest of the line /Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath
Drag your Installer again [NO backspace this time]
copy/paste --nointeraction


Recovering texts from iCloud I lost my iPhone 4 and really need my text messages.  I always backed up everything to iCloud.  I don't have a new phone, but I do have a computer.

How can I go to iCloud and recover my texts?

If your computer is a new enough Mac, if it has Messages.app installed, that should contain all your iMessages.

If you have a PC, I believe there are some programs that can extract your messages from your iPhone backups.


How to tell macOS to move things to the cloud and free space on my laptop? I use iCloud Drive and I see sometimes macOS keep files on the cloud and locally on the laptop there is only a link to the file. Whenever I need the file just click the link and it downloads. So far so good.

I have a lot of files, so no possible to keep everything locally. And I would like to keep adding files and take advantage of macOS functionality. I added many files (cd/dvd iso images) and disk is almost full. I guess at some point macOS will decide to keep files only on the cloud and free some space locally. Can I force this? How?

I have a lot of free space on iCloud Drive, like 5 times size of laptop ssd.

iCloud is a syncing solution and not a backup in the same sense as Dropbox or OneDrive.  It's not possible to keep something on iCloud and not on a device at the same time.

The setting Optimise Mac Storage setting creates a reference to the documents when your Mac is low on storage but still keeps the file in sync.  The file is not really removed from your device because if you delete the referenced file on the Mac it will delete it in iCloud, too, which is not what you wanted. It runs on its own schedule and constraints.

What iCloud offers is the ability to access files from all devices that are signed-in using that same Apple ID.  It was never meant to be, or designed, to act as an offsite storage.

If you need to do that you'll have to look at using other providers, like the one's I've already mentioned, for those file.


I logged out of iCloud on my iPhone and now it won't let me log back in The password is correct and it doesn't even say its wrong. Instead I get a verifying message and then it never logs in.

I'm not sure what the issue is because my iPhone literally just goes back to the log in screen after it says verifying and that's it.

How can I troubleshoot this?

This answer offers an alternative to the one posted by user @Sacha on May 10th of 2018. For Apple users (like me) that cannot remove 2-factor authentication (because their account does not feature the link to do so), try this:

Log into your Apple account from a computer (appleid.apple.com or icloud.com). That step will require you to use your 2-factor authentication, as expected, so have your phone handy.
Scroll to the "devices" section. Verify that all shown devices are correct and not listed more than once. In my case, my iPhone was listed twice and that seemed to confuse the iCloud login algorithm. If that's the case, remove all duplicate(s) from the "devices" list so you only have a single phone listed there, and log out.
From your phone, try logging in again to iCloud.
If that still does not work, log into your Apple account from your computer again, and remove the device causing problem from the list completely. Log out. Now you have a clean slate.
Grab your phone, and try logging in again to iCloud. This time, you may need to force the 2-factor code to be sent by SMS, instead of iMessages (since you might no longer have access to the iMessage app).
Hopefully, this time around, your iPhone will complete the login process into iCloud and you will see your device on the Apple account page next time you access it.


Will the Verizon iPhone 5 be capable of accessing cellular data while on an active phone call? I'm considering switching to Verizon for my family's new iPhones (partly due to cost, and partly due to free hotspot capabilities).

The current Verizon CDMA iPhone 4 and iPhone 4S can not access data while on a voice call. Has this been improved over CDMA or LTE for VZW with the iPhone 5 hardware?

Short answer, no.  Longer answer, you can access Wifi data while on a call, but not cellular data:

If you're in an area with Wifi coverage, you'll be able to talk on the phone while using data.
If you're in an area with only LTE/3G/CDMA coverage, you will not be able to talk on the phone while using data.

A statement from Verizon is over on The Verge:

  The iPhone 5 was designed to allow customers to place a voice call on the Verizon Wireless network, while letting customers access the Internet over the WiFi.

And Anand provides techy details:

  So onto the iPhone – we know definitively that the iPhone 5 definitely doesn't support either SVDO or SVLTE. It's as simple as looking at the FCC documents and the appropriate sections in the allowed and tested simultaneous transmitters section for SAR (Specific Absorption Rate) testing. There, it's spelled out that only one air interface can be active at a time, and that only one antenna can be selected for transmit at a time. There's also an explicitly called out mention to VoLTE not being supported at present. I didn't replicate the entire table of simultaneous transmission combinations which need to be tested (it is a huge table) there are no entries with CDMA Voice being active at the same time as any data mode save WiFi. This has been confirmed as well by later statements by the carriers and Apple.


Fix horizon line in Photos (as in iPhotos) I recall that it was possible with iPhoto to rotate an image by a small amount, just a few degrees, to rectify the orientation of an image. This is useful to make sure that pictures taken at, say, the seashore have a truly horizontal horizon.

This feature seems to have disappeared in Photos. Is it available within any other tool on El Capitan? Is it hiding somewhere within Photos?

The edit tools are a little bit hidden, but actually easy to get to, once you know how.

Choose your photo, double click to see it in single view, then just hit  Return ⏎  & it will switch to edit mode. It's also in the Image Menu.

Rotate is unexpectedly not where to find the control, instead it's under Crop, highlighted on the right in this picture...


Can I run Spotify by pressing my F8 button instead of iTunes? Is it possible to program the F8 key to run Spotify instead of iTunes?

The simplest way to do this, is to set Spotify to Open at Login.
As long as iTunes is not opened, Spotify will get priority when you hit any of the special keys.

Alternatively you can install a little helper tool. Try these instructions from the Spotify Community Forum:

Download Bubo (https://github.com/jguice/mac-bt-headset-fix#beta-version) and move application to the Applications folder

Then go into your Mac System Preferences --> Users and Groups --> Login Items -->

Remove Itunes Helper
Add Bubo

Done!


How to set alternatives in 10.8? On Linux you can use update-alternative to change the version of a command.

Which command in OS X (10.8) will switch the alternative of the current command?

I understand the motivation behind your question. update-alternatives elegantly solves the problem of managing several installed versions of a program (for example Java) or different ports of a program (vim vs. elvis vs. vile) by making one of them the default one.

update-alternatives, found in many Linux distros, creates and manages a set of symlinks from /bin, /usr/bin (and the like) to /etc/alternatives, and from there to the location where the program is installed.

For example, in openSUSE java is symlinked to /etc/alternatives/java, which is symlinked to a "private" path where java resides:

/usr/bin/java -> /etc/alternatives/java
/etc/alternatives/java -> /usr/lib64/jvm/java-1.5.0-sun-1.5.0/jre/bin/java

Unfortunately, and although some think it would be necessary, at least for MacPorts, there is no such thing in OS X. I have personally solved the lack of update-alternatives with aliases in my .bashrc:

alias ls='/usr/local/bin/ls'

or simply changing $PATH:

PATH=/usr/local/bin:$PATH

If you can't solve it like this and are weighing the fact of porting it to OS X be aware that although update-alternatives' first incarnation was a Perl script, it was rewritten in C for Debian, and some other distros adopted it later (for instance openSUSE 12.1).

openSUSE 11.4 provides the Perl version as an RPM package. If you are looking for the C version, go for any recent Ubuntu or Debian release, or openSUSE 12.1 or later.


Why would I disable swap file in Mac OS X? I came across a thread about installing an SSD drive in MacBook Pro.
Someone in the comments also recommended to disable the swap file but didn't say why:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist
sudo rm /private/var/vm/swapfile*

I wonder why one would want to disable the swap file in Mac OS X.
Does it increase performance? Stability?
Any downsides?

Finally, does it make any sense to disable swap file when not using SSD?

wonder why one would want to disable the swap file in Mac OS X.
  Does it increase performance? Stability?
  Any downsides?

I suppose people would do it for an SSD drive because those drives don't have the same lifetime as standard magnetic spinning-disk drives. There are a more limited number of write cycles, so presumably using them with a swap file would use up these cycles more quickly.

  Finally, does it make any sense to disable swap file when not using SSD?

If you have a lot of RAM, this would possibly speed up performance, but it's not a good idea in general. If you do run up against the memory ceiling, things are going to get flaky.

Also, wired memory isn't released when it becomes invalid, it is only released when a page out event is triggered, which won't happen if Virtual Memory is disabled. So it won't take long for all your memory to be gobbled up even if it is no longer used.


Power up after UPS initiated shutdown I have a Mac Pro with an APC UPS supply connected.  I have it configured to shut down the system when we lose power.  What I'd like to do is to have it power up the system when power is subsequently restored, but I don't see any option that appears to do that.  I am using OS 10.12.4 and an APC Back-UPS Pro 1500VA.

Simply put, no. The APC/Apple software is designed for shutdown only. I'd been looking for a similar solution for years when I managed a few XServes, but my institution opted to provide massive battery backups and a gas-powered emergency generator when we moved to a double rack of Windows servers a few years ago.

This device 3Gstore Remote Power IP Switch - 1 Outlet looks like it might work. I am going to get one of my very own for a security web-cam I just installed at home.

Disclaimer: Not professionally or materially connected with 3Gstore.


How to interact with a Numbers sheet via AppleScript? This question is related to:

SUMIFS with comparisons to relative cells

where I'm trying to figure out a way to do what I want using AppleScript.

I've been searching the Web to find a way to set the active sheet in Numbers before I attempt to make a modification there. The preliminary steps are essentially:

tell application "Numbers"
    activate
    try
        set the chosenDocumentFile to "/path/to/myfile.numbers"
        open the chosenDocumentFile
    on error errorMessage number errorNumber
        if errorNumber is not -128 then
            display alert errorNumber message errorMessage
        end if
    end try
    tell chosenDocumentFile
        try
            -- this is where I'm stuck
        end try
    end tell
end tell

Most of the stuff I've found online talks about creating or deleting sheets, but I haven't found anything that provides a clear example of how to select a sheet.

In my case I currently have 5 sheets in my spreadsheet. I know I want to select the second sheet to act on (sheet 2 - right?)

I've tried:

open the sheet 2

open sheet 2

select sheet 2

activate sheet 2

None of them seem to work, and all of them prevent the next line of code within that enclosing try statement from being executed.

I'm hoping there's some really simple answer for this (I still have lots to do before I get the code to do everything I want it to, but I'm stuck here right now).

As far as I know, Numbers does not have an explicit AppleScript command to select a given sheet.

There is the active sheet property of the document, e.g.,

tell application "Numbers" to get active sheet of front document

which will return the active sheet; however, while one might think that e.g.,

tell application "Numbers" to set active sheet of front document to sheet 2

assuming there is a sheet 2, would set e.g., sheet 2 to the active sheet, it does not set it as the active sheet.

Here is the method I use the makes a given sheet the active sheet in the front document:

Note: This is a hack method and it does cause a saved document to show as edited, even though it's not altering the value of the target cell. It works by setting the value of cell "A1" to it's current value, so while it's perceived as an edit, no data has been altered from its current value. However, it does work for me in Numbers 5.1 in macOS High Sierra, and is why I use it.

my selectSheet(2)

on selectSheet(n)
    try
        tell application "Numbers"
            activate
            set value of first cell of first table of sheet n of front document to ¬
                (value of first cell of first table of sheet n of front document)
        end tell
        --  # Press escape key to remove focus from cell A1.
        tell application "System Events" to key code 53
    on error eStr number eNum
        display dialog eStr & " number " & eNum buttons {"OK"} ¬
            default button 1 with icon caution
        return
    end try
end selectSheet

Note: The example AppleScript code is just that and, sans any included error handling, it does not contain any other error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.


Signing onto Shoprite Wifi causes Google to lock my account Shoprite is a chain of grocery stores in the Northeast. They now have a special iOS app where you can scan your own groceries as you shop. When you leave, you simply pay for what was already scanned and skip the checkout line.
In order to use the app, you must be logged into the Shoprite WiFi network. However, every time I do that, I get an immediate notification from Google that says

Google Account xxxxxx Suspicious login detected. See google.com/blocked

The link goes to a webpage that says:

We blocked an application from signing in to your account
We recently denied a sign-in attempt from an application (like an email or chat client) or a mobile device because we weren’t sure it was really you. To prevent unauthorized access to your account, Google notifies you via email and/or SMS when we notice this type of suspicious sign-in attempt.

After that, my Gmail account is locked, and I have to request a text message to unlock it.
This is really strange since my Shoprite account doesn't have anything to do with my Google account. I have seen absolutely nothing on the Internet about this, and neither Google or Shoprite seem able to tell me exactly what is going on.
I have no idea why this is happening, and I thought maybe someone here can explain it to me. There are two explanations I can think of:

Shoprite is attempting to access my Google account. They're a pretty big public company, and I can't imagine them surreptitiously doing something like this.
My iPhone is attempting to access my Gmail while on Shoprite's WiFi, but why would that matter to Google? I've connected to other WiFi networks around (Amtrak, Starbucks, Cablevision, etc.) and Google doesn't care about those. Besides, the app that's accessing my Gmail account would be my iPhone's Mail.app which has been setup to do just that.

Any ideas what is going on?

I have had similar issues with Google. I connect to Google services in the background from what Google sees as a "new location". So, when I sign in from what it deems as an unusual location, I see these entries in my Recent Activity :

When I verify that it was me "by clicking the "Yes, that was me!" button, the next time I connect, I no longer get the security notifications. This seems to remediate the issue, but it doesn't explain to me why I'm getting the notifications in the first place. (I haven't been able to track down an explanation, only a way to get rid of the notifications.)


Allow port arbitrary port (such as 5432) open on El Capitan. I'm running vagrant and successfully port forwarding from there. My issue is that some ports are not running. I know vagrant is working because I can successfully forward port 80, but cannot forward 5432.

Per these direction, I cannot sudo ipfw list as ipfw is not found on this OS (El Capitan thing I suppose?).

stuff$ sudo ipfw list
sudo: ipfw: command not found

I'm running a GUI that is unable to connect to 5432, so I think it's on mac's end.

The ipfw firewall has been replaced by pf in Mac OS X Lion and later. Try looking at the man page for pfctl to start.

An old, but still good cheat sheet for pf

As for debugging network connections on the Mac, I would run netstat to see what ports had listeners. And possibly sudo lsof -i to see which process had which port open.


Need help with small AppleScript I'm on Yosemite 10.10.4, Mac Mini.
I have a small Bash shell script to start Quake3 Arena in Wine. It works fine.

#¡/bin/bash
cd Desktop/Quake3ISO
hdiutil mount "Quake 3 Arena.iso"
cd Quake3
wine quake3.exe

Line 2: cd to the folder on my desktop that contains the iso, and also extracted files from the iso. I know it's a mess, but its the only way I can get it to work.

Line 3: mount the iso

Line 4: cd to a folder within the first one, called Quake3

Line 5: run "wine quake3.exe" which lives in that directory. (Desktop/Quake3ISO/Quake3)

So, trying ./quake3.sh mounts the iso, and runs the program happily.

But...
I am trying to do the same in AppleScript, but it's failing to find the configuration file for quake3.
It loads the image, and changes directories, runs wine and begins quake, but it now can't find the configuration directory, and possibly a few other files. The configuration directory is also below that (Desktop/Quake3ISO/Quake3/baseq3) folder

Q3 1.11 win-x86 Nov 24 1999
----- FS_Startup -----
Current search path:
Z:\Users\robert/baseq3

----------------------

Running in restricted demo mode.

----- FS_Startup -----
Current search path:
Z:\Users\robert/demoq3

----------------------
----- CL_Shutdown -----
-----------------------
Couldn't load default.cfg

I forgot to add. My Applescript

tell application "Terminal"
    activate
    do script "cd ~/Desktop/Quake3ISO"
    do script "hdiutil mount ~/Desktop/Quake3ISO/Quake\\ 3\\ Arena.iso"
    delay 5
    do script "cd ~/Desktop/Quake3ISO/quake3"
    do script "wine ~/Desktop/Quake3ISO/quake3/quake3.exe"
end tell

After some more experimentation I discover the following. As usual with QuakeIII, the CD has to be in the drive. So mounting it seems to fix that.
Next, I had done an install in the ~/Desktop/Quake3ISO directory, but a few years back had also done a wine install - which would not run.
But just now I copied all the files in the ~/Desktop/Quake3ISO/Quake3/baseq3 folder to the wine install folder in ~/.wine/drive_c/Program\ Files/Quake\ III\ Arena/baseq3 folder, and now I can run Quake directly from that wine folder.

   ie
    cd "/Users/robert/.wine/drive_c/Program Files/Quake III Arena"
    wine quake3.exe

and it runs fine.

I can also so the same in the ~/Desktop/Quake3ISO/Quake3 folder

ie
cd ~/Desktop/Quake3ISO/Quake3
wine quake3.exe

... and it runs fine.

So this tells me that I need to have AppleScript understand that the command to be executed should be executed in the directory it's changed to. So that when the program is looking for it's config files, it uses that directory as the base, or root directory and not the wine base directory?  I think?

Every do shell script command starts a new shell, so the cd doesn't have any impact on the following command. So you would be better of with running

tell application "Terminal"
    activate
    do shell script "cd ~/Desktop/Quake3ISO && hdiutil mount ~/Desktop/Quake3ISO/Quake\\ 3\\ Arena.iso"
    delay 5
    do shell script "cd ~/Desktop/Quake3ISO/quake3 && wine ~/Desktop/Quake3ISO/quake3/quake3.exe"
end tell


What is "Other" account on OS X Yosemite login screen? I am using OS X Yosemite. I am seeing 2 accounts on my login screen. One is my account and the other has the name "Other". What account is that? When I click on it, there is no username. When I try to shut down my computer, I am now prompted to enter my username and password. Previously there is no need to do so. I have tried the suggestion here How to get rid of the "Other..."-Account on the login screen? but that only hides the "Other" account. I am still prompted for my username and password when I want to shutdown. How do I remove/disable the "Other" account, not just merely hides it? Thank you for the assistance.

This indicates you either enabled the root user or you connected to a directory service (Open Directory or Active Directory) for the ability to login with network accounts.

Directory Services:
Open System Preferences > Users & Groups > Login Options

Look for a Network Account Server in the main pane of Login Options and edit accordingly if one is present.

Root User:
"Open Users & Groups preferences, click Login Options, then click the lock icon to unlock it. If necessary, type your password, then click Unlock.
In the Network Account Server section, click Join or Edit.
Click Open Directory Utility.
Click the lock icon to unlock it, then enter your administrator name and password.
Do one of the following:
Choose Edit > Enable Root User, then enter a root user password in the Password and Verify fields.

Choose Edit > Disable Root User.

Choose Edit > Change Root Password, then enter a new root user password."

https://support.apple.com/kb/PH14281?viewlocale=en_US&locale=en_US


OS X experiencing failure at long sleep At one point, my Macbook Pro (Late-2011 13 in. ver) started experiencing this issue every time it tries to wake up from a long sleep (longer than 1hr approximately). It fails to wake, and reboots instead, showing the pop-up that the os has shut down unexpectedly. It runs on a new SSD which replaced the old HDD.

I am trying to figure out if this is a hardware issue, or a configuration issue. One question that has arised on the way is about the hibernatemode value, which my OSX indicates 25. Is this a possible value?

When I ran pmset -g it showed the following:

Active Profiles:
Battery Power       -1*
AC Power        -1
Currently in use:
 standbydelay         4200
 standby              0
 halfdim              1
 sms                  1
 hibernatefile        /var/vm/sleepimage
 disksleep            10
 sleep                10
 hibernatemode        25
 ttyskeepawake        1
 displaysleep         2
 acwake               0
 lidwake              1

Have you tried to reset the SMC and NVRAM?

  To reset the SMC:

  Shut down the computer.
  Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
  On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
  Release all the keys and the power button at the same time.
  Press the power button to turn on the computer.

Source : Apple KB - Resetting the System Management Controller (SMC) on your Mac

  To reset the NVRAM (PRAM)

  Shut down your Mac.
  Locate the following keys on the keyboard: Command (⌘), Option, P, and R.
  Turn on your Mac.
  Press and hold the Command-Option-P-R keys immediately after you hear the startup sound.
  Hold these keys until the computer restarts and you hear the startup sound for a second time.
  Release the keys.

Source : Apple KB - How to Reset NVRAM on your Mac


Stop Finder from creating aliases when moving Applications In Snow Leopard, Finder treated .app files like any other application. You could drag an application between any two folders at will, and the application would be move.

At some point since then (I think in Lion), Apple changed this. Now, dragging a .app out of the applications folder and into some other directory creates an alias instead of moving the actual file. You can hold down "option" to make it copy, but this is incredibly annoying and has been bothering for years.

Is there any way to change the default behavior of Finder to stop doing this? Perhaps with a "defaults write" terminal command. Thanks!

You can hold Cmd while dragging to move the .app file in El Capitan.


Why does sshd only accept connections from within LAN? (Snow Leopard) The "server" ("mini", running OSX 10.6) has SysPrefs>Sharing>RemoteLogin enabled.  I can log in from another machine on the LAN with ssh me@mini.local just fine.  To enable access from WAN, I assigned a static IP address to mini (192.168.1.102) and added a portmapping entry in my TimeCapsule, mapping port 10221 to 192.168.1.102:21.  I have a DynDNS hostname, so I should be able to log in via ssh -p 10221 me@my.homeip.net but it just hangs and eventually times out.

I verified that DNS is mapping my.homeip.net to my correct public IP address.

Is there another setting on 'mini' that I've overlooked, that allows local connections but disregards non-local ones?

You are forwarding to port 21 on your mac mini. SSH uses port 22.

You are also not forced to use a different port on the router: you could map port 22 to 192.168.1.102:22


Why are all the homebrew formulas located in the 'libexec' folder? When I install packages manually, the typical layout looks like the following:

├── conf
├── lib
├── bin
│   ├── mvn
│   ├── mvn.cmd

But when I install it with homebrew, almost all the files are placed in the libexec folder:

├── bin
│   └── mvn
└── libexec
    ├── bin
    ├── boot
    ├── conf
    └── lib

Why is this strange layout used? It's a bit confusing when you read tool's official documentation and your paths mismatch.

The layout was a deliberate design decision on Homebrew’s side to keep the balance between usability, maintainer sanity, and not breaking things.

A comment in Homebrew’s source code says:

  Installing JARs to "lib" can cause conflicts between packages.
  For Java software, it is typically better for the formula to
  install to "libexec" and then symlink or wrap binaries into "bin".

Why conflicts?

To explain what the specific conflict is and what causes it, let’s have a look at (a gross simplification of) what Homebrew does when you run brew install foo:

Homebrew downloads and unpacks everything foo needs according to the formula.
Homebrew follows the installation instruction according to the formula. For example, it copies files around, applies patches, and so on. In the end, you get a keg, the folder containing the fresh installation.
For your convenience, Homebrew looks at the bin and lib directories of your keg, then symlinks everything it finds into /usr/local/bin and /usr/local/lib so you don’t have to.

Note how in #3, the formula does not have a say. This helps keep complexity out of the formula definitions. A formula maintainer can never forget to create a symlink because she or he doesn’t have to; Homebrew does it automatically for everything that is in bin or lib.

The layout policy was (AFAIK) first codified in issue #678 of Homebrew’s legacy GitHub repository, which says:

  This is expected behavior; libexec is assumed to be private-use stuff for that formula.

Basically, Homebrew considers the contents of bin and lib public artifacts, i. e. things that are supposed to be called from outside the formula.

Everything else, including the whole content of libexec, is considered an implementation detail, i. e. things for private use by the formula itself.

But what is the big deal with that? Could you, as an author of a formula like maven, not simply ignore those principles and instead live with a few unnecessary symlinks in /usr/local/lib, and give the user the same layout as the upstream project has?

Turns out that yes, you could, but it’s a horrible idea, and Homebrew maintainers would rightfully refuse such a formula until fixed.

Publishing private stuff to /usr/local/lib is a typical cause of JAR hell. (Imagine a Java-based Homebrew formula foo which uses mylib.jar v1, and another Homebrew formula bar which uses mylib.jar v2, with the version number not being part of the filename mylib.jar. Now go ahead and try to figure out why your business-critical application – which happens to use /usr/local/lib/mylib.jar because it’s in the path – only works on that 50% of your machines where foo has been installed after bar but not vice versa. This is an example of the conflict mentioned at the beginning.)

tl;dr Whatever you put into lib, Homebrew will symlink to /usr/local/lib for you. Putting a JAR you depend on into /usr/local/lib is a bad thing to do and leads to JAR hell.


Startup Disk Full: Core File The storage on my start up disk is being consumed by some kind of core files labeled as cores:1234 (numerical digits change). I downloaded OmniSweeper, which helped me locate these files and aware that each one is the size of >300mb. How do I disable this?

It is taking up space by the minute, literally. Screen shot provided below.

Thanks,
DG

They are coredumps, they are the result of a unix program crashing and then getting it's core dumped, which is basically a file containg what the program was doing when it crashed (memory state and CPU state).

If you have that many, it might be a symptom of a bigger underlying cause which you can check by inspecting the logs of you system using the Console app. To find out what binary (application program) the core belongs to, you can use the Terminal:

Open Terminal.app
Type "file " (excluding the quotes but keeping the space at the end)
Drop a core file on the terminal window, and it's full path will be entered
Press enter and the response will tell you all readable details on the file

In the end, however, unless you are a software developer, there is no point in keeping those core dump files, you can simply delete all of them.


How to find IMEI serial number on a WiFi Only Device I have a WiFi only 4th generation iPad and to trade my device in I am being asked for an IMEI serial number that you would dial for on your dialer. However, my iPad does not have a dialer, and I cannot find an IMEI in settings.

Can you help or is there no possible way to find this information?

The settings app has a general section where you can get all the various MEID / IMEI / ICCID and serial numbers. If you are being forced to make up a number, perhaps the listing isnt correct for a WiFi only device or you need to find a seller that can properly classify your hardware as WiFi only.

If you did have a cellular capable iPad, and you can’t find the information in the about section, it might need a restore or repair.


Cannot leave iOS 12 beta testing program on iPad I installed the iOS 12 Beta Software Profile on my 9.7 iPad 2017 a few months ago. I got a notification today that iOS 12.1 beta is available for download, which I did not want to install, so I went to Settings to uninstall the beta profile, but the Profiles setting is simply not there:

What should I do to get the option back?

I ended up downloading the beta profile again from Apple Developer Downloads, deleting it and restarting the device. This made the beta update notification disappear.

For some reason, the notification badge did not disappear, so it still shows that there is an update available - both in General/Software Update and next to the app icon.


Why won't my iCal calendars display in the same window? For a while (long enough that I almost finished writing a very long SE question about it), I thought Google Calendar wasn't syncing with iCal. Then, I realized that it in fact was, but all the calendars were cleverly hidden in the Window menu, just above Bring All to Front. If I click one of these, the calendar displays—in its own window. All the events are there, but ry as I might, I can't get any two calendars to display in the same iCal window! It's very irritating.

Google calendars other than your default calendar are treated as delegated calendars by iCal. To get them to open in the main screen go to iCal > Preferences > Accounts, select your google account, click the tab for Delegation, then check the boxes next to the calendars you want to display in your main calendar window.

Now in the upper left hand corner of the iCal window, click the Calendars button which brings up the pop-up allowing you to select which calendars are visible. Check the box for the calendars you want to view. You can return to this pop up at any time to change the calendars you're seeing at any given time.


Turn emoji back to previous default after upgraded to iOS 8.3 Hello I just upgraded to iOS 8.3. My emoji is now default to kind of yellow colour, which is super annoying. Any ways I could set it back to previous default colour. Thank you!

You can try holding down on the emoji you want and see if it brings up a menu to pick the skin color like this:

That feature is mainly only available on the more "human" looking emojis. Doing this will now set the default of that emoji to the color you chose, so I guess you could go through all of them and pick the one you want and they should stay as the new default instead of having to pick from the yellow one every time, but there isn't a way to "revert back" to 8.2 and earlier styles.


iMessage not working after changing MAC address My iMessage is not working after I have changed my MAC address. I have restored my original MAC address, but it is still not working. My phone is an iPhone 4s, 6.1.3 jailbroken.

I changed my DNS, restored with iLex RAT (because I don't want to upgrade to iOS 8), then reset network settings, but it is still not working. How can I resolve this?

I simply signed out of my apple id, signed into a different one, then signed back into my initial one and it worked. Hope it helps.


How to stop "password reset" emails from Apple? Every day or two, I get another "how to reset your AppleID password" from Apple.  They assure me my account is secure.

I've never gotten more than one of these from any other individual service, ever.  It's getting pretty annoying with the Apple ones, though.

Short of deleting my Apple account altogether, is there any way to stop this?

I get these all the time, and it's not even Apple's fault.

If—like me—you:

Use a me.com or mac.com email address as your Apple ID
Have a common username (such as steve, @ either mac.com or me.com)

Then every Joe or Jane who comes along thinks that they have joe@mac or jane@me, can't sign in, and tells Apple to reset the password. Apple does what it should do and sends you an email telling you how to reset your password. Again. And again. And again.

If you're in the same situation, there's nothing that can be done about it (short of giving up that nice mac.com address).


iCloud won't transfer manually added music I have 2 computers on which I listen to my music: a Macbook Pro (which I consider to be my "main" computer for my music library) and a Windows 7 desktop, for which the music library was originally populated via iCloud.  Both of them are up and running with iCloud and have been for a long time.  When I rate a title on one, the rating appears on the other.  When I buy a song on iTunes, it downloads to both.  Great.

But if I manually add a song to either library, it won't transfer to the other.  Instead, the song is visible on the other computer, but is greyed out and never downloads (or even becomes available for download).  The songs are remixes from music enthusiasts, so they will never be matched by iTunes Match, but that shouldn't keep them from moving to my other devices, should it?

Does anyone know what is keeping it from transferring, or how I might fix it?

I realise this is months late, but iTunes was never designed to synchronise Libraries in that way. iTunes Match is the closest you will get to automatic synchronisation.

The simplest way to do it is to manually add to each Library.

Even if both Libraries use the same actual source, such as NAS storage, or one of the 2 machines you mention, the Playlist data will not update to reflect the addition of a tune to the other machine - the file would be there, but the player wouldn't realise.

It is possible to manually transfer the playlist from one machine to another in such a case, but it needs re-syncing every so often, it can't be automated. The file-paths are absolute rather than relative, so this requires some patience & a lot of find/replace, then must be re-imported to the other machine. For your scenario I don't think that would be the way to go, but I can add instructions to this answer if you need.


Planning to downgrade a brand new macmini to 10.6. How do I recover to mavericks if things go wrong? I have a brand new macmini. It comes with mavericks and I haven't booted the machine yet. I know for certain that I will erase mavericks and install 10.6. However, if things go wrong, I would like to be able to reinstall mavericks. and restore the situation as it was as out of the shop. What do I have to do in order to achieve this ?

No you won't be able to install Snow Leopard, it's not compatible.

But you'll be able to build app that a compatible with older OS X from XCode. But you won't be able to test it's behaviour on older platform from this mac. You'll need older macs.


Disable Photo Booth sounds How do I stop Photo Booth.app making sounds on the countdown and on the capture?

Sounds like a "beep - beep - beep" countdown and a shutter sound for capture.

How do I mute the app?

Here's a possible option for you:
Hold down Option key while clicking the camera button. It'll instantly take the picture and not use the screen flash, but it will be silent.


Is there no "expose" feature (show all tabs) in iterm2 on Big Sur? The documentation says that Command ⌘+Option ⌥+E should show all tabs, but I am unable to do that.
https://iterm2.com/documentation/2.1/documentation-one-page.html
Under "Expose Tabs"

Backstory is here: https://gitlab.com/gnachman/iterm2/-/issues/9433
I removed it because it was very slow and buggy. It was some of the oldest AppKit code I wrote, and it showed. Better alternatives are:

Global search — replaces the search feature of expose.
Open Quickly — a faster UI to jump to a tab that searches things like current directory, recent commands, etc.


I need a keyboard shortcut for Adding Bookmarks for multiple tabs in Safari There was an older post about this question (link below) from a few years back but I'm wondering if that process no longer works due to iCloud bookmarks, Safari 12, new MacOS etc.

What I would like to do is create a keyboard shortcut for the "Add Bookmarks for These (XX) Tabs..." in a current window of Safari. The System Preferences > Keyboard > Shortcuts doesn't work since the menu label has to be exact and the tab number variable needs to change to match the number of tabs each time. I did do a test with 5 in there and that works for an instance with 5 tabs. Not sure if there is a variable that can be written in there that knows it needs to change.

If not through system settings, assuming it would need to be something like an Apple Script which would work as I'm trying to use Stream Deck to set a button to fire the script.

Adding Bookmarks for multiple tabs in Safari with a keyboard shortcut

OK, so the AppleScript required to click that menu item is quite simple:

click menu item 8 of menu 1 of menu bar item "Bookmarks" of menu bar 1

  To come up with this particular incantation I used UI Browser.app (there's a free Trial). In UI Browser.app choose your Target app, use the column browse to find the menu item you are interested in, then use the AppleScript dropdown to copy the required snippet to your clipboard (or press Alt+Cmd+T).

  I made a small edit to the snippet to reference only the Bookmarks menu item by name.

The AppleScript snippet needs to be dressed up a little more to be useful:

activate application "Safari"
tell application "System Events"
    tell process "Safari"
        click menu item 8 of menu 1 of menu bar item "Bookmarks" of menu bar 1
    end tell
end tell

The works for both Safari and Safari Technology Preview, which is nice.

Running this in, say, macOS Script Editor.app will remotely click the referenced menu item and display the expected conformation dialog.

  Note: you could add additional AppleScript to manipulate and/or dismiss the confirmation dialog; I'll leave such changes as an exercise for the reader.

Finally, we need to add a shortcut key to access the menu. There are a number of different ways to do this and choice will depend on personal preference and/or software at hand:

Alfred: workflow with NSAppleScript Action + Hotkey Trigger
Keyboard Maestro: AppleScript Action + hot key trigger
Automator: Service + Shortcut key via macOS System Preferences (see this answer)
FastScripts Lite (free for up to 10 shortcut keys): shortcut

  Note: it is no longer possible to assign a shortcut key to an item in the macOS Script menu, so I've not included that method of calling the script.

The last of the options above, FastScripts Lite, is the one that comes for free, and also the easiest method, so I'll use it in this answer.

Enter the above "activate...end tell" snippet into macOS Script Editor.app and save the resulting script to ~/Library/Scripts/Applications/Safari/Save Bookmarks for Current Window Tabs.scpt.

In FastScripts Lite.app you'll now have a menu item that is effectively an alias for Safari's "Add Bookmarks for These X Tabs..." menu item, and that can be assigned a shortcut key using FastScripts Lite.app > Preferences > Script Shortcuts.


Itunes Info Button Missing? I am running the most current iTunes  11.14 version and am trying to sync my contacts on my computer to my iPhone 4s.

From everything that I have read, I'm told to find the "info" button and select from my choices.

For some odd reason, my version of iTunes does not have or show the "info" button next to Summary and Apps, etc.

Where is that little critter and if it's not on this version, how do I sync my contacts from my Mac to my phone?

Apple removed support for syncing of contacts with iTunes 11. To synchronize contacts between a Mac and an iOS device you now must use iCloud.


iOS Widget for turning Wi-Fi on/off Is there a widget for turning on and off Wi-Fi? I have to open up the settings and go to Wi-Fi to switch it off. For me, this is annoying and unacceptable. Just can't live with it.

I know:

What the Wi-Fi button on Control Center does
Control Center's behaviour has changed since iOS 11 update
How to turn off Wi-Fi from the Settings app

I just want quick access to WiFi toggle like on Android.

iOS apps cannot control Wi-Fi, so it is not possible for an app to provide a Today widget to change the Wi-Fi power.

If your device is jailbroken, you can install  RealCC, which makes the toggles in Control Center for Wi-Fi and Bluetooth control the power rather than connections.


Does my 21.5 inch Late 209 iMac support mixing and matching memory modules? I have looked at this question, and apparently my iMac does support mixing memory sizes. However, when I installed 2 4GB memory modules and 2 2GB memory modules, when I clicked  → About This Mac → More Info... → Memory, it said that I had only installed 4 2GB modules. I have checked the packaging, and it still verifies that they are both 4GB modules. For further information, I am running Version 10.9.1 Mavericks.

If you use only the 4GB modules, what does it say then?
If it still see's them as 2GB each, it might be the RAM - who knows, maybe they just put the wrong sticker on it ;)


Delete the current line in Android Studio? I want to select the entire line my cursor is on so I can delete it. By using CtrlE I can move my cursor to the end of the line. But CtrlShiftA doesn't work... What's the alternative(s)? Thanks.

The CommandDelete can solve my final problem: I want to delete the line the cursor is on. And the cursor doesn't have to be at the end of the line you want to delete, it can be anywhere in the line.


Why is the iCloud Photostream option not available in iOS preferences? My iPhone 4 runs iOS 5.1.1.

When I go to settings > iCloud, the Photostream option is not available.
I've tried to restore my phone, but the option is still not available.

How can I activate this setting when it's missing from the preference?

Just looked a little closer at my settings....
Settings -> General -> Profiles -> [Work Profile] -> More Details -> Disable Documents in the Cloud, iCloud backup, Photo Stream.

There's my answer, my company supplied configuration that was loaded on the phone limits this option.

C'est la vie...


Apple site on Safari not working properly Here is an interesting issue: on the Mac and iPod sections of Apple's site there are the products subsections (Mac, Applications, Accessories, Server, on the Mac page and Products, iTunes and more, on the iPod page). Now, when you click on, say, the Applications link, the images above should slide out and be replaced with the images of Apple's apps. Except from Safari on my machine it doesn't.
Also, the Web Inspector shows two JavaScript errors that. This happens only in Safari.
Any body else observed this?
Any idea why?
Mac OS X 10.6.8
MacBook Pro 8,2
Safari 5.0.2

Figured out. Ghostery was blocking an Omniture tracking script: http://images.apple.com/metrics/scripts/s_code_h.js

Thanks for the tip, bmike.


Boot Camp Low Audio Level Through 3.5mm Audio Jack Description:

When using the 3.5mm audio output while booted into Windows 10, audio is barely audible at max volume; built-in speakers work perfectly. That is, the volume is very soft when my headphones are plugged in. Windows partition installed through Boot Camp Assistant.

Device: 2018 15" MacBook Pro, Vega 20 GPU.

OS: Tested on Windows 10 1809 AND 1903 (Both fully updated)

Boot Camp Assistant Version: 6.1.0 (6067.230.4)

What I Have Tried:

Clean install Windows 10 1809 and 1903
Enable and disable Windows Sonic For Headphones
Cannot disable audio Enhancements (the tab is missing for some reason)
Reinstall Mojave
Reinstall Windows Support Software

Observation:

Cirrus audio driver does not seem to be installed, but rather Apple Audio Driver. I am assuming this is normal?

Comments:

Is this a driver issue or a "me" issue. Headphone audio level is normal while using macOS Mojave. Windows 10 installation went smoothly and was uneventful. I did not have this problem on my 2015 15" MacBook Pro.

I’ve tried reinstalling everything from the operating system to the audio driver. My current work around is to use a USB to audio output adapter.


How can I update iTunes Match from the command line? I use iTunes Match to access my iTunes library at work. I added some new music to my library (back at home) recently, but I forgot to run the "Update iTunes Match" command to ensure that the songs were matched/uploaded to the cloud. Now I'm at work, and my new tunes aren't in iCloud.

I have shell access to my iMac at home using SSH. How can I tell iTunes to update my library from the command line? (I presume the answer will involve the use of osascript.)

A side benefit of knowing this would be that I can schedule it to run nightly so this doesn't happen again, which is why I'd rather not just use VNC.

iTunes doesn't let you AppleScript this natively, but you can use some UI scripting to 'click' the menu bar item and do it for you:

tell application "iTunes" to activate
tell application "System Events"
    tell application process "iTunes"
        click menu item "Update iTunes Match" of menu 1 of menu bar item "Store" of menu bar 1
    end tell
end tell

You can use that via SSH:

osascript -e 'tell application "iTunes" to activate' -e 'tell application "System Events"' -e 'tell application process "iTunes"' -e 'click menu item "Update iTunes Match" of menu 1 of menu bar item "Store" of menu bar 1' -e 'end tell' -e 'end tell'


Spotlight taking a lot of power on macOS I recently installed macOS, but I have noticed that "Spotlight.app" has had high CPU usage. It is not indexing.

The Average Energy Impact column in Activity Monitor takes past energy usage into account. For example for me it shows 23,87 for Time Machine even though it is not backing up at the moment.

Apparently Spotlight has been very active but has now finished indexing.


iPhone says there is not enough space/room to download an app, but there is Cannot Download
There is not enough available storage to download "<APP>". You can manage your storage in Settings.

My brother gets this error message when we go to install a large app from the App Store. He has 1.2 GB free and the app is ~600 MB. Why is it doing giving us this error, and do I really need to clear more space? What else could be wrong?

The size listed on the App Store is for the actual IPA, which is nothing but a zip file, the contents of which are compressed. The install size can be double or even more, depending on the app and its contents.


Can I store and run applications on an external drive? I am thinking of getting a this MacBook but the hard drive space is not sufficient. I was wondering if I bought an external hard drive for it would i be able to download apps and things onto it.

You can store and run applications in the non-standard /Application location on OS X, which means you can keep things on your external drive and run them from there.

You just have to be aware of the limitations of doing it this way:

The applications and data on the drive won't be available when it's not connected.Seems obvious but this can come up in surprising ways so I think it's worth saying here. Let's say, for example, that you have a text editor installed on your external drive and it's the default application for text files. When you double click on a text file when the drive is not connected you'll get an error about the application not being found. You'll need to right click and select an alternate application in that case.
The bandwidth, especially the sustained rates, for accessing the data and applications on this drive is limited to the connection method.For Thunderbolt it's pretty darn good but still not as good as a drive in the machine. For USB it's hit and miss. It depends a lot on the USB chipset used in the drive and what else is sharing the USB buss. Most applications will load resident in to memory when you launch them so for applications on an external USB drive you'll have some start up latency and that's it. But if you have to access a lot data or if the application loads itself in pieces as you access different features, you might find the I/O wait tedious. Expect beachballs here and there for sure.

Most applications can be safely relocated to the external drive by dragging them from /Applications to the new location on the remote storage. Applications are bundled in a nicely self-contained way. Note though that relocation the applications .app bundle from /Applications to the remote drive only moves the bundle. The configuration and ancillary data the application uses, generally found in /Library or ~/Library will remain on your primary drive. That data is harder to move. It's also usually smaller than the application bundle.


Why do fields turn black when using Preview to duplicate or print some pdfs? I've come across a PDF form, whose editable fields turn black when, after completing the form, I try to:

duplicate
move
print, or
email

the form.

Here's what the form looks like when I download it.

And here's what it looks like when I try to take any of those actions listed above.

Note: I didn't create the PDF, and I don't have (or want) Adobe Acrobat professional on my machine.

Has anyone else seen this before?
(I have a workaround, which I'll share below.)

This is workaround, but it does the trick.

Use the print function to "print" a new version of the completed pdf

This seems to restore the grey beneath the filled-in text, like so...


How do I check to see if my computer is infected with the OSX/Crisis Trojan? Just recently, a new trojan for OS X was discovered. Apparently it only affects Snow Leopard and Lion. Whether it does/doesn't affect Mountain Lion is still unknown. The trojan sits on your computer and hides, doing nothing so far. How do I check to see if this trojan has been installed on my system? If it is, how do I remove it?

Apparently, Intego has been investigating this trojan and has found that the trojan will only be on your machine if the following folder exists:

/Library/ScriptingAdditions/appleHID/

If it was installed with admin privileges, this files/folders will exist:

/System/Library/Frameworks/Foundation.framework/XPCServices/
/System/Library/Frameworks/Foundation.framework/XPCServices/com.apple.mdworker_server.xpc/Contents/MacOS/com.apple.mdworker_server
/System/Library/Frameworks/Foundation.framework/XPCServices/com.apple.mdworker_server.xpc/Contents/Resources/
/Library/ScriptingAdditions/appleHID/Contents/Resources/appleOsax.r

These files ping the IP address 176.58.100.37 every 5 minutes. It currently doesn't do anything, but at any point the trojan could activate and potentially cause problems. Intego also reports that Mountain Lion is not affected by the trojan. Intego's VirusBarrier will remove the trojan.


Are Apple keyboards multi-key rollover? For people who type with many fingers, are Macintosh keyboards are multi-key rollover?
Bonus points for explaining how to test this on any Mac or listing which models are 3 key rollover or higher.

Current Apple keyboards (this answer is from 2012, but I've re-tested in 2020) are not N-Key rollover and as far as I know no recent keyboard they have ever made is. I think some of the really old ones were N-key rollover, but can't confirm it.
You can use this website to test your keyboard.
Beware that every keyboard has a different electronic layout and will fail in different key combinations. On my Apple Aluminium keyboard if I hold down the W and E keys, then press the D key, the third key press does not register. But there are other key combinations where as many as six keys will register at once.
It is commonly said that true N-Key rollover can only be achieved using a PS/2 keyboard, and that USB keyboards can only achieve 6-key rollover. As far as I know, this limitation only applies to Microsoft Windows.
My mechanical keyboard's spec sheet claims "6-key rollover with USB, N-key rollover with USB to PS/2 adapter". When using it with USB on my Mac, I've confirmed that is in fact 20-key rollover.


iCloud Photo Library and storage usage on devices I am considering to use one of Apples iCloud plans.
I read that photos and videos on the devices are "lightweight versions" using less storage (at least if you configure it that way).

But let's say I have 200 GB of cloud storage filled with 190 GB of pictures, how can my iPhone with 16 GB handle that? (Assuming 16GB are not enough for the "lightweight versions" of the photos)
Am I getting device storage warnings and alike?

Thanks.

It is not a lightweight version it's more like a preview and then when you're connected to the internet you have access to the photo in full resolution. Your iPhone will let some space to the photos it will just optimise the storage, not all photos will be in the cloud. But I'm not sure if it can handle 200Gb but some space in your iPhone will be used depending on how frequently you access your photos in the cloud.


How can I post to Twitter using Siri? It seems like there is no voice command in Siri to directly update your status on twitter.

Am I missing something? I thought that with iOS 5 Twitter is tightly integrated into iOS?!

Workaround
Because Twitter offers to update your status via SMS, there is an easy workaround.

Create new Contact
Assign as first name: Twitter
Assign phone number:  40404   (this number is for United States residents)

Now you can update your Twitter status via Siri:

Tell Twitter Hello World.

Enable SMS for Twitter
In order for the workaround to work, you need to enable the SMS feature for Twitter first.
You can do this either online by editing your profile on twitter.com or send the text message start to 40404 (for US residents only!). Then follow the instructions in the reply. However, the latter way is more complicated.
International Twitter SMS codes
United States    40404
United Kingdom   86444        (Vodafone, Orange, 3 and O2 customers)
Australia        0198-089488  (Telstra customers)
...

You can get a full list of the world-wide twitter short codes here.
Some countries or providers do not support short codes. You have to use long codes instead. Fees may apply:
United Kingdom  +44-762-4800379
Germany         +49-157-05000021
Finland         +35-845-73950042


Is there a way to sort photos by file size in iPhoto? I have a bunch of photos and videos in iPhoto and I'd like to find the largest videos particularly to see if I can delete them to make some space. It seems strange that I can't find an option to do this in iPhoto - am I missing something?

No, there is no way to sort on size in iPhoto. From your context I guess you mean filesize. In iPhoto, size means the dimensions on the Photo (length by breadth, measured in pixels) - see the Export dialogue, for instance. iPhoto is all about the images and not the files that contain them, so I'm not surprised. It's a $15 app, you get a lot, but not everything.


How to scroll using an external USB trackpad that is not a magic-mouse? In some cramped situations I would prefer to not use the macBook pro internal trackpad but rather an external one as shown

The right/left clicks and the trackpad area do work fine for traversing the screen and clicking. But then how to scroll the current application window?  On the internal trackpad that would be done by two fingers on the trackpad.
The Settings | Trackpad only applies to the internal trackpad of the macBook pro.  There is also an "Configure bluetooth Trackpad" : but this is a usb.
Is this possible? I do not want to use a bluetooth because I have bad issues with the bluetooth freezing the macOS.
I have a 2020 macBook pro 16" and am on Catalina.

I suspect that the trackpad settings/bluetooth settings may not be all that useful for this.
Firstly if you do a system report (Apple icon ► About This Mac ► System Report...), you can check to see if the USB device is recognised. This seems to be the case since your saying it recognises left and right clicks.
My only suggestion is that this may require some third party software to properly recognise it. For example: SteerMouse. Similar to if you have ever installed a joy stick for a simulator, it usually requires the actual third party software to recognise it.


Time capsule backups previous versions of AppStore apps? I have an App that I bought from the AppStore but later the publisher started to distribute outside the AppStore.

I updated the application and when it stopped working I tried to find on my Time Machine backup with the surprise that it wasn't there. Only the actual one probably last backup.

That makes me think that Time Machine doesn't backup AppStore apps thats good if my current application was from the AppStore.

If this is correct. I'm hopping for way to mark thiss application to be included in all the backups.

It's strange, I always backup all the entire hard disk even if they are AppStore apps.
So I am able to restore previous apps version.

Check if you have excluded some apps from backup.


PSA: Random freezes/kernel panic on 2013-2015 retina MBP I've got a Late 2013 15" MBP (A1398) that has been experiencing random freezes/kernel panics for a while now. I was initially unable to pinpoint a cause.

After a while tinkering and the sudden realization the panics were precipitated by moving the laptop; I realized there is a small screw right underneath the SSD. With time, vibration and possibly hits/falls, the screw can come loose.

The problem with this is the screw's head can make contact on some of the SSD components effectively shorting them out. AFAICT, the shorts are benign and have no consequences other than a kernel panic.

Of course, I wouldn't hold my breath nor bet on it not having the potential to leave permanent damage in the drive.

So... what's the point of the question? This issue can be easily solved by adding one or three strips of Kapton tape (or similar) in order to insulate the screw head from the SSD; as seen here:

This happened to me on the aforementioned model but I wouldn't be surprised if this problem is common to all MBP models sharing this design.


How do I run sudo command from standard account? From what I've read, it is good security approach to have two accounts, one admin and one standard.

I am trying to run the following command in terminal on my standard account

sudo mv /System/Library/CoreServices/Search.bundle /System/Library/CoreServices/Search.bundle.bak killall SystemUIServer

It asks for a password at which point the process fails because the current user "is not in the sudoers file."

Is it asking for my admin account password or root password?  Do I have a root account/password if I haven't explicitly set one up? How do I temporarily elevate my access to execute the command without necessarily enabling root?

The system is asking for the password of your account and then verifies whether you are allowed to run sudo based on the content of /etc/sudoers. By default only Administrators (which have the option ticket in Preferences) are allowed to do this.

In case you want to run shell commands with sudo without having to switch users all the time you have several options:

Use ssh <any-admin-user>@localhost to log in as an admin user and run sudo then
Add your non-admin user to /etc/sudoers by logging in as an admin user, executing sudo visudo in Terminal, duplicating the %admin    ALL=(ALL) ALL line and replacing %admin with your username. This will allow you to use sudo in Terminal without giving you full admin access. Using visudo instead of editing the file directly will ensure that the file gets checked for syntactical correctness on save (an error in /etc/sudoers might lock you out of your system completely)


Ejecting all network drives via Applescript/Automator/Shell? I use the following script to attempt to eject all disks that aren't internal:

tell application "Finder"
    eject (disks whose ejectable is true)
end tell

This has the advantage of skipping volumes like MobileBackups as well as several others.

Unfortunately, it doesn't eject network shares.

Is there any way to get connected network shares in applescript?

As a +1, ideally this would skip things like optical disks as well.

EDIT: Both answers so far have shared ways to eject specific network disks. This, of course, is easy and I know how to do it. What I'm specifically asking for is a way to attempt to eject every disk other than system internal disks, regardless of their name.

I use Automator. I inserted 'Get Specified Finder Items', and named the target disks that I wanted to 'Get'. Only those named get chosen, but network drives do work. I then pipe this to 'Eject Disk'.

That's it.


How can I disable Universal Clipboard on macOS and iOS? I've looked into the iCloud settings on both my Mac and iOS, but I can't seem to find an option to disable this feature. Is there a plist entry somewhere that I can use, or is it forced on?

Disabling Handoff is currently the only way to disable Universal Clipboard.

Mac: Go to System Preferences > General > uncheck Allow Handoff
iPhone: Go to Settings > General > Handoff > uncheck Handoff

Just so you know, Handoff uses a secure communication channel to transfer information between devices signed into the same Apple ID.

Data does not travel to Apple's servers or even over the internet. Devices advertise availability to each other via Bluetooth and data is transmitted over Wi-Fi, but only on the local network.


When MouseKeys are on, how do I click or move the mouse using AppleScript? This post suggests that the command tell application “System Events” to key code 37 in AppleScript should move the mouse pointer one pixel down and to the left if run when MouseKeys are enabled. In OS X 10.7.2, however, it has the effect of generating a lowercase l, and not moving the mouse at all.

Similarly, I had hoped tell application “System Events” to key code 34 using control down would sent a control click at the current point of the mouse cursor, but that does not seem to be the effect.

Does anyone know a way that works in Lion on a mid-2011 MacBook Air to generate a click or control-click at the current mouse location using AppleScript? It is okay if it relies on MouseKeys and/or UI scripting.

I would prefer if it did not involve installing compiled command line utilities, but if such utilities exist and are Lion compatible, that is far better than nothing.

There are tons of command line utilities to do this... and I'd reckon that going this route's your best bet... One benefit? is that these solutions should work, irrespective of whether or not "mouse keys" are on, right?  One of my particular faves is cliclick

Cliclick” is short for "Command-Line Interface Click". > It is a a tiny shell / Terminal application that will emulate mouse clicks or series of mouse clicks (including doubleclicks and control-clicks) at arbitrary screen coordinates.
Hence, it is a tool for automating / scripting things that cannot otherwise be scripted (for instance, using AppleScript). Other than GUI Scripting, it does not require "Access for assistive devices" to be activated in the System Preferences.

Usage:
$ cliclick c m

will "control-click" the current mouse location, but you can also specify the coordinates, shift-click, double-click, etc.  It can also return the coordinates of the mouse with a -q argument, and return the mouse to the original location (when specifying coordinates) with the -r argument.
In your case.. I guess you'd just...
do shell script "cliclick c m"
from inside your AppleScript / Workflow / whatever...
There's a GREAT post on this subject on MacWorld's site (née Mac OS X Hints) - that I've gleaned lots of good info from, over the years.  If you don't care for my answer you will surely find a solution you DO like, there... there's hacks to make everyone smile - from an Automator freak = to a grumpy C diehard.
Update:
There do seem to be some ways - to "do it" in AppleScript.. but they all seem to require knowing where your mouse is... which i assume you don't.  So in an embarrassingly nerdy play for some rep... I wrote this..
do shell script "python -c 'import sys, time; from Quartz.CoreGraphics import *;

def mouseEvent(type, posx, posy):
  theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft);
  CGEventPost(kCGHIDEventTap, theEvent);

def mouseclickdn(posx,posy):
  mouseEvent(kCGEventLeftMouseDown, posx,posy);

def mouseclickup(posx,posy):
  mouseEvent(kCGEventLeftMouseUp, posx,posy);
  ourEvent = CGEventCreate(None);
  currentpos = CGEventGetLocation(ourEvent);
  print currentpos[0];
  print currentpos[1];
  mouseclickdn(currentpos.x, currentpos.y);
  mouseclickup(currentpos.x, currentpos.y)'
"

What the hell is it?

AppleScript calls 'do shell script'.
Which then calls Python - with a command line argument (-c) = that's been escaped and cajoled = to cooperate with A/S.
Python then "imports" CoreGraphics/Quartz, etc.
And defines some Cocoa-API/PyObjC methods for "dealing with" the mouse.
Python "figures out" where the mouse is.
And clicks! (down, then up)
As a bonus, it returns the coordinates of the mouse, 'if you were interested_.

Works 100% and isn't even THAT slow. Hope you like it!
Edit:
Here is the BASH one-liner, for purists / A/S haters.
echo -e "import sys, time; from Quartz.CoreGraphics import *\ndef mouseEvent(type, posx, posy): theEvent = CGEventCreateMouseEvent(None, type, (posx,posy), kCGMouseButtonLeft); CGEventPost(kCGHIDEventTap, theEvent);\ndef mouseclickdn(posx,posy): mouseEvent(kCGEventLeftMouseDown, posx,posy);\ndef mouseclickup(posx,posy): mouseEvent(kCGEventLeftMouseUp, posx,posy);\nourEvent = CGEventCreate(None); currentpos = CGEventGetLocation(ourEvent); print currentpos[0]; print currentpos[1]; mouseclickdn(currentpos.x, currentpos.y);\nmouseclickup(currentpos.x, currentpos.y);" | python


How to remove Windows Operating system from Bootcamp? I have installed Windows 8 through BOOTCAMP, and now i want to remove it and leave it for a clear OSX. Is there anyone who know how to remove it completely? (I mean nothing related windows left).

Apple helps:

  Boot Camp: Remove Windows from your Mac

  How you remove Windows from your Mac depends on whether you installed Windows on a disk that has multiple partitions or one that has a single partition.

  Important: Back up all important data stored on your Windows partition.

  If you installed Windows on a disk that has multiple partitions

  Start up your Mac in OS X.
  Quit all open apps and log out any other users.
  Open Boot Camp Assistant, then click Continue.
  Select “Remove Windows 7 or later version,” then click Continue.
  Do one of the following:

  If your Mac has a single internal disk, click Restore.
  If your Mac has multiple internal disks, select the Windows disk, select “Restore disk to a single OS X partition,” then click Continue.

  If you installed Windows on a disk that has a single partition

  Start up your Mac in OS X.
  Open Disk Utility, located in the Other folder in Launchpad.
  Select the Windows disk, click Erase, choose the Mac OS Extended (Journaled) >format, then click the Erase button.


OS X Snow Leopard installer hangs I installed Linux on my MBP. I just told it to overwrite the whole hard drive so OS X is gone.

But now I want to go back to OS X so that I can upgrade to Lion.

I start up my MBP with the installation DVD. I see it startup with the white screen and the spinning wheel. Then after a while nothing happens.

I'm not sure if my DVD is bad. Maybe it's trying to read something and it can't do it.

I read that the installation DVD first copies part of itself onto the hard drive. Is it possible that it's expecting to find a certain partition to copy itself on to and since it's not finding it that's the reason it hangs?

Is it possible to copy the DVD onto one of my external USB drives and use refit to boot that drive like it's the DVD?

What can be done?

Try to apply a PRAM Reset:

Hold P+R+⌘+⌥ right after boot and wait till the MBP restarts.

Then insert the install DVD and try to read it again.

C will boot from the DVD
⌥ will let you choose your startup volume

Click here for more startup key combinations.


Is there an OS X terminal program that can access serial ports? What programs can act as a terminal and access serial ports?

This is not for terminal access on an IP connection, this is so I can access a hardware device plugged into a USB/serial converter running at 9600/8/N/1.

You can use the terminal command screen to do this!!!

As seen on ServerFault:

  I love using [screen] for connecting to serial consoles, i.e.

screen /dev/ttyS0 19200

Or, if you prefer Mac OS X hints...

  I often have to do router configuration via a console port, so I use a
  Keyspan Serial Adapter to get access. Two problems then present
  themselves: ZTerm is a horrible Mac OS X app. It hasn't been updated
  in five years or so, and isn't a Universal Binary. The developer
  doesn't seem in any hurry to rectify the situation. It is not worth
  the shareware fee in its current form. Minicom requires installation
  of Fink or MacPorts and is overly complex. Solution: Use screen,
  Terminal, and a little AppleScripting.

  First, launch Script Editor and type/paste in the following code:

tell application "Terminal"
  do script with command "screen /dev/tty.KeySerial1"
  set number of rows of window 1 to 100
  set number of columns of window 1 to 80
  set background color of window 1 to "black"
  set normal text color of window 1 to "green"
  set custom title of window 1 to "SerialOut"
end tell

  Compile and save as an app from within Script Editor, and you have a
  double-clickable application to launch a serial Terminal session. You
  may want to customize this slightly -- you can change the screen
  colors or number of columns or rows. You may also need to customize
  the screen command with a different device name if you are using
  something other than the Keyspan Serial Adapter (do an ls tty* of the
  /dev/ directory to get the right name).

  screen uses Control-A to take commands directed to it. So type
  Control-A followed by Control-\ to exit your screen session. If you
  fail to do this and exit a Terminal session, you'll leave the screen
  session alive and the serial resource unavailable until you kill the
  screen session manually. man screen will show you further commands to
  send to a screen session.

  If anyone can reply with a link to a tutorial on how to wrap an
  interactive Unix App in Cocoa, that would be the next step -- it would
  be nice to do this without involving Terminal. If you prefer to use
  Minicom, you could still use the AppleScript to wrap it into a nice
  launchable app -- use this older hint to find the right command line
  commands.

Many USB-Serial adapters use the chip from FTDI. Install the "Virtual COM Port" driver and look for the proper TTY name in /dev. For example, on a PowerBook G4 it came up as /dev/tty.usbserial-FTALKY8I.


song ratings on iPhone I used to be able to rate a song one star to 5 stars while listening to it on my iPhone.  I do not have that option any more.  Now, when I tap on the title of the song, it only takes me to the album, and I can only "heart" it or not.

I have figured out how to get my ratings back in iTunes..

How do I view and edit the rating for a song on my iPhone?

Rather than tapping the title of the song, tap the album cover while the song is playing. There, the five dots to rate the song will appear.


How to change timestamp of movie on iPhone? When I recorded a movie with my iPhone, the date was not set correctly. So now the video shows up in the wrong order in the Photos app.

It seems the video date is inferred from the file created/modified timestamp. How do I edit the timestamps of the file stored on my phone?

I figured out how to modify the timestamps of the file on my PC, but I don't know how to put them back on my phone while retaining the edited timestamps.

Windows explorer does not support copying files to the iPhone
iFunBox will copy files to the iPhone, but updates the timestamps at the same time

update:

MOV files have EXIF data, too. I used ExifTool to edit the tags like this:

exiftool.exe IMG_2439.MOV \
             -"CreateDate"="2016:10:12 20:59:55" \
             -"ModifyDate"="2016:10:12 21:02:37" \
        -"TrackCreateDate"="2016:10:12 20:59:55" \
        -"TrackModifyDate"="2016:10:12 21:02:37" \
        -"MediaCreateDate"="2016:10:12 20:59:55" \
        -"MediaModifyDate"="2016:10:12 21:02:37" \
           -"CreationDate"="2016:10:12 20:59:55-05:00"

However, deleting/modifying this file on my phone must have removed it from the Photos app database... I can't see this movie at from my iPhone, now. Only from the file system when connected to a computer.

Modify the database at /Photodata/photos.sqlite. (Camera roll photos are sorted by zaddeddate, so setting this date to zdatecreated will sort them in the expected order.)

More info and detailed steps:

Fixing the iPhone’s photo library
[Tutorial] Fix: iPhone Photo Database corrupt and/or Cameral Roll out of order
Fix Corrupt Photo Database


Can I obtain the web browsing history from my in-app browsers on iOS and iPadOS? Every week or two, time permitting, I recap what I have browsed/watched/listened to etc. online. It provides insight into my thought processes, it helps give me some continuity of purpose and aids my memory. But pages browsed in in-app browsers on iPhone/iPad and, of course, any use of apps themselves leaves no history log that I'm aware of. Currently I try to remember to open any in-app browser pages in Safari, but in practice I often forget. My SOHO router doesn't allow HTTP logging and isn't compatible with OpenWRT, which I assume would allow it.
Is there a way, other than with router logs, to obtain this in-app browser history? And would router logging be a reliable method if available?

There is currently (as of iOS 14) no way to view browser history if it's done within an app.  Developers use Apple's SFSafariViewController class and it doesn't expose this option to developers.
In addition to not being able to view history, in-app browsers can't provide access to autofill data or website data.


"Other" just ate my hard drive When I woke up his morning, I had >80 GB of free space on my hard drive. Over the last four hours, in which I wasn't even around, something filled my hard drive completely. I would attach a screenshot, but there isn't even room to save one.

I'm currently looking at around 210GB of 'other' on my 250GB HD - and I have no idea where it came from. It's always been fairly stable until today.

I am, of course, deleting everything I can afford to, but unless someone knows of something huge I can nuke where 'other' is, I don't think I'll be able to get it down to a manageable size.

I have a Time Machine backup. If I restore to it, will it also contain this huge amount of 'other'? Or is there a better option?

There are many things that 'other' could be. This Apple KB article details what 'other' space is:

OS X: What is "other" space in About This Mac?

…but basically, there's not only one thing that it could be, or one thing that everyone's suffered from.

Your best bet is probably to run something like Daisy Disk or similar to find large files to delete. Alternatively, use Finder and search for large files sorted by Date Modified so that you can see recent files that might be taking up large quantities of space.


Recently scrolling up and down gesture triggers page change gesture Recently my mid 2012 Retina Macbook Pro's trackpad has started exhibiting some strange behavior. Attempting to scroll up or down using the two finger gesture randomly seems to trigger the page back/page forward gesture.

I've tried rotating my macbook slightly to correct for any slight variation in my finger positioning, however that doesn't seem to help.

I don't know the exact point where this began happening, but I'm sure it wasn't like this a year ago. I'm currently running Yosemite, after upgrading from a clean install of Mavericks.

Edit: This is primarily happening in Google Chrome. I will try other browsers but I suspect this is irrelevant.

If this is happening in Preview: when your pointer is on the titlebar/toolbar, using the 2-finger scroll will trigger the page up page down gesture. Make sure your pointer is on the document itself and not the titlebar.