Are loading times using a USB hard drive slower? I recently installed Snow Leopard on a 2 TB USB 3.0 hard drive for my 2009 White MacBook, since the internal hard drive is broken (it no longer shows up during boot or in Disk Utility).

The external drive boots to the login screen in 1-2 minutes. But then it becomes completely unresponsive for about 10-20 minutes (I can move the mouse around, but I can’t click or type anything).

After 10-20 minutes, everything works perfectly and behaves just like when Snow Leopard was originally installed on the internal drive.

I am wondering if this “load” time is expected when using an external hard drive for your operating system.

The external drive boots just fine to the login screen in 1-2 minutes.
  But then it becomes completely unresponsive for about 10-20 minutes
  after that (I can move the mouse around, but I can’t click or type
  anything).

10-20 minutes seems a bit long, but not far fetched; remember, you are actually connecting via USB 2.0 to a spinning hard drive. The White MacBook in 2009 came with a USB 2.0 port; even if you plug in a USB 3.0 drive, it will "fall back" to USB 2.0 speeds.

Maximum theoretical data transfer speeds:

USB 2.0 = 480 Mbit/s (60 MB/s)
USB 3.0 = 5 Gbit/s (625 MB/s)
USB 3.1 = 10 Gbit/s (1.21 GB/s)
SATA III = Up to 6 Gbit/s (750 MB/s)
SATA II  = Up to 3 Gbits/s (300 MB/s)

USB 2.0 is more than 10x slower than SATA III and 5x slower than SATA II (3Gbits/s or 300MB/s).  If you have lots of things being loaded, it's going to take some time.

  ...since the internal hard drive is broken (it no longer shows up during
  boot or in Disk Utility

Why not get a new hard drive?  You can use any SATA III drive as it's backward compatible to SATA II.  In fact personally, I am using a Samsung 850 EVO in a White 2007 that runs a dual boot of OS X Lion and FreeBSD.  Any SATA II or SATA III drive will work.

This is super easy to change out and only requires removing three screws in the battery compartment.  Ifixit.com has an excellent step by step tutorial.


Repeated MacBook Pro 2012 HDD Cable Failures Two weeks ago, a friend's mid-2012 MacBook Pro gave the dreaded question mark folder upon attempting to wake from sleep. I pulled the drive and checked it (backed up, SMART status passed, 70+ MBps read/write - pretty good for an old 2.5" spinner). I booted to AHT and ran full hardware diagnostics. It came back with no errors. I know that HDD cables in these machines fail regularly, so I replaced the cable with a used one I bought from PowerbookMedic.com. It worked!

About a week later, the exact same thing happened - a flashing question mark on waking from sleep. So my question is:

Could a different piece of hardware be failing/did I overlook something? If so, what? If not, what are the chances that this new cable failed so soon after install? More importantly, if I exchange it for another used cable, what are the odds it will fail quickly again?

Important notes:

HDD is known good
Once the flashing question mark folder shows up the first time, nothing will boot attached to that cable (attempted with Win10 SSD, macOS HDD, multiple attempts made - the first time this occurred, a cable replacement solved that issue).
Computer will still boot and operate effectively from HDD when attached via USB

Please don't hesitate to ask any clarifying questions!

Looks like it was just bad luck. Got a cable from Amazon here as recommended by Allan in the comments and installed it. It's been working for almost a month with no issues.


How can I create a Windows password reset disk on Mac? I have installed a dual-system on my Mac: Windows and Mac. Unfortunately, I forgot the password to login Windows OS and cannot access it. Is there any possible way to create a Windows password reset disk on MacOS，so that I could crack Windows password without reinstall?

Use Hiren's Boot CD. it have a password deleter. you can download it for free and just need to burn it to a CD.


Mac Pro (mid 2010) grinds to a halt when display is rotated to portrait I have a Mac Pro Mid 2010 with two ATI Radion 5770's driving 6 Dell U2412M's. Problem is, when even just one of these displays is rotated to portrait, the entire system grinds to a halt. CPU usage spikes to about 85%, I have 12gb of RAM installed and when this happens, about 512mb is free. And graphics performance is all but completely dead. At first I thought this may be because I am driving six monitors at once. But this is illogical be cause for one, it only just started occurring since I upgraded to 10.8(which as a power user, I absolutely hate). And two because this also happens with just one monitor hooked up. Any ideas?

This is the sort of thing a well documented bug would let an engineer fix the code to avoid crippling a powerful Mac with a video change.

https://developer.apple.com/bugreporter/
Once you have the machine blocked, type sudo sysdiagnose in terminal and send that output in with the bug report as an attachment.
Usually, you never hear back, but sometimes you'll get an email requesting more details to help engineering isolate the behavior you are seeing.


Touch ID setup fails on new (duplicate) user account I duplicated my account based on this answer. After the procedure, macOS asked me to set up Touch ID.

I tried multiple times with many different fingers, but I couldn't get it to fully scan the fingerprint. The last "lines" would never fill up, and I couldn't get to the part where you're asked to scan the sides of your finger.

This process still works fine on the original account. No finger scans correctly on the duplicate account.

How can I make Touch ID work correctly on my duplicate account?

I imagine (but have not verified) this is because the fingerprints are the same – macOS is identifying that you are the same person. If it allowed registering the same fingerprint twice, it wouldn't know which account to unlock when you touched the sensor.


Power Photos app removes duplicates I need to keep when copying photos to a new library I have a pretty large photos library (over 20,000 photos), and as I inevitably knew that I would, I ran out of space on my hard drive. I have an external hard drive already, and I'm looking to move my library to live only on the external hard drive to free up space on my computer's.
Because of the size of the library I wanted to organize it better, and create individual libraries for each year, and for certain events. I also figure this will help avoid any issues with it getting stuck while copying such a large number of pictures, if I'm not trying to do all 20,000 at once. I created albums that represented what I wanted the new libraries to be (one for each year) and put all those photos from that year in.
The issue I'm having is that when I copy the photos from the albums into the new libraries on my hard drive using the Power Photos app, it removes all duplicates. For most people this would be desired, however, although I do sometimes use outside applications, I edit many photos simply using the photos editing tools since I usually only want a few light and color adjustments. Before I edit a photo, I always duplicate it and edit the duplicate so that I have the original, and if I decide I don't like the edit or I want to consider a different way to edit it I still have the original image to use for those purposes. Whenever Power Photos removes all of the duplicates, it removes the photos I've edited, which I obviously don't want.
Is there any way around this? I tried removing the "version 2" title from a duplicate and that did not work, and I thought that renaming the duplicate photo may work but I can't find where to rename an image in photos.

This isn't ideal and I can't guaranteed it working in this case, but this is the roundabout solution that I go for when I want to stop any given OS molesting my files: Zip it. If you put the files that Power Photos is deleting in to a zip, move that zip to the external drive, and then uncompress (unzip), you should end up with the duplicates on the external drive. If you can then copy the unzipped files in to the albums that you want them to be in, your problem should be solved.
Also, are you sure that PowerPhotos is the right tool for this job? I commonly see it deleting duplicates advertised as a feature, rather than as something that you're supposed to avoid.


Can a development Apple TV be upgraded to the current tvOS? I got a development Apple TV from last fall (the second version) and was curious if it can be upgraded to current tvOS (9.2?). I plugged it in and didn't see the App Store on it.

Yes, this is possible. Connect the device to your computer using the USB cable and use iTunes to update the OS. Alternatively, you can install the configuration profile available in the Member Center of developer.apple.com.


Apple Watch Apps Not Available for Download Sometimes, certain apps don't show up in the main menu of the Apple Watch app, in the section where all downloadable apps currently installed on iPhone are displayed. They also disappear from my Apple Watch at those moments. I do have them installed on my iPhone, so I'm not sure what the issue is.

I have an iPhone 6+ running iOS 9.0.1, and an Apple Watch running watchOS 1.0.1.

How do I get the apps to appear? I've so far tried uninstalling and reinstalling the apps on my iPhone from the Apps tab of the Apple Watch app, and restarting both my phone and watch.

Could be a bug. Try updating to watchOS 2 and see if that helps.


If the Apple Watch has wifi - does it connect to my local router? It would appear the Apple Watch has the ability to communicate via wifi.

When I set mine up, I didn't have a step to identify my local router, so I assume it may have obtained configuration about my local router from my phone, or that it doesn't connect (directly) to my router at all.

My question is: If the Apple Watch has wifi - does it connect to my local router?

Yes. It uses the wifi networks already configured on your phone. Mine worked over my home network perfectly with zero configuration on my part.


How to disable "Eject device before disconnecting or turning it off." finder notification I have an external mic with storage built-in, and every time I unplug it (or turn the monitor off, which cuts power to the mic) I get an notification shown in the screenshot: Disk not ejected properly. It is an 'Alert' style notification because it persists until I clear it. I don't want to eject the device every time I turn off the monitor or unplug it. I don't even use the storage on it. I don't care about corruption like this answer.
Can I disable this alert some how, or make it less obtrusive? I used to okay with it in the previous macOS, but in Big Sur this notification is more annoying to clear away.

I don't think you can eliminate this warning.
Normally you shouldn't even think of eliminating it, but I can see your use-case for not needing it for this specific device.
I would be more inclined to prevent the volume from mounting in the first place, then it will never 'not be properly ejected'.
You can prevent it from mounting using fstab.
I wrote an earlier answer on using this, so I'll link to that rather than covering the same ground again. The question itself is entirely unrelated, but the answer contains step by step for fstab
I do not know, however, if this still works as advertised in Big Sur, with the protected OS partition. Someone else would have to help you through that, if it's not mutable any more.
Time Machine restore to new partition, different computer


What does Apple mean by "This may decrease battery life"? Does it mean that my battery will "lose capacity" over the years (months?) or that it will just uncharge faster because it's consuming more energy?

Both, one directly from using more power, the other indirectly from deeper discharges (for the same time off AC power) and/or running hotter while plugged in and sitting at full charge.

Using more power will shorten the max time you can use it during one discharge starting at full, ending when the laptop powers itself off.

If you plug it back in before then, then saving power will mean that discharge cycle wasn't quite as deep.

Every charge/discharge cycle has a small cumulative impact on the available capacity of a Li-ion battery.  (I think that's approximately true).  The deeper the discharge, the bigger the impact.  Bouncing around multiple times between 60 and 80% is probably better for a battery than discharge from 100 to 10% and then back up to 100%.  Also sitting around at full charge, especially at high temperature, is harmful to capacity, so laptops that spend all their life plugged in can still wear out their battery.

Also keep in mind that the meaning of "100%" and "0%" is set by the battery controller electronics.  If a Li-ion cell ever literally discharges all the way (like with a resistor across the terminals), it can never be safely charged again: it's at high risk of catching fire if you did charge it.  So the laptop electronics shut off the laptop before that happens, making the actual "0%" safely far from chemically fully discharged.

See https://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries and other things you can google for more info about modern lithium batteries, and how spurs of lithium metal can form that reduce useful capacity.  I think there can be some cases where a charge/discharge cycle can restore some life to a battery, but probably not a super-deep discharge.


What is the keyboard shortcut ctrl+option+shift+power for? I'm running a MacBook Pro Retina (Mid 2014) with macOS High Sierra (10.13.3).
Coincidentally, I found the key combination Control ⌃+Option ⌥+Shift ⇧+Power button that immediately turns the MacBook off. As soon as I press the buttons, the screen is black and the computer is off. It's like a kill switch.
What is that shortcut for and how is it called? Does it hurt my computer?
EDIT: Maybe it is related to the SMC Reset? https://support.apple.com/en-us/HT201295

According to the apple support: This key combination resets the SMC (System Management Controller). The SMC takes control of the battery. Once the controller has been reset, the power supply is cut off.
It is not recommended to do this while the Mac is turned on.


Script to change System Preference function key settings no longer working in Big Sur OS11 I have a simple script that I've used for years to toggle the function key (fn) off and on. The checkbox is located at System Preferences > Keyboard > Keyboard Tab > 3rd checkbox down. Unfortunately, with OS11, it stopped working. I've now tweaked the script, but it generates an error message every other time I run it.
I'm a novice, so there may be a more elegant way to do this than the script below--it's simply what I've been using.
tell application "System Preferences"
    reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
    tell process "System Preferences"
        click checkbox "Use F1, F2, etc. keys as standard function keys" of tab group 1 of window 1
    end tell
end tell
quit application "System Preferences"

This is the Invalid Index error I get:

Weirdly, the script works when I remove the <quit application "system preferences"> line and run the script from Script Editor with System Preferences open (so I can watch what happens). When I close System Preferences and add back in the last line, <quit application "system preferences">, here's the error I get within Script Editor:
error "System Events got an error: Can’t get tab group 1 of window 1 of process "System Preferences". Invalid index." number -1719 from tab group 1 of window 1 of process "System Preferences"
Any help or advice is greatly appreciated!

This AppleScript code works for me on Big Sur.
tell application "System Preferences"
    reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events"
    tell process "System Preferences"
        repeat until checkbox "Use F1, F2, etc. keys as standard function keys on external keyboards" of tab group 1 of window "Keyboard" exists
            delay 0.1
        end repeat
        click checkbox "Use F1, F2, etc. keys as standard function keys on external keyboards" of tab group 1 of window "Keyboard"
    end tell
end tell
quit application "System Preferences"

If that version throws errors… here is an alternate version that also works for me.
tell application "System Preferences"
    reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard"
end tell
tell application "System Events" to tell process "System Preferences"
    repeat until checkbox 3 of tab group 1 of window "Keyboard" exists
        delay 0.1
    end repeat
    click checkbox 3 of tab group 1 of window "Keyboard"
end tell
quit application "System Preferences"


Network Proxy *.local, 169.254/16 bypass Is the reason this bypass of *.local, 169.254/16 on my MacBook Pro OX S El Capitan computer the result of me giving my wifi password out to my neighbor?

What is being done there is that you are bypassing any configured proxies for local computers or computers with a self-assigned IP address.  This is configured by default in OS X and has nothing to do with giving your WiFi password to your neighbor.

Local Computers (Hosts)  If you are not given a local DNS name by your DHCP server (your WiFi router, for example), your Mac will default to a .local domain.  So, if you have to go to another computer on your own local network, it will bypass the proxy (if one is configured) and just connect directly.  OS X is assuming all local computers are on the .local domain.

169.254/16  This is a non routable (private) self assigned IP address.  You would get this IP if you don't have a DHCP server providing you one.  Again, this is there to bypass any proxies you might have configured when connecting to a computer on your local network.

What is a Proxy (Server)  In short, a proxy is a server that makes requests as an intermediary for other computes on the network.  For example, you can have a content filter (at work) that prevents you from going to the naughty bits on the Internet.  It will look at your request, analyze it, then either reject it or make the request for one.  When the remote server responds, it takes the data and sends it to you.


Use old iMac G5 as external Mavericks-style display I currently have a Mid-2010 iMac (Intel i3 3.06 GHz) running OS X 10.11 "El Capitan" and a really old 17-inch Mid-2005 iMac G5 (PowerPC G5 2GHz) running OS X 10.4.11 "Tiger".

I would like to know if there is any free (if it is software only; cables and stuff are fine) way to convert the old iMac G5 into an external monitor for the newer Intel iMac with the multiple display support introduced in Mavericks (not just mirroring).

Any advice?


Cannot Turn on Location Services When I open System Preferences, go to Privacy, unlock the pane with my password. When I click on the 'Turn on Location Services' checkbox, the computer freezes, and the box turn blue and immediately turns white. How do I fix this?

Try clearing temporary/cache files

These files are automatically generated and don't contain any of your data. Sometimes, they will corrupt and create problems similar to yours.

Please backup all data and read the entire answer before proceeding.

First, copy the below path and paste it into the Go to Path dialog box found by going into the Go menu in Finder, or right-click it and select Services ▹ Reveal in Finder. It might be simply Services ▹ Reveal.

/var/folders/zz/zyxvpxvq6csfxvn_n00000sm00006d

A folder should open with another folder in it selected. The selected folder would be zyxvpxvq6csfxvn_n00000sm00006d. Select only that folder and move it to the Trash. Do not tamper with the rest of the folder.

You may be prompted for your administrator login. After you empty the Trash, restart your computer. Turning on Location Services should now work.


Wake-on-Lan Protocol What kind of WoL protocol does OS X use?

Trying to explain. When I use OS X on my Mac Mini and it is going to sleep it wakes up automatically when receiving any packets (e.g. when I try to connect via SSH).

Now I'm using Debian Jessie on my Mac mini and when I run ethtool -i eth0 I get

Supports Wake-on: g
Wake-on: g

Which means only magic packet activity supported by card.

So are there any Linux drivers to wake up my Mac on receiving SSH access requests for example?

My understanding from the Debian wiki:

Quote:

  I found that I didn't want any of the Wake On LAN settings except Wake on "Magic Packet" (g). I only wanted my machine to turn on when I specifically told it to, not on unicast messages (u), broadcast messages (b) or multicast messages (m).

Instead of Wake on "Magic Packet" (g), you would want Wake on unicast messages (u).

Disclaimer: I haven't tried it.


How to increase size of the Spotlight search results window? Is it possible to increase window width of the Spotlight search results under Mac OS X 10.6.6? I mean the semi-transparent "instant search result" window appearing at the top right corner under magnifying glass, not the Finder window.

The standard window is too narrow: longer file names or Dictionary word translations just don't fit there. Why not using more screen space for the search result?

Have you looked at using 'Alfred' as search tool - It's free on the App Store and very flexible, and has a wider results view. If you try it, take a little time to get familiar with the options - I find it a fantastic time saver.


Re-reading your .bash_profile When you make a change to your .bash_profile it will be read the next time you open a terminal.  But what if you have a terminal open already. Is there anyway to do a re-read?

You can use source

source ~/.bash_profile

From the bash manual:

    .  filename [arguments]
   source filename [arguments]
          Read and execute commands from filename in the current shell environment and return the exit
          status  of  the  last command executed from filename.  If filename does not contain a slash,
          file names in PATH are used to find the directory containing filename.   The  file  searched
          for  in  PATH need not be executable.  When bash is not in posix mode, the current directory
          is searched if no file is found in PATH.  If the sourcepath option to the shopt builtin com-
          mand  is  turned  off, the PATH is not searched.  If any arguments are supplied, they become
          the positional parameters when filename is executed.  Otherwise  the  positional  parameters
          are unchanged.  The return status is the status of the last command exited within the script
          (0 if no commands are executed), and false if filename is not found or cannot be read.


Lost Apple ID: How to recover iTunes media and iCloud data? I have an iPad containing all my music and iCloud data (contacts) but I lost access to my Apple ID. I want to make a backup of the data on my iPad, create a new Apple ID and then re-import the data.

How do I do this?

You could just sync it with iTunes (which would also backup the contacts on the computer) on OS X or Windows. Then setup your new Apple ID, add it to the iCloud settings and continue with iCloud backup (and iTunes backup too, if you wish).


Distribute iOS app without human interaction Is there a way to deploy an iOS app to a device without requiring human interaction.

By 'no human interaction', for instance, consider an automated scenario (in a CI environment) where the server can deploy an app to a device and there is no need to have a person to go to the device in order to open an URL and click 'install'.

Following image shows what I want to avoid.

Yes it is possible. You need to create a profile for said device(s). Profile Manager and Apple Configurator are your friends for such tasks.


How do I stop my Mac from attempting Time Machine Backups? I have a 2005 PowerBook running 10.5.8 that, in its previous life, was my personal, full time machine that I used all the way through graduate school. It has been relegated to very light duty in the past year, and serves its purpose well. There is one minor annoyance that I'd like to get rid of, but have been unsuccessful so far. The problem is this: it is on most of the day, every day, and roughly twice per day I get a pop up window asking me to select a drive for Time Machine backups. Like I said, this used to be my full-time Mac, and I backed it up regularly so this seemed (at first) to be an artifact of its previous use/state. I do not need to back this machine up anymore and therefore do not need Time Machine on. I cannot get it to stop this behavior. Here is what I have done so far:

Solution: turn off Time Machine backups via System Prefs. Outcome: no dice.
Solution: trash com.apple TM prefs file and restart the computer to reset TM to its default state. Outcome: no change.
Solution: Create a new user account to see if the problem persists. Outcome: it persisted.

So, I am out of solutions. This is a minor problem, as I simply dismiss the dialog box, but it is fairly annoying. Any takers?

If you're referring to the nag when you plug in a new disk, you can try the defaults setting mentioned here:

defaults write /Library/Preferences/com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool YES

Alternatively, try decreasing the interval of backups to some insanely great number. Try the opposite of the setting listed as #26 on this page:

defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 1800

You might try this to have TM prompt you once anually:

defaults write /System/Library/LaunchDaemons/com.apple.backupd-auto StartInterval -int 31449600

You might need to use sudo to apply these settings.


Low brightness setting doesn't "stick" in iBooks I like to read in iBooks with the brightness turned down, but I have to re-adjust this every time I open the app.  Is there a way to make my brightness setting "stick"?

On the off chance you weren't already aware, you can modify the system-wide brightness by double-tapping the home button and swiping the "shelf" to the left.

iBooks can set a lower brightness than the system will allow outside the application -- so if you frequently set it lower than the system's lowest setting, you'll have to make that change every time you open the app.  As you can see in the screenshot below, when the iPad is at it's lowest system brightness, the iBooks brightness bar is at about 20%.


How do I remove grayed out phone number in send/receive in message settings? My service has been disconnected on my iphone6. I want to use it for imessage, how do I remove the old phone number that's grayed out in the send/receive in message settings?

Thanks

According to Apple, all you need to do is sign out of your device

 Source: https://appleid.apple.com/account/manageCheck your iCloud preferences after signing out and back in.Settings › iCloud › User Account › Contact Information

If you are unable to remove/modify

Depending on your carrier, you may need to remove your sim and reinstall iOS.


Wifi, DNS problem on MacBook Pro retina On a Macbook Pro retina 13 2014 with El Capitan 10.11.5 I can't access websites through their domain name (google.com, bing.com, etc).

I can access the internet with Google Chrome, but with others applications I can't.

I can ping 8.8.8.8:

MacBook-Pro:~ alex$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=58 time=18.093 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=58 time=18.489 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 18.093/18.291/18.489/0.198 ms
MacBook-Pro:~ alex$

I can't ping google.com

MacBook-Pro:~ alex$ ping google.com
ping: cannot resolve google.com: Unknown host
MacBook-Pro:~ alex$

I tried to put DNS manually (8.8.8.8), reboot, but it doesn't work.

I tried to delete these files and reboot but it doesn't work:

com.apple.airport.preferences.plist`
com.apple.network.identification.plist`
NetworkInterfaces.plist`
preferences.plist`

tried:

MacBook-Pro:~ alex$ dig @8.8.8.8 www.google.com

; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 www.google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9734
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.            IN  A

;; ANSWER SECTION:
www.google.com.     264 IN  A   172.217.16.68

;; Query time: 33 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Jul 14 16:00:31 2016
;; MSG SIZE  rcvd: 48

MacBook-Pro:~ alex$

Could you help me please?

Google Chrome uses its own DNS resolver, that's why it behaves differently.
dig command also connects directly to DNS server.
To verify your current DNS server settings on the Wi-Fi network interface use:

networksetup -getdnsservers Wi-Fi

To troubleshoot your problem try:

clearing the DNS server settings (and rely on DHCP) with:

sudo networksetup -setdnsservers Wi-Fi empty

setting the DNS server manually with the command:

sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 8.8.4.4

create a new location with separate DNS settings by:

clicking on the network icon in the menu bar
choosing Open Network Preferences...
selecting Edit Locations... from the top list box (you might need to unlock settings with administrator's password first) and creating new location
clicking on Advanced... button, selecting DNS tab and adding the DNS servers in the left pane


Cannot ping localhost: "unknown host" on Mac OS X El Captain I am trying to resolve localhost which right now is "not found"

if I ping localhost - I am getting

ping: cannot resolve localhost: Unknown host

I have made sure that the /etc/hosts file has the below entries that are necessary to have the resolution for localhost -

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost

However, when I ping 127.0.0.1 it is successful -

PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.052 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.066 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.054 ms
^C
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.052/0.057/0.066/0.006 ms

In doubts of this getting blocked by my antivirus - I have also disabled my "web root secure anywhere" anti-virus... and it did not solve anything.

Also, I have noticed that when I restarted my machine - for the first few mins the ping localhost worked and stopped working after few mins. not sure how to track what stopped it from working.

Based on the answer at DNS not resolving on Mac OS X - tried "dig @8.8.8.8 localhost" only to find that there was no "answer" section at all.

localhost:~ $ dig @8.8.8.8 localhost

; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 localhost
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 3535
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;localhost.         IN  A

;; AUTHORITY SECTION:
.           805 IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2016081801 1800 900 604800 86400

;; Query time: 20 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Aug 18 17:15:07 2016
;; MSG SIZE  rcvd: 102

As requested, the output for "ls -le@ /etc/hosts" -

$ ls -le@ /etc/hosts
-rw-r--r--  1 root  wheel  6126 Aug 18 17:09 /etc/hosts

I have solved the problem by restoring my Hosts file (it was empty):

But before, you have to check your hosts file.

  cat /etc/hosts

If nothing is shown, that means your hosts file is empty.

Then just copy and paste this over the existing hosts file then save it as plain text to restore it.

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

If your hosts file is not empty, your can try to delete it and add it again with this lines.


How to change account name and full name to one, consistent name? I have created an administrator account on a Mac OSX 10.5.8. At first, the user name and account name were called "kaleb". However, I later changed the name (is this account or user?) via System Preferences | Accounts to "apple2".

I now want this name to be consistent for everything related to this account. To try to do this, I followed the instructions at http://support.apple.com/kb/HT1428. However, this hasn't worked. I still can login as "kaleb" (and as "apple2"), and the name of my home folder is still "kaleb" although the user is called "apple2". On the command line, the username is "kaleb". However, in Systems Preferences there is only evidence of an "apple2" user.

What can I do to get rid of "kaleb" and have all permissions, pointers, names etc. under the name "apple2"?

You will need a third account to do this trick fully.

Make an admin account named differently than the final short name you wish to have in the filesystem for /Users/apple2 (the desired "perfect user" with everything matching).
Log in to the admin account and make one last backup of your system.
Delete only the account you wish to keep - being careful to keep the home folders - do not let the system delete this home folder, just delete the account without changing the home folder.
Open terminal and use this command exactly (unless you start with something other than kaleb and end with something other than apple2:

sudo mv /Users/kaleb\ \(Deleted\)/ /Users/apple2

This command uses the \ character to escape the space and the parentheses so be careful to paste it exactly or [chat] here or elsewhere with someone that knows how the unix command line works if you have any doubt about how it will rename one folder by moving it.
You can really mess things up in terminal with sudo if you are not prepared to wipe everything and reinstall the OS and restore from a backup.

Now when you (re)create the apple2 user the OS will fix the ownership of the home folder and the short name will match the directory and the long name by making all three "apple2".

My process differs slightly from Apple's in HT1428: OS X: How to change user account name or home directory name in that they enable / disable the root user where I just make a new admin account. Apple has you rename the folder on the fly while logged in as root and then creates the new account - so your renamed account will get UID 502. I delete the account (but not the files) so that your renamed account gets UID 501. None of this really matters - you just want to have a backup in case either process fails you - both will get your short name and new account back in sync.


how to make more display only few lines at a time? On linux more -10 <file> displays only 10 lines at a time of file file. On a macOS Terminal, however, this does not work (for me).

How can I get this to work? Or how else can I get equivalent behaviour with less?

I should say that I run OSX 10.12.5.

less -10 <file> on macOS 10.13 also scrolls forward 10 lines at a time.  The major difference is that it fills the first screen, as opposed to more which only generates the specified number of lines even on the first screen.

If that's not acceptable, the LINES env variable can override the number of lines on the screen.  So something like

env LINES=10 less <file>

will force 10 lines on the first screen, and also scrolls forward 10 lines at a time.


I have an iPod touch 6th generation but I can't sign in to Face Time or iMessage I am using iPod touch 6th generation. I've tried to sign up in Face Time and iMessage a lot of time but they are showing that there's a problem on network. Why is this happening?

I've had similar experiences with my iPod 6th Gen too. I suggest that you check your network, or WiFi and try again. If it is a network issue, then you might have to wait until it is resolved. I fixed mine, after figuring out that it was a faulty WiFi and not the iPod (the Wifi option was on) or the service. Hope this helps!


MagSafe Power Cable Going Yellow Well, my MBP cable has gone yellow after a while. I've tried cleaning it with water, and also toothpaste (with whitening) and that doesn't seem to have removed the yellow stains. I guess I'll try mouthwash next; I may have to gargle that myself first. Anyone have the same problem? I haven't been keeping it in unusual places, in my bag and on the desk.

On the left is the whiter clean cable.

Depending on how old the charger is, it is possible the agent causing the discoloration is leaching through from what the casing covers instead of being caused by an external source. In this case, bleaching and cleaning will affect only the surface of the cable.

I used to have several cables like this, on old barrel-shaped (non-MagSafe) chargers, but when the laptops were recycled, so were the chargers, so I don't have anything to dissect to prove my assertion.

The power charger can also get quite hot when charging, and if the charging cable is partially or wholly wound on the charger body's cable-storage fingers, they may become very hot as well, causing some of the discoloration you see. I always fully unwind the connection cable before charging.


Long term effects of iPhone left in the sun? I accidentally left my iPhone 5 a few hours in direct sun and it overheated. Obviously I put it in shade to cool down but my question is will there be any significant damage? Long term? It was really hot when I found it.

If you cooled it down, then the problem is resolved for now and there is nothing more you can do. Try to avoid doing that again as this will slowly move from the short term effects to long term ones.
Short Term Effects of Overheating

Battery decreases- fast! (Hopefully temporarily, when you cool it down, it will return to 98% of what it was before)

Long Term Effects of Overheating
When the iPhone overheats, Apple also claims that you might experience these (more extreme) results:

device battery stops charging

display weakens

poor cellular signal.

To stop this from happening, try and turn your iPhone so that the screen is facing down. This will help it avoid contact with the sun. If you have a case, that will be better because the sun will be hitting the case instead of the phone directly.


Spotlight won't find apps after AppStore updates them This started happening with Type2Phone, an app from Houdah Software. Every time after I would update the app via the AppStore, Spotlight would no longer find the app (I use Spotlight for app launching). I contacted the developer, and following a series of steps, we found that what is happening is that somehow the updated app is having this attribute added to it:

kMDItemSupportFileType            = (
    MDSystemFile
)

[This is the output of the mdls command]

This explains why Spotlight is no longer finding the app.

Now logically, he informed me that this command should remove the attribute:

sudo xattr -d com.apple.metadata:kMDItemSupportFileType /Applications/Type2Phone.app

But although the command executes, it doesn't remove the attribute! I.e.

mdls /Applications/Type2Phone.app/ | grep MDSystemFile

Still has MDSystemFile as output.

I've run Disk Utility to check for directory damage, rebuilt permissions, etc. to no avail. The only solution is to rebuild the Spotlight index completely -- but the problem will recur with a new update.

Although it inexplicably only happened every time I updated Type2Phone, now it's happening when I update Tweetbot.

Any insights into this problem which is driving me batty?

I had the same problem with Outbank.app which was driving me nuts, as well.

After a wile I found this site where I was told that writing the attribute with xattr actually updates the spotlight metadata. So,

sudo xattr -w com.apple.metadata:kMDItemSupportFileType "" /Applications/Type2Phone.app

should do the trick.


Enable VoiceOver ine only one app? My kid likes to listen to music on her iPad, but she can't read yet (she's working on it) so she has to play each song for a few seconds to find the song to which she wants to listen. Is there a way to enable VoiceOver for just the Music app? Enabling it for the entire device is annoying. Or is there an alternate way to play music that will speak the song titles?

You can't enable VoiceOver for just one app, but you can easily turn VoiceOver on and off.

Method 1(Siri): Just launch Siri(by pressing and holding the home button), and say "Turn on Voice Over", and and Siri will reply(no reading necessary). You can also turn Voice Over off, by saying "Turn of Voice Over" when you leave the app.

Method 2(Acessibility Shortcut): Go to Settings > General > Accessibility > Accessibility Shortcut and tap "VoiceOver". Now whenever you triple-click the home button, it will enable voice over, and when you triple click it again, it will disable VoiceOver.


How do I transfer or sync u2 songs of innocence from My Library to my iPod? I have U2's Songs of Innocence in My Libray of my iTunes. I have a PC. How do I transfer/sync this album to my iPod? Clicking the "sync" button does not do it; it only syncs up all other albums. And, I have an iPod 5th Generation, not and iPod Touch.

Check your sync settings. If all music is set to sync it should work out.

Another possibility is that they haven't been downloaded yet. In that case a small cloud should be next to the songs in your library. When you click it, they're downloaded.


How to disable Apple Wireless Trackpad from recovery mode? I booted into recovery mode / macOS Utilities and erased my hard drive anticipating to reinstall the OS. Unfortunately my computer is paired to an Apple Wireless Trackpad that I can't find. I believe this trackpad's button is permanently pressed, preventing me from left-clicking, so I can't get all the way through the installer. This trackpad is listed as paired and connected when I go into Terminal and run system_profiler. However recovery mode has no System Preferences so I don't know how to disable this trackpad. Is there any way I can disable the trackpad from recovery mode, such as from Terminal?

Try moving the computer to another location a good distance away from where the trackpad may be located. The theoretical maximum distance for Bluetooth is actually far larger than what I thought. See this page, and this one for more info about Bluetooth ranges.


How to draw a curved arrow in Keynote 09? I don't find how to draw a curved arrow in a Keynote'09 presentation... I'm sure is really before my eyes but .....

Create the Arrow

From the Insert Shape menu choose the "Draw with Pen" tool:

Click once at one end of your curved arrow:

Click and drag at the other end of your arrow:

Hit the Escape key to stop drawing.
From the line ends menu, choose an arrowhead you like:

Edit the Arrow

To reshape the curve, click on it once, then click on it again;
When the endpoints turn red you can change things:

Click and drag the round circles at the end of the gray Bezier
handles to reshape the curve (a little practice makes perfect):

Click and drag one of the red endpoints to change the start or end:


Configured Airport as Bridge and use OS X Server for DHCP and DNS, no Internet I want to use my Mac Mini as an OS X Server with the following services:

DNS
DHCP
Open Directory
Profile Manager

I configured my Airport Extreme under the "Internet" tab to use my static IP supplied from my ISP. I'm using the IP of my Mac Mini as the primary DNS server and no secondary DNS server. Under "Network", I have router mode set to Off (Bridge Mode).

When I open Safari on the Mac Mini server, I'm not getting any Internet connection at all. I checked in the DNS settings of the server and made sure I had forwarding servers pointing to my ISP DNS and Google DNS (as backup). Under Sys Prefs, I have a static IP assigned and pointing DNS to itself.

How can I have my Mac Mini supply DNS, DHCP, and RADIUS wireless support and still get Internet?

You're trying to accomplish more in one step than you can handle. Break down your problem into subproblems, and solve each one.

The first you want to get working is to have an internet connection on your Mac Mini when the Airport is set in bridge mode. Do this without setting up DNS-servers and changing DNS settings to use your Mac Mini as the DNS server.

When you have working, you can add on the DNS.

Basically at this point you want to ensure:

a) That the Mac Mini's network port is setup with the correct IP, subnet mask and default gateway. This is the static IP and network settings, you have been supplied by your ISP.

b) That your Mac Mini can "ping" addresses on the internet. Open Network Utility and try to an address on the Internet. Try first with an IP (such as 23.78.125.15) and then with a DNS-name (such as www.apple.com).

Remember that in this (simple) scenario, you can only use an IP-address once. I.e. if you assign a static IP to the AirPort Extreme, you cannot assign the same static IP to your Mac Mini.

If you have got only one static IP, you cannot use that IP on both the Airport Extreme and on your Mac Mini.


Preventing applications from creating folders in your documents folder I have two applications (Microsoft RDP Client and Parallels Desktop) that insist on creating their own folders in my Documents folder. They use those to store user-specific files, settings, profiles and such.

My Documents folder is neatly organized and I don't want applications creating their folders in it. Parallels Desktop has a setting allowing me to change the path for its folder, but the Microsoft RDP client doesn't seem to.

Is there a straightforward way to prevent an application from automatically creating folders in Documents?

In my specific case, I'd be happy with a solution that prevents RDP Client from creating the directory altogether, e.g. by creating a hidden locked entry with the same name as the folder it wants to create.

I understand your frustration, but I suggest you just hide the offending folders from Finder, you can easily do that with the following terminal command:

chflags hidden ~/Documents/HideMe

Preventing those folders to be created is likely going to cause problems running those applications.


USB Sticks not getting properly recognized Two of my USB sticks (Lexar and PNY, both 32 GB) are not getting recognized correctly by macOS Sierra. Both worked before (one formatted with NTFS, the other with FAT32); they were then used as installation media for upgrading a couple of MacBooks to macOS Sierra.

They have since been tested, getting reformatted by Linux as well as Windows 7 between tests, but the following output is always the same using diskutil list:

/dev/disk3 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     Apple_partition_scheme                        *32.0 GB    disk3
       1:        Apple_partition_map                         4.1 KB     disk3s1
       2:                  Apple_HFS                         311.3 KB   disk3s2

After plugging them into the MacBook they are still working on Windows and Linux (they were tested by writing the whole stick and verifying the data).  I also deleted the partitions using fdisk in Linux.

Is there a way to repair this behavior? And if not, is there a way I can redefine how the partitions are getting assigned by macOS so that I can still manually mount them?

There's nothing wrong with what you are seeing.  That's the partition scheme for your bootable USB.  When you format it, you are not deleting the partition, just "blanking" the active partition.

Formatting a partition is not the same as deleting the partition.

To get back to a "single" partition (this is what I am assuming you want to do), issue this command in diskutil

diskutil partitionDisk /dev/disk3 1 GPT HFS+ NAME 100%

This command will permanently delete anything you have on the device.  Make sure you are using the correct device identifier

Be sure to replace "NAME" with the name you want to give to the USB.

Your drive partition map will be wiped, and the HFS+ (Mac OS Extended) file system installed.

What I suspect happened in your case is that you didn't "write" the new partition scheme to the USB.  This is done by issuing the "w" command.  Linuxhelp has an excellent tutorial on fdisk

More info can be found by typing man diskutil


Files on desktop un-deleteable, say "No Items selected" when previewed I have some image files that mysteriously showed up on the desktop. When I go to move them, they show a copy (+) icon and they are unable to be deleted. When I select either one and press space bar to preview, instead of a preview, the message "No items selected" is displayed.

I also noticed that they do not show up in a regular finder window of the desktop, but only in the desktop itself.

Upon relaunching finder (CMD+OPT+ESC > Finder > Relaunch), the symptoms vanished.

But does anyone know why this keeps happening? I've seen it multiple times now.

The same thing has happened to me with canceled download files from Safari and temporary files created by ImageMagick. The files are only shown on the window of the desktop and not when opening ~/Desktop/ in a separate window. They have always disappeared after reopening Finder or logging out and back in.

I can't reproduce it right now, but I'll check if there's anything interesting in the logs the next time that happens. tell application "Finder" to update folder of desktop might be worth a shot as well.

A related question at Super User: OS X: The item XYZ.txt~ can’t be moved to the Trash because it can’t be deleted


Which iPhones support the apt-X codec for Bluetooth audio? I'm shopping for a new Bluetooth headset for my iPhone 4 and noticed that some headsets support the apt-X codec for "CD-quality sound". Presumably this is better quality than plain old A2DP that I've been using so far.

Which iPhones (if any) support apt-X audio over Bluetooth?

No iPhone has native support for apt-X, but you can buy a dongle such as the Sennheiser BTD 300i or a similar one from Creative to enable apt-X support.


how to access system files such as network libraries? I am trying to find some algorithms about the implementation of network stack for Mac OS X, can I access the actual codes from the operating system itself.

Any suggestions are very much appreciated.

Thanks

Apple has published quite a lot of source code

Open Source: Source code for a lot of frameworks and commands
Open Source Development Resources

PS: Any detailled discussion about the code (or even where to find which functionality) is off topic on AskDifferent and should be discussed on StackOverflow.


Advice on securely removing malware I'm helping out a friend who thinks they may have malware on their machine. I don't know what kind or to what extent, so I don't want to boot into the system. My question is:

Is there a good boot time anti-malware like Avira Rescue Kit (which won't seem to boot on a Mac)?
Or, should I boot into the recovery partition, and run Malwarebytes?

Thanks

Malwarebytes is at best terribly ineffective from my experience. Why do you suspect a rootkit? I don't think you're wrong, possibly very perceptive but just wondering why.

The problem with rootkits is they will hide all evidence of their existence especially from a rickety Malwarebytes scan. Mac malware creators must be sophisticated enough to jump some of the small hurdles Apple attempts to create so keep that in mind in terms of the persistence factor at play.

What makes you think that the malware won't go hide in your NVRAM, xartstorage (secure enclave, graphics card, SMC, create a RAMDisk, etc. to make you think that it's gone and that Recovery Mode really is an almighty kill switch and isn't just a pacifier that effectively negates all legitimate and acceptable levels suspicion.

macOS (previously styled OS X) is inherently insecure. "It just works" is not the befitting of a truly secure operating system. In which case "I expletive hate it," would probably be more likely. Focus groups probably would have found that didn't go have quite the same cachet.

To assess the potential of this type of malware:

Open terminal and type cat /dev/ and paste the results if you wish.
When you reinstall the OS in Recovery, look for an process called "unknown" the the install logs (Command L and then be sure to select the option in the top left corner to show all progress and errors).
You could also enable kernel debugging and read the kextlog shown as your OS boots. In full disclosure this does require a high level of modest effort so it's perfectly acceptable and possibly most productive to dismiss the possibility of a root-kit in advance.
Obtain a copy of the entire disk with all volumes and mount it read only to a Windows VM then try various malware scans.


How do I tell if there is an iPhone backup in my iCloud account without the iPhone A couple of months ago I had an iPhone.
That iPhone was never connected to iTunes. It was configured to make backups to iCloud. It was stolen.

Now I'm getting another, used iPhone from a family member. It would be nice if I could restore the backup of my previous iPhone to the newer iPhone.

But since I no longer have my previous iPhone, I don't know if there still is a backup to restore. If there is none, I don't want to reset the new iPhone.

Is there a way to tell if the backup is still in my iCloud account?

Simply log in into iCloud Control Panel on your Mac or PC (using your Apple ID and password) and press [Storage]; you will see the list of available devices/backups on the
account:


Add MP3 Files To Native Music Player? I use Linux on the desktop and have zero access to iTunes. I'm in a position where I have to use an iPhone for a while.

I can plug my phone to my computer and mount the storage drive. Where would I dip my MP3 collection in order to pay them in the native application?

It's an iPhone 4S updated to the latest version of iOS.

afaik since iOS 5 there is no longer a Linux Application that supports syncing Music to an iPhone (there used to be GTKpod)

The easiest would be to install WINE and then iTunes I suppose.


Let guest account use Boot Camp On a 2013 iMac running the latest Mac OS X, we have a Mac partition and a Windows 7 partition. The administrator can use the Boot Camp application to restart the Mac into Windows. The guest account however should also be able to use Boot Camp and restart into Windows. Is this in any way possible, because it seems you always need to enter the Administrator password in order to reboot into Windows?

You can use the following code to create an Applescript application to accomplish this.

  do shell script "bless -mount \"/Volumes/Boot Camp Name\"
  -setBoot -nextonly" user name "admin username" password "admin password" with administrator privileges

  do shell script "shutdown -r now" user name "admin username" password
  "admin password" with administrator privileges

You will need to:

Paste the above code into AppleScript Editor
Fill in your admin username, password and name of your bootcamp volume where necessary

Once your details are entered you can save the script for editing later and then export it (File > Export) as an Application, making sure to check the "Run-Only" box before clicking Save.  What this does is create an AppleScript application that can only be run, not edited or viewed.  When you launch the application your Mac will temporarily reboot into whichever volume you specified in the code.

The following accomplishes this:

bless & setboot - This designates the default startup disk
nextonly - This tells the system that the volume designated in this command should only be the startup disk for the following boot, subsequent restarts will boot to the proper startup disk.
shutdown -r now - This tells the system to reboot now
Exporting as a run-only AppleScript application allows the students to execute the command but not view the contents, which should keep the admin credentials safe.  I made a sample application on my system and was unable to view the script inside the application by digging through the package contents.  It may be possible to get around this but I couldn't find a direct way.

To make this accessible to Guest users in addition to standard user accounts you could add it into the default user template at /System/Library/User\ Template/English.lproj/.  Settings, files, etc in this location carry over to the "on the fly" Guest accounts available in the newer Mac OS X revisions.

Hopefully that does the trick for you!


What risks from an SMC reset? My mac is always quite hot and the fans are often at full speed even with moderate activity. Also, when I plug in the external monitor, the computer becomes very sluggish and kernel_task starts taking insane amounts of CPU.

So it looks like I need a SMC reset.

My question is: what does it entail? Will I lose some settings/configurations? Do I need to back up some data? Is there any risk that the system will not work properly after the reset?
As weird as it sounds, I did not see these questions ever addressed anywhere the reset was mentioned online.

This is my working computer, so it would be very inconvenient if I somehow disabled it.

Will I lose some settings/configurations?
No.

Do I need to back up some data?
Well, you should always have backup of important data. When it comes to SMC reset it does not touch your storage/hard drive. So no data should be affected.

Is there any risk that the system will not work properly after the reset?
There is a very slight risk. In 99,9999% of all times, if the computer are working perfectly and has no hardware issues the computer till work 100% properly after SMC reset. However there has been cases where the SMC reset fries the logic board, although, those cases had shown other hardware symptoms.

The SMC is responsible for these and other low-level functions:

Responding to presses of the power button
Responding to the display lid opening and closing on portable Macs
Battery management
Thermal management
The SMS (Sudden Motion Sensor)
Ambient light sensing
Keyboard backlighting
Status indicator light (SIL) management
Battery status indicator lights
Selecting an external (instead of internal) video source for some iMac displays


What's the best solution to sync contacts from Mac to Android Phone? I'd like to sync my contacts from the Mac addressbook to an Android phone, but I'd rather not use Google (or any cloud) where I have no control over my data.

So far I found SyncMate and Missing Sync. Both cost $40 and promise to do sync more data that I will ever get on my Android phone.

SyncMate offers a free edition that can sync the contacts to the phone, but it's slow (more than 3 minutes to sync 250 contacts), has no progress bar and won't update the contacts on the Mac if I added a number on the phone (and I have set the sync to bidirectional!).

The Missing Sync doesn't seem to offer a free or trial edition, so can't tell how well it works.

Has anybody compared contact syncing with these two products? And are there other options?

I finally found a solution that I'm happy with:

On my NAS appliance, I installed OwnCloud, which supports contact synchronisation with the CardDAV protocol. OS X support CardDAV out of the box.
On the Android device I installed CardDAV-Sync and Contact Editor Pro (see the OwnCloud doc). Both together cost about $5, but there are free versions that also work well with fewer features. Still much less than $40 for Missinc Sync or SyncMate.

Thus I get the advantages of a cloud solution (immediate updates, two-way sync) and get to keep my contacts private.


Efficiently organize 100s of externally stored ebooks within iBooks for iPad without doing it manually in collections? I have hundreds of ebooks stored on an external drive of mine. I don't want them on my MacBook Pro because I don't want them taking up space due to the fact that I don't read ebooks on my Mac. I just bought the new iPad so I can read these books.

In iTunes, I tried creating folders to put the books into in an attempt to organize them properly but they all just appear in the same huge list within the iBooks app on the iPad and I have to manually create collections and put the books in there.

Surely there has to be a better and more efficient way of doing this? I have tried Googling all over no question is specific to mine with a viable solution.

Basically to summarize:

I have all my iBooks on an external drive which I want to sync with my iPad but without having them stored on my computer. What is the best way to go about this?
How can I keep my collection organized so when I sync, I don't have to keep searching for new books I added to manually add them to an existing or new collection?

Managing ebooks with iTunes is a horrific experience for the user.  If you are willing to adjust your expectations, Calibre does a good job, but it lacks polish.  You may find it doesn't work the way you expect, but with some patience you may find it does what you want (and more!)


How to mass delete your photos in your iPhone? I cannot do it in the phone itself, neither in iPhoto.

How can you delete all your photos in iPhone?

From http://www.idownloadblog.com/2014/02/28/how-to-delete-photos-from-your-iphone/

How to delete all photos from iPhone

The following method is without a doubt the fastest and most efficient way to mass delete photos from your Camera Roll. You can choose to delete one or hundreds of photos at once, and get the job done in less time that it takes to say it.

1) Plug your iPhone in your Mac. Launch the application called Image Capture. You might not have heard of it before, but it comes with all Macs. It should be somewhere in your Applications folder.

Note to Windows users: I do not have a Windows machine to test this on, but if my memory is correct, you can achieve the same thing by going to “My Computer” and look for your iPhone, which should appear as cameras normally do on PC. Don’t quote me on this though. Hopefully, some commenters that have a Windows PC will be able to give us more details about that.

2) Make sure your iPhone or iPad is selected from the “Devices” list in the left navigation bar.

3) Select as many photos as you want to delete. If you want to delete all of them in one scoop, hit the “Command + A” keys on your keyboard to select all photos.

4) Click on the red delete icon at the bottom of the screen.

5) You will get one last chance to stop the mass removal of your pictures. Image Capture will ask you if you’re sure you want to delete the selected items permanently. Click Delete. All the photos will be wiped from your iPhone or iPad.


How to keep apps from adding themselves to login items? Today, I noticed that there were several "login items" that I'm 99.99999% certain I did not add.  I figure those items added themselves when I installed them (they were probably installations that required authentication).

Of course, I can always check "login items" every time that I install an app (if the installer asked for authentication), but I'd prefer to lock "login items" altogether.  Is that possible?

Update*

if you do a get info on the ~/Library/Preferences/com.apple.loginitems.plist file and tick the lock checkbox.

No changes will be written to the file. Therefor on next login there will be no additions.

I just tested this and it worked. But cannot guarantee that this may or may not be a good thing to do.  I my self will use my Answer below.

You can set a launchAgent to watch for changes on the ~/Library/Preferences/com.apple.loginitems.plist file

In my example here I use a launchAgent to watch for the change and then run a command to notify me. In this case I use the command tool growlnotify

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>loginItems</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/growlnotify</string>
        <string>-n</string>
        <string>login items change</string>
        <string>-m</string>
        <string>login items change</string>
        <string>-s</string>
    </array>
    <key>WatchPaths</key>
    <array>
        <string>/Users/USERNAME/Library/Preferences/com.apple.loginitems.plist</string>
    </array>
</dict>
</plist>

I actually made this using lingon which take some of the pain out of making launchAgent.

The command I run is :/usr/local/bin/growlnotify -n "login items change" -m "login items have been changed" -s

Note this is a simple example. And you should remember that any changes may take a short while to be written to the plist. But my tests have shown it to work.


iBooks ePubs lost all cover art after iOS5 update After I upgraded to iOS 5 on my iPad 2, iBooks no longer shows any cover art for ePubs that I have imported. Anything that is from the iBook store shows art fine, along with PDFs.

Is there a solution to this?

Yes, I found that if you remove the books from the iPhone, then add them again via sync the cover art should return.


FileVault: How come a new user can log in without disk password? I thought I had enabled full volume encryption on my OS X 10.9.5 MBP. Then I created a new user and when rebooting, this new user is able to log in without knowing the password for the disk.

The start up screen is presented with the new user to the left and the normal "Unlock disk" (or something like that) icon to the right – if I want to log in with my normal admin account, I first have to unlock the disk and then my user becomes visible.

What gives?

From Apple KB - Use FileVault to encrypt the startup disk on your Mac
Emphasis mine...

  Enable users

  If you enable FileVault on a Mac with more than one user account, you're asked to identify which users can unlock your startup disk as part of setup. Click Enable next to a user name to let that user log in to your Mac at startup. Then, enter the password for that account.

  Users that you don't enable can't unlock the startup disk. These users aren't able to use your Mac until after an enabled user logs in.

  Any new user accounts you create after you turn on FileVault are automatically enabled.


How does the Apple TV remote control my iPhone when using Airplay? Today I discovered something cool while using Amazon Prime + Airplay to Apple TV 4... I discovered that I can use the AppleTV remote to fast forward and rewind.

Does anyone know how this feature works?
Does an AirPlay session allow for more than just "broadcasting" to the target device, or is there some kind of back-link to the phone?
Does the phone "see" the Apple TV remote?
Does this mean I can use the Apple Tv video game controller in conjunction with my iPhone while AirPlay is on?

Applications can respond to the "Remote Events" from the AirPlay device. This is some kind of back-link as you described it. Developers has to respond to those events manually (unles they are using some built in classes..). For more info please check official Apple site.

  When AirPlay is in use, your media might be playing in another room from your host device. The AirPlay output device might have its own controls or respond to an Apple remote control. For the best user experience, your app should listen for and respond to remote events, such as play, pause, and fast-forward requests. Enabling remote events also allows your app to respond to the controls on headphones or earbuds that are plugged into the host device.

So your phone is "not aware" of the remote/game controller etc. It receives some events from the AirPlay.

For the allowed events please check developer site.


Purchases I did not download do not appear in iTunes library In both my MacBook and my iPad, all my purchases that I did not download do not appear in my library.

They are in the Purchased section but do not appear in the library for me to stream from the cloud. This isn't an issue on my iPhone for some reason. When I go to "View" on the top bar my MacBook, there is no option for selecting whether or not I want to display downloaded content only.

How do I get my iPhone settings to sync to my iPad and Mac or do I need to perform some steps on them?

The first item is to check on the iPhone to be sure you are using the iCloud Music Library / iTunes Match / Apple Music settings there as you expect.

Then you’ll repeat the inspection on all other devices to have them match up with your iPhone if that has the library / playlists / features and media you want to go to all the devices.


Shouldn't Siri be able to run on the new iPad? Siri has been made to run on older iOS devices some time ago. It was reported by MacRumors that special hardware is what sets the iPhone 4S as the exclusive device for Siri. Enter the new iPad.

The new iPad supports voice dictation, which, to me anyway, is a clear indicator of at least some of this earSmart technology making its way into iPad 3. Additionally, the new iPad has some sort of access token to Apple's servers, given the voice dictation feature. As discussed by answers to my question here, the new iPad is connecting to Apple servers for voice processing. Additionally, Voice Dictation would imply that the new iPad has access tokens for Siri's servers.

So, we have the hardware, and we have the token. The new iPad should be able to run Siri, pending an update from Apple or the jailbreak community.

Is this thought process correct? Have I missed anything?

The short answer is no, not yet. The long answer is because the only (reliable/legal) way to get Siri on a non-iPhone 4S device is to use a package found in Cydia called Spire. This requires you to have access to a Siri proxy server or an iPhone 4S for the tokens. However, @chpwn (the developer of the package) has stated many times that it will not run on iOS 5.1, because the iPhone 4S IPSW (the actual firmware downloaded from Apple) cannot be unencrypted at this time. This IPSW is needed to harvest the Siri files for use on other devices. He could port it illegally, but he doesn't plan on it. Because the new iPad is running iOS 5.1, Siri cannot be run on it, plus a public JailBreak for the new iPad hasn't been released yet.


Dual (DVI) monitor setup for MacBook Pro 15" (Retina mid-2015) I am looking for a solution to connect a MacBook Pro 11,4 (15" retina model from mid 2015) to two monitors. The present question is different from prior questions on dual monitor for Macbook Pro, as it is for a specific model (specific ports) and monitors with specific connections.

Both monitors have VGA and DVI connections, but my MacBook Pro has two ThunderBolt ports and a HDMI port.

You'll want to purchase 2 mini-DisplayPort to DVI cables. Connect the DVI end to the monitor and the mini-DisplayPort into the Thunderbolt ports on the MacBook Pro.


How to close apps in iphone 4? Possible Duplicate:
  iOS 4 - can I close and app without it staying open in the background?

From what I know, pressing on the home button on iphone 4 will merely hide the application, instead of closing it.

So how can I make sure that all the unwanted apps are closed, so that the memory can be reused?

You have two options to close an app:

With the application hidden (i.e. if you are currently at the home screen or are interacting with another app) you can double-press the home button, hold down any icon in the app switcher until they all start to wiggle, and press the minus icon in the top left corner of the app you want to close.
With the application in the foreground, you can hold down the power key until the "slide to power off" option appears, and then hold down the home button until the the application quits.

The first option is faster.


MacBook Pro won't read one particular CD (but CD player will) I have a CD which I'm trying to add to iTunes, however my MacBook Pro won't read it. Every time I put it in it tries to read it, clicks and ejects after approx 20 secs. I've played the CD in a CD player with no problem so I don't think the CD is the issue and I can read other CDs no issue.

Things I've tried so far:

Reset the NVRAM
Reset the SMC
Renamed the cdinfo.cdlib in the preferences directory.
Run a cleaning CD through.

I tried the above separately with a test of the CD between each.

Any thoughts?!

it is possible that the CD has a scratch on it or is dirty. When this happens to me I wash it in the sink.

Warm water, and put a little dish soap on your hand (remove any rings!) and gently rub the CD back and forth (never round and round) until all the soap is gone. Dry with a soft towel (not paper towels) and try the CD again.

You could also examine the surface for scratches. If you find any, you could try the toothpaste method for buffing out the scratch (google it for details).

Failing that you may have to find a friend who can rip it for you. Some optical drives just have a problem with some CDs and DVDs. Sometimes I have to use another Mac or even an old PC to rip recalcitrant optical media.


No SSH connection possible over Wi-Fi I have a MacBook Pro from 2014 running macOS Mojave. I cannot SSH into a remote server, use git over SSH or use the Mac App Store while connected to my Wi-Fi at home. Some of my mail accounts seem to have a problem, others work.

There is no problem with other devices, there is no problem if I am connected over Ethernet, there is no problem if I am connected via a different Wi-Fi, there is no problem if I use my university VPN via Wi-Fi, and there is no problem if I am running Ubuntu via USB.

The problem seems to be a specific combination from Home Wi-Fi and my macOS. I don't really want to reinstall my OS, and I don't have a single clue what I can do or try.

DNS-Servers are:

8.8.8.8

and

8.8.4.4

for IPv4, and

2001:4860:4860::8888
2001:4860:4860::8844

for IPv6.

This could be due to network segmentation.

What type of gateway/router are you using?

Is it possible that you are connecting to a guest type network, or that the gateway has a network segmentation feature which is turned on?


Samsung Galaxy 6 sets off Apple Pay on iPhone 6 I have to carry two phones - one Samsung Galaxy 6 and one iPhone 6. Unfortunately, something in the Galaxy sets off the Apple Pay on the iPhone when they're in the same pocket, and it constantly shows the credit card. Normally I wouldn't care, but this accelerates battery drain as the screen is on far more often.

Is there some software way to address this in either device?

Apple Pay works with NFC "Near Field Communication" band at 13.56 Mhz (but in low energy) means it has to be very close to the source to work).

You iPhone gets a interference signal (not intended) from Samsung and it thinks it is near a payment machine and it activates.

Since it is a interference, there is no software that can fix that, it is a hardware issue (shielding).
(BT and WiFi) or keep them apart.

So your choices are, turn off the Apple Pay, turn off the Samsung payment feature, or keep them apart.

Edit: upon closer exam of the "Samsung Galaxy s6" model it shows to have the NFC capability, that would also explain the interference.  (and you may be able to solve the problem by turning the Samsung's payment feature off.)


Apps gone missing after rebooting on jailbroken iPad 4 After school, I was doing research on Canadian Blood Service. I went into pages and than it got stuck. I wait for 3 minutes nothing happened so I hold the lock button and try to shut my iPad down but nothing works, I was listening to music at the same time and the music is still playing. I has to do a hard reset by holding home button and lock button. After the reset I found out that every single app has gone missing except for the Stock apps which comes with the phone, and my jailbreaking app suck as Cydia ifile, IAP Free and etc. I reboot many times but nothing happened. The apps are still taking up the storage but I can't see them in usage not search.
Does anyone have any idea? I urgently needs help.

Thanks. and here's my iPad's info: iPad 4 White Wi-Fi 32 GB, jailbroken with Evasion 7 IOS 7.0.4 system.

Your apps haven't been deleted — it's a Springboard glitch where the apps aren't shown. Try…

Install (or reinstall) a tweak in Cydia, then respring.
Delete /var/mobile/Library/Caches/com.apple.mobile.installation.plist then respring.


Is there a key to trigger the home button on an external iPad keyboard? Is there a keyboard shortcut to trigger pressing the home button on an iPad when using it with an apple (bluetooth) keyboard?

Unfortunately, the answer appears to be no. The Apple iPad Keyboard Dock for the first generation iPad had a physical home button on the keyboard, but successor products compatible with the iPad 2, including the Apple Bluetooth Keyboard have been unable to replicate this feature. Not the answer you're hoping for, I'm sure, but I'm afraid it's the answer, for now. Of course, Apple could change all this with a software update.


How to forceibly shut down a mac? Press the power button and it'll restart and restoring the windows.
Press the power button for so long and it'll sleep. When return it'll restore the whole windows.

What about if I want true restart or shut down?

Press and hold the power button for several seconds and your Mac will power completely off. This should only be required in the most extreme circumstances. Normally, you should shut down your Mac by clicking on  the Apple icon in the upper left corner of the menu bar and selecting Shut Down... from the drop down menu.

Your applications are resuming when you log back in because you're telling OS X to restore their state when you shut down.

When you shut down or log out make sure the Reopen windows when logging back in option in the shut down window is UNCHECKED. Like this:

This will prevent OS X from saving the state of open applications and restoring them when you log back in.

You should also check your log in settings to make certain you aren't starting programs as login options. Open System Preferences and click on the 'Users & Groups' icon. Find your name in the user list and click on it and then click the Login Items tab. Remove any applications you don't want to start on login from this list by selecting the application and clicking the - button at the bottom of the table. Like this:


Supported USB-C Alternate Modes on MacBook Pro (15" 2016 and later) I am curious as to exactly what USB Type-C alternate modes (and variations of those modes) are supported on the 15" 2016 MacBook Pro and later. I've done some searching on the Internet, but I've been unable to find any credible source of information on the subject. I would consider a credible source of information to be:

Official Apple technical documentation explicitly describing all supported USB Type-C alternate modes which are supported on the device. (All I've found so far is marketing info, which isn't specific enough.)
Analysis of USB PD traffic which might indicate supported alternate modes and capabilities.
Some sort of command-line utility or tool which is able to dump this information.

I already know that the USB Type-C ports on this machine support the following alternate mode configurations:

4 lanes using Thunderbolt 3.0.
4 lanes using DisplayPort 1.2.
2 lanes using DisplayPort 1.2 and 2 lanes using USB 3.1.

But I'm pretty sure it supports additional variations.

According to EveryMac,  the model numbers of your specific CPU are i7-6700HQ, i7-6820HQ, or i7-6920HQ, which all have Intel HD Graphics 530. The specs list the resolutions that you can expect to find with DisplayPort and HDMI.
However, in reality you can possibly do better. For example, there are active USB C to HDMI 2.0 cables which allow 4k@60Hz on 2016 MacBook Pros, when the alternate mode was only HDMI 1.4, or 4k@30Hz.
Note that depending on your model you may also have an AMD Radeon Pro 450, 455, or 460 GPU. To find out, in the terminal, the following commands may be helpful.
For model and CPU system_profiler SPHardwareDataType
For GPU system_profiler SPDisplaysDataType
You could also save all of the system profiler information to a plain text file, and go through that with a text editor. Note that it can take a few minutes, and the file could be 5MB. system_profiler > output.txt
Finally, before choosing a monitor, cable or adapter it can be very useful to search through the reviews and customer questions for your model. That's the only way that I found out a 2016 MacBook Pro can output full resolution and refresh rates to HDMI 2.0 monitors.


Problem downloading iPhone/iOS upgrade, iTunes complains: "You do not have enough access privileges for this operation" When trying to upgrade my iPhone running iOS 4.1 to 4.2, iTunes displays the error message saying:

  There was a problem downloading the software for the iPhone "[Username]'s iPhone". You do not have enough access privileges for this operation.

I kept trying the upgrade process repeatedly, but with no luck. Everything else, including app and music downloads, works fine. I'm running iTunes 10 on MacOS 10.6. What do I do?

I found a fix on the Apple Discussions board:

Go to ~/Library/ (i.e. open your home directory, then select the Library folder)
Get Info (click File -> Get Info or type ⌘I)
If possible, make sure the lock at the bottom right corner of the Get Info window is unlocked
Make sure the Sharing & Permissions: section is visible
Where it says "Username (me)" make sure the privilege is set to Read & Write
In the little tool/wheel pulldown right below, select Apply to enclosed items (say yes, if it asks you if you know it can't be undone)
Try the upgrade again

This worked for me. Hope it helps!


Can I use my Macbook Pro Retina as a monitor for PS3? I want to connect my PlayStation3 to my Retina Macbook Pro so that I can play my games using the MBP's display, is it possible to do it with HDMI port or something else?

No, the video ports (HDMI and Thunderbolt) are output only. The MacBooks aren't designed to function as monitors.

You could try getting a video capture device that supports live viewing, but the performance and quality are likely to be far from optimal—such solutions are designed for recording video, not live playback or gaming.


Default System Sound Location I'm looking for some of the sounds that come default on OS X, like the preferences lock/unlock:

I basically just want to copy the sound files onto my desktop.

All sounds are .aiff and you'll find many by going to:

Mcintosh HD>system>library>components>

Then right click on CoreAudio.component and click 'show package contents'

Then go into Contents>Resources>SystemSounds>finder>

Note that this is different in El Capitan but is what I used in several OS's before, ie: Yosemite, Maverick, etc


Relative Wifi performance: iPhone 5 and iPad I noticed that my iPhone's Wifi performance sometimes lagged and so I did an experiment. From exactly the same place in my living room, within seconds of each other, my iPad showed around 6Mb down and my iPhone 5 showed less than half that, around 2.5Mb.

Can someone suggest why they think this might be?

Not knowing what iPad you have, it likely has a different CPU and Wireless chipset. It also could have differing RAM and workloads - although they usually are not a blocking or even major factor in download tests.


How to configure mobile Safari to show closed captions on videos in webpage I have a closed caption video embedded from YouTube on my website that will show the captions when viewing in Safari on a desktop computer. When I view the web page in Safari on iPhone 6, the captions do not show.

I have clicked the little icon in the bottom right of bottom grey bar for "Subtitles and CC" and have it set to "English".

I have set my iPhone settings > General > Accessibility > Media > Subtitles & Captioning to on and default type.

Clicking the video and viewing it with the YouTUBE app on my iPhone will show the captions but I would also like them to show when viewing from the webpage directly.

Not sure if this is an iPhone issue, Safari issue, YouTube issue or if it requires a simple edit to the iframe/embed code on my webpage.

I do have "&cc_load_policy=1" as part of my src tag.

iOS/Safari and iOS/Chrome also do NOT show closed captions for video-js videos on webpage either.

Anyone out there run into this?

First you need to understand that there are a couple of ways that Closed Captioning can be added to a video. If you are looking at iOS specifically, then the video must conform to the CEA-608 encoding standard, and needs to be either a HTTP Live Stream (HLS) or MP4 video. Other video formats WON’T work on iOS as an embedded video if you need CC playback.

If the video meets one of those to standards, then it’s about the playback setting that are set for the HTML5 web page.

If you are looking to embed a YouTube video on your page. You need to verify that the video has an existing Closed Caption track (not one of the on the fly automatically translated ones).

Below is an example of a web page that should play back a movie trailer for “The Martian” that has had a Closed Caption track created for it.

I have verified this page works on my desktop Mac with Safari and Chrome, a Windows 7 laptop with Chrome, an iPhone 6 with iOS 9.2, and an iPad Air with iOS 8.4.1.

<!DOCTYPE html>

The key code bit for YouTube videos is the &cc_load_policy=1 you already have found.

But if the video you have linked to does not meet the original video specs, then you will never see CC text in iOS. The native YouTube player will play back videos not in the CAE-608 standard, but iOS through a web player will not.

If you need to do this for your own videos, then you need to make sure your encode creates a CEA-608 embedded CC track.

I hope this helps.


Quarter circle with self-filling edge when mouse pointer is near the corner in Big Sur I am new to Big Sur. While setting it up, I noticed a feature I had not seen before. Whenever the cursor got close to one of the four corners of the screen, a quarter-circle-like shape appeared adjusted to the specific corner and the edge of the quarter circle was gradually being filled up with color.
In the meantime, I have changed a lot of settings in Big Sur and I can no longer reproduce this phenomenon. As a result, I cannot post a screenshot/video and must rely on the verbal description above. If this description sounds familiar to anyone, I would be grateful for the identification of this feature. The closest match I could find is hot corners, but this quarter-circle thing definitely seems to be a distinct feature.

I figured it out. When you select Show Keyboard Viewer within the keyboard input menu in the menu bar, it automatically enables Accessibility Keyboard, in the same way as though you had checked Enable Accessibility Keyboard in System Preferences > Accessibility > Keyboard > Accessibility Keyboard.
Now, this feature has its own hot-corner functionality (the default setting is Hide / Show Home Panel in all four corners), but it only gets activated if the cursor keeps touching (or “dwelling on”) one of the corners for 1–2 seconds. After this delay, the keyboard viewer is hidden or shown once again. It is during this short delay that the quarter circle appears and its white edge gets gradually filled up with gray—see the picture below.


Time Capsule beeping on disk access My 2 TB, 3rd generation Time Capsule just started making a beep-like noise today. I bought it about 30 months ago.

It beeps only when I do some disk access, e.g. when I access the filesystem remotely. Using it as a wifi router does not make it do any noises.

What should it be?

Edit: after 2 weeks with my Time Capsule beeping on every disk access, suddendly after a restart it just stoped. I restarted it before, but it had no effect, I have no ideia why it worked this last time.

I believe some hard drives that are SMART enabled (all drives Apple use are) will beep when they detect the SMART status is failing. Perhaps open Airport Utility to check the health of the drive. I would suggest copying any data off the drive now before it fails.


Use caffeinate to prevent sleep on lid close on battery The native caffeinate utility is not working to prevent my macbook from sleeping when I close the display.  Instead, the system sleeps and various network services ( VPN, screenshares, VOIP calls, messaging clients, file transfers ) to fail while I walk from my desk to my meeting in < 5 minutes.

Walking around with the laptop lid half open makes it difficult to safely carry with my coffee, and is distinctly uncool.

The native caffeinate utility is designed to handle this as a user-friendly replacement for pmset, but appears to be designed not to work when disconnected from AC power.

Docs via man caffeinate

  -s Create an assertion to prevent the system from sleeping. This assertion is valid only when system is running on AC power.

Looking for a native alternative to InsomniaX or nosleep.

A timeout feature is essential so that I avoid accidentally stuffing my undead macbook into a bag, resulting in a hot mess.  ( caffeinate -t, specifies the timeout value in seconds )

It's not ideal, but here's a solution. To prevent the laptop from sleeping when the lid is closed and you're running on battery, run the following commands:

sudo pmset -b sleep 0; sudo pmset -b disablesleep 1

To re-enable laptop sleeping when the lid is closed and you're running on battery, run the following commands:

sudo pmset -b sleep 5; sudo pmset -b disablesleep 0

The "5" in the second set of commands represents the number of minutes before sleeping when on battery; adjust as desired for your laptop.

This is a bit dangerous, since if you forget to re-enable your settings, the laptop will never sleep when on battery. Because of this, I've written a shell script to automatically re-enable the settings:

#!/bin/bash
#***************************************************************************
#*** noz - prevent laptop from sleeping when lid is closed
#***************************************************************************

#***** set some defaults *****
BATTERY_SLEEP=5 # in minutes
DEF_WAKE_LEN=300 # in seconds

#***** determine timeout value *****
timeout_len=${1:-$DEF_WAKE_LEN}

function prevent_sleep() {
    echo
    echo -n "Preventing sleep for $timeout_len seconds; press <enter> to continue..."

    sudo pmset -b disablesleep 1
    sudo pmset -b sleep 0
}

function enable_sleep() {
    # $1: <enter> = 0, timeout = 1, Ctrl-C = undef

    #----- insert a newline for timeout or Ctrl-C -----
    if [[ ${1:-1} -eq 1 ]]; then    echo; fi
    echo "Restoring previous battery sleep setting: $BATTERY_SLEEP"

    sudo pmset -b disablesleep 0
    sudo pmset -b sleep $BATTERY_SLEEP

    #----- sleep on timeout only -----
    if [[ ${1:--1} -eq 1 ]]; then   sudo pmset sleepnow; fi
    exit
}

#***** prevent it from sleeping *****
prevent_sleep

#***** trap Ctrl-C *****
trap enable_sleep INT

#***** wait for an enter *****
read -t $timeout_len
rc=$?

#***** re-enable normal sleep *****
enable_sleep $rc

The shell script will disable sleeping until you hit the Enter key, at which point it will re-enable the sleep settings (alternately, you can hit Ctrl-C and achieve the same thing). It will also set a timeout (defaults to 300 seconds/5 minutes) after which the sleep settings will automatically be re-enabled, and the laptop will be forced to go to sleep. While this would be a pain if you're using your laptop in a meeting, it will be a lifesaver if you forgot and put your laptop in your bag to go home.

Astute readers will note that these commands require sudo; sadly, that's unavoidable AFAIK. What I've done on my system is to make it so that I don't have to enter my password to run pmset as root. To do that, edit the sudoers file (sudo visudo) and add this line:

joe ALL=(ALL) NOPASSWD: /usr/bin/pmset

replacing "joe" with your username. You could probably achieve the same result (i.e. running the script without having to enter your password) by running the shell script SETUID, but I don't like doing that; opening up this one command via sudoers seems less risky to me.

To run the script, stick it in a directory on your PATH and invoke it as such:

noz [<timeout in seconds>]

When you get to where you're going, simply hit Enter or Ctrl-C and you're good to go. And if you forget about it, it will automatically reset and sleep.

There's probably a way to achieve all of this via AppleScript, so that you can then assign it a hot key and what not; I'll try that if I ever get tired of running this from the command line.


Applescript date conversion I used to have a AppleScript snippet which convert my date to this format : 08/25/2017 (MM/DD/YY)
The source date format changed and I don't managed to make it work

e.g :

set creationDate to "2013-04-03"

set [M, ordinal, Y] to the words of creationDate

set the text item delimiters to {"st", "nd", "rd", "th"}
set cardinal to (first text item of ordinal) --> "2"
set cardinal to text -1 thru -2 of ("0" & cardinal) --> "02"

set the text item delimiters to space
set date_string to {M, cardinal, Y} as text

-- date -j -f '%B %d %Y' 'June 02 2012' +'%d/%m/%Y'
set command to {¬
    "date -j -f '%B %d %Y'", ¬
    quoted form of the date_string, ¬
    "+'%d/%m/%Y'"}

The creation date is an example but it's taken from a webpage and it's not fix.

here the result I received

  {"date -j -f '%B %d %Y'", "'2013 04 03'", "+'%d/%m/%Y'"}

If your example is in the order year, day, month and you want MM/DD/YYYY then this code does the job

set creationDate to "2013-04-03"
set [Y, ordinal, M] to the words of creationDate
set the text item delimiters to "/"
set date_string to {M, ordinal, Y} as text

What you are attempting to do with the date command is unclear.


FireFox version of Safari "text only"? I find the "text only" option in Safari - you know, those lines to the left of the URL bar - extremely useful on my iPhone and iPad. However on my Windows laptop for work, I use FireFox and would really, really like that feature. I know I could use third-party apps like Pocket and the like but frankly I would like something "built-in" which doesn't require bloatware.

On a side-note, does this feature have a particular name?

Firefox has no built-in reader feature. But you can install an extension to add this feature : Reader for Firefox


MacBook Pro "Core i5" 2.7 13" Early 2015 upgrade factory SSD with Intel 600p? I researched this all over and it appears that the Intel 600p is the correct form factor/spec SSD, but I can't find any references to anybody using it to upgrade one of these MBPs.  The only drives I can find people linking to are the OWC Aura drives, which I've had heat issues with (on another laptop), and had 3 Aura drives fail that I had to RMA.  So, I'm trying not to use OWC.

The only other topic on this site about this upgrade is pretty outdated and before the Intel 600p was available, so I'm trying to find recent info...

Thanks!

I've seen that both MCE and Transcend make drives to upgrade MacBook Pro/Air with PCIe SSDs. Here are links to the options, which are cheaper than OWC:

MCE - http://store.mcetech.com/mm/merchant.mvc?
Transcend - https://us.transcend-info.com/apple/jetdrive/


Can I connect 3 screens to my iMac? I am trying to connect iMac to 2 other monitors as well as my TV. That is a total of 4 displays.
HERE IS MY PLAN!!!-(I'm not rich)
I have a 21.5 inch iMac that has one thunderbolt port but can also be used as a mini-dvi port. I want to connect that to a Cirago HDX3DP01 HydraDisplay X3 DP to 3 DP Multimonitor Adapter
This in theory will allow me to connect to 2 monitors with an open slot for my TV.  I do question the resolution output. The HydraDisplay supports up to 3840 x 1024 (3x 1280x1024). I'm not sure what that means. Which resolution is it? I know that the 21.5-inch iMac has a native resolution of 1920 by 1080 pixels, while the 27-inch iMacs are 2560 by 1440 pixels. This means at top resolution of the HydraDisplay is cannot support the native resolution of the IMac 21.5 nor the 27-inch. Will this matter when mirroring or sharing the screens as one? (disregarding the TV)
So, I have several questions:
1. Will this work?
2. Is resolution a big deal when sharing screens?
3. Has anyone ever tried this or have a better way of doing it besides expensive thunderbolt?

From the link I can only find the interface used is DisplayPort (not Mini Display Port or DVI) which to my knowledge are different standards which means item 1) would not work

For item 2) what is the purpose of having multiple displays? Are you repurposing extra displays or actually have an alternate need?

For item 3) I use a USB display monitor which allows me to connect multiple additional screens trough different USB ports in addition to my standard display out.


Destroyed user account on OS X with dscl; how to restore? I was trying to create a new user on my OS X Lion machine, and somehow managed to destroy my own user's account. Here are the steps I took; hopefully someone here can recognize what I did, and maybe identify some way around this.

First, I ran these commands:

sudo dscl localhost -create /Local/Default/Users/elasticsearch
sudo dscl localhost -create /Local/Default/Users/elasticsearch /bin/bash # mistake!
sudo dscl localhost -create /Local/Default/Users/elasticsearch UserShell /bin/bash
sudo dscl localhost -create /Local/Default/Users/elasticsearch RealName "Elastic Search"
sudo dscl localhost -create /Local/Default/Users/elasticsearch UniqueID 503 # MY uniqueID
sudo dscl localhost -create /Local/Default/Users/elasticsearch PrimaryGroupID 1000
sudo dscl localhost -create /Local/Default/Users/elasticsearch NFSHomeDirectory /Local/Users/elasticsearch

The big mistake I made here was using "503", which was my user's UniqueID. Immediately my shell username changed to "elasticsearch". I fiddled around, tried to change the current user with sudo su -u sritchie, but this didn't work.

On restart, only the "Elastic Search" user was available. I logged into the Lion Recovery partition and reset the root password.

After logging in as root and checking on the terminal, I made the remarkable discovery that my home folder was totally empty. I deleted the elasticsearch user, but it made no difference. I don't see anything in Deleted Users either.

The odd thing is that when I log in now as myself (sritchie) I can see desktop icons with previews. I can even open a few text files from the Downloads folder if I use the dock alias to Downloads.

Could this data be hiding somewhere? Any help would be REALLY appreciated!

Thanks,
Sam

I hope you took a backup of your machine before the sudo command that deleted your account was run. If you have a (Time Machine) backup, you should be able to restore your deleted account & files to a point in time before the deletion occurred. Otherwise, you're probably out of luck.