DNS lookups fail with e.g. `ping`, but work with `host` I'm using pfSense 2.0rc3, and I've set it up as a DNS forwarder and enabled "Register DHCP leases in DNS forwarder" and what I understand are all the appropriate settings to get DNS server for local lookups.

It works as expected with Linux and in particular I can run host abc and ping abc (and other applications) and they all work as expected.

However in Mac OS X Lion 10.7 it does not work as expected. In particular, only lookups with the host command seem to work, i.e.

$ ping abc
ping: cannot resolve abc: Unknown host

$ host abc
abc.local has address 192.168.1.128

$ ping abc.local
ping: cannot resolve abc.local: Unknown host

$ host abc.local
abc.local has address 192.168.1.128

Why does the lookup for abc work when using the host command but fail with ping (and other applications)?

Thanks for reading.

Why they made this change, I don't know, but it's driven me crazy for a while.

I don't know why things work for host, but not ping, but I think it has to do with the nature of these two utilities. Ping is a simple (although very helpful) diagnostic utility for dropping packets on the wire that should get echoed back to you. The hostname lookup functionality is just a side effect of the job and handed off to the system's recursive resolver (I believe -- I haven't verified by checking linked libraries or anything of that sort). Host's main job is to do DNS name resolution, so it implements its own recursive resolver.

Apple's recursive resolver is mDNSResponder. For some reason, the version of mDNSResponder in Lion needs the "-AlwaysAppendSearchDomains" command line option to behave as it did in Snow Leopard (at least).

Here's a quick way to fix it:

sudo sed -i .orig '/ProgramArguments/,/<\/array>/ {
s/\(<string>-launchd<\/string>\)/\1\
                <string>-AlwaysAppendSearchDomains<\/string>/
}' /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

(There should be two tab characters at the start of the second-to-last line above, but I couldn't figure out how to get this little editor to insert tabs, so I added 16 spaces. Either should work, but the tabs fit the spacing of the original file better.)

This will add the "-AlwaysAppendSearchDomains" argument to the mDNSResponder startup plist file (and save a backup copy), but since this is controlled by launchd, that system needs to be told to restart mDNSResponder.

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Now, if you check your running mDNSResponder process, you should see it running with your new argument:

ps auxww | grep mDNSResponder

(Props to http://www.makingitscale.com/2011/fix-for-broken-search-domain-resolution-in-osx-lion.html and http://kavassalis.com/2011/07/wtf-bug-in-os-x-10-7/, where I found my answers to this problem.)


Automator command line: "Unable to open workflow" I created a workflow in Automator consisting of a single action, "Convert Format of Word Documents" (provided by Microsoft Word). I saved this in ~/Documents/convert_word_to_pdf.app. I can run it by dragging a word file over this app, and it will generate a PDF for me. However, I can't figure out how to run it through the command line. I tried running automator convert_word_to_pdf.app foo.docx and I get Unable to open workflow.. I also tried convert_word_to_pdf and convert_word_to_pdf/document.wflow as arguments to automator, with the same results. What am I missing here?

Use -i:

automator -i foo.docx ~/Documents/convert_word_to_pdf.app

Or if there are multiple arguments:

printf %s\\n foo.docx bar.docx|automator -i - ~/Documents/convert_word_to_pdf.app

See the man page:

SYNOPSIS
     automator [-v] [-i input] [-D name=value ...] workflow

DESCRIPTION
     automator runs the specified workflow.  To create or edit a workflow, use
     the Automator application.

     The following options are available:

     -D name=value
              Set variable name to value for this run of workflow.

     -i input
              Set input as the input to workflow If input is - then the con-
              tents of standard input is used.  The newline character (\n) is
              the delimiter for multiple strings.

     -v       Run in verbose mode.


Make macbook store apps on one hard drive and data on another I just replaced my optical drive in my 2010 macbook pro 15 inch with my old 500GB hard drive that used to be in the HDD bay and placed a new SSD in the HDD bay. Now i have 256  GB of SSD storage which i would like to use for only my operating system and applications.

The rest of the data (music, movies, text files, pdfs, etc) i would like to be stored on my other Hard drive.

I reformatted both hard dives to be Mac OS X Extended (journaled) and am currently installing the SSD with OS X Yosemite.

How do I tell my mac that i want to install apps on the SSD but storing music and other stuff should be done on my HDD (which now is in the optical bay).

Copy your home directory over to the other drive.
Open up System Preferences then the Users & Groups pane.
Click the padlock to unlock it
Right-click on your name
Change the Home Directory to point to your newly copied one on the other drive.

NB. You might want to use a syncing program to do the copy, or create a different user to do the copy as after rebooting so that your original user isn't logged in and running anything. Makes the copy cleaner.

If you want to do this with a brand-new user, so much the better.

Alternatively, you can use your existing home directory and just sym-link everything over...

Select the folders in Finder on the new drive - ctrl-L (File menu -> Create Alias), then drag the aliases to the old drive and remove the old originals. This is less neat, but works just fine.


Does upgrading my iCloud plan extend my previous subscription? If I upgrade my iCloud storage subscription, do I basically lose my previous upgrade?

As of today, Apple's iCloud storage upgrade options look like this:

  10 additional GB (15 GB total): $20/year
  20 additional GB (25 GB total): $40/year
  50 additional GB (55 GB total): $100/year

If I purchase the 10 additional GB plan today, I pay $20. Let's say that six months from now I decide I need more storage and so upgrade to the 20 additional GB plan.

Do I pay $40 at that point (as opposed to an additional $20 upgrade of the first plan, or some kind of prorated thing)?

Assuming that I do have to pay the full $40, do I drop down to the free level a year after that, or do I drop down to the 10 GB level for six months and then down to the free level?

I've not had much luck Googling this or searching through Apple's support pages, so I'm hoping someone here has experience or (better) can point me to something definite.

The terms are listed deep in this link to the iCloud terms and conditions:

  The applicable storage fee for an upgraded storage plan will take
  effect immediately; downgrades to your storage plan will take effect
  on the next annual billing date.

So a literal interpretation would be you would not get any credit for the unused portion of the year you paid for the initial storage if you upsold yourself before that year term expired.

In practice, Apple has been generous with giving pro-rated refunds for AppleCare when you cancel it (but that is listed explicitly in the T&C for AppleCare) and has extended MobileMe storage for free - so you could either get the lower storage tier added to the end of the higher tier (which would be a bit of a complicated thing for Apple to track - especially if you did two buys in one year).

I suppose you could open a ticket with billing support to see if they have a current policy on how they handle up-sales from one paid tier to another, but I would expect the initial purchase to end when you upgrade to a higher tier before the anniversary unless you contact Apple and they offer you a credit or extension as an exception and not something that is programmed into the system.


What is opt-cmd-] bound to and how can I switch this off? In my newish Mojave install on an iMac I experience some odd behaviour:

  ⌥ Option⌘ Command] plays the alert sound even if it is bound to an action in a keyboard shortcut tool like Keyboard Maestro

And it is only ⌥ Option⌘ Command], other key combinations which (to my knowledge) are not bound to anything. E.g ⌥ Option⌘ Command[ doesn't make any sound.

Also this behavior only seems to happen in one (my main) user account (other accounts - whether admin accounts or not) do not have this problem.

I cannot attribute this to any main application or menu bar app. (And I have quite a few of them!) How did I check?: One-by-one I quit all main apps and then all menu bar apps - still ⌥ Option⌘ Command] plays the alert sound.

How can I find out what causes this alert tone?  How can I find out which app/tool/daemon binds to ⌥ Option⌘ Command]?

Notes:

I care about this because I usually have on ⌥ Option⌘ Command] a particular Keyboard Maestro macro running. This still works - but additionally this unexpected alert sound plays on the shortcut. (And the sound happens even if I have Keyboard Maestro completely quit.)

I would go into system preferences > keyboard > shortcuts, and browse through all of the keyboard shortcuts and see if any have ⌘⌥]as they’re keybind. you could also open Automator, and press the record button, press ⌘⌥] and then click stop recording and see what it says that you did.


Mac webcam - get the device How do I access my default video camera on my mac? I know on Linux it is /dev/video0 but my Mac does not have that. I'm trying to capture my webcam into ffmpeg

ffmpeg -i /dev/video0

But it won't work because /dev/video0 doesn't exist.

Unfortunately, it appears that ffmpeg can't record using the iSight, as reported in a ffmpeg-users thread.

Really a shame that Apple doesn't expose this functionality!


Absolutely eliminate "Automatic new Desktop when dragging" As far as I know I do have only one (1) Desktop enabled
I'm looking at this web page right now in Safari.
Safari is a normal window (say, 50% of the width and height of the physical screen, and it is sitting right in the middle of the physical screen).
This is a mid 2015 mbp with no external monitors attached.  Every piece of software is the latest as of writing
Using the pointer, I grab an image (say, one of the small icons on this screen).
I grag it to the extreme right of the desktop - as if I am going to drop it on the desktop near the right
But I keep dragging it, and hold it on the extreme right edge of the screen

IN FACT WHAT HAPPENS IS......

After a few moments, the "whole desktop" will slide to a new desktop on the "right".
Strangely, this new desktop has a different color background to my usual desktop
The "new" Desktop appears to be identical to my usual only desktop (same icons scattered around etc), except only the background color is different

And click here for a video !!!

http://tinypic.com/r/jq2nis/9

I want to completely disable this "sliding" function.  (Or at least know what the hell it is!!) Is it possible?

Related!  How do I correctly set strictly ONLY ONE desktop?

Not seeing this behavior. I have several desktops enabled, yes macOS will happily slide to the next available if I drag a file/window to the extreme right of the screen, but it won't create NEW desktops. Once I hit #4 (the last desktop I have enabled) holding a file against the right side of the screen doesn't trigger any action. Perhaps you have more than 1 screen enabled in Mission Control? Remove them, it should not auto-create more. (added as answer per request!)


How to set an unattended Mac to automatically download files & photo originals from various iCloud accounts e.g Family Shared iCloud Storage? I have 2TB of iCloud storage, with Family Shared Storage turned on and several accounts in use by various family members. I would like to maintain a local copy of this 2TB, and I have a spare Mac to use for the job.

My issue is that, as far as I understand, macOS will only sync iCloud (files and Photo Library etc) for the currently logged-on user.

How do I set it up to automatically log into and sync files & photos from all of our iCloud accounts (e.g. every night)?  I don’t want to have to manually rotate through changing users every time.

FYI I am comfortable with using Terminal, but not an expert Terminal user.

You could try enabling Fast User Switching, then logging in to all of your family’s accounts. Fast-switching between users keeps the previous user logged in, so processes running on that account should keep running in the background (albeit with a lower priority).

Open System Preferences → Users & Groups → Login Options.

Click the Padlock to unlock Administrator-only options.
Finally enable Show fast user switching menu as (Icon or Name doesn’t matter).

Now click the new option that should have appeared on the right side of your macOS menu bar, and login to another user account.

This should be sufficient since cloudd and photolibraryd will start automatically to sync your files and photos. However if you want to be safe, open up the Photos app.
Repeat steps 4-5 for every family member.

You should only need to repeat this procedure if you reboot your Mac (eg. after a system update).

Screenshots courtesy of How-To Geek.


I upgraded my CC programs and now they are no longer on the dock. How to get them there? I upgraded my Creative Cloud programs and now they are no longer on the dock. How may I get them there (Photoshop, Illustrator, Muse, etc)

The simplest way to put anything in the Dock is just to find it in your Applications folder & drag it there

it will become a permanent addition.

You can remove it again by dragging the Dock icon out to the desktop...

None of this will affect the app itself, only its appearance in the Dock.


Empty compressed memory Is there any way to empty the compressed memory used by an app without restarting this app?

Apps like Memory Cleaner or the purge command do not work!

No, there's no way to do so.

If you could empty the compressed memory used by an app, the app would stop functioning and crash. Therefore it doesn't make sense to empty the compressed memory of running apps.


Multitasking on iPhone Does the iPhone close the background programs if it runs out of memory or battery?

There are two ways to approach this question.

From the end user's perspective, the answer is no. No matter what you do, the app will come back to the same state it was in previously, unless you close it from the switching interface.

Technically: yes. When the device runs short on RAM, it will freeze the application's state from RAM to the main storage (flash). When you resume, it loads the state from flash back into RAM, and then resumes. This is intended to happen quickly enough and transparently enough to be indistinguishable, but you may sometimes notice that resuming takes a bit longer if you have loaded several other apps in the meantime (and therefore pushed the app out of RAM).


Correcting wide angle photos from iPhone 6 on iOS I'm looking to correct lens distortion from my iPhone 6 when I take certain wide angle photos.

Take this picture of Pittsburgh taken on the Monongahela river just upstream of the point:

If I try to rotate it in Photos - the left side needs -5° rotation for vertical elements to look vertical. The center of attention is vertical at 0 degrees rotation. The far right side needs +8° adjustment.

I'm looking for a way to use a high quality filter to adjust for the physical characteristics of the iPhone 6 lens as described in step three of this tutorial:

Where Lightroom on the PC/Mac has a database of common lenses and the corrections needed for perspective problems

I would like to:

Avoid carrying a computer (or waiting to return to one) to edit photos like this.
Avoid getting Lightroom if there is a more narrow lens distortion program that fits this need. (A small database of common lens perspective correction factors)
Do the editing on iOS alone.

What software options exist for this task?

You may wish to try SKRWT for iOS.

From an article from PhotoApps.Expert:

  If you've ever shot a photo of a tall building from the ground, you know when
  you tilt up at it, the perspective goes wonky and your beautiful
  square building starts to look like the pyramids of Egypt.

  SKRWT by mjagielski [$1.99 on the App Store] is an app that makes
  correcting that perspective distortion extremely simple. Not only does
  it do keystone correction, but it can also fix wide angle lens
  distortion.

I tested it with a snapshot of Minneapolis. (I didn't spend a lot of time on this.  Just to test.)


Is there an app that's similar to Calendar + Wunderlist? I'm constantly switching between the two, and it's driving me crazy being so disorganized. I use Wunderlist as a to-do list. I'll create a list, titled with the date, and list the things I need to do that day. So every date requires the creation of a list; sometimes I'll have 10-20 lists when I need to plan further ahead, and it gets tricky when I have something coming up weeks or months ahead of time. The issue is, it's hard looking ahead to see what's been planned, what appointments I have, etc. (I know searching is possible, but that's not the same as having an overview of the next few days or weeks).

When I use Apple's Calendar, I essentially do the same thing, each day is a to-do list. But when in month -- the view I find most helpful -- I can't arrange the orders of the items I create. I have to either go to day view or week view and drag it, or set a time, which can be very tedious if done for each item. Week view can also be quite annoying because there's no ability to scroll horizontally (like you would with a webpage or pdf), it jumps week by week, making planning ahead sort of tricky for me. So essentially, I end up creating an unordered list.

Is there an app that can address these issues? I'm aware that there organization / productivity / calendar apps that are loaded with features, but cost a good amount of money. I don't want to be paying for an app of which only 2% of the features are useful to me. So a minimal app, and one that's free or more afforadable -- really, I'd just like to to address the above issues.

I've scoured the internet, but haven't found anything. Please help, I'm pulling my hair out.

I will suggest you the Clear App.
Is a minimal to-do app that allows you to create multiple lists and items within that lists. Furthermore, will allow you to set reminders for every item in your lists.

The app is really minimal which help you keep organised. Another feature of the app is that the higher an item or a list is in your app, then the higher the priority is and therefore the colour (first item is dark red, indicating importance and the last one yellow, indicating not that important).

Is also available for iOS (iPhone, iPad), Apple Watch and Mac OS X, and sync over iCloud to keep everything synchronized.

Is not free though, but for me is my main to-do organiser app for a long time, so for me, worth it's money.


I can no longer see the url from where I have downloaded a file in Get Info, can I get that back? I always used to use Get Info to see the URL where I've downloaded a file. Image, PDF, data. Now I can't see this field anymore in any of my recent downloads. I don't see it for old files or new.

update: based on the comment, I went back and looked more carefully. In the Title and Headline lines I only see the file name and extension repeated in each place.

Did I loose this information when I deleted the indexing? Or is the display just turned off temporarily?

MacBook Air 10.11.6 El Capitan  Downloads with Chrome primarily, seems to be same with Safari downloads.

edit: following instructions from @user3439894's comment to drag the file into a command window after typing xattr -1, I can see that the url is still available somewhere, and in at least this case is correct (I've changed some codes to xxxxxx):

david-selfs-MacBook-Air:~ david$ xattr -l /Users/david/Desktop/IgRb0.png
com.apple.metadata:kMDItemWhereFroms:
00000000  62 70 6C 69 73 74 30 30 A2 01 02 5F 10 23 68 74  |bplist00..._.#ht|
00000010  74 70 73 3A 2F 2F 69 2E 73 74 61 63 6B 2E 69 6D  |tps://i.stack.im|
00000020  67 75 72 2E 63 6F 6D 2F 49 67 52 62 30 2E 70 6E  |gur.com/IgRb0.pn|
00000030  67 5F 10 23 68 74 74 70 73 3A 2F 2F 69 2E 73 74  |g_.#https://i.st|
00000040  61 63 6B 2E 69 6D 67 75 72 2E 63 6F 6D 2F 49 67  |ack.imgur.com/Ig|
00000050  52 62 30 2E 70 6E 67 08 0B 31 00 00 00 00 00 00  |Rb0.png..1......|
00000060  01 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00  |................|
00000070  00 00 00 00 00 00 00 00 00 57                    |.........W|
0000007a
com.apple.quarantine: 0001;xxxxxxx;Google Chrome;xxxxxx—xxxxxx-…

I'd start by rebuilding the Spotlight Index on your Mac.

  Choose Apple menu () > System Preferences, then click Spotlight.
  Click the Privacy tab.
  Drag the folder or disk that you want to index again to the list of locations that Spotlight is prevented from searching. Or click the
  Add (+) button and select the folder or disk to add.

  To add an item to the Privacy tab, you must have ownership
  permissions for that item. To learn about permissions, choose Help
  from the Finder menu bar, then search for “permissions.”
  From the same list of locations, select the folder or disk that you just added. Then click the Remove (–) button to remove it from the
  list.
  Quit System Preferences. Spotlight will reindex the contents of the folder or disk.

From: How to rebuild the Spotlight index on your Mac


Group Settings in Mavericks Profile Manager I have successfully setup my Mavericks server with Profile Manager.
I have enrolled my devices and all is working fine.

(For example) I have a group with 40 users in it. I want to apply Calendar (CalDAV) settings to that group.
It asks me to enter the username and password for the user. It's a group....

Is there a way to add the settings as a "template" and the user only has to add there username and password?
I assumed that when the user enrols the device, they have to authenticate to the /mydevices page, so it already has the users credentials?

Am I missing something?

Yes there are variables you can enter for common user fields

http://krypted.com/mac-security/using-payload-variables-in-profile-manager/


Recover Apple Music Playlist Deleted by Mistake Does anybody know how to restore an Apple Music playlist that was deleted from my Mac? It's a personal collection I've been curating for a long time and my toddler deleted it. Is there a cached version somewhere in the back end I could trace it back to?
Thanks

See if this helps you at all. https://discussions.apple.com/thread/251373506?answerId=252694873022#252694873022


Unable to ssh root@localhost on jailbroken iPad with iOS 8.1 I jailbreaked (not for pirates) my iPad 4 (iOS 8.1) several weeks ago and found it unable to ssh root@127.0.0.1 via Prompt 1 or 2 on iPad. Even I cannot connect via LAN IP (e.g. 192.186.X.X). However, there's no problem if I ssh root@LAN IP on my iPhone or Mac in the same LAN.

By the way, I was able to ssh root@localhost on jailbreaked iPad when it was running iOS 6.1. It is also okay if I have already ssh logged in to iPad on my Mac, and ssh root@127.0.0.1 again.

The output of netstat on iPad:

Surface-Pro:~ root# netstat -an|grep .22
tcp4       0     28  172.22.29.64.22        172.22.26.158.47927    ESTABLISHED
tcp4       0      0  172.22.29.64.50293     17.110.228.29.5223     ESTABLISHED
tcp4       0      0  *.22

Does anyone know the reason that iPad cannot connect to itself in apps? (Maybe sandbox/containers model has been changed since iOS 8?)

A much better alternative than to run Prompt as root, is to create another sshd instance listening to a port above 1024.

In this example I have used port 10022.

Copy /Library/LaunchDaemons/com.openssh.sshd.plist to /Library/LaunchDaemons/com.openssh.sshd2.plist
Change the Label and the SockServiceName in com.openssh.sshd2.plist by appending 2 to ssh / sshd:

com.openssh.sshd -> com.openssh.sshd2
ssh -> ssh2

Add the following lines to /etc/services:

ssh2              10022/udp     # SSH Remote Login Protocol
ssh2              10022/tcp     # SSH Remote Login Protocol

Differences for iOS versions:

iOS 12.1.2 / unc0ver, iOS 13.3.1 / checkra1n:

from this answer choice #2.
copy the plist as above, but change the SockServiceName in com.openssh.sshd2.plist from ssh to simply the new port number 10022. The section will look like this:

<key>Sockets</key>
<dict>
   <key>Listeners</key>
   <dict>
      <key>SockServiceName</key>
      <string>10022</string>
   </dict>
</dict>

iOS 12.4 / chimera.sh

don't copy the plist file
instead, edit /etc/ssh/sshd_config as root. Details from this article
remove the comment in front of Port 22
add another line beneath for Port 10022

All iOS versions:

Reboot the device (or launchctl load com.openssh.sshd2.plist if you do not want to reboot)
Connect via port 10022 instead of 22

If you have installed bash, coreutils and sed you can automate it with this script:

#!/bin/bash
cd /Library/LaunchDaemons
cp com.openssh.sshd{,2}.plist
sed -i'' '/<key>Label<\/key>/{N;s/sshd/sshd2/}' com.openssh.sshd2.plist
sed -i'' '/<key>SockServiceName<\/key>/{N;s/ssh/ssh2/}' com.openssh.sshd2.plist

cd /etc
if ! grep ssh2 services; then
    cat >> services <<EOF
ssh2              10022/udp     # SSH Remote Login Protocol
ssh2              10022/tcp     # SSH Remote Login Protocol
EOF
fi


Is there a way to control the clock speed of the GT 650M GPU in a Retina Macbook Pro from OS X? This is not about gaming performance. I've got that all sorted when booting into Windows.

This is a 2012 version rMBP.

The question is about trying to gain a little more control over the hardware from the OS X-side.

During the summer, the machine runs acceptably cool under typical usage, for example, web browsing, even mp4/h.264 (non-flash) video decoding, etc. I was watching a 1080p Blu-ray rip the other day. Handled it fine.

However, once I plug in my external 2560x1440 display via a MiniDP-to-DL-DVI adapter, the display will only connect if the GT 650M is switched on. I use gfxCardStatus to control whether this Nvidia GPU is allowed to be switched to.

So this is fine, except that now I have to keep the fan spinning at higher RPMs (controlled through smcFanControl, of course), and even with that the temperature reads above 70 degrees C most of the time. It will generally be in the mid 50's to low 60's range when running the integrated GPU.

I know these are not very specific numbers, but the point is that whenever the Nvidia GPU is powered on the machine is producing a lot more power as heat.

According to an app I have here called "BatteryExpert" it draws around 11 watts on integrated and 19 watts with the second screen plugged in.

So my question is how can I see the clock speed of the Nvidia GPU, and how can I adjust it in hopes of cooling it down, but still keep it enabled? I need it to be powered on for the secondary monitor, but it's making the aluminum surface a bit too warm for comfort for typing.

I am able to boot to Windows to run e.g. GPU-Z there to check the clocks, but on Windows I'm not aware of any app that can read out a power draw wattage, so it's a little difficult to corroborate. (I guess I can compare idle temps, though.)

It may turn out to be the case that that ~8 watt difference (which results in the 15+ degree C difference in temperature, and a similar difference felt on the aluminum surface) is fully accounted for by running the 650M at its lowest power level, as it is after all a ~50W unit. I'm not really sure what to think. On the one hand 50W is at 900Mhz under load, and here it should be ~165Mhz ('s what GPU-Z tells me in Windows) idle.

Well I've gone off in the weeds at this point. The question is, what is some monitoring software to show me the GPU clocks? When I tried iStat Menus it did not have a GPU clocks reading.

If you don't need to use the MBP screen while using the external monitor you can disable it using a small magnet.

A small magnet placed on the left side of the MBP keyboard, more or less above where the SD card reader is placed, will make it think that the lid is closed. The GPU will need to do less work to drive just one screen (the external) and use less power, and with the lid still open the airflow will be beter.

I use this on a 2011 MBP, other versions may need to have the magnet placed at different places for it to detect a closed lid. And if you try this, please use the smallest magnet available.


Find process associated with launchd TCP port 5901 is open on my machine and is causing some mischief, and I want to know which process is opening it.  When I run lsof -i -P I see that launchd is the process that opened the port.

Is there a quick way I can determine which launchd plist file is being used to open that port? I'd rather not have to go through each plist mentioned by launchctl list.

First, is this being opened by the system launchd (process ID 1, running as root), or a user launchd (running as a user)? If it's the system launchd, you're looking for a LaunchDaemon; if it's a user launchd, you're looking for a LaunchAgent.

Assuming it's the system launchd, you can look for the relevant LaunchDaemon like this:

grep 5901 {,/System}/Library/LaunchDaemons/*

(note: if port 5901 were listed in /etc/services, you'd also have to look for it by name as well as number. But it isn't, so you don't have to worry about that.)

It's also possible that it's a LaunchDaemon that was loaded from some other place; tracking that down would be messy, so start with the easy check first.


Remove all references to Parallels 7 Windows 7 VM programs My system has been polluted with references to programs residing in a Windows 7 VM in Parallels 7.

For example, Windows programs show up in Spotlight, and in Safari settings under General->Default browser I get an annoyingly long list of irrelevant Windows programs.

I've tried to disable "Share Windows applications with Mac" in Parallels settings, to no avail.

This blog post suggests to add the Applications (Parallels) folder to the Spotlight privacy list, but I can't do that because I don't have that folder. I deleted it some months ago in an unsuccessful attempt to remove the same references as now.

The VM is on a USB disk that's usually not connected so these references must be stored in OS X somewhere. How and where are this links stored and how can I get rid of them?

I found a solution that may be specific to my setup, buy may be useful to others too.

I had moved the folder with the Windows applications shortcuts
elsewhere and had forgotten about it. I deleted this folder.
I deleted duplicates from Finder's 'Open With' menu using /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user followed by sudo killall Finder. You may read more about it here.


Can I see detailed browser history on the iPhone? I have an iPhone 4 on iOS 5.1. When I go into Safari's History page, I can see my browsing history by day, but I need to know what page I visited two days ago, at a specific time. Is there any way that I can do this?

Mobile safari does not have that feature and the application sandbox means you likely won't get at that data from another app running on the device without jailbreaking.

Many tools can export the browsing history to your computer - the trial version of PhoneView might be good to start and see if that meets your needs.

History files in particular are stored as .webloc files.


Hardware Router For macOS I "think" I understand that all firewalls are software. However, I am splitting the monthly internet bill with a roommate who has the ISP modem/router in his room. I would like add (if possible) more security measures. (I cannot get my own ISP in my room; as the house is designated as a “heritage house” and the landlord won’t agree to any “drilling”).
I have my macOS firewall turned on to “block all incoming connections”. I also use Tunnel Bear VPN.

Are there any recommendations (hardware or software) available considering my situation?

If you want more security than what you have now, you could add a hardware based router/firewal between your roommates Internet connected network and  your "network"

What you would be doing is connecting your WAN port of your router to your roommates LAN.  This will create a "double NAT" network, where your roommate becomes your ISP.

The benefit this has over a highly configured firewall is that the router will immediately block all incoming traffic (by default) on the roommates LAN but allow you egress to the Internet.


How do I know a mac needs to restart? Is there a way to figure out from a script whether a Mac needs to reboot? A file, the presence or contents of which I could monitor perhaps?

I'm looking for an equivalent to the file /var/run/reboot-required found on my Ubuntu boxes. My use case would be to centrally monitor my servers (and perhaps laptops) using Puppet, collectd or… well, something.

Like Linux, OS X is designed not to require restarting. There is no system wide means to determine if a restart is required - or even requested by a process.

For situations where a restart is required, the process responsible for needing the restart is also responsible for organising the restart.

Tools that update OS X are most likely to request a restart.

softwareupdate

Take a look at the  softwareupdate manual page for the most likely candidate to request a restart.

softwareupdate prints a message at the end of the updating process stating if a restart is required. The calling script or user is then responsible for restarting.

Delayed Updates

If an update requires a restart to be successfully and safely installed, OS X will delay the updating process. The update will wait until the next restart or shut down.

This approach allows updates to be downloaded as part of a schedule but not interrupt or interfere with running processes or active users.

Pending Updates

To see if an update is pending, check the contents of /Library/Updates/. This folder appears to contain property list files documenting packages and updates queued for installation.

You can use the tool defaults in your scripts to read plist files such as /Library/Updates/index.plist:

defaults read /Library/Updates/index.plist InstallAtLogout


iPad 4 Charges Very Slowly After I updated to iOS 8.4, My iPad has been charging Very slowly.

Times:

12:00PM (noon) - iPad died, switched on charger. (1%)

1:30PM - iPad comes on. (2%)

3:00PM - 4%

4.00PM - 9%

5:10PM - 9%

What is wrong here? This is completely not normal. I have also got an iPad mini with the same charger. And charges much faster.

Charger:

10W Offical Apple Charger

Sounds like a bad battery, to me. Over time, batteries just wear out to the point of not holding a charge or charging very slowly. An iPad is pretty tough to repair, so unless you have some experience in repairing them, I'd seek a pro to replace the battery for you.


Why can't I scale a wallpaper on iOS 7? When selecting a photo from my photo stream as the wallpaper (on my iPad 4 with iOS 7), the wallpaper is shown as a preview, allowing me to scale and move the visible area. Unfortunately, this doesn't work for most images, e.g. ones that I downloaded to the device from the web.

Using the two-finger pinch to scale the image doesn't work at all, and moving the visible area is very slow, if it works at all.

This behavior results in weirdly cropped and scaled wallpapers - the same was working fine on iOS 6.

Is this a known bug? It seems to be related to the size of the photo - the stock wallpapers coming with iOS work fine.

Don't know why it is happening but I use the app #nocrop (it's free) to make the pictures smaller before using them as wall paper.
You might also want to try switching reduce motion on/off in Settings > General > Assessibility > Reduce Motion.
Hope this helps


Looking for an external monitor for my late 2008 aluminium macbook I have the above laptop and thinking of getting a new, larger monitor to go with it. I have already reviewed other threads here and elsewhere, but there are a few things I am not clear about...
The Macbook has a mini displayport, so I will need an adapter. If I wish images AND sound to be available, which adapter will work (best)? M-DP to HDMI or DVI? I couldn't find a definitive answer...
Also, if I want to use the laptop in clamshell mode, how am I supposed to connect a new keyboard (I have a bluetooth one in the house) and a mouse to it?

This Samsung 27in monitor should suit your needs.

It's got a fast 4ms response time, good brightness, and it's pretty large, 27 inches.

Get a Mini DisplayPort to HDMI connector which carries both video and audio.

Turn on and set up your Bluetooth devices which should still keep connected while the laptop is in lid-closed mode, or you can connect a keyboard and mouse through the USB ports or a USB hub.


Apple password not being accepted Trying to install a settings update on my iPad but it won't accept my password.
I have tried resetting password but it still won't accept it
I'm afraid I'm a bit of a dinosaur

Visit https://iforgot.apple.com to reset your password with Apple ID:

  Reset your password

  You can change or reset the password for your Apple ID account by providing some information.


How to make Apple TV play episodes consecutively? I have a 3rd-gen Apple TV. I recently started ripping and adding some of my TV Shows from DVD and I've stumbled into a problem.

Some of TV shows episodes are played consecutively (one-by-one without my intervention) while some are not and after the playback the screen goes back to episode selection menu. This happens on iTunes 11.0.5 on Windows and the versions available since mid-2012. Similarly Apple TV is updated anytime a software update is released for that device as I always use the latest stable software available. I play the movies/TV shows on my Apple TV via HomeSharing.

My guess is that I must have tagged some of them badly and they're not recognized as consecutive or of the same titles maybe.

Can someone suggest what I might have done wrong?

If you create a Playlist or Smart Playlist and choose the episode from that it will continue to the next item auotmatically.


What is the difference between "activate" and "launch"? Here is an example of Applescript code:

do shell script "osascript -e 'tell application \"Safari\" to activate'"

do shell script "osascript -e 'tell application \"Safari\" to launch'"

Is there any difference in the behavior of these two commands?

Because, to my eyes, it appears that they accomplish exactly the same effect.

From the Commands Reference section of the AppleScript Language Guide:

  activate Brings an application to the front, launching it if
  necessary.

  launch Launches an application, if it is not already running, but
  does not send it a run command.

  If an application is already running, sending it a launch command has
  no effect. That allows you to open an application without performing
  its usual startup procedures, such as opening a new window or, in the
  case of a script application, running its script. For example, you can
  use the launch command when you don’t want an application to open and
  close visibly. This is less useful in AppleScript 2.0, which launches
  applications as hidden by default (even with the run command).


Merging multiple AIFF files from the command line Is there a way to put multiple commands in different voices into the same audio file. I know you can do this:

say -v "Cellos" "la di da" -o ex.aiff

But I have multiple commands in different voices such as:

say -v "Cellos" "la di da"
say -v "Bells" "di da da"

Is there a way to  have say put multiple phrases using different settings in to the same aiff or mp3 file? (If not, can I merge the individual files programmatically using terminal tools and commands?

Using sox:

sox 1.aif 2.aif output.aif

Using ffmpeg:

ffmpeg -f concat -i <(printf %s\\n "file '$PWD/"{1,2}.aif\') -c copy output.aif


How can I add a second sender address with different SMTP server in iOS? I forward my university email address to my GMail account, so I don’t have my university IMAP set up as an account on my iPad (and I don’t want to, because then I’d receive those mails twice). Still, I want to send email using that address, via my university’s SMTP server.

Is there any way to add another sender address to an account and assign it a different SMTP server than the account’s default SMTP in the iPad’s email client?
If not, can you recommend another email client for the iPad that has this capability?

Configuring additional outgoing mail servers
from the Apple support websites has detail instructions:

Go to Settings → Mail, Contacts, Calendars.

Tap the Mail account for which you would like to change the settings.
If your account is configured to sync Notes or other items, you may need to tap Account Info on the following screen as well.

On the Account Info screen, locate the Outgoing Mail Server section and tap the existing SMTP entry.

A list of SMTP servers will appear, with the Primary Server and then Other SMTP Servers. Go to Other SMTP servers → Add Server....

Enter the additional SMTP server information. Host Name is required.

Tap Save.


Target Display Mode between a Dell XPS and 2013 iMac I have been searching for a long time for the answer to this question.

I have a Dell XPS laptop with minidisplay port out and a 2013 iMac.

Can I buy a mini-display port cable and connect it to the thunderbolt port on the mac and use Target Display Mode.

or

Can I buy a thunderbolt cable and connect that to minidisplay port on the Dell and use target display mode

I'm pretty sure it can't be done - but I can't find anywhere that categorically says so.

Two reasons in your particular case.

The iMac 2013 needs Thunderbolt to Thunderbolt, not mini Display Port.

Both machines need to be running macOS to enable the function.
Macs running Windows in Boot Camp cannot use Target Display Mode.

Background info from Apple KB - Use your iMac as a display with Target Display Mode

Also -
Using MacBook Pro as keyboard/mouse for Windows computer for alternative methods of displaying one machine on another.


How can I restore the default dimensions of the Force Quit dialog I accidentally maximized the Force Quit dialoge on my Mac and I am looking for a way to restore it to its original size other than manually resizing it. I would like it to be have exact dimensions as before.

Is there such a way to do that, for example, with preference files or defaults?

You can delete a key in ~/Library/Preferences/com.apple.loginwindow.plist:

defaults delete com.apple.loginwindow 'NSWindow Frame ProcessPanel'

The changes seem to be applied immediately.


Method for using F4 key without pressing function button on MacBook Pro I'm using a program that uses the F4 key as an important shortcut which I use heavily.

Every time I want to press F4 on my MacBook Pro also have to press the fn button.

Is there a possibility (such as with an AppleScript?) that something could detect if I'm using that program and allow me to avoid pressing fn and let me use the shortcut just with the F4 key?

Palua

Palua lets you change all function keys for individual apps.

  With Palua, you just need one click - or one hotkey - to toggle the mode your Fx keys are.

FunctionFlip

FunctionFlip can 'flip' certain function keys only instead of changing all keys, but it works for all apps.

  FunctionFlip individually controls your MacBook or MacBook Pro's function keys, turning special keys back to regular F-keys, or vice-versa.

  FunctionFlip's purpose is simply to disable the special features — rewind, play, mute, etc. — on the function keys. For example, if you "flip" F7, F8, and F9, those keys — only those keys — will revert back to normal F keys. Press the fn key with the special key to get the special function back. That is, the "special" and "normal" functions are flipped.


How to sort rows in Numbers without affecting the formula? I have a table with a basic formula:

The 7th column (1038€94) is calculated with the formula 1133€34 - 94€40 + (empty cell). In others words, the 7th column is calulated by (value in the row above) - (value of the 4th cell of the row) + (value of the 5th cell of the row).

All the rows have the same formula in the 7th column.

The first column is a date. If I choose to sort the rows depending on this date, the formula breaks because Numbers keeps a pointer to the cells before sorting the data:

Is there a way to sort the rows without breaking the formula? Or make the formula uses the cell above without specifying the line in the formula?

Thanks

I think there is no easy solution to this within Numbers. You should either copy your table to another sheet as values (formula results) whenever you need to sort it or recreate your formulas using, for example, the vlookup() function (also check the hlookup() and other reference functions in Numbers in case necessary) if you need to sort in-place. In the 2nd solution, instead of getting 1133,34 by a direct reference to its cell, you would get it (and any other numbers not at the same row in the formula yielding 1038,94) through a separate "vlookup" each. In addition, all "vlookup"s should be created sort-proof specifically against column-based sorts.

By column-based sort-proofing, I mean the cell references within "vlookup"s should directly refer only to the cells in the same row or the whole table. Then, assuming the formulas in the column where 1133,34 is calculated are parallel, you can use the same formula for all the cells in the same column by copy & pasting it.

Below is an example formula if you wish to take the 2nd option. It simply adds two values from the "some variable" column. The first value is from the current row and the second from two days earlier. Pls note the exact use of absolute cell references in the formula (the $ signs, necessary so that the same formula can be used in other cells in the same column by copy & paste) and how the date for two days earlier is referenced to in the vlookup in the formula.

Here is a copy of the same formula in text in case you have trouble recreating it and wish to copy & paste from here:

= B5+VLOOKUP($A5−2,$A$2:$C$5,2,0)

And here is how the table and the same formula looks like when the table is sorted based on the date:


Is backup of IMAP necessary when switching to a new Macbook I am switching to a new macbook and am in that case wondering, if it is necessary to backup my e-mail. All my mailboxes are Exchange or IMAP. I mean they are already located on the server, so is it even necessary to back up my mailboxes. Can't I just add the accounts on the new computer and they will sync automatically, leaving me at the same place as I was on my old Macbook?

Thanks in advance.

IMAP and Exchange both keep your email on the server.   Adding the account on a new computer will allow you to access your existing email on a new local machine.

While you didn't mention POP3 in your question, that would be the email protocol that was designed to store your messages locally.  IMAP and Exchange protocols came later.


Change account profile photo on network account We have recently joined three iMacs to our Active Directory domain. I would like to set the account profile photo, however this seems to be disabled for network accounts (I can set it for local accounts).

Is there any way to set the profile photo for network accounts?

Enabling the account as a Mobile account has re-enabled the display photo option.


How can I convert iPhone .m4a recordings to a more common and lossless format? what's the best way to convert .m4a to a more common song format, like mp3 etc.

The m4a files are recorded by the iPhone and my machine runs windows vista home premium 32-bit sp2

I want it to be as lossless as possible. (hopefully possibly 0%)

If the song is already in iTunes, it's easy to do it right within it. Go to the iTunes Preferences and choose "Import Settings" on the "General" page. You can set the desired output format here. Afterwards, select the songs you would like to convert and choose Advanced > Create XY Version, where XY is the file format you specified in the Import Settings. When iTunes has finished converting the files, you will have each track twice - you could use a smart playlist to filter the ones in the new format.

Bear in mind that converting from one lossy format to another lossy format will always result in a lower quality.


1Tb PCIe SSD in 2012 Retina MacBook Pro? Now that the late 2013 Retina MacBook Pro can be configured with Samsung based 1TB PCIe based SSD storage, would those fit into the late 2012 Retina MacBook Pro?

OWC describes about the 1TB configuration, but not about the specs.

No, the 2012 and early-2013 Retina MBP SSD's are not PCIe-based, so you could not install an SSD from a late-2013 Retina MBP.


How to create a read-only RAM disk on macOS from the command line? On macOS Catalina, a RAM disk with 512MB space can be created with the following command:

diskutil eraseVolume HFS+ "RAMDisk" `hdiutil attach -nomount ram://1048576`

On Ubuntu, a RAM disk and its read-only shadow can be created by:

mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
mount -t aufs -o br:/mnt/ramdisk=ro none /mnt/readonly

So how can I create a read-only RAM disk on macOS Catalina with command line like this, or create a read-only shadow of existing RAM disk?

Get the device number of the RAM disk: diskutil list (e.g. disk3)

Add some content to the RAM disk .
Unmount the volume: diskutil umount disk3
Mount the RAM disk read-only: diskutil mount readOnly /dev/disk3.

Apply the disk number according to your environment!

unmount/mount works for an HFS+ disk (in case of a RAM disk)/volume or an APFS volume only
unmountDisk/mountDisk works for HFS+ disks and APFS container schemes.

If you format the RAMDisk as APFS container and one APFS volume

diskutil partitionDisk $(hdiutil attach -nomount ram://1048576) 1 GPTFormat APFS 'RAMDisk' '100%'

you can either mount the APFS container scheme or the APFS volume:

Get the device number of the RAM disk's container scheme: diskutil list (e.g. disk4)
Unmount the volume: diskutil umountDisk disk4
Mount the RAM disk read-only: diskutil mountDisk readOnly /dev/disk4

or the RAM disk's APFS volume:

Unmount the volume: diskutil umount disk4s1
Mount the RAM disk read-only: diskutil mount readOnly /dev/disk4s1

As one-liner for an HFS+ volume with the unique name RAMDisk:

RD=$(diskutil list | awk '/RAMDisk/ { print $5 }'); diskutil umount $RD; diskutil mount readOnly $RD; exit

As one-liner for an APFS volume with the unique name RAMDisk:

RD=$(diskutil list | awk '/RAMDisk/ { print $7 }'); diskutil umount $RD; diskutil mount readOnly $RD; exit

Thanx to user3439894 for all his hints & comments...


How to login as a different bash user in terminal? I have to check if my web page running locally on nginx does not work due to permission issue. My web scripts are running as _www user, so I tried to switch to _www but this does not work:

maciek@macus:~$ sudo su - _www
Password:
maciek@macus:~$ whoami
maciek

How can I do this in 10.8.5?

Use login:

$ login
login: username
Password:
Last login: Day Month Date HH:MM:SS on ttys000
$ whoami
username


Is there a way to move a window without the mouse? Since installing Mavericks whenever I open a new window in XQuartz (say gvim) it positions the newly created window at the top left of my monitor.  Because every monitor now has a menu bar, the menu bar covers the title bar of the new window.

This means I can't use my mouse to grab the title bar and drag the window to a new position.

Are there any ways to drag a window using the keyboard, or failing that a way to click on any part of a window to start a drag operation?

I upgraded Xquartz and the problem went away.  Windows open below the osx title bar now instead of underneath it.


Can we still set a "highlighting mode" in Preview on the Mac (for PDF documents)? I remember in the past, we can double click the "highlighting icon" and make it a highlighting mode, so whatever we select in the PDF document, it'd be highlighted permanently. Select something again, and it is again highlighted permanently.  (highlighted as if it is marked by a highlighter).

But now in Mojave, it doesn't seem to have this mode? We have to select something and move the mouse to click that highlighting icon, and select some text, and move the mouse to click that highlighting icon again?

This behaviour still works for me in Mojave: Preview's Toolbar has a highlight icon. When active (the lighter colour seen in the image below), then you can highlight text in the way you describe.

The behaviour you're seeing may be what happens when the highlight icon is not active (the same shade as the other icons).


How do I change focal distance in iPhone SE When I try to take a photo through  window screen, the plane of focus is the window screen rather than the things outside.

Is there any way to forcibly change the focal distance when every part of the field of view is covered by the window screen?

I want a close-up shot, of the thing outside, so stepping back from the window screen is not ideal.

I am using an iPhone SE. On an "old" style camera, I would adjust the lense to change the focal distance.

Maybe I'm misunderstanding your question, but you can force the iPhone camera to focus on a particular item/person by tapping where it's located on the screen.

In your case you may also want to lock the focus and exposure. You can do this by tapping and holding on the screen for about two seconds. When you do this you'll see a number of contracting rectangles around your finger and you're then free to move the camera a little while keeping it locked on a particular scene without losing focus. You'll know it's worked as AE/AF LOCK will appear on screen.  To undo this, just tap anywhere on the screen.

You can also zoom in to what you're wanting to capture by pinching two fingers on the screen. This will reveal a line with a positive sign (+) at one end and a negative sign (-) at the other. You can then drag along this line to zoom in/out as required.

[UPDATE]

I'm no photography expert, but since you've clarified you're talking about focal distance, then the iPhone SE by default isn't going to really achieve what you're looking for on its own. After all, it's not a dedicated camera per se.

Instead you might want to consider purchasing one of the many add-on telephoto lenses for iPhone. Apple does offer the olloclip 4-IN-1 Lens which is compatible with iPhone SE models, so it may be worth checking out whether that would meet your needs.

If not, you may find others that meet your needs, such as from the highly regarded likes of Moment and Ztylus.

Another possible option would be to research 3rd party camera apps. Some of these are very highly rated and can achieve awesome enhancements over the default iOS camera app, although I can't personally recommend one in terms of focal distance.


Xcode Update SDK to 10.9 I ran the update for Mavericks as well as the Xcode 5.1 update (build 5B130a) and I can't find a way to update my OS X SDK from 10.8 to 10.9 (The only updates that show up are iOS SDK 6.1 and the docsets).

I was looking forward to using Sprite Kit on my Macbook Pro (10.9.2), but the SDK just does not show up. SpriteKit is definitely on my system, though, because /System/Library/Frameworks/SpriteKit.framework/ exists. When I add the SpriteKit framework directly from /Applications/Xcode.app/Contents/SharedFrameworks/SpriteKit.framework it can't find it either.

I accidentally forgot to rename Xcode 4.0 and left it as Xcode.app in /Applications/Xcode Older Versions/ which is what I used to store Xcode 4 in case the old Xcode 5 developer previews had any issues. So that bundle was replaced, not 5.0.

The weird thing is that even when I was sure I had it 5.1 open SpriteKit Game didn't show up as an option. Rebooting fixed that.

Oops.


How to add image/mount/disk back to the sidebar? I accidentally dragged and removed an image/disk from the sidebar under the device. I can now only access this image under volumes folder, but I like to add it back to the sidebar. Is there a way to do it? (I can see it also in my diskutil. Thanks.

Press command shift G at the same time and go to /Volumes, then drag the folder and drop it to the sidebar. This will work when you cannot find the image on either your desktop and don't have a top level path saved in the finder's sidebar.


Simulate taking USB cable in and out I have a MacBook at home, where I have a webcam connected to.

The problem is I'm not at home and the surveillance software I'm using can't see it.

Is it possible to simulate taking the USB cable out and putting it back in again?

Try

sudo kextunload -b "com.apple.driver.usb.AppleUSBEHCIPCI"; sleep 5; sudo kextload -b "com.apple.driver.usb.AppleUSBEHCIPCI"

Works on my system, just tested it. I had to run the command 3 times though because for 2 times my usb camera didn't reconnect correctly, no idea why that happened.

Or similar to this with the full path

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
sudo kextload /System/Library/Extensions/IOUSBMassStorageClass.kext

Oh well, this work


Removing Reminders and Notes from the dock? After upgrading to Mountain Lion today, I'm noticing the Reminders and Notes apps now having been added to the dock.

Great way to discover those apps if you're not aware of them, but I'm not going to use them.

As such, I tried removing them, which seems to work (both dragging them off and right-click and remove from dock), but after logging out and back in, they're back.

What's the quick-tip to get rid of those from the dock permanently?

The only unremovable Dock icon is the Finder, removing anything else should result in it staying removed.  There is nothing special about Reminders and Notes, and it's always annoyed me that they put in icons for things like launchpad etc when they have system wide keystrokes or gestures for the same task.

One point to bear in mind tho, is that to prevent people accidentally removing items from the dock (accidental drags are apparently more common on Magic Mouse/Trackpad users) the distance you have to drag the icon away from the dock is significantly increased.  Try it, drag an icon away, and see how far it has to travel before you get the "puff of smoke" icon that indicates it will remove it.  Letting go before seeing this cursor change will just boomerang your icon back into the dock.


change default editor for command line tasks? I want to create a cron job. Launching a terminal window, and entering crontab -e opens my current crontab, but opens it in the editor vi. I would prefer to use the nano editor.

How do I configure my system (Mojave) to launch nano instead of vi?

The editor that is launched when you enter crontab -e at the command line is set in an environment variable. Specifically, the default editor that is launched in your terminal window is controlled by the environment variable labeled VISUAL, or $VISUAL. You can see all of the environment variables for the shell you're using by typing env at the command prompt; e.g.:

My-MacBook-15:~ seamus$ env
TERM_PROGRAM=Apple_Terminal
SHELL=/bin/bash
TERM=xterm-256color
TMPDIR=/var/folders/8_/s3jxzj5150s9f3d3y5k4wzdr0000gp/T/
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.f9meUexEfE/Render
TERM_PROGRAM_VERSION=421.1
TERM_SESSION_ID=CECBC621-33BB-45FD-96E3-B414DBE99F65
USER=seamus
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.LVyDWNJZbD/Listeners
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin
PWD=/Users/seamus
LANG=en_US.UTF-8
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/seamus
LOGNAME=seamus
DISPLAY=/private/tmp/com.apple.launchd.tzdryqvBdL/org.macosforge.xquartz:0
SECURITYSESSIONID=186a7
_=/usr/bin/env

You may note, as in the above example, that the VISUAL environment variable is not included in this list. This only means that for your current username, the VISUAL environment variable has not been changed from the system's default. You can confirm this (or check the value of the the VISUAL environment variable) in a compact manner as follows:

My-MacBook-15:~ seamus$ echo $VISUAL

My-MacBook-15:~ seamus$

The blank line indicates that no value for $VISUAL has been set for this user, and the system default will be used.

CHANGING THE DEFAULT EDITOR FOR THE CURRENT SESSION:

To set the VISUAL environment variable so that nano is launched as the default editor for all editing tasks initiated from a terminal window for this user, simply set the environment variable as follows:

My-MacBook-15:~ seamus$ VISUAL=nano
My-MacBook-15:~ seamus$ export VISUAL

Or, if you prefer:

My-MacBook-15:~ seamus$ export VISUAL=nano

You can verify this setting as follows:

My-MacBook-15:~ seamus$ echo $VISUAL
nano
My-MacBook-15:~ seamus$

And that will do it! From this point forward (until your shell or your system is re-started), any time an editing task is launched from a command in a terminal window for this user, nano will be used instead of the system default. And of course the system's default editor will be restored when the system (or the shell) is re-started. If you don't wish to perform a re-start to restore the default editor, simply specify vi as the editor:

My-MacBook-15:~ seamus$ export VISUAL=vi

CHANGING THE DEFAULT EDITOR TO PERSIST ACROSS ALL SESSIONS:

To change the default editor permanently (that is, to persist across re-starts) is also easily accomplished. Simply create a hidden file in the user's home directory (~/), and set the VISUAL environment variable in it, all accomplished conveniently in a single line:

My-MacBook-15:~ seamus$ echo export VISUAL=nano >> ~/.bash_profile


How do I change the login screen background in macOS Mojave 10.14.2? It used to be the case in macOS Mojave that if one changed the Mojave.heic file in /Library/Desktop Pictures/ then it would boot into that new picture. This is documented in this thread.

10.14.2 broke this solution, forces the desert background, and does not react to changing said HEIC file.

Does anybody know how to change it in Mojave 10.14.2?

You can also refer this post from SilverWolf: How do I change the login screen background in macOS Mojave?

Take a look at the /Library/Caches directory.

You will find the file "com.apple.desktop.admin.png." I have edited my picture so the thumbnail is different. You can do the following:

Back up this file as com.apple.desktop.admin.png.bak.
Copy/Paste or Drag/Drop your own png as the same original name com.apple.desktop.admin.png
Also ensure that the permissions are identical to the original file.
(I believe) a restart is needed. Try it logging out first and checking.

The "Mohave.heic" file is located in the /Library/Desktop Pictures directory. Changing that file will edit the default background for each user but not edit the login background image.


Macbook Pro become buggy after update I'm running on Mac OS X (ver 10.7.2) on my Macbook Pro 15. I did an update earlier this morning and after that everything I run fails or runs really slow. Some of my application also don't work properly anymore. My guess is when I did the software update and it rebooted, It failed to complete the installation and just rebooted. So I think the update wasn't installed properly.

Here are some problems that it caused.

Whenever I plug a thumb drive or external HDD it's not being mounted. But I can see the drive in Disk Utility. The USB port i think is working because I use it for my wireless mouse. - my guess is the drive for external drives got corrupted.
When I try calling someone on Skype it logs me out.
There are some lags with the animation. e.g. when i run the Launchpad it has a laggy and harsh animation. It's feels like the animation only has 3 frames so it isn't that smooth.
It's really slow!

I just bought this laptop last week and It didn't come with a Mac OS X CD. Is this normal not having a CD?

Some solution I'm planning to do:

Reformat/Reset my Mac OS X
-problem, I don't have the CD
Repair the driver
-problem, I don't know if it's really the driver fault or which driver I should install

Please advice what should I do. The nearest apple store is also far from where I live - so this is my last option to send it back to the store.

Try a SMC Reset: http://support.apple.com/kb/ht3964

You can also re-download the update and try again (=combo update): http://support.apple.com/kb/DL1459


How to fix Windows Boot Camp after Linux install/ I am using a 2010 iMac that needs to use the hybrid GPT/MBR to install Windows via Boot Camp.

I had a working dual boot install using Boot Camp with Mac OS High Sierra and Windows 10. To install Ubuntu, I made 3 new partitions using Disk Utility in Mac OS and installed Ubuntu 16.04 onto them using the "Something Else" option. Mac OS and Ubuntu now boot fine either from Refind or from the option menu on boot up.  Windows now won't boot and gives a message " Missing Operating System" when I try to boot from it.

This is the new diskutil list output (the new partitions I created were 4,5,and 6):

    /dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE           IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB         disk0
   1:                        EFI EFI                     209.7 MB       disk0s1
   2:                  Apple_HFS Mac OS                  1.3 TB         disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB       disk0s3
   4:                        EFI                         6.5 GB         disk0s4
   5:           Linux Filesystem                         198.7 GB       disk0s5
   6:                 Linux Swap                         15.2 GB        disk0s6
   7:       Microsoft Basic Data BOOTCAMP                514.0 GB       disk0s7

I didn't touch the Bootcamp partition and it still seems to contain data but I seem to have freaked out the MBR. Anyone got any ideas for how I can fix this and rescue the Windows install?

You basically need to implement the same solution as the answer to Bootcamp High Sierra upgrade now not working. Substitute the commands given below.

r
h
2 3 7
y
af
n
ab
n
07
y
n
w
y

This solution is probably not the best one. Basically, you should have not moved BOOTCAMP to disk0s7. You should have either used a third part tool to move BOOTCAMP or manually reinstalled Windows.


Update to a specific version of Safari for iPadOS I am using the iPad's Safari (browser) for development testing.
I need a specific version of safari that is 13.1.
The current version is lower than that. If I update safari from the app store it will update to the latest release version (~14).
How can I install a specific version of Safari on the iPad?

The version of Safari browser is tied to the version of iPadOS running on your iPad. It's not possible to pick and install a specific version of Safari which is lower than the current latest version of iPadOS.
If you wish to use a specific version for development and testing, you can install Xcode on your Mac, which would give you access to iOS/iPadOS simulators running on macOS.
Thereafter you can pick and download a specific older version of iPadOS (such as iPadOS 13.1).
The only con is that instead of Safari running on a real iPad device, you'd be testing on a software simulator of Safari for iPad running atop a desktop/laptop computer.


Any danger to letting a MacBook stay on the charger long-term? I came into possession of a 2009 13" MacBook Pro. Most of the time, it will be used as a desktop computer - but there will be instances when I will need the 5 hour battery.

Is there any danger to letting the machine stay on AC for weeks at a time? Will it kill the battery, or does the Macbook have a charge/discharge routine?

Ideally you should let your computer discharge completely every month to avoid losing battery capacity.

Apple has a calendar to remind discharging the computer every month at webcal://www.apple.com/batteries/images/notebook_icalreminder.ics


raise window underneath the current active one I am wondering is there a shortcut to raise another app's window underneath the current app's active one, so i can quickly toggle the top two windows, as this is a common workflow in my daily work.

I have tried a few window management apps, but couldn't find any that allows me to do this task.

I want to bring the window upfront immediately, not something like Command + Tab that goes through a list of all open windows.

If the window you want to raise belongs to the active app of the frontmost window, then you can use ⌘` to bring the next window forward.

You can then use ⇧⌘` to bring back the previous window. (This combo also walks backwards through the apps windows.)

If the window you want to raise does not belong to the active app, but a different app altogether you can use ⌘tab and then ⌘tab again to get back to the previous app, assuming it hasn't been closed.

⇧⌘tab can be used to walk backwards in the app switcher.

⌘ is the command key.
` is the Grave Accent, and on a US keyboard is just above the tab key.
⇧ is the shift key,


Change date in menu bar from "DAY MONTH" to "MONTH DAY"? The date in my menu bar is in "DAY MONTH" format (e.g. 23 Oct) but I want it in "MONTH DAY" format (e.g. Oct 23). How can I do this? Also, it shows "Tue" as the week day when I'd prefer seeing it in full (e.g. "Tuesday").

In System Preferences -> Language & Text, "Region" is set to "Custom" because I changed a few things on the page. Under "Dates", I see: "Thursday, January 5, 2012", "January 5, 2012", "2012-01-05", and "2012/01/05".

Is this date format based on my location and is therefore fixed? (I'm not in the US at the moment.)

I'm using Mountain Lion now, but I recall a few versions ago that it was much easier to modify the date/time appearance in the menu bar by copying and pasting a few elements in the Date/Time preference pane.

Have a look at this page on macyourself.com - it does exactly what you're looking for, it seems.


Macbook Pro think 60W adapter is a 12W one, and won't charge anymore When charging my Macbook Pro (13 inch, mid 2017, MacOS Catalina 10.15.7) with the 61W USB-C Power Adapter from Apple, sometimes the "battery is not charging" warning start appearing from nowhere draining the battery (from every one of the 4 ports available).
By looking up the charging information (using Istat Menus) it appear that the Macbook think that the 60W charger is in fact a 12W one (and it appear that the intensity is negative i.e not charging):

By unplugging/plugging back the USB-C cable (sometimes several times) all comes back to normal

Why is this happening ? (Sometimes while the battery is full and still plugged, sometimes while charging)
STORY OF THE MACBOOK SO FAR:

The "battery is not charging" issue start happening early this year, but the Macbook had another issue with the logic board as well. After the logic board and battery being replaced, the issue is still here.

SMC reset didn't fix anything.

A full discharge, then a full charge didn't fix anything.

When using the power adapter from Apple and the USB-C cable on another device (unfortunately a phone and not another Macbook), it's charging normally.

When using another power adapter on the macbook, it's charging slowly (but coming from a 12W power adapter and a USB-A to USB-C cable that seems fair enough).

When charging my MacBook Pro (mid 2017, macOS Catalina 10.15.7) with the 61W USB-C Power Adapter from Apple, sometimes the "battery is not charging" warning start appearing from nowhere draining the battery.

There are a couple of possibilities that can be attributed to this:
Battery Health Management
This could be expected behavior. With the release of Catalina (10.15.5), there is a feature called Battery Health Management that will actually stop the charging of the battery at a certain battery charge range.  This "battery not charging" message is perfectly normal when this function/feature is enabled.
Faulty USB Mux Chip
There have been reports that the USB Mux chip (TI CB3215) is faulty.  This chip is what negotiates the charging power to be delivered from the USB-C (USB-PD compliant) power adapter.  It starts off with a 5V nominal voltage, but then can go as high as 20V at about 3A (≅ 61W).  The full spec calls for up to 20V @ 5A or 100W, but (obviously) can be lower due to a lower overall wattage rating.
This is expected given that the correct charger for the 2017 MacBook Pro is the 87W charger.  See the Apple Support document Find the right power adapter and cable for your Mac notebook.  If you use a power adapter with less than the required wattage, your MacBook will not be able to supply enough power for all of it's functions - charging and powering the computer.  In this case, it was using all available power to run the laptop and there wasn't any left to charge the battery.
Your charger is likely good

When using the power adapter from Apple and the USB-C cable on another device (unfortunately a phone and not another MacBook), it's charging normally.

"Normally" is relative here. If it's from a MacBook and USB-C PD compliant (which Apple chargers are) it would be sufficient enough to charge the phone at what appears to be a "normal rate."  Being that it's USB-C, it would conform to the USB Power Delivery Specification (USB-PD) where the current is negotiated to the highest possible.  As mentioned earlier, it would start off at 5V then negotiate from there.  As most phones use a 5V and a 2-2.5A charger anyway, even without negotiating power, the adapter is delivering the maximum (what the phone will draw) to charge the phone.  This means your charger is likely working as it should.  However, a proper test would be to try that charger on a different MacBook.  If you see that it negotiates anywhere near it's full 61W, then you've confirmed it's viability.

When using another power adapter on the MacBook, it's charging slowly (but coming from a 12W power adapter and a USB-A to USB-C cable that seems fair enough).

This is also expected.  Most USB-A chargers only supply up to 12 watts of power. There is no power negotiation with these chargers.  When connected to your MacBook, it will receive the 5V from the adapter, the Mac will attempt to ask for more but since it will not get a response, it will just continue to draw the 12W available.
TL;DR
Some of this, as described is normal behavior if Battery Health Management is enabled.  If you suspect your adapter, you can use aftermarket USB-C chargers with confidence but I always recommend getting quality adapters and cables from well known vendors like Anker, Belkin, StarTech, etc.  However, there is the possibility that the USB mux chip that regulates the charging is failing or has failed.  Apple will require a replacement of the logic board, but there are board repair facilities that can replace that single component.

60w charger only delivering 5.5w to battery?
Is the Macbook 12 inch's USB-C charger interchangeable with other USB-C chargers or devices?
Danger of damaging 13" macbook pro by charging it with 85w charger?


Macbook Air Fan running frequently and loudly Not sure if there is something running that is causing it. Here is my activity monitor.

Just wondering if there is something going on here that shouldn't. Otherwise I'll just go ahead and reset the SMC

The easiest explanation is that the MacBook Air is by no means a performance Mac. Their processors range from 1.1 GHz to around 1.8GHz. Some have 8 GB of RAM, while others have just 4 GB, and some (like one of my family member's MacBook Air) have only 2 GB. Graphics processing units and other parts follow suit. In short, the MacBook Air sacrifices performance for portability, which isn't necessarily a bad thing, but it does mean that if you try to do a lot on it or preform hardware-intensive tasks on it, it will get pretty warm and the fans will go pretty high.


"Segmentation fault: 11" when trying to vacuum Apple Mail index Reading up on how to improve my suddenly-very-slow Mail app, I found the tip to rebuild the sqlite index:

  sqlite3 ~/Library/Mail/V4/MailData/Envelope\ Index vacuum;

But I get an immediate "Segmentation Fault: 11" and nothing happens. Can't figure out what that means or how to solve it. It's about the first time Google hasn't provided an answer for me. Anyone? (I'm on 10.12.x which is why it's V4.)

‘Segmentation fault: 11’ almost always means the process ran out of RAM whilst trying to perform some operation/calculation. This would corroborate with your slow Mail due to the size of the database you're trying to process (or it's just corrupted in such a way).

It may also be worth checking your free disk space, since the VACUUM command specifically requires plenty of space:

  The VACUUM command works by copying the contents of the database into a temporary database file and then overwriting the original with the contents of the temporary file. […] as much as twice the size of the original database file is required in free disk space.

https://sqlite.org/lang_vacuum.html


Lion: Map Option + arrow to home/end I am using the CLI version of Vim on Mac mini, with OS X Lion.

I use Vim as my main code editor, and one thing that bother me is lack of Home and End keys for moving to the Start and End of lines, respectively.
(On my laptop, the arrow keys left and right are home and end, with the Fn modifier)

I know Control + Arrows move screens, and Command + Arrows move through windows, so any way I can I can get Option or Fn + Arrows to do this?

I would really like something like this across all applications.

EDIT:

I answered this myself by basically following: theandystratton.com/2009/… I used the values supplied in the second comment too, which worked in both Vim and in general terminal too.

I wonder is there any drawbacks to using this...?

To remap home and end in Terminal, run f=~/Library/Preferences/com.apple.terminal.plist; plutil -convert xml1 $f; open $f -e, and change this:

<key>F729</key>
<string>scrollToBeginningOfDocument:</string>
<key>F72B</key>
<string>scrollToEndOfDocument:</string>

To this:

<key>F729</key>
<string>&#x1b;OH</string>
<key>F72B</key>
<string>&#x1b;OF</string>

To change them in normal text views, create ~/Library/KeyBindings/ and save a property list like this as DefaultKeyBinding.dict:

{
    "\UF729" = moveToBeginningOfParagraph:;
    "\UF72B" = moveToEndOfParagraph:;
    "$\UF729" = moveToBeginningOfParagraphAndModifySelection:;
    "$\UF72B" = moveToEndOfParagraphAndModifySelection:;
}

Another option would be to use KeyRemap4MacBook. See the "Use PC Style Home/End (except in Virtual Machine,RDC)" setting in https://raw.github.com/tekezo/KeyRemap4MacBook/master/Tests/lib/string/data/checkbox.xml.


Leopard or Lion with Photoshop 11.0? I just downloaded OS7 to my iphone. To back it up on itunes it needs itunes 11.1. It wont download to my computer because I'm still running 10.5.8. If I upgrade to Snow Leopard or Lion I need to know that my old Photoshop 11.0/CS4 will still work.

Photoshop CS4 works with 10.4.11 and above. So yes it'll work with Snow Leopard or Lion.

There might be some minor issues on Lion. I don't know if the have been corrected since.


Does Apple provide a web site with content of `man` pages for the command-line commands bundled with Mac OS X? I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward.

Does Apple provide man pages on the web?

The old online index seems have to vanished. You can however find the source code of manual pages on https://opensource.apple.com/. This site hosts historical versions as well.

For example:

fputs(3) - https://opensource.apple.com/source/Libc/Libc-1272.200.26/stdio/FreeBSD/fputs.3.auto.html
ls(1) - https://opensource.apple.com/source/file_cmds/file_cmds-272.220.1/ls/ls.1.auto.html
grep(1) - https://opensource.apple.com/source/grep/grep-28/grep/doc/grep.1.auto.html

Unfortunately there is no overview of all manual pages, so you have to manually check directory indexes or use something like site:opensource.apple.com/source "ls.1" in DuckDuckGo or Google.


When I try to delete my iCloud account on my iPhone it tells me to sign out using my old email and password. I don't remember the old password How do I get my iCloud account to let me change my email account without having to give my old password for my other email account? I don't remember that password.

You can easily reset your password if you have access to the email account that you've used while creating your Apple ID. Go to this page: https://iforgot.apple.com/password/verify/appleid and the email your primary or rescue email address and hit the 'Forget Apple ID' button.

You can also reset your Apple ID password by answering the security questions. You might find this Apple Knowledgebase article useful: https://support.apple.com/en-in/HT201487


What is the exclamation mark in the bottom right corner for in Photos for iOS? When looking at a photo in Apple's Photos.app I noticed a white  exclamation mark in the bottom right corner of a photo. What does that indicate?

After tapping around a bit I tapped on Edit and a message popped up that said there was any issue downloading the photo over cellular. I guess it was just a thumbnail. I recently turned on iCloud Photo Library and turned off cellular data for photos. Turning cellular data back on removed the exclamation mark.


Need help to understand how this find command works I'm a beginner on OS X and I believe this command will make a list of all files and subfolders of specific folders

find /Volumes/Documents/ -exec stat -f "%N %Sm" {} + >~/Desktop/test.txt

I don't know how to figure out what this actually does.

The command you posted has two parts

find /Volumes/Documents/ -exec stat -f "%N %Sm" {} +
>~/Desktop/test.txt

The second part is easier to explain, it just writes all the output of the first one into a file called test.txt which is stored on your desktop. If you leave that part out, the result of find will be directly written into your Terminal window.

The first part is the actual find command. A call to find basically gets two kinds of parameters

one or several paths acting as starting point for the search (/Volumes/Documents/ in your case)
one or several expressions aka "find commands" which get applied to every file/folder found

A simple version would look like find /Volumes/Documents/ -print which just prints every file/folder found.

In your example the expression part is a bit more elaborated:

-exec runs a command on the results of find (stat -f "%N %Sm" actually)
stat gives info about a file.
The -f option for stat displays information using a specified format.
%N %Sm is the format used by -f.

% means a format string.
N means to print the file name.
Sm means to print the date modified for the file.

{} + is replaced by as many found files/as possible in each call to stat

For more information on understanding commands, see the man page for find and stat.


Custom Screenshot Folder locations I have already changed the location of my screenshots folder so it doesn't cause clutter on the desktop. What I am wondering is if there is a way I could break it down in to two locations so that when I do a full-screen screenshot it goes to one location and if I screenshot only a fragment of the screen it saves in another location.

The easy solution would be to use some 3rd party app to manage and organize your screenshots. Something like Ember or Skitch.


How to remove a folder link from side bar in OS X Lion I've updated my OS to Lion today. But now, I can't remove the folder "maven-2.2.0" from Finder Sidebar. This folder was deleted from my computer, and I can't right click on it.

How to do it?

Hold down ⌘ Command while dragging the item out.

I found this Lion change interesting; I don't necessarily like it, but I think it mirrors the way that you have to hold down ⌘ when rearranging toolbar items.


Computer starts up to gray screen, in recoevery mode getting "Open Error 5: Input/Output error on System/CoreServcices/ManagedClient.app/* Computer starts up to gray screen, in recoevery mode getting "Open Error 5: Input/Output error on System/CoreServcices/ManagedClient.app/*

My computer turned to sludge, and I hit the power button and shut it down.

On startup, we got to login screen, put in my password, wait for minutes..no go

Manual shutdown.

On startup we get the white screen of death.

Put disk into recovery mode, got the recovery OS going, and opened disk utility.

My Macnitosh HD was still there, but I ran "Verify permissions" and got the above error for a long time. Eventually, I stopped the process and hit "Verify Disk".

This happened quickly, and it tells me that my Disk can't be repaired. (Not sure how to get a backup from the files I have, so help with that would be good)

When I go to the menu and hit "Statup Disk" my copy of Mountain Lion is not present.

Not exactly sure what to do in terms of backup, installing a new OS, repairs.

Whaty should I do?

You need to specify what year/model your Mac is, and what operating system came with the system.

Let's assume that "Lion" came pre-installed and you have the option of a "Recovery Partition". You need to first format your hard-drive, removing everything (making sure that you have a back-up!!) and then:

1) Switch off your mac

2) Book your Mac and press and hold the ⌘ (Command) key and R key immediately; after the first chime sounds. You must keep holding down both the Command and R keys until you see a window with “OS X Utilities” across the top in large text. This should enable you to do a fresh re-install.

The second way to access the recovery partition is to re-boot your mac and hold onto the (options) key.

If you do not have a recovery partition on your hard-drive you need to seek someone who has a Mac with lion+ on and download the OS X Recovery Disk Assistant v1.0 and placing a new image onto a memory stick, and following the steps above with the memory stick.

If your Disk cannot be repaired, then, there maybe an issue with the disk itself. Or, you could try and "Erase" the disk and doing a fresh re-install. Again, you need to TRY the best you can to ensure you back up all the data before trying any of these steps. But, it seems to me (personally) that this may not be an option for you.

I hope this helps :)


Broken Command Line Tools on Sierra, can't install Node.js native packages, build Python etc I'm on macOS Sierra 10.12.1 (16B2555) with Xcode 8.1 & Command Line Tools installed but I can't install any Node.js native add-ons, I can't compile Python etc.

I've tried removing Xcode and Command Line Tools (the latter via removing /Library/Developer/CommandLineTools) and then reinstalled Xcode from App Store and Command Line Tools via xcode-select --install but the problem is still there. For example, this is what happens if I try to install the contextify npm package on Node.js 7.2.0 or 6.9.1:

$ npm install contextify

> contextify@0.1.15 install /Users/mgol/_/node_modules/contextify
> node-gyp rebuild

gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CXX(target) Release/obj.target/contextify/src/contextify.o
make: ccache: No such file or directory
make: *** [Release/obj.target/contextify/src/contextify.o] Error 1
gyp ERR! build error

It works fine on a colleague's machine with the same OS.

I sometimes see App Store notifying me of a Command Line Tools upgrade for Xcode 7.3 which seems off, maybe my setup has some leftover from the old Xcode?

Any ideas? I feel lost in what else I can try.

From your log, it looks like the build process expects ccache to be installed.  Depending on your preference, use either Homebrew or MacPorts to install ccache, and then try the build again.


MacBook Battery charging I recently bought a replacement battery for my MacBook battery. In Coconut Battery the Current charge has been as high as 8000 mah, yet the maximum capacity is listed as 6100. When the battery icon shows 100% has been reached the MagSafe light stays orange and doesn't turn green till the Current Charge exceeds the Maximum Charge.

Also, sometimes the laptop running on battery power will just shut off at 50%. When I plug in the charger it turns back on without a reboot but suddenly the battery icon shows 10 or 11 %..
Any ideas on these issues? Could my charger be defective and charging the battery too much?

The fact that your computer shuts down at 50% remaining charge and also that your MagSafe LED remains orange makes me think that either the replacement battery isn't an official Apple part, that it is defective/DOA, or that your logic boards SMC is corrupted and needs to be reset.

If the battery is indeed new and Apple original than proceed with an SMC reset:

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

This will tell the SMC chip to reset all power states and reboot so that it forgets the battery and MagSafe adapter momentarily and then rediscovers them.

Hope that helps


Failed High Sierra update, can't mount drives, how to recover files? The issue is with Apple MacBook Air "Core i5" 1.6 13" (Early 2015).

It had not been backed up in a while but an update to High Sierra was attempted. The update failed and now a regular boot or safe mode boot leads to the "question mark folder". Booting in recovery mode or web-recovery, then attempting to update the OS leads to "Downloading installer information to the target volume failed."

At this point the main concern is to recover the files. In terminal I can see that the files are there, but I can't mount an external drive to copy them. There is power at the USB ports but nothing shows up in Disk Utility ( or "diskutil list").

I made a bootable USB with El Capitan on it, and when I boot from that, the USB ports work. But now the SSD won't mount, so I can't recover anything.
Running "diskutil list" shows the SSD as disk0/disk0s1/disk0s2, but only disk0/disk0s1 can be mounted (of course disk0s2 is the partition I need to access). disk0s2 is APSF, and I don't think its encrypted.

How else can I get one of these disks mounted?

The problem, whatever it was exactly, was solved by having the update completed at an Apple store, connected directly to an update server. Hopefully somebody finds this useful.


Charging MacBook Air with a fast charger from usb-c I have a MacBook Air 2020 and forgot my charger at work. Evidently I need to charge it in a few hours. I have One Plus phone with a fast charger which is USB-C compatible (5V, 4A). Could I use it to charge the MacBook Air?  Does this damage the mba ?

It shouldn't damage anything, but it might not be powerful enough to keep up.
The Macbook Air charger is 30w, which is about 6A.
Amps are "pulled" by the computer rather than "pushed" by the power supply [which is the opposite to voltage; this is why voltage has to match but amperage doesn't] however, your charger will be incapable of supplying all the Mac is asking.
This will just make charging slower. If you're lucky, it might just keep up, otherwise the battery might still lose charge slowly while the Mac is in use, even with the charger connected.


Copy voice messages from iPhone How can I copy voice messages from Phone (not text or log information) from an iPhone 4 to a computer so you can listen back to them?

I am a songwriter and the only was I was able to save some songs on a moment's notice was to call myself up and leave them as messages which I have renewed, some for over a year. This was before I found out about Voice Memos, which I would also like to transfer. I can record with a mic from the phone but the volume is very low.

Try this app - http://www.ecamm.com/mac/phoneview/

It copies all the info you mentioned to a Mac. Free trial to be sure you like it before paying.

If this is one time (or your value of the time it takes to manually record these is less than $30), just hook a stereo plug from the phone to the computer and record the mic input on the Mac. (Or PC if you use that computer)


Can I have both iCloud-synced and local-only Safari bookmarks? Can I have some Safari bookmarks synced via iCloud to other computers and at the same time have some that are just local to my computer? If so, what is the best way to do that?

Currently, iCloud Safari Bookmark Sync is an "all or nothing" venture. There is no way to select or de-select bookmarks or groups of bookmarks to be synced or ignored by iCloud.


Office 2016 package will not install I'm trying to install Office 2016 and it appears as though Installer will not run/install the .pkg file. When you double click on the package itself it instantly exits, leaving behind these errors:

CoreServicesUIAgent[323]: Error -60005 creating authorization

and

com.apple.xpc.launchd[1]: (com.apple.xpc.launchd.oneshot.0x10000011.Installer[859]) Service exited due to signal: Broken pipe: 13

I've tried repairing disk permissions and rebooting (multiple times) as well as re-downloading the package from MSFT, no luck. Any ideas?

The (odd) answer to this question turned out to be a corrupted installer that came from our implementation of O365. When provided with a different installer it worked fine.


My iPhone 5 isn't downloading apps There are a few apps that I found online that I'm trying to download, but my phone isn't letting me. When I click the link and it brings me to the app store, I click the "get" button, and then the "install" button, but instead of recognizing that, it just reloads and I have to click it again. I've tried it many times with many different apps, but it just keeps reloading until I give up. It didn't even give me an error message. I know I have plenty of storage, so that isn't the problem. Thank you for any insight.

There is a service disruption affecting the all iTunes stores. See Here

Wednesday, 14 October, 2015
All Store Services - Some users are affected
Users may be unable to access multiple services and stores or make purchases.

Next time this happens, check http://www.apple.com/support/systemstatus/


How to restart or shutdown a Mac when it says app running but cannot force quit the app? I have a Macbook Air running Yosemite 10.10.4, and I am trying to either to restart or shutdown this Mac.

But it will say the app VLC Player is running, but if I right click the VLC icon at the dock and choose Force Quit, nothing happens. (the neon light under the icon is not lighted up by the way, so doesn't look like the app is running).

If I press Command Option ESC, and choose Force Quit for VLC, nothing happens, and restarting the Macbook still says I need to Force Quit the app VLC.

In Activity Monitor I don't see a VLC app running either.

If I open up the Terminal app and use ps aux | grep -i vlc then nothing show up except for this grep command line.

So how do I restart or shutdown this Macbook when I need to Force Quit an app but Force Quit doesn't work?  I don't want to do those extreme things such as pressing the power button for 5 seconds or Command CTRL SHIFT PowerButton (or something like that) which is like to yank the power cord if it is a desktop.

Good to hear that the shutdown worked.  Remember to precede it immediately with a 'sync', executed as the root user or via the sudo analogue, to flush the hard drive caches to disk from volatile memory.

If you desire to investigate deeper, in hopes of learning what is going on ( I hope you seek more info... ), then please do the following:

 1.  Open Terminal, and then open two, distinct windows.

 2.  In one window only, type:

     sudo dtruss -afloe -n VLC > ~/Desktop/tracevlc.txt 2>&1

 3.  In the other window, type:

     open /Applications/VLC.app

 4.  Attempt to reproduce the original problem.  If you need to shutdown, do so.

 5.  When the machine reboots, read the tracevlc.txt on your Desktop -- it might well provide a clearer understanding of what is happening...

Hope that this helps!  Let me know if you find anything of interest...

F.

=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=
my previous response follows:
=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=

Do you get anything from executing as your login-user (non-root) the following in a Terminal:

launchctl list | grep -i vlc

or

sudo pgrep -f -l -i vlc

Try this:

obtain a root shell via:

sudo -s

Sync drive buffers to hardware:

sync

Attempt to terminate vlc by various means:

pkill -KILL -f -i -l vlc

killall -9 -z vlc

killall -9 -z VLC.app

Attempt to tear down user-space, terminate all userspace apps, shutdown system services, and reboot.  If you are running a recent version of OS X, then this works best:

launchctl reboot system

Otherwise, do this:

    shutdown -r now