Shell script to rsync or if not mounted - mount and rsync This is what I've got so far:
!/bin/sh
Storage Folder Backup
Defines mount point
LOCALMOUNTPOINT="/Volumes/thisisanetworkshare"

Checks for mount
if mount | grep "on $LOCALMOUNTPOINT" > /dev/null; then

If already mounted initiates rsync job
caffeinate -i rsync -av /Users/auser/storage/ /Volumes/thisisanetworkshare/ --log-file=/Users/auser/rsync.log

Otherwise mounts and initiates rsync job
else
    mkdir thisisanetworkshare
    mount_smbfs //thisnetwork/thisisanetworkshare /Volumes/thisisanetworkshare
    caffeinate -i rsync -av /Users/auser/storage/
    /Volumes/thisisanetworkshare/ --log-file=/Users/auser/rsync.log
fi

So basically I want to start an rsync if the network share is already mounted but if it's not then I would like to mount that network share and start an rsync.
The network share requires auth but this is saved in the keychain so doesn't ask for it in finder. Does this matter for a shell script?
Thanks in advance!

Using the proper normal syntax of the command line version of the mount command from the command line or a bash script for a password protected SMB Share will require entering the password, by one means or another. However from a bash script or command line there is a way to access the stored Keychain password to mount the SMB Share without entering the password in the bash script or from the command line.

The following assumes both the authenticating User Name and Password for the target SMB Share is stored in the User's Keychain.

Since the authenticating User Name and Password for the target SMB Share is stored in the User's Keychain then mounting the target SMB Share can be done via AppleScript within the bash script or command line using the osascript command.

In the following example I shared the Temp folder on another system on my Network having the IP Address: 192.168.169.227

I first mounted this via Finder's Go menu > Connect to Server... where I checked the "Remember this password in my keychain" check box so it's stored in the Keychain.  Once that was done I unmounted the share and used the following command to mount it from a bash script.

osascript -e 'tell application "Finder" to mount volume "smb://192.168.169.227/Temp"'

I did not need to pre-create the "/Volumes/Temp" folder as that is done automatically by this method unlike using the mount -t smbfs //... command normally where the mount point supplied has to already exist.

So as you write your bash script use this method in place of the normal command line version of the mount command.


why login screen has a 2-second delay with external monitor? On a brand new mid-2013 MacBook Air, with an external monitor ASUS PB278Q 27" 5ms WQHD (2560 x 1440), connected through a miniDP-to-DP cable, every time the computer gets back from the monitor sleep, the login screen has a delay of several seconds, prior to the typing or the updates being reflected.

This generally happens about a second or two after MBA's own monitor gets online, and the unresponsiveness continues for a couple of seconds, until the external monitor appears online.

Why do I have such a big screen delay on login, and how do I deal with it?

My conjecture of the situation is that when my Mac instructs the monitor that it is no longer needed, it enters some kind of power saving mode which seemingly makes it unintentionally treated as a disconnect from the Mac, and then when the Mac wakes the monitors back up, the external monitor is made to appear as a new device, and takes some extra time for configuration / adjustments.  In any event, I'm convinced this should not be happening, but who exactly is to blame, and is there any way to deal with this?

A new conjecture is that this is due to a non-compliant mini-DisplayPort to DisplayPort cable that is causing the problem.

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

In certain circumstances you may notice a black screen after waking your computer from sleep. The computer may also appear to be unresponsive when the black screen appears.

Certain cables advertised as being VESA 1.1a compliant may contain a construction issue that may result in the DisplayPort power pins at either end of the cable shorting together. VESA 1.1a compliant cables must isolate the DisplayPort power pins at either end of the cable.

Supposedly, this only affects resolutions above 1920x1200, e.g. of the popular resolutions, only 2560x1440 and above are affected.

The StarTech mDP to DP cables are not VESA compliant, and very few mDP to DP cables are actually compliant.

There's a web-site with a list of compliant cables:

http://www.displayport.org/products-database/?products_category[]=cables-connectors&products_manufacturer=


Is there an iPhone app that can give me a push notification of a new email? I want an app that can push my emails so they show up with the blue screen and with my notification tone.

I've tried Im+ but it's a chat also and I just want to push my emails.
I have Gmail, and I only want to push Gmail mails.

Is there an app that can do just that?

Note: I want the blue icon that appears with a sound. (This is the exact same thing that happens to SMS and any other push notification.

I think you might be confusing "push" and "SMS".

Push allows an email client to receive a message shortly after it has been sent, without waiting for a "fetch" window at n minutes.

If you just want all mail to show up as SMS (text message), you can use Gmail's built-in forwarding to achieve this.  It will forward the email as soon as it is received, and all SMS messages are delivered in a "push"-y manner, so this should do what you want.

Open Gmail's "Mail settings"
Select the "Forwarding and POP/IMAP" tab
Click the button to "Add a fowarding address" and enter your phone's SMS text number (you can find a very comprehensive list of carrier email-to-SMS addresses here: http://www.emailtextmessages.com/)
Verify that you own the address (they will send a verification code to the address, and you'll enter it in Gmail)
Select to "Forward a copy of incoming mail to" that address you just entered
Choose to "keep Gmail's copy in the inbox" if you would also like to be able to access your email the traditional way

You don't need to sign up for any third-party service, it's free, and you'll get your SMS messages immediately.

If you only want to forward a subset of your email, you can set that up in Gmail as a filter with a rule that forwards to your SMS email address.

Keep in mind the limitations of SMS, though.  The theoretical maximum length for an SMS is 255 concatenated 160 character messages, but most carriers will limit it to only a few messages -- so you might lose a lot of body text on longer emails.  But it will serve as good, fast notification that a new email has arrived.


Network stops working, with "Can't Assign Requested Address" On OS X 10.9 (but no prior version), every now and then, I start getting strange network errors.  I can still ping, but anything that requires actual content (like a web page) completely stops.

For example:

$ ping 80.68.93.197
PING 80.68.93.197 (80.68.93.197): 56 data bytes
64 bytes from 80.68.93.197: icmp_seq=0 ttl=46 time=175.291 ms
64 bytes from 80.68.93.197: icmp_seq=1 ttl=46 time=172.519 ms
^C
--- 80.68.93.197 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 172.519/173.905/175.291/1.386 ms
$ curl http://dailyjs.com/
curl: (7) Failed to connect to 80.68.93.197: Can't assign requested address

It seems similar to this message thread, but I don't see an answer there.

I've tried deleting the ethernet interface and re-adding it, but that doesn't seem to help.

I've tried deleting the ethernet interface and turning on wifi, which shows the same symptoms.

A reboot might fix the problem, but it's rather intrusive.  Any ideas?

In my case there was only one host giving me this issue. sudo route delete example.com fixed it instantly, no reboot.


16" Brand new macbook pro not charging / booting up I'm an IT guy of a company. We have ordered some 16" macbooks for our developers but they're not charging/ booting up. When I try to boot up, a battery icon appears on black screen just like empty battery situation despite being charged for hours! I'm attaching a photo. I've tried SMC reset and other stuff mentioned in Apple website but no luck. I've 6 macbooks like that! Very disappointing... I'm just wondering, if anyone else come across this issue before or solved?

Regards!

This happened to me twice in the past day: I purchased both of the following model MacBook Pro 16-inch laptops and both exhibited the exact same behavior. They never booted. I never saw any screen other than the empty battery screen with charge icon. I used the 96W USB-C Apple power adapters that shipped with the Mac. Nothing. Two lemons in a row!

MBP 16.0 SG/2.4GHZ 8C/32GB/5500M/2TB-USA
Part Number: MVVN2LL/A
$3,899 retail price
Third time's a charm? I'll let you all know later today...


Install pyqt via homebrew with `--with-python3` but still goes to Python 2 Here's my command and output (some command line arguments are left out):

$ brew reinstall pyqt --with-python3
==> Reinstalling pyqt --with-python3
==> Downloading http://downloads.sf.net/project/pyqt/PyQt4/PyQt-4.10.3/PyQt-mac-
Already downloaded: /Library/Caches/Homebrew/pyqt-4.10.3.tar.gz
==> Patching
patching file configure.py
==> python configure.py --confirm-license --bindir=/usr/local/Cellar/pyqt/4.10.3
==> python ./configure-ng.py --confirm-license --bindir=/usr/local/Cellar/pyqt/4
==> make
==> make install
==> Caveats
Set PYTHONPATH if you want Python to find your site-packages:
  export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
==> Summary
  /usr/local/Cellar/pyqt/4.10.3: 560 files, 18M, built in 6.6 minutes

I suspect the formula of pyqt somehow hard-codes the python's version. For example it explicitly includes paths like python2.7/site-packages/. Here's the function install in the file:

  def install
    # On Mavericks we want to target libc++, this requires a non default qt makespec
    if ENV.compiler == :clang and MacOS.version >= :mavericks
      ENV.append "QMAKESPEC", "unsupported/macx-clang-libc++"
    end

    args = [ "--confirm-license",
             "--bindir=#{bin}",
             "--destdir=#{lib}/python2.7/site-packages",
             "--sipdir=#{share}/sip" ]
    # We need to run "configure.py" so that pyqtconfig.py is generated, which
    # is needed by PyQWT (and many other PyQt interoperable implementations such
    # as the ROS GUI libs). This file is currently needed for generating build
    # files appropriate for the qmake spec that was used to build Qt. This method
    # is deprecated and will be removed with SIP v5, so we do the actual compile
    # using the newer configure-ng.py as recommended.
    system "python", "configure.py", *args
    (lib/'python2.7/site-packages').install 'pyqtconfig.py'

    # On Mavericks we want to target libc++, this requires a non default qt makespec
    if ENV.compiler == :clang and MacOS.version >= :mavericks
      args << "--spec" << "unsupported/macx-clang-libc++"
    end

    system "python", "./configure-ng.py", *args
    system "make"
    system "make", "install"
  end

But I am not sure whether it's safe to change the path directly in the source. Any ideas? Thank you.

You are right. The formula does hardcode the python version. I have worked on an updated version, and it should be available tonight.

Also, it is safe to change the path directly in the source. However, being a git repository it will complain if you have uncommitted changes when you want to update. Your best bet would be to just wait until tonight or tomorrow morning.


iPhone connected to charger and shows charging but not charging battery Last night I charged up my iPhone 5c and this morning I woke up and it was on 1 percent. After this, I checked that the iPhone's charger was plugged in properly and it looked fine.

I turned on my phone to answer a message and the phone went dead. I don't understand why this happened because it had the lightning bolt there in the battery, indicating it was charging.

It happened to me once. Your charger is an Apple charger? When I was using a fake charger it was a really problem for me, so my way to fix it was rebooting via LOCK + HOME buttons and then check if the iPhone was charging. It could be just a bug.

If it's still not charging, change your charger because it can be broke somewhere or getting voltage changes. Apple Support have all the graphics for voltage changes with fake wires or chargers.


How to handle Numbers' automatic Data Formatting? I'm trying to put together a sheet that calculates hours I work. One thing I want to do is calculate hours that are billable. So I have something like this:

Things that aren't billable or are already billed go to 0.

However, I'm having a problem with either the zeros that are generated or the field that adds them all together:

"Durations can't be compared to other data types." Here's my formula for the cell:

So, either the second value in the COUNTIF is giving me problems or the zeros above are (which is possible, since doing a simple SUM with a 0 value won't work either).

How do I deal with this? If I try to set the 0 cells or the sum cell at the bottom to the Data Format "Duration," it overrides my selection.

Is there a way to force a data format onto a cell with a formula?

If this is more suited to Super User, feel free to transfer.

Without access to the spreadsheet that you've shown, I've attempted to recreate this myself. It appears that there are two things wrong with the spreadsheet above:

The test-array for the countif is of Data Format Automatic. This means that the zeros are not of format Duration and can't be compared by the countif.

To fix this, select the entire array and choose Duration from the Data Format list.
The countif's condition is of format Number whereas the test-array is of format Duration.

To fix this, use the following for the countif cell:

=COUNTIF(G2:G11,">0h 0m")


Disk Utility: choose disk or volume? When using disk utility to verify/repair permissions (or verify/repair the disk itself), I've never been clear whether I should perform operations on the disk ("WDC WD1200BEVE-00WZT0" in my case) or on the volume nested beneath it ("MacintoshHD"), or both. I usually do both, but is this necessary?

It can't hurt to repair permissions on your actual disk, but it is quite unnecessary, because "Macintosh HD" contains the actual operating system, so the stuff that you want to repair.


Add someone to contacts through Game Center? Is there a way to add the friends I have added to Game Center to my contacts app? I'm using iOS 7.1 on iPad.

No, this is currently not possible.

You can provide feedback to Apple regarding this on any of the iOS device pages:

http://www.apple.com/feedback/iphone.html or /ipad.html or /ipodtouch.html.


My MacBook is slow recently. How do I fix this? My MacBook has become very slow recently and not because of any software update. But it just became suddenly slow. Logging in to my account takes 2 minutes and even opening a terminal window takes a while to load. Apps take a while to open and quit. I even tried to reinstall macOS without formatting my drive but my MacBook is still as slow as a snail.

PS. I have 24GB left on my 120GB drive.

EDIT: I have a MacBook Pro (Retina, 13-inch, Early 2015) with 8GB ram. I am using this MacBook for 3 years.

What ideas should I consider next?

It looks like you have sufficient Disk space and RAM.

If your battery is EOL (died) or not holding charge...

Mac will cut the CPU clock speed to 1/2 of maximum that will impact all and any operations.

Install Intel Power gadget to verify your CPU, this is an example of normal speed CPU.

Use the Activity Monitor to see who is responsible. Here are my examples.

Notice the Disk activity as Data/Sec

Finally about the battery (check this on your computer)


Why no Deliver notice? When I text 1 person (who also has iphone) the message never says Delivered but the person does get the message.  Why doesn't it say delivered like it does to anyone else I text with iMessage?

There are a few possibilities.

This person has iMessage disabled in their settings.

They have an older iPhone that doesn't support iMessage.

They have mobile data turned off, in which case, they would only be able to use iMessage when connected to wifi.


Opt+arrow cursor manipulation stopped working Part of my regular repertoire of keyboard shortcuts is Opt+arrow and Shift+Opt+arrow for moving (and selecting) a word at a time in apps like Word, TextEdit, etc.

A couple days ago Opt+arrow stopped working in most places (though not all). I figured a reboot would clear it out but it did not. The only place I can find that it works right now, strangely enough, is a textbox on a website in Chrome. So I can use it this dialog I'm typing in right now, but not the URL field of the browser.

Any idea how to fix and/or reset this behavior? I'm lost without it.

I found the answer.

Even though it wasn't selected, I did have installed "Unicode Hex Input" as an Input Soure (along side U.S) in the Keyboard->Input Sources preference pane. I removed the Unicode option altogether, and the opt-arrow shortcut started working again instantly.


How do I disable the Control+Shift+Down Arrow Hotkey? I have a new Macbook Air with Lion and I'm using Excel in VMWare Fusion and it has a hotkey for Control + Shift + Down Arrow.

Every time I try and use this key combination instead of doing what it's supposed to do for Excel it's getting intercepted by Lion.

Is there a way to disable this hotkey globally or perhaps just when I'm using Fusion?

To reassign the key globally, go to System Preferences » Mission Control and under Application Windows, where it currently says ^↓, assign another key (I used F10, à la exposé).


Completely reinstall everything on Mac mini My Mac mini behaves in strange ways.  Certain applications open randomly, downloads just don’t download sometimes, for a while I could not empty the trash, etc.
I want to cleanly erase everything that my computer is including the kernel, Hardware, SMC Recovery firmware and everything else and just put back fresh operational replacements.  I am not looking to buy a new computer (like other questions here said to do) I do not know which one or couple of things is corrupted but I want to just get rid of everything and start over without bricking my computer.  Any ideas?

Restart the machine, while holding ⌘ Command⌥ Option R. The option key gives you the latest supported version of macOS rather than what it shipped with. Then follow the prompts to reinstall a new macOS.

As long as you have a backup of your needed documents and settings I would also erase the drive with disk utility within the process of reinstalling, that will ensure nothing is left over from a potentially damaged OS install.


Move Wifi passwords from one mac to another A little bit of background here. I previously had High Sierra installed on my Macbook Air, but for some reason, at one point when I tried to boot up my mac, it showed a folder with a question mark sign that kept flashing. Luckily for me, I was about to upgrade to macOS Mojave, so I had a bootable disk with Mojave on it. I created a new volume on the existing Container in recovery mode, installed Mojave on it and copied out files from the corrupted High Sierra Volume.
Now, I had previously read on some articles and forums that the way to move keychains manually to a new mac was to navigate to ~/Library/Keychains/ and copy out the login keychain, but I found out that Wifi passwords were stored on the System keychain in Keychain Access, so I navigated to /Library/Keychains/ and copied out System.keychain along with the login keychain from the user folder and I deleted the volume.
Coming to my Mojave and opening up the High Sierra's System.keychain in Keychain access, I found that I was unable to copy the Airport passwords to my main Mojave System keychain because it was requesting for the High Sierra's System.keychain password. This is puzzling, because I already was able to unlock the High Sierra's System.keychain with my Mojave user password which by the way is the same as my previous High Sierra user password.

Yet, when I select all the Airport passwords in the High Sierra's System.keychain and try to paste them in Mojave's System keychain, I get shown this:

Typing in the correct password doesn't work, the pop up window just jiggles to show that the password is incorrect. I don't know what else to do, as I have quite a lot of Wifi passwords. Please, any help would be appreciated.

I believe that in Mojave you cannot simply copy the keychain file. I found the best solution to be to sync the keychain in iCloud. This assumes that you have access to
both machines.

Go to system preferences -> ICloud. Select Keychain.

Repeat this on the second machine.

Your keychains should now be transferred.


How to download Yosemite Beta from the Beta Program? I signed up on the OS X Beta Program site to test Yosemite. Was given a redemption code and automatically directed to App Store. Redemption code was already filled into the manual input box in App Store but there was no option to download. Tried again, and App Store said redemption code already used. Can anyone suggest how I get the download?

Go to your Purchases in the Mac App Store. There you should see it.


MP4 object: 10.8 webkit browsers "Missing Plug-in", other browsers display video via QuickTime My organization's web site uses object tags to display MP4 video files. Here's an example:

<object width="494" height="388" codebase="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B">
<param value="http://server.site.org/path/filename.mp4" name="src" /> <param value="false" name="autoplay" />
<embed width="494" height="388" autoplay="false" pluginspage="http://www.apple.com/quicktime/download" type="video/mp4" src="http://server.site.org/path/filename.mp4" />
</object>

The videos display correctly in: Mac Firefox, Windows Firefox, Windows IE, Windows Chrome, Android browser, iOS Safari, Mac 10.6 Chrome and Mac 10.6 Safari. Other html tag options (iframe, video, etc) failed to offer as much compatibility.

The videos do not play in Mac 10.8 Safari and Mac 10.8 Chrome. (I think 10.7 works). Instead, Safari shows a blank white space with "Missing Plug-in", and Chrome shows a broken plugin icon and message bar.

The Macs in question do not have DivX or Perian (discussions.apple.com said those add-ons can cause similar problems).

What has changed in OS X (or QuickTime, or WebKit) to cause this? How do I work around this regression, without breaking functionality in other browsers?

On modern browsers your best bet is to use the HTML 5 video tag.

<video width="494" height="388" controls autoplay>
 <source src="http://server.site.org/path/filename.mp4" type="video/mp4">
 Your browser does not support the video tag.
</video>

You can put your fallback code where it says "Your browser does not support the video tag.".


Burning Data+Audio Disc It's been a long time since I've ever had to burn something that isn't just a set of data, or an ISO (via Disk Utility), but now I have to burn a Multi-Session disc.

Are there easy ways of burning a data ISO first, followed by MP3s (as standard Redbook Audio tracks), other than paying $80 for Roxio's Toast burning software?

While these instructions on Apple's website (Apple support doc) are for OS X 10.4, they still work in Snow Leopard.  It has been a very long time since I had to do a multi-session CD, but I remember doing this way or in a very similar way. It's worth a try and a CD-R costs a lot less that Toast.


How to change mail server for an IMAP account in OSX 10.11 when mail server greyed out? I need to change the mail server for a IMAP account in OSX.

But the mail server field is greyed out (see below screenshot). Ideally i dont want to have to setup the account new from scratch a re download all the emails from the server.

Is there a way i can edit the mail server field of an existing IMAP account ?

I found the answer after some searching via HERE

Select the Advanced Tab, uncheck the box to “Automatically detect and maintain account settings”, save change.
Go back into Preferences > Accounts, update the Incoming Mail Server to: mail.comporium.net


Mission Control behaves unpredictably When switching applications using Mission Control, the application I select moves to the foreground as expected.

However on occasion, it will then immediately jump back into the background. This is very annoying. I closed all my other applications but that did not help. Please see this gif for a demo:

Does anybody have any idea what might be causing this?

This is a bug of Mission Control, that Apple should fix.

A temporary solution is to:

Right click the Terminal icon on the Dock.
Click Options.
Assigns it to None rather than All Desktops.

This will however not let the app show up on all desktops any more.


Jailbreak an iPad 1 on a PowerMac G4? Is it possible to jailbreak an iPad 1 on a PowerPC?

I've tried Greenpois0n on PowerPC, but for some reason that doesn't work, so is there any other software I can use?

(iPad is running iOS 5)

Absinthe 2.0.4 has support for PowerPC. It works on iOS 5.0 - 5.1.1.


How to interact with dialog boxes using keyboard that appear not to allow keyboard interaction? I recently asked a question: How to navigate the Special Characters window with the keyboard?

However, it seems to me that OSX has a class of dialog boxes that seem to be inaccessible to keyboard activation.

Finder - View Options
TextEdit - Fonts
TextEdit - Special Characters
OmniFocus - Inspector

I.e., there will be a shortcut key to show the dialog box, but in order to interact with the dialog box you need to use the mouse or trackpad. I.e., Control + backtick does not activate them. I note that this is not the case with all such dialog boxes. E.g., most preference dialog boxes, the info dialog box in Finder, etc. permit keyboard activation.

Does this class of dialog boxes have a special name?
What do people who prefer to use the keyboard almost exclusively do with such dialog boxes?

I did a little bit of searching and found this page on OSX accessibility.

They might be called "Utility Windows".

Control + F6 Moves focus to the first (or next) utility window
Control + Shift + F6 Moves focus to the first (or  previous) utility window

Once inside, Tab and Shift tab can be used to navigate.

Interestingly, these shortcut keys worked with the following dialog boxes

Finder - View Options
TextEdit - Fonts

But did not work with these

TextEdit - Special Characters
OmniFocus - Inspector


My iPad Mini won't turn on after charging Last night I went to use my iPad and found the battery was completely drained. So, I charged it, after a few minutes it turned back on, and I looked at the battery symbol and it had said that it was at 62% battery life.

I was somewhat confused, as just moments before it was completely dead. I left it to charge for a bit before taking it off charge to charge my iPod.

The next morning the iPad was dead again. I put it on charger and all that happened was the logo would pop up, fade away, and repeat. I left it alone to charge and when I tried to turn it on, nothing happened. I've only had the iPad for two months, and this is the first time anything like this has happened.

It hasn't been dropped or damaged at all, at least to my knowledge. Any advice? I really don't feel like spending money at the Apple Store for them to tell me it's just some fault in my charger or something. I've tried most everything, including the Home/Sleep-Wake button reset.

If you are not near an Apple store or Authorised Service Provider then call up AppleCare (apple.com/contact) and they will help you try a few steps and if they come to the conclusion that your iPad needs to be swapped then they will send you one. Pretty sweet deal. I encourage purchasing AppleCare+ as well while you talk to the phone agent because you have a small period of time to purchase it and it is a fantastic investment.


Turn main screen off when watching full screen video on TV I connect my Mac via an HDMI adapter to my TV to watch films.

Is there a way to turn off my Mac's screen while watching those?

Decrease brightness to the lowest level would be the best option for me.

There are many other solitons in this thread.


External HD shows "Invalid Extent Entry" in Disk Utility First Aid for the Time Machine "Backup" volume. Erase that Backup volume? External is a Seagate 2TB Backup Plus Desktop Drive for Mac. I'm running 10.11.6 on a Mac Mini. It's connected by FW800. Disk Utility First Aid for just that volume stalls after the "Invalid Extent Entry" note.

I ran Disk Utility on the entire external drive (all volumes). Result: [All checks seem good, then...] "Problems were found with the partition map which might prevent booting. Operation successful."

Other 3 volumes on that Seagate seem to work fine. One of those volumes has secondary Time Machine backups.

After restart, Mac without prompting says: "OS X can’t repair the disk “Backup.” You can still open or copy files on the disk, but you can’t save changes to files on the disk. Back up the disk and reformat it as soon as you can."

I assume I should erase that Backup volume but my concern is I'm afraid erasing that Backup volume might screw with the other volumes, and my only other TM backup, which is on another volume of the same external HD.

The invalid extent entry error basically means the directory on your drive is corrupted. In other words the index of what files are stored and where they're stored is all mucked up.

This can be repaired but not without risk. You basically have two options if you still want to keep using this drive:

Use a third party disk utility that can repair the corrupted directory (e.g. DiskWarrior, Techtool Pro, etc)
Reformat the partition

Note: I have no affiliation whatsoever with either DiskWarrior or Techtool Pro.

Regardless of the option you choose I would still recommend manually backing up any files you can still access to another drive. Obviously this is a must do if you opt for the second option.

As to your concern about accidentally reformatting the other partitions, this shouldn't be a problem as long as you're only selecting the particular partition (or volume) with the error.

More specifically:

launch Disk Utility
select the partition in the sidebar
click the erase tab
make sure the format in the drop-down menu is the one you want
give it a name
click on Erase


Macbook Pro 8,2 Crashing During Login Specs:

Early 2011 15" Macbook Pro (Sierra).

RAM upgraded October 2016, 16GB Corsair
SSD upgraded July 2016, 256GB SanDisk
Battery replaced January 2016
Logic board replaced February 2016 (replaced as result of qualifying for the gfx card recall.)

Basically a year old computer

Problem:

Yesterday it started crashing while signing into a user account -- while connected to power. The flow is as follows:

Boot (Grey screen with Apple logo)
Display user accounts
Sign in to user's account
Sign in progress bar
Crash at ~1/3 complete progress bar
Reboots automatically

Background:

Over the past 1.5 months the battery has become seemingly defunct.

Initially, it would crash after ~2 minutes of use after waking from sleep and running off battery. It would need to be connected to power in order to start up successfully.
After about 2 months of this, it began crashing while running off battery regardless of whether or not it had woken from sleep.
Now it (usually) crashes within seconds if the charger is disconnected.

When I went to the Genius Bar I was told it may be a bad battery. It passed all of their diagnostics, however, it seemed to heuristically lose charge quickly and the capacity came in at over 100% -- which is only expected from batteries right out of the factory.

This all seemed like a case of a bad battery until yesterday. Maybe these issues are not connected... but seems like they could be.

Troubleshooting:

So far I've tried:

Tried 4 separate properly 85W MagSafe chargers. Same results.

So it's not the bad battery.

Booted from an external bootable drive (running El Capitan). Same results.

So, not an issue with the SSD nor corrupt OS (I think. Booting from an external drive should bypass the internal drive completely. Yes?*)

Ran the extended hardware test. No issues found.

So, not an issue with RAM. I am going to try and run memtest if I can get access to a shell.

Left it idle for ~15 minutes at the login screen. Does not crash.
Spent ~15 minutes in the guest account (the safe account -- only Safari access) and messed around. Does not crash.
Spent ~2 hours of time in the "BIOS" pages. Hardware test, Disk Utility, etc. Does not crash.
Booting into safe mode (Cmd + S) displays BuildError(): error building a user of type

Hypothesis:

It seems the issue is occurring when the boot program is loading the OS. I don't know a ton about how things work at this level, but my guess is the logic board is the culprit and is failing during this handoff.

Questions:

Any ideas?
Could a bad battery somehow bust up power management -- or is it entirely isolated whilst connected to external power?
Have I done enough to rule out corrupt software, SSD, and RAM?

This question is an excellent example of the unintended consequences of not addressing a small issue (bad battery) and having it create new issues (crashing).

While it may appear that a bad battery and a crashing hard drive are mutually exclusive, they, in fact, are intrinsically linked.  This however, doesn't preclude the possibility that their are other issues at play, but in order to address efficiently and accurately, you have to eliminate the initial problem.

The Battery

You have a at least an 18 month old battery assuming it was "brand new" when you installed it and not sitting around in a warehouse for a few years prior to your purchase.

Your battery reports its remaining capacity based on a calculation of certain variables - the current voltage and the draw.  It can't measure the batteries ability to hold a charge.  So reading a battery that says 100% only means it's 100% at that moment.

Sleeping on a Dead Battery

When your MacBook Pro detects a low battery condition, it will put the MacBook Pro to sleep.  Going to sleep powers everything down except the RAM;  its current state is kept in RAM so you can quickly resume right where you left off.  If your power gets low enough, it will go into hibernation mode writing the RAM to disk.

If your battery dissipates so quickly as to not allow this state to be saved, you run the risk of corrupting data (and not just your pictures of cats and toasters, but data critical to macOS).  This sounds like the issue you described.

Troubleshooting

Eliminate your battery from the equation.  Disconnect it from the logic board.  Remove the back cover and using a plastic tool (like a spudger) remove the battery connection. Your MacBook doesn't need a battery to function.  You don't need to replace the back cover for the next step, just be certain you are not putting the MBP on a conductive material.  You can put it on a towel if you want.

Check the health of your SSD.  Boot into recovery mode, and run the following commands to check the SMART status of your SSD:

$ diskutil verifyDisk disk0
$ diskutil info disk0 | grep -i smart

Most likely, you will get "Verified" with the last command meaning your SSD is good.  Anything other than "verified" consider getting a new disk.

If everything is good, you can move on to fixing the login issue

Fix Login Issue

Create a new user in Terminal.  Boot into Single User Mode and then issue the following commands

fsck -y
mount -uw /

What you are doing is checking the drive and then mounting the / volume as read/write.  To create a new user, follow the instructions already written up in this post being sure to adjust the values for your specific needs.  Reboot by typing reboot

If you can log in with this newly created account, you corrupted your User Profile and your best bet is to use this new account and/or create another one.

If it solves your issue, you can skip to step 3.  If you can't log in, continue to the next step.
Reinstall macOS.  Operating under the assumption you have made Time Machine backups, reinstall the OS.  Migrate your backed up data using Migration Assistant.
Run your Mac, but don't disconnect the power. (you're not on battery, remember?) Use your Mac as you normally would.  If you have no problems, then the issue of it crashing is solved.
Replace the battery.  If everything works, you would have resolved the login crash issue and narrowed down the cause to the failing battery. See this Answer:

  When they [batteries] do die, it's always best to get a good quality replacement
  battery from a reputable manufacturer. The 2006 MBP uses an external
  battery so it's fairly easy to find replacements - and some even come
  with generous warranties.

Even though it's written to address a 2006 MBP, the explanation and recommendations are still valid and relevant.


What are alternative browsers for OS 10.3.9? Where find download/install files? Too many major websites are using features that in-effect are "walking away from" my old OS 10.3.9 and Firefox 2. (That is, my favorite browser, and its available plugins and extensions, are starting to no longer render some common websites properly, or at all.)  I would like to experiment with alternative browsers but do not know which ones have archived "antique" versions that can be downloaded and installed on such an old Mac.  Any advice (apart from "Upgrade to 10.4...")?  My machine is a PowerPC "iMac" -- the version with the white half-sphere base and the moderately thick flat-screen on a "stalk" -- sort of like the movie "Wall-E" but with a rounded body.

"Upgrade" is going to be the standard answer. Your computer is over 10 years old now, has a slower processor and less memory than my phone, and is well into the timeframe where it can be expected to stop working without notice. If you still have the original disk drive, it is now at twice it's expected service life. But of course you have a backup.

Most software vendors do have old-version archives, but you have to dig for them. Most websites do not maintain compatible versions - mine certainly do not, I cut off at IE9 and I do not test older versions of Chrome, Firefox etc. I'm a bit surprised this site runs on Firefox 2.

You can get a brand-new Air or iMac for $1000. For twice that you can put a 27 inch model on your desk, either one running the latest of everything. And you're good for another decade.


I can copy El Capitan installation on thumb drive but it is not visible when I hold option key on restart I am using OS X El Capitan on Macbook 7.1 (Mid-2010). My thumbdrive is detected inside El Capitan and I can make it bootable and put El Capitan installation on it by using terminal command:

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

but thumb drive is not visible when I hold option on restart. Therefore I can't install El Capitan on my new SSD that I have. When I install using terminal, I get this message at the end of the process, in terminal:

  Couldn't mount dmg /Volumes/Install OS X El Capitan/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg (error code 112)Mount of outer dmg failed.

After this, when I ran the hdiutil:

hdiutil verify Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg

on the thumb drive, I got:

  Checksumming Protective Master Boot Record (MBR : 0)… Protective Master Boot Record (MBR :: checksum failed with error 1000.  ............................................................................................................................................................... calculated CRC32 $00000000, expected CRC32 $BE5D6293 hdiutil: verify: checksum of "Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" is INVALID hdiutil: verify failed - image data corrupted

So the error can be either on the installation or the thumb drive itself (bad drive).

Sometimes I get this message at the end of the installation thumbdrive making process:

  Failed to copy kernelcache, The file “kernelcache” couldn’t be opened because there is no such file.

I want to install fresh clean install of El Capitan on my brand new SSD that I bought, and somehow Apple is preventing me from using it. Any help anyone?

(Download the latest El Capitan Installer (10.11.3))
Open Terminal and check the hash of InstallESD.dmg:

shasum /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg

The result (as of March, 5th 2016) should be: 526a6f7a619ef86f42acc026276aab351ea27614
Insert your thumb drive
Get the disk identifier of the thumb drive with

diskutil list

Below I assume the disk identifier of the thumb drive is disk1
Delete any MBR on the thumb drive:

diskutil umountDisk /dev/disk1
sudo dd if=/dev/zero of=/dev/disk1 bs=512 count=1
diskutil mountDisk /dev/disk1

Open Disk Utility and partition the thumb drive:

Options...: GUID partition table
Name: Untitled
Format: Mac OS X Extended (Journaled)
Create the El Capitan Installer thumb drive:

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

The output looks like this:

Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.

Check the InstallESD.dmg on the thumb drive:

hdiutil verify /Volumes/Install\ OS\ X\ El\ Capitan/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg

The output should look like this:

Checksumming Protective Master Boot Record (MBR : 0)…
Protective Master Boot Record (MBR :: verified   CRC32 $8A0AD7CD
Checksumming GPT Header (Primary GPT Header : 1)…
 GPT Header (Primary GPT Header : 1): verified   CRC32 $E61CC7FE
Checksumming GPT Partition Data (Primary GPT Table : 2)…
GPT Partition Data (Primary GPT Tabl: verified   CRC32 $8F9F9AF5
Checksumming  (Apple_Free : 3)…
                    (Apple_Free : 3): verified   CRC32 $00000000
Checksumming EFI System Partition (C12A7328-F81F-11D2-BA4B-00A0C93EC93B : 4)…
....
EFI System Partition (C12A7328-F81F-: verified   CRC32 $B54B659C
Checksumming disk image (Apple_HFS : 5)…
.................................................................................................................................
          disk image (Apple_HFS : 5): verified   CRC32 $F1A0F123
Checksumming  (Apple_Free : 6)…
...................................................................................................................................
                    (Apple_Free : 6): verified   CRC32 $00000000
Checksumming GPT Partition Data (Backup GPT Table : 7)…
...................................................................................................................................
GPT Partition Data (Backup GPT Table: verified   CRC32 $8F9F9AF5
Checksumming GPT Header (Backup GPT Header : 8)…
....................................................................................................................................
  GPT Header (Backup GPT Header : 8): verified   CRC32 $5826D5C7
....................................................................................................................................
verified   CRC32 $BE5D6293
hdiutil: verify: checksum of "/Volumes/Install OS X El Capitan/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" is VALID

Some of the CRC32 values may be different in your output!
Reboot you Mac with the thumb drive attached and hold the alt/opt button. If the thumb drive doesn't show up on the first run just repeat the step. It took me 2 tries to successfully boot to the installer thumb drive.


OSX: Dupe-checking / Merging / Cleaning iCloud Contacts & importing 350 additional ones I'm in a bit of a pickle, I've been given an errand (or.. so I thought ;) ) to run, of cleaning up 1100 iCloud Contacts for a friend, who runs a little business. He also handed me 350 additional contacts in Excel Sheets to be added to his iCloud Contacts. (3 Excel files, 3 groups in iCloud Contacts, so he can switch between them).

Now, I can probably "kind of" pull off the Excel->CSV->Import to iCloud Contacts business, but there is a lot of data that needs to be merged into a Notes-entry inside the Contacts  and to be made sure it's not lost. But I would appreciate any and all advice you could give on how to export a reasonable CSV that Contacts (I'm running OSX Mavericks, btw) where multicolumn content that goes into Notes  will actually go into the Notes in Contacts.

But here's the real thing. Since he has a completely utterly borked up 1100+ contacts list with multiple duplicates, some entries with no names but just phone numbers, maybe duplicate names with differing e-mail addresses etc, which app or method would you recommend for cleaning it up?

I tried to google around for apps but all I could find was a fake website that (supposedly) listed 5 excellent Contacts -cleaning applications..

But when I started downloading the #1, I realised I was downloading it from the same server the website was running on - so it was I believe Cisdem that wrote the blog-entry masquerading as a reasonable review of all possible Contacts-managing applications. Now I'm not so convinced that I should try Cisdem at all, if they do shady things like that, I've never had good experiences with these types of fake-review-posting app developers' sites.

How should I proceed?

A pickle indeed, data sanitizing is no fun and you have a doozy.

If you have access to his iCloud account you can go into contacts, select all of them and click on the gear icon to export them. I do believe that Apple only lets you export as a vCard.

I do believe there are a number of utilities that convert vcards to another format, some of them online.

Once converted I would be tempted to suck them all into an Excel (or other like Numbers, etc.) spreadsheet and do you data massaging there. But that would depend on your Spreadsheet-Fu. But getting it into a CSV format would be the first start. After that it's a matter of mapping all the right fields in an organized way so you can sort and find dupes.

Then it is a matter of getting the Excel data back into a CSV and then back to vcard format. Pssibly one of the online vcard to CSV sites do the reverse as well.

Hope that at least points you to a line of inquiry that works.


Exception in thread "main" java.lang.UnsupportedClassVersionError (Trying run Alda on OS X) I've hit a wall with trying to get Alda to run on OS X.

It's an executable I downloaded from here; then, as per the installation guide on GitHub, I ran chmod +x alda on it, and then moved it to my /usr/local/bin. After that, though, I've run into any number of issues:

The first error I've been getting occurs whenever I try to run Alda from command line.

Exception in thread "main" java.lang.UnsupportedClassVersionError: alda/Client : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
logout

I also got an Invalid memory access of location […] Segmentation fault error a few times, FWIW.

I've looked into Java version (I'm running java version "1.6.0_65"), tried updating, all to no avail.

How do I get around this?

There is a large highlighted first line of the installation instructions "You must have Java 7+ installed on your system in order to run Alda."

So install the JDK (not JRE) from Oracle as per Oracle's comment

  The Java Runtime (JRE) that you download from java.com or oracle.com contains a plugin to run Java content from your browser. In order to use the command line tools, you will need to download the Java Development Kit (JDK). The JRE and JDK are separate and can coexist on your system. Only one JRE can be installed on Mac OS X. There can be multiple JDKs installed on a system, as many as you wish.


How do I format a (non-formatted) drive when the menu options in the Disk Utility are greyed out? So I tried installing Lion on an old (white) Macbook, but first I wiped by my drive clean. Just to find out that I only had 1GB memory and Lion requires 2GB.

Now the drive is clean, with no filesystem (I think), and it won't even allow me to install Snow Leopard.

Keeps saying 'Can't install OS X' on this computer - that happens after I boot to the install Disc and choose English.

I am assuming it is because the drive is not formatted for an OS X friendly filesystem....but the Disk Utility option is greyed out.

How do I fix this?

You need to format/partition the drive as a MacOSX Journal Extended first then you will be able to install Snow Leopard.


installing windows from bootcamp with image dvd I'm trying to install windows 7 with bootcamp. I get the following message, after mounting windows image (.iso)

  Insert your Windows installer disc and
  wait a few seconds for the disc to be
  recognized.

I did the same thing on the imac and it was fine, but now, on the macbook, osx seems not to recognize the dvd.

Do you know could I fix this problem?

You cannot use an ISO image with the Boot Camp Assistant. It only allows a disc, as:

You need to install it outside of Mac OS X
You cannot mount an image when Mac OS X is not running
Mac OS X's EFI bootloader only accepts physical storage media

Thus, you can only use a disc. To burn the ISO to a CD/DVD, mount the image, open disk utility, insert a blank disk and click on burn. After burning the disc, you should be able to use it for Boot Camp.


brew changes from php71 to php@7.1 on installation I am trying to install php71 with the command brew install php71 but instead php@7.1 is installed.

When trying to install redis with brew install php71-redis it's installing but not working with that php@7.1.

macOS High Sierra 10.13.3

also sometimes still get this warning:
Warning: Use php@7.1 instead of deprecated homebrew/php/php71

Found my answer!
After this update (brew) we need to install pear (pecl) for installing extensions for php.. so i.e. redis extension was installed pretty easy like pecl install redis
But need to be set correct php version that pear (pecl) would found where to install extension.


Print wirelessly from USB printer connected through router I have Canon Pixma MP198 (USB only) printer that is connected to my d'link router with usb cable.

Can I print documents wirelessly from my iPad 2? Without the need to turn on my PC if I want to print?

Any apps for this?

Note:printer isnt airprint capable

Thanks

Printer Pro

You can use Printer Pro. This app will scan your network for all printers using the same services as OS X, to find all printers available rather than just AirPrint printers.

  Compatible with any Printer (Wi-Fi and USB)
  Printer Pro automatically finds a printer in your wi-fi network.

You can download Printer Pro Lite for free to test if your printer is found by the app before purchase.


Can deleted device be reallocated in the Developer Portal? I want to know if deleted devices from the Developer Portal are reallocated. After deleting a device, I can use that spot to allocate it to a new one?

I have read in
Program Renewals

  Yes. You are allowed to assign up to 100 devices for testing and Ad Hoc distribution per membership year. At that start of a new membership year, Team Agents and Team Admins can remove devices and restore the available device count for their development team to 100 devices. When Team Agents or Admins first log into the iOS Provisioning Portal at the start of a new membership year, they will be presented with the option to remove devices and restore the device count for those removed devices. Important Note : Devices can be removed and their device count restored only up until the first new device is added. Therefore, it is important to remove all devices you are no longer using for development prior to adding any new devices.

But as I understand this is after renewal?

I have deleted a device for testing in my account, but havent seen the number of available devices update?

Each year when you renew your program membership you can remove devices added in previous years.  So if you had 100 devices allocated, you could delete 5 and add 5 new devices.

As soon as you add a new device, you can no longer remove devices for the remainder of that year.

So what they are telling you is each year, after renewal, delete any devices you need to remove first. Once you add your first new device, you are only permitted to add devices until your next renewal up to a maximum of 100 devices.


What does "slide to upgrade" do? On iOS 9, after restoring from a backup, a screen comes up that says "slide to upgrade."

This doesn't update your iOS firmware, right? I imagine it just prepares your backup for iOS 9. Is this correct? I have scoured Apple's support articles, Reddit, and the likes. All I can find is information about a bug related to the slide to upgrade screen.

I just bought an iPhone SE. It came pre-installed with iOS 9.3.2. I set it up from an iPhone 5s iOS 8.1 iTunes backup. When the restore was complete, I was greeted with the "slide to upgrade" message. I slid it, and a loading bar with the Apple logo was displayed. When it was finished loading, a message appeared saying "upgrade complete." When the setup was finished, I went into Settings; it was still on iOS 9.3.2. It is now asking me to update to iOS 9.3.3.

Thus, "slide to upgrade" does not update your iOS firmware to the latest version, it likely just prepares the old backup data for use with with iOS 9.


Is there a lower level log of USB activity than Console.app or system.log? I'm plugging in a USB device which should be a USB/serial adapter. In addition to it not seeming to work, plugging and unplugging it produces absolutely no output in Console.app or /var/log/system.log. Is there any lower level place I can look to see what's happening when I plug it in?

You need to install the usbutils commands via macport (sorry, I don't use brew)

sudo port install usbutils

then, for a first check, try the following command:

lsusb

You should see a list of your USB devices. It might be hard for you to identify your device. A good way to filter all your devices is to remove every of them except your USB/serial adapter.

If lsusb returns nothing. Your device is dead.

If my memory is good, the name of an USB-serial adapter printed ends by:

 USB-Serial (UART) IC


Permanently Enlarging the "Open File" dialog box in Yosemite Whenever I open a file in any application I'm presented with the standard "Open" dialog box which I find to be frustratingly small (less than 50% in each dimension on my 11 inch screen). I can enlarge it to a more generous size, but the new dimensions don't seem to be made permanent, so next time I open a file the standard small-size dialog is shown.

Is there a way to permanently resize this dialog box?

I tested this with TextEdit and it does not remember the size of it's open dialog window. I tested it with Script-Editor and BBEdit and they both remember the size.

After reading something about another, maybe related situation, I tried this:

I resized the open dialog in TextEdit like it is described here (second screenshot).
[ which is: hold the SHIFT-key and click into the right side of the dialog and start dragging it ]

And when I do that this way, TextEdit remembers the size, also between relaunches.

So may be this is possible with all applications you want to remember it's open dialog size? It's not a general solution but a workaround. If it does the job it may be a pretty useful one.

I got the idea to try this from here
(second screenshot): http://osxdaily.com/2014/12/08/resize-large-open-save-dialog-windows-mac-os-x/ and I found that site with a google query containing the title of your question.


Mac OSX hard disk gives invalid PEOF - how do I back up data? Yesterday my macbook pro (running 10.6.8) refused to reboot, and after booting it using the install disk and running disk utility I got Invalid catalog PEOF. The volume could not be verified completely. So, from the looks of it, I may have to reinstall the OS:

Is there anything else I can try?
If not, how can I access the disk and try and save some data before formatting (if at all)?

I'm not stranger to command line unix and all that if needs be. Any help will be great, thanks.

Do you have another Mac? If so you can connect the failed Mac to your other mac via firewire and you target disk mode.

Power off the failed mac, connect it to the working mac via firewire. (The working mac can already be powered on) Boot the failed mac and immediately hold down the T key on the failed mac. Continue holding it until the firewire icon shows up on screen. You should then see the mac mounted on the working mac.

Link with more details http://support.apple.com/kb/ht1661

Also an interesting link with some details on your error http://support.apple.com/kb/TA21624?viewlocale=en_US


Get page number from Metadata instead of Index In Applescript, we can get the index number of the current page we are viewing in Skim with the following code:

tell application "Skim"
    activate
    set theDoc to front document
    get index for current page of theDoc
end tell

Is there a way to access the metadata page number instead of the regular page index?

Assessibility Inspector Results

Accessibility Inspector just indicates that it is a text field. (Page number has been changed to 1098)

Another way to access the text field

With the following code, in which {350, 55} is the position where the text field is located on my screen,

tell application "System Events" to click at {350, 55}

I've found out that the text field can be accessed with:

text field "Page" of group 2 of toolbar 1 of window "程元敏 - 2013 - 尚書學史.pdf (page 1150 of 1696)" of application process "Skim" of application "System Events"

Hence, the following attempt to get its value.

tell application "Skim"
    activate
    set theDoc to front document
    get value of text field "Page" of group 2 of toolbar 1 of theDoc
end tell

The above script resulted in this syntax error:

  Expected end of line, etc. but found “"”.

Questions:

Besides telling me how to access the text field with code, I would also like to know why Accessibility Inspector failed to indicate any information about the text field?

Is there a way to directly access the metadata in of a pdf document with applescript?

Why do we have to embed tell application "System Events" to tell application process "Skim" within tell application "Skim" for the code to work?

Below is an AppleScript that declares a handler to obtain a list of pages from a PDF document, to which you supply the file path.  When the handler is called, if the file path is valid, it should return an AppleScript list that contains the page label of every page, ordered by page index.  However, bear in mind that PDF pages are indexed from zero, while AppleScript lists are indexed from one.  Therefore, item n from the returned list gives you the page label for the page at index n - 1.

use framework "Foundation"
use framework "PDFKit"
use scripting additions

property this : a reference to the current application
property PDFDocument : a reference to PDFDocument of this

on PDFPagesInDocument at filepath
        local filepath

        try -- test file exists
                set fileURL to filepath as text ¬
                        as {alias, POSIX file} ¬
                        as «class fsrf»
        on error
                return false
        end try

        script pages
                property list : {}
        end script

        tell PDFDocument to tell alloc()
                initWithURL_(fileURL)
                repeat with i from 0 to pageCount() - 1
                        tell pageAtIndex_(i) to set the end of the ¬
                                list of pages to its label() as text
                end repeat
        end tell

        return the list of pages
end PDFPagesInDocument

After pasting the above code into the top of your own script, you could then use it like this:

choose file of type "com.adobe.pdf" with prompt "Select PDF File"
set PDFpath to the result

PDFPagesInDocument at PDFpath

This would allow the user to select a PDF file themselves whenever the script runs.  However, you can specify your own, hard-coded file path, as I do here:

PDFPagesInDocument at "/Users/CK/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/Sun Tzu - The Art of War trans Giles Pax Librorum 2009.pdf"
set pageList to the result

--> {"Cover", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "1", "2", "3", ¬
    "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", ¬
    "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", ¬
    "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", ¬
    "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", ¬
    "53", "54", "55", "56"}

As you can see, this particular PDF copy of Sun Tzu's The Art of War has 65 pages, where the page that a reader traditionally thinks of as being page 1, i.e. the first page one would flick to in order to begin reading a book's narrative, is the tenth page in the PDF file.

Other Questions:

  Is there a way to access the metadata page number instead of the regular page index?

Solution above.

  I would also like to know why Accessibility Inspector failed to indicate any information about the text field?

The software developer who codes an application gets to choose what information gets exposed for accessibility hooks.  There are guidelines that Apple lays out for developers to follow, and thankfully, most are conscientious and make sure their software reports information about the main UI elements, which, at a minimum, is meant to include the elements' name, description, object class, its purpose (or role), its position in the hierarchy, and a few other basic bits.

Besides being nice for those who script the UI to death, they actually serve a greater purpose, in aiding users with special needs to be able to interface with software that they otherwise wouldn't be able to use (for example, a blind person cannot see the value displayed for a page index, but voice over software would use accessibility hooks to retrieve the information and read it aloud to the user...provided the information has been exposed).

It appears Skim developers are just lazy or don't wish blind people to be using their software.

I've found out that the text field can be accessed with:

text field "Page" of group 2 of toolbar 1 of window "程元敏 - 2013 - 尚書學史.pdf (page 1150 of 1696)" of application process "Skim" of application "System Events"

Hence, the following attempt to get its value:

tell application "Skim"
    activate
    set theDoc to front document
    get value of text field "Page" of group 2 of toolbar 1 of theDoc
end tell

The above script resulted in this syntax error:

Expected end of line, etc. but found “"”

The information you gleaned from the first snippet are class objects that all belong to the application System Events.  So when you then try to get application Skim to reference these objects, it can't: it's never heard of a text field.  It does, however, recognise text as the name of a class object (the class of all AppleScript strings), and then tentatively assumes that field is an identifier for a variable that it will need to look up and read the value from.  That's where it would ordinarily then complain that you never declared a variable with that identifier, but the word "Page" that immediately follows is a bigger concern, as this makes no sense to it in any context.

That's when the compiler categorises this as being a syntax error, reports the double quote as the definitively-illegal character that makes the entire expression impossible to evaluate.

That said, even if it wasn't a syntactical error, it would have led to a runtime error because your reference stops at toolbar 1, having completely omitted the parent object of toolbar 1, which is window "程元敏 - 2013 - 尚書學史.pdf (page 1150 of 1696)" (which you could also refer to as window 1 for convenience), and its parent object, which is process "Skim", and its parent object, which is application "System Events".

What you needed to do is to take the snippet you were given, and use that with one tiny adjustment: the topmost object--which is the one at the end of the reference--is always going to be an application object, which in this case is "System Events".  This is the object that owns all of the other objects that the reference contains, and is therefore the thing you need to be tell-ing:

tell application "System Events"
    value of text field "Page" of ¬
        group 2 of toolbar 1 of ¬
        window 1 of process "Skim"
end tell

However, do not--as you have done--put your tell application "System Events" block inside a tell application "Skim" block.  Although you don't see it, AppleScript bitches about this, generates an error (quietly), figures out what you do mean, then thankfully gets on with it.  But it slows things down, which is the best case scenario, but in other situations, it can cause overlapping object classes or terminology to clash.  If you're lucky, it'll just cause the script to terminate in a runtime error.  If you're unlucky, things get overwritten and data gets lost.

Unless there's a specific reason to, and you know precisely what you're doing when doing it, don't ever put one application tell block (or clause) inside another.  Generally speaking, since most languages only carry out one operation at a time anyway (this isn't true, but pretend it is, because it is for AppleScript), you will only ever be getting AppleScript to talk to one application at any particularly point in your script, so try and make sure that this is the case when you review what you've written.


minimum MacBook and specs required for iOS development I have this early 2008 MacBook 13" which only is upgradeable to 10.7.5.

I checked on the app store and it says Xcode requires OSX version 10.8.4 Mountain Lion and later. Although this page from Apple Dev Center says the requirement is Snow Leopard 10.6.8 and later.

Is this MacBook sufficient for iOS development,and if so, what iOS version does it support?

If you want to develop apps for iOS 7 or later, you need to have the Xcode 5+ with Mountain Lion or Mavericks. Snow Leopard or later is required to run Xcode 4+.

Xcode 4+ == iOS 5, 6
Xcode 5+ == iOS 6, 7


How to view Apple Card account information on a desktop computer? My phone died. I need to see my purchase history, receipts, and billing information for my Apple Card.
Can I find this information online? Or can I only find it in the Wallet app?
BTW the Wallet app appears not to be compatible with my iPad Pro 2nd generation.

There is some info in System Preferences/Wallet & Apple Pay if you add the card there.  The main desktop interface is https://card.apple.com/  Neither of them shows the Mastercard account number or the most recent transactions.  You can see your statement history.  I hope Apple eventually ports the full Wallet app to Mac and makes a feature complete card web site.


How to list all files in directory excluding any that start with a dot? I'm currently using the command

find /Volumes/DriveName > driveName.txt

to create a file listing of all files that are on the drive.

How could I modify my command (or what would be a better command) to have the list not include any dot files, for example ._Filename or .DSstore?

I'm not looking for software like CDFinder etcetera to keep a searchable database. I need a text output that contains all the files on the disk, as well as their relative locations to each other.

To exclude files and directories add an exclusion pattern to the find command (see info find for more):

find /Volumes/DriveName -not -path '*/.*' > driveName.txt


H.264 encoded .mp4 not playable on iphone i have a video podcast that i've synced to my iphone.  when i browse the iphone through itunes, it shows that the podcast is on the phone.  when i open the 'Music' app in my phone, the podcasts don't show up.

the video is H.264 encoded .mp4 files, and my phone has 5 GB free.

how do i get the videos to show up and play?

Does it play on your computer in iTunes?  There is a menu choice in iTunes that will convert to iPhone-compatible format.


What's the right ownership for /usr/local for current macOS and Homebrew versions? Someone told me that

  Homebrew no longer requires /usr/local/ to have an ownership such that it can be written by brew commands ...

I recall long time ago I have to manually change the ownership for files and directories in /usr/local/.

Now how do I change them back and what is the default or best ownership setting for files and directories in /usr/local/ for the newest macOS and Homebrew versions?

The correct ownership is root:wheel with permissions of 755.


How to login when I can't enter my password because "e" key on keyboard doesn't work My "E" key on my keyboard stopped working. The tech says I need to change the keyboard, but for now I just want to use a bluetooth apple keyboard. The problem is I can't connect it without logging in and I can't log in as my password contains an "E"? What can I do to connect the bluetooth keyboard? Everything else works. Keys and mouse plus trackpad.

Try entering ⌘+option+F5 to bring up the "Accessibility Options" popup window. This window will appear similar to what is shown below.

Select "Enable Accessibility Keyboard", then click on the "Done" button. The on-screen keyboard should appear, as shown below.

Use the keyboard to enter the "E" key or the entire password.


Running a script as root and presenting a GUI to logging in users I am having a programming decision problem and hope, that you can show me a solution or tell me, if my plan on how to solve the problem would be okay or not.

I am managing some macs and want to run a script every time a user logs in. The script (which I haven't written yet) needs to make some changes (or not). The changes need administrator privileges but the script also needs information from the currently logged in (or logging in) user.

Normaly, this would be a job for a LaunchAgent / Deamon, but here comes the problem: Scripts in /LaunchDeamons run as system administrator but start together with the system. They are not aware of users loging in or out and they may not show a GUI. ~/LaunchAgents run as the logged in user and get started when the user logs in. Also they may show a GUI. However they do not run as system administrator.

So this is my problem: running a script as root, but starting it whenever a user logs in and present a GUI to him: My solution would be to write two scripts:

Script 1 runs as system administrator and lies in /LaunchDeamons. This would have a Socket open for incomming connections (AKA "Server Socket").

Script 2 runs as the user beeing logged in and lies in ~/LaunchAgents. It presents a GUI to the user and sends the information to script 1 via a socket connection.

It doesn't seem to me as this would be the most reliable / straight forward solution, but I can't think of anything else. I also tried to find out how other programs solve this problem (munki for example, which presents a GUI to the user but installs programs as system administrator) but couldn't figure out how they did it.

I'd be happy for some comments on this!
Regards, Christian

PS: I plan to use python.

Sockets - Involved but Tried and Tested

Your solution of two scripts talking through a socket is the tried and tested approach. We did this for Power Manager and it has worked reliably from OS X 10.3 – 10.11.

You can use a tcp or unix domain socket for this purpose.

In our situation, the daemon pmd runs as a computer wide process and the user session daemon pmuser runs once per user. They talk to share information that a computer wide daemon can not safely obtain and to perform actions within specific user sessions.

The computer wide daemon can detect when a user logs in. This is done through the SystemConfiguration API SCDynamicStoreKeyCreateConsoleUser.

The graphical script must be launched within the graphical user session; a launchd job in /Library/LaunchDaemons with the key value pair LimitLoadToSessionType: Aqua set will ensure this.

Depending on the information you need to gather from the user, I expect what you want to achieve is possible with Power Manager; feel free to get in touch.

launchctl's bsexec

Recent versions of OS X include a launchctl that promises what you need: the ability to launch a process within a user session. See How to launch a GUI application in another user's graphical session? for the details and likely problems you will encounter.

If you are deploying on OS X 10.10 and later, investigate launchd's new domain capabilities. A complete rewrite in OS X 10.10 opened up many as yet not completely documented options. The launchd mailing list is a treasure trove of information.


iOS 7.1 Exchange PDF viewing We have a fleet of iPads and iPhones that are having issues with iOS 7.1 and PDF attachments.

If we send the PDF that is having issues to an email on our exchange server then the PDF file will open as a blank white or black screen. If then sent to any other app it will not open (We use PDF Expert)

If we change any of the following it works and open just fine.

Use a gmail address and the same mail app.
Use the same PDF but opened and saved in a different PDf compatibility setting.
Open the same PDF from webmail.
Use a device running iOS 7.0 and open the PDF

I've reproduced the issue with 3 iOS 7.1 devices.

So we found a workaround via https://discussions.apple.com/message/25159423?ac_cid=op123456#25159423

"Interestingly, I think I stumbled on a workaround.

For one of the emails with an attached PDF that I have been having trouble with, if I tap on the PDF icon to download it, and then tap on it to open it, I get the error (black or white screen).

But, with this same email, if I first tap on the "Download Full Message" link at the bottom of the email, the PDF will then open correctly when I tap on the PDF icon.

I confirmed that this works on two different iOS 7.1 devices."


Re-download apps with second computer/device My situation:

I have an iPhone with synced to my computer and my wife just bought an iPad (in shipment) which she will sync to her computer.

We want to use my Apple ID on both computers/devices so that she can use apps and music I have already purchased. Syncing the devices to the same computer is not an option.

Is this an option, and how would it work, i.e., would she have to "purchase" and get a message saying it has already been purchased, and to re-download?

Thanks!

There's also the option of Family Sharing that Apple introduced in iOS 8.

This allows you to share apps, music, and other purchases while still being able to maintain separate Apple ID's for other purposes.


Is it possible to run Snow Leopard (Server) inside VirtualBox on a Mac running Lion? Is it possible to run Snow Leopard (Server) inside VirtualBox on a Mac running Lion, as a means of continuing to run legacy PowerPC apps (Eudora, Quicken, et.al.) under Rosetta, even on new Macs (Lion only)?

The EULA seems to allow running the OS in a VM on Apple Mac hardware.

ADDED:

If so, what VirtualBox configuration and/or settings should one try?
How big a virtual HD should one use?

(My goal is to run authentic vintage apps, if possible, not work-alikes).

Yup. You should be able to. Give it a try. :)

Though, I hope apps will be updated to work on Intel, because this isn't the most resource-firendly solution. It probably takes more processing power / RAM / Hard Disk Space to install and run Snow Leopard than to run the app itself.

Yet, I think you can find alternative Intel apps. I really like using Apple's Mail for e-mail, and this article shows several alternatives to Quicken.

Anyhow, its your choice. Give it a try and see what works better for you.


-bash: /usr/local/bin/nmap: Bad CPU type in executable I recently update my Mac OS to Catalina 10.15.

I ran nmap I kept getting

  -bash: /usr/local/bin/nmap: Bad CPU type in executable

I've tried reinstalling it

brew uninstall nmap
brew install nmap

but I see no effect, I even try full path

⚡  Desktop  which nmap
/usr/local/bin/nmap
⚡  Desktop  /usr/local/bin/nmap
-bash: /usr/local/bin/nmap: Bad CPU type in executable
⚡  Desktop

I decided to go the site :

https://nmap.org/book/inst-macosx.html

Click on Download

https://nmap.org/dist/nmap-7.80.dmg

I downloaded that .dmg, installed it, now my nmap working again.

  Note : I will leave this post since, it might help others in the future.


What's kern_sploit proccess that apears in my iPhone 4? After jailbreaking iPhone 4, I was noticed that some processes were added to the process list, like kern_sploit. What is this?

It's Greenpoison's exploit. It's legit. According to the GitHub source, Snowbreeze installs it.


Would Apple still take its 30% cut if I collect donations for charities in an app I develop? I know that selling things without going through App Store In-App Purchases etc. is not allowed widely. Even apps like Dropbox historically had problems with it and even they use in-app purchases for Dropbox upgrades today.

If I'd develop an app that people donate charities using an online payment system (like Balanced or Stripe), would Apple still take my app down because I'm not going through in-app puchases?

I have here some App Store Review Guidelines, but you can't use in-app for donations. There are some points in the Apple In-App Purchase Policy covering some of your questions:

21. Charities and contributions
21.1 Apps that include the ability to make donations to recognized charitable organizations must be free
21.2 The collection of donations must be done via a web site in Safari or an SMS

Source:
https://developer.apple.com/appstore/resources/approval/guidelines.html (late 2013)


Yahoo Widgets - crashing - clean uninstall Anyone remember Konfabulator / Yahoo Widgets? Anyone still use it/ them?

Well, I do… to track my IP, and put rotating pictures on my desktop. Pretty low-level stuff, but it's been part of my desktop UX for a decade.

Trouble is, something has gone rotten. The app(lette?) itself spontaneously quits, and the pop-out pref bar disappears, while the widgets themselves continue running. My rotating pictures in Picture Frame present, but they've walked down my screen. Typically I would occasionally open prefs and move them back up. Now I'm unable.

As a fix, I tried simply deleting the package and reinstalling, but it persists in flaking on me. I searched root and user /Library and /Preferences for tell-tale associated files to kill to no avail.

Anyone have any suggestions on how to diagnose / and fix? I'd be happy to step away from it if anyone has a suggested replacement that will run in the background, and rotate through images in a user defined directory.

For better or worse I'm running Lion on a 2 x 2 GHz Dual Core Intel Xeon Mac Pro Tower.

TIA

System Prefs > Desktop & Screensaver > Desktop can rotate pictures from any specified folder, natively - no widget required.

Tracking your IP can be done with many tools - this one from dynDNS might do the trick [not something I've ever used as mine is static]  Dyn Updater

Screen-fill options as below...


How do change focus from the address bar back to the document after CMD+L? CMD-L brings focus to the Address Bar.  Is there are shortcut key for toggling back to the document of the current tab?  How else might I achieve this other than a keyboard shortcut built in to Safari?

Context:
Safari 7
OSX Mavericks

You can ⇥ back, or alternatively ⇧⇥ which is usually faster.

It takes me two presses of ⇧⇥ to get back from the address bar to the page: one to move to the Add to Reading List button and one to get back to the page. This may be higher if you have the back/forward buttons on the toolbar, and lower if you have Full Keyboard Access disabled in System Preferences.

You can use Keyboard Maestro to create a macro which lets you get back to the page with a single keyboard shortcut.


What is the best way to export iphoto library to a certain folder structure? I have done a lot of processing to my iphoto library (organizing events, etc) and I want to export my iphoto library to a external hard drive but I want others to see the files so i don't want to just store the iphoto library package.

Is there any ability to export in certain patterns like

Photos / [Year] / [EventName] /

or something similar to this?

Yes. Couple of possibilities

If you have the latest version of iPhoto 11 there's a limited option in the Export dialogue. (File -> Export. Note the 'Subfolder Format' option in the Export dialogue. Remember you actually have to have an Event selected for the option to appear)
For earlier versions, or more granularity, Apps like iPhoto2Disk or PhoShare will help you export to a Folder tree matching your Events.


Where did this new WiFi network with SSID 'SETUP' come from? After setting up my router (Linksys WRT120N) and my wireless network, upon clicking on the wireless icon and selecting "Join Other Network..." a new network called SETUP shows up when clicking the Show Networks button.  Where did this network come from?  It is password protected, but none of the user accounts and passwords can access it.  There is no way of deleting it.
The network that I have initially set up is, however, working fine.
(MB Pro; OS X 10.6.8)

This could be the network for a wireless printer. Its possible that someone nearby has bought a new printer with wireless functions.


AirPort Express and ssh So, I've been trying to understand networks a little better and I'm playing around with ssh. I've learned how to set up port forwarding from my AirPort Express directly to my computer, but I am confused on how I am supposed to change the port that is used to accept ssh traffic by the router.

When I set up the port forwarding to my static IP address, I also wanted to change which port the router uses to accept ssh traffic. However, each time I change the public and private TCP ports on the base station and try to connect with ssh by specifying the router port-something like ssh Kyle@123.45.678 -p 1234-I get a connection refused.

Here is my question. How do I change the port that accepts ssh traffic for the AirPort Express router, and if I change that port and the port accepted on my computer, how do I specify the particular port for the router and the particular port accepted by my computer in the ssh command?

Both the AirPort Express and my computer are currently accepting ssh traffic on port 22 (when I have remote login activated, that is). I am trying to change each of these to a different port.

I think you're trying to set up port forwarding, to allow yourself to ssh in from outside, and changing the port to keep it slightly more secure? You don't need to change the port used internally (inside your network) - you just need to change the port used from outside of your network. Then, set up a rule that passes connections on the desired port to the internal. You would for example tell the router that incoming connections on port 1234 should be redirected inside your network to the machine at 10.0.1.123 on port 22. There are some instructions here that might help. (I don't have an AirPort but have set up port forwarding for multiple routers - the basic idea is the same for all)

Asking your computer to accept incoming ssh on another port is more complicated, and (as of El Capitan) apparently requires deactivation of SIP, which is why it may simply be easier to set the AirPort to forward to port 22 by default.


My iPhone keeps telling me my cellular data is off? I have an iPhone 6 and I haven't used cellular data, only Wi-Fi. And every night, only at night while I'm browsing, that tab or whatever it is called keeps popping up and saying that my cellular data is off. I don't understand why do I need to know that multiple times and after appearing a couple of times it turns my Wi-Fi off!

I don't know what to do. It's really annoying.. Some people said to turn off Bluetooth or something with the chip, I don't know, but my Bluetooth is never on because it wastes my battery for nothing. Not sure what to do, any help appreciated.

Apple has some information up at:

https://support.apple.com/en-us/HT201673

It basically points you to contact the vendor (i.e. your cellular carrier) to troubleshoot problems with cellular data. Apple would help you locate the cellular data on/off switch in settings, but once you've done that - you could back up your phone and erase it / restore a known good OS and re-test cellular data.

That would let you know it's not software or settings. Then you would need to determine if your phone needed a hardware repair (less likely but possible) or if your carrier can tell why the coverage is spotty or not continuos. They have the cell tower logs and know how your account is set up (as opposed to Apple that designed the device to work with hundreds of carriers).


Reading creation date from file an change I have files named "clip-2016-03-01 10;01;14.mp4" and would like to make filename to creation date of file.

Found this thread
read creation date from file name and change - batch

for f in *; do
t=$(echo $f | sed -E 's/([A-z]*-)|([ ,;])|(\..*)//g' | sed -E 's/(.*)(..)/\1.\2/')
touch -t $t "$f"

done

But I'm not that used to using terminal.

1. Where do I put the search string to the folder containing the files in terminal?

Also found another thread suggesting that touch command won't work and that I should use SetFile -d command.
https://superuser.com/questions/492342/how-can-i-batch-shift-the-creation-date-of-files-on-os-x-10-6-8

This will operate on all files in the Current Directory.
You could cd ~/MyDirectory, either in the script or in Terminal before running it.
Another option is to change the * in for f in *; do to ~/MyDirectory/*

This won't actually give you the creation time, because it isn't stored by Unix. Ctime actually records the time of the last status change (which may or may not be creation time).

OS X seems to store other data in extended attributes, but this is not what the script does.


How can I unlock single-user mode? I stupidly forgot the password to my MacbookPro. I have locked single user mode 2 weeks ago (for security reasons). How can I unlock single-user mode to get my password back?

Thanks guys :D

There is a way to geting if you follow this link to the Apple website where you will find information on resetting the administrators account password.

You will require a Mac OS install disc as close to the OS you are using as possible


Cannot partition my Disk: Free space in disk utility much smaller than actual free space MacOS Mojave 10.14.6
Processor: 2.8 GHt Intel Core i7
Memory 16 GB

I want to partition my Disk because I want to try to install Linux-Ubuntu. For this I'm following this tutorial.

In Disk utility I clicked on the main volume > partition > partition but the following message appears:

This container has 915.81 GB used space.
Its minimum size is 1 TB.
This container cannot be split because the resulting containers would be too small.

And I cannot click on the + button to partition the disk

I then tried the following:

I then tried to make some space and deleted around 300+ GB of data and have now 439 GB (when I go to apple button (above left) > About this Mac > Storage). However, in Disk utility the amount of free memory didn't change and is still only around 85GB and it is still not possible to partition the disk.
I deleted 2/3 automatic time machine backups with

tmutil listlocalsnapshots /
tmutil deletelocalsnapshots ...

deactivated the automatic time machine backups with

sudo tmutil disable localsnapshot

What should I do?

EDIT

Here is the screenshot from diskutil where the problem is appearing:

is it an apfs vol?
did u try to partition the volume without a specified format?
please post more info !!
off the top of my head i can think of a couple of things, mainly

diskutil eraseVolume /dev/diskXY (where X= the disk and 1 the volume within that disk) "Free Space" "%noformat%" <desired amount, %, or if you've already created a separate volume use the R option or 100% in order to erase the entire volume>

diskutil partitionDisk /dev/disk2 1 GPT "Free Space" "%noformat%" "100%"
or format it as a FAT32 part and use that for linux(its been a while since i've done this myself; but i can find u some resources if u'd like...)

    check the man pages, man diskutil

    also what mac are u using?(make model and what not ... it might be handier to install refit/refind and use that as boot manager before installing ubuntu so that your mac will always boot up into a
     custom bootloader with a choice of operating systems).

    if none of these are viable options or you'd rather not mess with the bootloader, why not just install vmware fusion, virtualbox and use ubuntu as a virtual machine (depending on what you'll be using it for, not too much resources need to be allocated; i'd start off with 2cpu and around 2048-4096mb of ram[this, of course, is dependent on what you're initial resources are...if u're running an old dual core processor and only have 4G of ddr3 ram, then the initial option with refind/dedicated partition might be the way to go.])

    What will u be using ubuntu for?

    Have you created a liveusb and booted into ubuntu already ?! Are you familiar with linux?!


Confused by Siri's answer I asked: "Should I wear a jacket today"

It replied: "Sorry Nathan, I can't look for places in France"

What does that mean? (Yes it's true I'm in France)

It probably tries to look up the weather to answer that question and fails to find the weather at your location.


How to fix HDD failure on a MacBook Pro? My daughter's Mac failed to boot. I did:

Recovery Mode - would not allow to reinstall OS X, Disk Utility failed.
Internet Recovery Mode - doesn't work
Created external drive with OS X, rebooted successfully from it.
Tried everything "standard", not working, Repair fails.
Erased HDD (worked); rest no change, tried again Disk Utility etc. with no results.
Terminal attempts:

diskutil verifyvolume disk0s2
The volume could not be verified completely. File system check exit code is 8.
diskutil repairvolume disk0s2
The volume could not be verified completely. File system check exit code is 8.

fsck #1

fsck #2

Computer specs: MacBookPro7,1; HDD 500GB, model: WDC WD5000BPKT-00PK4T0 -

And now...I am finally short of ideas ;)
Any advice from the community, please?

The error File system check exit code is 8 indicates you have an unrecoverable file system read error.

This can be due to either or both of the following:

Corrupted file system
Failing/failed hardware

If it's a just a file system problem, you can try the following:

run First Aid multiple times to see if the problem gets fixed
wipe your drive (format it) and reinstall macOS

Obviously, if the first option doesn't fix the problem, your next option is to format and reinstall.

If it's a hardware issue, your best bet would be to replace the failing drive with a new one.  Your MacBook Pro (MacBookPro7,1) is a Mid-2010 model which means it's a 7 year old drive (if it hasn't been replaced) which is well beyond the lifespan of spinning hard drives.  At this point, I would recommend upgrading to an SSD and even maxing out the memory for best performance.

While I agree with @klanomath that it could be the SATA cable, it's not the most likely culprit given the age of the laptop and drive.  My money is on a failed hard drive.  However, a replacement SATA cable is fairly inexpensive part to replace and if you decide to go that route, it won't be an expensive investment.


Dark theme for Thunderbird on macOS? Does there exist a theme plug-in or add-on that can make the Thunderbird on macOS looks mostly dark or black?

It's part of the default theme package in current beta versions (running b64).

In Mojave, it switches to the dark theme automatically if you change the OS to dark. However, whereas the dark theme in Firefox is pretty much complete, the theme in Thunderbird is haphazardly applied. I'm not running dark mode Mojave specifically because Thunderbird theme is off. See bugzilla entry here: https://bugzilla.mozilla.org/show_bug.cgi?id=1486205


Reclaim hard drive space from deleted partition and reclaim Apple bootloader I had my system dual-booted with Ubuntu 14.04. However, I found myself not using it enough to warrant the storage space. I deleted the ubuntu partition and the ubuntu swap partition.
However, am now facing two problems that I have struggled to solve.

I have been unable to reclaim the disk space from the deleted partitions. I've tried booting into recovery mode Command+R and repairing the disk. The disk repairs successfully, but still remains the same size, and will not let me increase the partition size.
The system is still trying to use the grub bootloader. In order to boot to OS X I have to hold down the Option key on startup. This issue is more of an annoyance, but I would love to figure out how to solve it.

Is any of this possible without a fresh install of the OS?

Edit: Screenshot of partition table below. Also, using OSX 10.10.3 Yosemite.

Edit: Could this have anything to do with the Recovery HD below by osx's hard drive on the partition list? Is it safe to remove the recovery hd given that CMD + R reboots are now an online process?

Edit: Output of requested commands below:

diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            245.4 GB   disk0s2
   3:                  Apple_HFS Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *137.4 MB   disk1
   1:        Apple_partition_map                         32.3 KB    disk1s1
   2:                  Apple_HFS VirtualBox              137.4 MB   disk1s2

    sudo gpt -r show /dev/disk0
          start       size  index  contents
              0          1         PMBR
              1          1         Pri GPT header
              2         32         Pri GPT table
             34          6
             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
         409640  479330712      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      479740352     262144
      480002496    1269536      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
      481272032  143870383
      625142415         32         Sec GPT table
      625142447          1         Sec GPT header

    sudo fdisk /dev/disk0
    Disk: /dev/disk0    geometry: 38913/255/63 [625142448 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -  625142447] <Unknown ID>
     2: 00    0   0   0 -    0   0   0 [         0 -          0] unused
     3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
     4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

The disk giving you problems uses the GUID partition table (GPT) to define the its layout. You provided me with the relevant contents of this table when you posted the output from the command sudo gpt -r show /dev/disk0. These values appear to be correct, except for the entry with an index of 3. This entry is shown below.

      480002496    1269536      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

The start and size values of 480002496 and 1269536, respectively, are OK, but the contents should be GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC.

To correct the problem you need to boot to OS X Internet Recovery and enter the following commands in a Terminal window.

gpt  -r  show  /dev/disk0
diskutil  unmountDisk  /dev/disk0
gpt  remove  -i  3  /dev/disk0
diskutil  unmountDisk  /dev/disk0
gpt  add  -i  3  -b  480002496  -s  1269536  -t  426F6F74-0000-11AA-AA11-00306543ECAC  /dev/disk0

Once completed, you can boot back to OS X and open the Disk Utility application. The "Recovery HD" partition should no longer appear. You will need to move the slider on the "Macintosh HD" partition as far down as it will go. Click the "Apply" button to recover the free space.

Note: The "Recovery HD" partition has not been deleted. Normally, it is hidden by the Disk Utility application. The partition will still appear when using the diskutil list command. When you move the slider down be aware the Disk Utility application will have to relocate the "Recovery HD" partition to the end of the disk. This can take a while, so be patient after clicking the "Apply" button.

Example Using a Flash Drive

I tested the procedure using a flash drive. Before fixing, the flash drive appeared as such:

Using similar Terminal commands resulted in:

This allowed me to move the slider as such:

Clicking the "Apply" button produced:

In your case, the small free space shown above will not appear. (This is not free space, it is the space taken by the hidden partitions.)


How do you display time zone in Apple photos I've seen the following screenshot showing the time zone in the info display in the new photos app.

I can see how to see the time zone if I use the adjust time and date, but it doesn't display in the info display box.

it's actually a setting in "date&time" in your system preferences.

Open it and then in the "date&time" section, click on "open language & Region", then "advanced".

Click on "times" section and add/drag "time zone" to the "short time" format.