Could trying to disable WindowsServer.plist break my iMac it will no longer start? Forgive the long story, but I have a mix of old knowledge and unfamiliarity with Mac so I don't know what might be relevant. The tldr version is my iMac won't boot.

Trying to put op an upnp server: Windows Server on my Leopard Imac I found afterwards that the service planted itself. Trying to quit the process, immediately triggered a sort of reboot screen, and the OS responded, but still the service was not quitted.

I tried (I'm a former Win user, and not acquianted with unix - I picked up the command from a forum) with a sudo launchcntl -w to disable the service.
By doing this, the mac spinning wheel appeared and nothing responded anymore.

I powered down the Imac. When trying to restart the boot reached the gray apple logo screen with the spinning wheel still there, as if it was still trying to disable WindowsServer. The keyboard locked immediately and caps light on.

Tried SMC reset, pram reset. As the keyboard was locked each time I tried, no luck. Now, the power button only responds when I first detach the power chord, and reattach it. Inserting the 1st install disk trying to boot from it and run diagnostics didn't work. Always the same screen with the spinning wheel, no keyboard response. DVD is even locked, and cannot eject it anymore.

Safe boot of course doesn't work as not one keyboard is accepted.

So, I'm dead locked on all sides. Must admit that windows still gave you a chance to boot. This mac is dead on a service disablement process.
The damn keyboard locks, so I have no control. I whished there was a reset button like on the TC.

What to do ? I have no idea. Backup is not available on Time Machine.

Does this need hardware repair or does someone have any ideas.

This is a bit of a mess - but you could do one test to isolate the hardware from the software (and some of the hardware).

Power off the Mac and pull the power cord. Disconnect everything you can - keyboard, mouse, etc... Take out all RAM - the manuals are at http://support.apple.com/manuals if you are not familiar with the safety precautions and tools needed.

Then plug in only the power cord and wait a few seconds. If the Mac doesn't start up, press the power button once.

You should get three beeps if the machine is healthy.
Power it off and put the RAM back in - be sure it's seated well / pushed in completely.
Connect only the mouse and power it on holding the mouse button down (button one if there are several).
The CD should come out if the hardware is healthy.
Shut it down (you can use the mouse or connect a keyboard if needed).
Now power on with the shift key held.

At this point, if your Mac booted, it's likely everything is fine and you can use Apple's support to troubleshoot the startup issue. If anything doesn't go like I mentioned - you should take a printout of this and what your results were and post here, or seek hardware help.


Change user password by providing new password as hash in a script Currently working on a deployment of a large number of Mac's, on which I want to set the password for an administrator account without putting the password plain-text in the script. Is there some way to provide a hash of the password to dscl/passwd?

yes you can change the password by providing a hash to a script.  This works for 10.7 and later (up to at least 10.9.1).

You need the hash you want to set it to.  The easiest way to do this is create an account with the password you want and read the hash. The hash is stored in /var/db/dslocal/nodes/Default/users/[username].plist in the ShadowHashData field
Create the user the standard way (using dscl) but don't set the password using dscl instead use the defaults command.

Example for user called 'lana':

#!/bin/bash

#hash to set obtained from:
#defaults read /var/db/dslocal/nodes/Default/users/lana.plist ShadowHashData
pw_hash='(<10145341 4c544544 ...really long...2d534841>)'

#needs to be unique
$uid=510

#gid of an existing group
$gid=510

dscl . -create /Users/lana
dscl . -create /Users/lana UserShell /bin/bash
dscl . -create /Users/lana RealName "Lana May"
dscl . -create /Users/lana UniqueID $uid
dscl . -create /Users/lana PrimaryGroupID $gid
dscl . -create /Users/lana NFSHomeDirectory /Users/lana
dscl . -merge /Groups/admin GroupMembership lana
defaults write "/var/db/dslocal/nodes/Default/users/lana.plist" ShadowHashData "$pw_hash"


Activation lock when I'm the only owner that my iPhone ever had, asking for my AppleID iPhone 5C, iOS 9. Was bought in the Apple Store and activated by me with my Apple ID a few years ago.

Today, on 10:00 pm, when I was riding a subway train, connected to its free wi-fi, black screen with white apple appeared suddenly, when I was browsing, as if it was rebooting. It glitches like that sometimes, very rare and not very long (unlike the real reboot). But this time after the logo there was something different - on the lock screen in the notification area, there was the text "Activation required" with an icon of a circled exclamation point.

After swiping the screen, the system said that this iPhone is linked to the Apple ID, and offered me to enter my Apple ID and password, the ones that "were used to set up this iPhone". It also was showing my email with some hidden symbols. The screen was titled "Activation lock". It looked similar to this, but with my email dotted: https://phoneunlockingshopca.files.wordpress.com/2015/08/official-bypass-icloud-activation-lock-remove-icloud-account.png

I successfully logged in, and then there was an iMessage alert: "Your carrier may charge for SMS messages used to activate iMessage", as if it was the first setup. But all my data remained in place.

Then I went to https://www.icloud.com/activationlock/ and it said that my activation lock was on. And didn't say how exactly to turn it off. How to bring it back to normal?

When I google about the activation lock, everything seems to be about "previous owners" cases. But there were no previous owners, and I am able to unlock my phone for now. And no cases like mine in the search results.

I'm interested, what could have triggered it? What data could have been compromised? I remind you that there were no messages about lost mode or erased iPhone, no scammer messages asking for money for the unlock, nothing like that. But still, it's pretty creepy. My email's and Apple ID's passwords are different and pretty secure, I have 2-factor auth on them too. Also, when Pokemon Go came out, I created second Apple ID to download, but surely didn't log in back to that account for weeks, just used my main one as always. And never had any other Apple IDs on my iPhone.

What a person should do to trigger what I experienced today? What data did he need to know? And can a free wi-fi network be a factor? And what about the time, as if it was scheduled? Or was it an iPhone glitch without any third party involved?

What can I do to secure my phone and accounts besides changing passwords?

Activation lock being on is a good thing; it means that your device cannot be activated on a different account or carrier until it's disabled, usually at the time you sell or otherwise dispose of your device.

I'm not sure what would cause it to randomly pop up like it did - the first (and really only) thing that comes to mind is your carrier making some adjustments on their end that caused your phone to need to be reactivated, but as you saw, no data is lost during this type of activation. It's also possible that something was corrupted on the device that required reactivation with the carrier to resolve. You would also see this screen if you put in a new SIM card.

You should change your password for your Apple ID to be on the safe side, but it's unlikely that any third-party, aside from your carrier, was involved in this incident.


Does the firmware impact how / if the Hard drive will function (Mac OS X 10.6)? I am going to be replacing the Hard drive in my Mid 2010 Mac Book Pro (Snow Leopard 10.6.8) and I noticed that on the box the Hard drive claims to support Mountain Lion or Higher. I am wondering if this is just placed there for convenience (claiming to support highest firmware since most people will have it) or if this means that it will not run with OS X 10.6.8?

HD model: WD WDBMYH0010BNC

Does the firmware impact how / if the Hard drive will function?

For the Model WD WDBMYH0010BNC

I found multiple places that claim it will work on 10.6.8.

http://www.amazon.com/Western-Digital-2-5-Inch-Mainstream-WDBMYH0010BNC-NRSN/dp/B00D901NX6

http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=8433785


Removing smart card login from my Mac I've seen a lot of questions about adding a smart card login to a Mac, but my problem is the opposite.

I have a company smart card that I use on my personal computer sometimes for checking webmail and such. However, at some point I must have done some Keychain stuff with it inserted into the USB reader, because ever since it requires me to insert the smart card and enter its pin in order to unlock my lock screen or to approve software installs and updates.

Note: I can Switch Users and login normally to those accounts.

I don't want to mess up my keychain, so I'm hoping someone can tell me what I need to do to bring things back to normal so I can manage my personal computer with just my personal credentials.

Use sc_auth unpair …

This worked for me:

/usr/sbin/sc_auth unpair -u [username]

The sc_auth command…

  sc_auth configures a local user account to permit authentication using a supported smart card.  Authentication is via asymmetric key (also known as public-key) encryption.  sc_auth works with signing keys, but not encryption keys.

…with the option unpair:

  unpair   Remove association with a user and keychain. If no specific hash is provided, all associations with a user are removed.


Messages wont open: the Messages database is being updated Recently on my new macbook when I try to open up the messages app it won't let me open it and gives me the error:

Messages is updating...

The Messages database is being upgraded, please wait while it finishes or Quit Messages and relaunch it later.

And no matter what I do it won't go away and work.

I have tried to copy over the messages folder in Library from another computer but it didn't help at all. this is really starting to bug me and I would appreciate any help towards fixing this issue.

My macbook is running the latest version of Yosemite and is the 2014 edition

I've been getting the same thing on and off for a long time now. I wait for any period of time and still get the same, most always a reboot of the system makes it work again...frustrating!

I'm running El Capitan 10.11.3


Why did deadbeefdeadbeef become deadbeeedeadbeef? My computer had a sudden shutdown today, and part of the associated report is found below:

  ** Panic Report *** panic(cpu 4 caller 0xffffff800a4bade0): "a freed zone element has been modified in zone kalloc.256: expected
  0xdeadbeefdeadbeef but found 0xdeadbeeedeadbeef, bits changed
  0x100000000, at offset 120 of 256 in element 0xffffff805d4c7d00,
  cookies 0x3f00113ca62d16fc

Originally I thought maybe this was a virus of some kind, since the number deadbeefdeadbeef looked like it wasn't a random memory address.  I Googled the term deadbeef and found that it's a standard magic number.

My question is, what could have caused such a memory corruption as this?

The error message you have got is directly from the operating system kernel - warning of unexpected memory corruption. This is obviously not supposed to happen. 0xdeadbeef is indeed a common "magic number", but it appears here for a very specific reason.

Specifically this error messages comes from zalloc (a zone-based memory allocator) within the kernel. The kernel is the part of the operating system that is run in "privileged mode", meaning roughly that it has full access to the computer. Your own applications are run in a limited mode that gives it less access to the computer. As part of its functioning the kernel uses RAM memory to store and process information. In order to keep track of which parts of RAM is actually used the kernel uses many different allocators. The zone-based memory allocator is special in that it is used by the kernel itself only (i.e. not for applications) and that it allocates only RAM blocks of specific, fixed sizes. For example it might allocate blocks of 256, 512 and 1024 bytes - but it won't allocate a block of 300 bytes. This is done to make the allocator simpler and thus faster.

The cookie part of the error message refers to a security related feature, where pointers (memory addresses) in the kernel are "poisoned" by combining (with XOR) them with a cookie. The cookie is simply a random number picked when you boot your computer. This ensures that these memory addresses seem random, and are not predictable by virus/malware that exploit bugs to get access to privileged resources.

One specific functionality of the zone based allocator is that when the kernel frees the memory (i.e. states that it no longer has use for an allocated piece of memory), it doesn't just note that it is free for other use - but it also overwrites the memory pointer with the magic number 0xdeadbeef. This serves two purposes: (1) if the kernel erroneously use the memory after it has freed it, following the pointer wouldn't "happen to work" or "happen to point to other data which will be corrupted" - but rather trigger a system error interrupt as the address 0xdeadbeef is mapped to ensure that happens, (2) if the allocator later is asked for a new allocations and wants to hand out the same block again, it can detect if it was changed, meaning that there's a bug or hardware error somewhere.

In your case the error message indicates that (2) happened - so something altered some of the RAM in your computer that the kernel thought was marked as not in use. The cause of such a memory corruption is most often either a kernel bug, third party kernel extension bug or hardware error.

If the problem is a kernel bug, you probably have no way to fix this except to either wait for a new update from Apple, or downgrade to an earlier version of macOS. If this happens once in a blue moon, then just wait for the next update. If it happens frequently, you can try to figure out exactly what you did to trigger the bug, and avoid doing that in the future - or downgrade to an earlier version of macOS that hasn't got the bug.

If the problem is a third party kernel extension bug, I would check for updates to all of the kernel extensions you have installed. Kernel extensions are usually installed as drivers for third party hardware, or for special applications that change the way the system works at a low level. This could be for example virtualization software (such as VMware) or software such as Little Snitch or similar. It is always a good idea to disconnect any third party hardware and not start up such low-level applications and check if the bug disappears - then reconnect one thing at a time until you have the problem.

If the problem is hardware error, you really have no choice but to get the hardware replaced. Usually errors like this are caused by defective RAM modules. It could also be a thermal or logic board problem, but it is not usually the case. Use the Apple Hardware Test to check if your RAM modules have errors.

In the extreme case this error could be caused by a virus, but I would definitely look for other reasons first. A virus or malware usually tries to keep its existence hidden, so it wouldn't be triggering error messages such as these (and causing system lockups). However it is possibly that a bug in a virus triggers this error messages, similar to bugs in non-malicious kernel extensions.


How to enable iCloud on broken iPod My iPod Touch turned off last night and after, it never woke up again. Is there any way to turn on iCloud Photo on this iPod by using my Mac? iCloud is working but not for photos, only for notes.

If the device is dead, it's not going to be able to sync anything, even if you could otherwise switch it on remotely.

You can switch on photo sync from System Prefs > iCloud for cloud storage, or use iTunes or import using Photos or Image Capture... but all these methods require the device to still be capable of doing that.


In Pages, What is this Line Under a Rectangle Shape? There is a persistent thing going on in Pages where there is a line under a rectangle shape when I make it. How do I get rid of it? I don't want it to show up when I export the document to a PDF.

Simple.  Make sure you've selected the object you want to remove the line from.  Click your inspector, and navigate over to the graphic tab (see screenshot).  select none.  Last screenshot shows the result.


What is the real working method of making a bootable usb drive? Always when I need to make a bootable usb drive on a mac I struggle, I end up switching to windows because none of the below works for me, I'm using MacBook Pro:

running sudo dd if=Debian.is of=/dev/rdisk2 bs=512k in terminal
using Disk Utility, formatting the usb to have 1 partition, MBR and unmounting the partition, then dragging the iso image onto restore tab
using diskutils for the above

On Windows we have plenty of tools. I always struggle with creating either Ubuntu bootable  usb stick or Windows 7 in the company deployment process.

a) You can use the free and open source Mac Linux USB Loader app to make a bootable USB drive.

OR

b) Follow the instructions for How to create a bootable USB stick on OS X (it has a step to convert ISO files to IMG before writing it to the USB drive).


What apple device takes photos with a resolution of 2250px x 3000px? I'm trying to figure out what kind of mobile apple device took a certain photo that was sent to me, and I'm hoping you guys can help.  The dimensions of the photo are 2250px x 3000px.

Thanks!

i think the photo was cropped because that image is 6.75 megabytes and i don't know of an Apple device with a 6.75 megapixel camera. The small camera on the new ipad pros are 2320 x 3088. it cold easily be a slightly cropped image from an ipad pro.

The main Camera on the ipad pro is about 12 megapixels or 4032 X 3024 = 12.192768 Megapixels. This could also easily be cropped to your size.

I don't know what sizes the newer iPhone cameras are but your probably looking foe a 7-meg camera or larger.


AppleScript for Dropbox on External HD Disclaimer: I don't know much AppleScript, but I am a bit of a programmer, so you can go a little technical on me.

I am looking for a solution to the issue of putting Dropbox on an external HD.  While they don't advise it, I think that it can be done safely with a couple measures:

Run Dropbox when the hard drive is mounted through AppleScript.  This shouldn't be hard because I read that there is StartOnMount or I can listen for the hard drive's "folder" in /Volumes like here.
Stop Dropbox when the hard drive is ejected, wherein lies the problem.  Is there an event triggered by pushing the eject button that would allow me to run a script before un-mounting?

Either I use the above method or I somehow disable the drive from being unmounted by Mac OS X and mount and un-mount only through AppleScripts (hide it from the Finder's sidebar or, preferably, something better).  Which of those is the easier solution?

I use to have multiple dropbox instances running at once. I think you can put db  app on the drive and use the same trick I did.

HOME=/Volumes/Whereever/you/wanna/go; /Volumes/Whereever/Dropbox.app/Contents/MacOS/Dropbox &

One thing. With this method you change your default $HOME into your new path. So Dropbox will create a folder called Dropbox in that path.


2 iPads, same iCloud account, but contacts lists are different! As the title suggests, my 2 iPads have the same login, the same iCloud backup, but the contacts list on both is different.

Is there a way I can merge the two so they're synced?

My old iPad has most of the contacts I want, the new one has newer ones which weren't in the old one, so don't really want to lose either set!

Are both iPads synchronized to the same email accounts?  FOr example, my iPhone only Gmail access but my iPad Pro has access to multiple Gmail and Hotmail accounts.  This could account for the variation.  The only way I know to fix mismatched contact lists is to either export one and merge it into the other one.  I'm not sure how easily this would be on an iPad, but if you can send them both to a Gmail account, Gmail has the ability to detect/merge duplicates, etc.


Graphs of mail messages over time I'd like to be able to track information relating to how I use email. I'm basically after a better way to visualise when my inbox is going out of control, and I'd historically like to know how much email I deal with.

At the moment I have a spreadsheet with daily tallies of ‘messages in inbox’, ‘total for today’, ‘trashed today’, etc., that I often forget to update since it's a manual process.

I've attempted to AppleScript mail in the past but generally have found it's flaky trying to deal with smart mailboxes. (Haven't tried using accessibility scripting, though.) E.g., something like this (assuming I have a smart mailbox called "Unread"), doesn't work:

tell application "Mail" to get every mailbox whose name is "Unread"

Is anyone aware of software, or know a workable technique, for tracking mail behaviour over time? The more automated the better of course. TL;DR version: How can I get the number of messages in a smart mailbox?

I am looking for this also. This answer claims: "AppleScript doesn't offer any means of getting a list of replies to a message. My workaround is to get the message id of the message being replied to and search it in the sent messages."

TimeToReply.com also provides a similar service, but they have locked out new users pending product updates (unfortunately, they are moving from a cloud service to client plugin model).


Apple’s podcast app will share statistics/analytics with creators and advertisers - how to opt-out (protect privacy)? I use on AppleTV and iOS the podcast app weekly. In headlines there were sad news about privacy Apple is going to let podcast creators — and advertisers — see what listeners actually like:

  A new version of Apple’s podcast app will provide basic analytics to
  podcast creators, giving them the ability to see when podcast
  listeners play individual episodes, and — crucially — what part of
  individual episodes they listen to, which parts they skip over and
  when they bail out of an episode.

  The reason all of that is important is that up until now, Apple has
  provided almost no data at all about podcast listening behavior — just
  the fact that someone has downloaded an individual episode.

How to opt-out of the data collection? Is there no other way than change Podcast client?

This only affects iOS11 which is currently in beta (actually, only beta 2 has been released at this time).

We don't know if Apple will allow users to opt-out of this type of info-sharing with podcasters in the final shipping version of the OS.

The answer, for now, is no, you can't opt-out of this info sharing.  When the final version is shipped, this answer should be updated.


Photos & Reducing Clutter on macOS High Sierra I’m using macOS High Sierra. Recently I started to shoot movies and use FCPX to edit etcetera. My question is when going to About this Mac > Storage > Manage > Reduce Clutter> Review Files > Large Files… Much to my frustration I find oodles of QuickTime movie files. I’d like to delete them and regain the almost 300 GB of storage that’s being used up. But I’m worried they would no longer be stored in my Photos application (where I imported or dragged and dropped everything I’ve filmed). Why do they end up saved in that documents file and is it safe to delete them. A related question, when I delete downloads, if I’ve saved them in photos or in pages, will those be gone from those places or will they remain?

This largely depends on how you have photos imported to the Photos app. Photos > Preferences has an Importing checkbox. If this checkbox was ever disabled when you imported photos, you may not have all photos in the library itself and may exist in other places on your computer.

If you are not using iCloud Photo Library, consider selecting the image or movie in Photos, and using File > Show Referenced File in Finder. This will allow you to see exactly where the file lives.

You could export all your movie files from Photos and move them to a different hard drive or cloud storage solution, or delete the movies in Photos and replace them all with the Importing checkbox selected. You should export originals via File > Export > Export Unmodified Original for x Videos.

I also recommend making sure you have good backups via Time Machine or another service. If you make a mistake when deleting files, you can recover files.


Apple ID not working in App Store I've suspected this for a while, but have proven it for myself by keeping an accurate track of my Apple ID and Password, having written them down + kept a log on another system.

I went to the App Store to download the latest macOS Sierra update. While the auto updates worked well, signing into the App Store with my Apple ID did not work.

I successfully logged into https://appleid.apple.com with the same password. I re-checked all my details. I then changed my password in my Apple Account Manager at the above url and re-entered it in the App Store after I shut the App Store down and reopened it. However, it would not let me enter with the new (or old password).

Obviously I am perplexed, frustrated and annoyed by this.

Does anyone have any suggestions on how I can address this?

Just a thought but maybe its signed in already on another account and needs to be signed out first. On the Store menu make sure that you aren't already signed into an account and if so sign out and try signing back in. It may work then again it may not. Just something you could try.


Is there a way to export my highlighted bookmarks in iBooks? I don't see any native functionality to export highlighted notes made from within iBooks

Is there a third-party tool that will allow this?

yes there is, if you have a mac.

Get iExplorer here
http://www.macroplant.com/iexplorer/

plug in your iOS device and use iExplorer to
look in the books file and drag the following files to your desktop.
iBooks.plist  and iBooksData2.plist

and this app
https://github.com/lgoss007/BookmarkExtractor

put the files in the appropriate spot and you can get your highlights


How to remove friend's HomePod from audio selection during phone calls? I do not see it in Bluetooth devices. It is not manageable in the Home app. It's surprising how much of annoyance an extra click to get speakerphone is. Example below (NIST time of day phone number).

These can be removed by rebooting your phone.


How do I change shells (bash to ksh) on OS 10.9.1? I need to brush up on ksh after an 8 year hiatus.  How can I run korn shell in my OS 10.9.1 terminal then switch back to bash when done with tutorials.

The easiest way is to just start Terminal as usual and type ksh to start a Korn shell. If you want to open a new Terminal window for it, type Shift-Cmd-N and run ksh from there.

Depending on how your .profile looks like, you might need to change it as well to identify the shell it's running under and execute initialization commands accordingly.


Can Apple's Notes handle pictures pasted from Clipboard? I was viewing an article and taking random screenshots from interesting parts and pasting them in Notes. Today I open Notes and the pictures are gone, and Notes crashes if I try to select the missing pictures. (Their area is still there taking up space.)

Any idea if this is normal? How can I recover the images?

The answer to your question is yes, sort of. Notes in Mac OS can handle pictures either dragged in or pasted in from the clipboard. I didn't know this would work but just tried it and it worked perfectly.

My Notes syncs with both my iPad and iPhone through iCloud. In iOS the image pasted into a note on my Mac is represented by a paper clip and deleting that paper clip on an iOS device does not seem to delete the picture on Mac OS even after sync, so it doesn't work quite as well as I'd like with iCloud and iOS but works fine with Mac OS.

My guess is this capability is going to be expanded in a future version of notes and this is a place marker.


Stop destroying network performance every time an app scans for wifi networks While trying to debug poor video chat quality, I noticed that certain apps cause periodic ping latency spikes even while pinging my router.

I tracked the problem down to the fact that the apps (e.g. Genymotion, qbittorrent) seem to be scanning for wifi networks every few seconds. (When I turned on debug wifi logging, I kept seeing lines like Info: <airportd[74491]> SCAN request received from pid 76811 (genymotion) with priority 0 that correlated with the latency spikes.)

Is there any way for me to stop this from happening? It basically means I can't run Genymotion and have a video call at the same time because it'll stutter every 10-15 seconds.

Why this happens

It comes from the GUI library Qt that is used in both programs. Several people experienced the same thing and report it:

reddit
bugreports.qt.io (the official bug tracker)

How to solve it for the newest versions of Qt

Set the environment variable QT_BEARER_POLL_TIMEOUT to -1.

QT_BEARER_POLL_TIMEOUT=-1 open -a qbittorrent

The problem also happens on Windows, it is solved similarly:

set QT_BEARER_POLL_TIMEOUT=-1
qbittorrent.exe

References:

news.ycombinator.com
github.com
lostdomain.org

How to solve it for Genymotion

Genymotion currently uses of Qt version 5.4.2 that doesn't support QT_BEARER_POLL_TIMEOUT.

@Ben Kuhn contacted the support and the solution is to launch this command:

rm /Applications/Genymotion.app/Contents/{,MacOS/player.app/Contents}/PlugIns/bearer/libq{corewlan,generic}bearer.dylib


MacOS turn off sync with iPhone for a while Imagine I want to lend my friend my MacBook for an evening when I'm in the same place playing iPhone synced with the MacBook. I don't want him to check/send messages. Is it possible to turn off that functionality for a while?

Create a new user account (or enable the Guest user) on your Mac (System Preferences -> Users and Groups)
Log out of your account
Have your friend log in with the new or the guest account

Using a separate accounts prevents any messages from showing up, it also ensures that nobody will be able to mess with your data.


How do I send calls from numbers not in contacts to voicemail? I'd like to send all of the calls that I receive from numbers that are not in my contacts to voicemail.

Is this possible on ios10?

No, this is not possible with the Phone app included in iOS 10 (nor with any earlier version).


Is it possible to install Windows Vista 64-bit on mid 2010 27" iMac w/ Mavericks? I have a legal copy of Vista which I used to use before I had a drive failure on my mid 2010 27" iMac. Since then I've installed OSX Mavericks, and now it's telling me that only Windows 7 and 8 are supported via Boot Camp.

I tried circumventing this by booting from the Vista disk, but it won't let me install because now OSX uses GPT instead of MBR (or so it seems). I really don't want to have to buy Windows 7 since I only need Windows for a few games. Is there any way around or am I stuck?

You can do it without using Boot Camp, just make this few steps:

Install rEFIt.
Resize your disk so you get some free space for vista.
Create a new partition from that free space.
Boot up your Mac with the Vista install disk inserted.
Install Vista onto the new created partition.

If you need a more detailed How-To/Tutorial/Manual/Assist (or what ever you will call it), have a look here http://lifehacker.com/5531037/how-to-triple-boot-your-mac-with-windows-and-linux-no-boot-camp-required


Multiple Java versions support on OS X and JAVA_HOME location I know is possible to have multiple versions of Java on OS X but i find it difficult to understand how it works.

I upgraded to Mountain Lion and now echo $JAVA_HOME is empty.

However in /System/Library/Frameworks/JavaVM.framework/Versions/

1.4     1.5     1.6     A       CurrentJDK
1.4.2   1.5.0   1.6.0   Current

When I go into 1.4.2 and I execute java - version or ./java -version

  Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)

So why all those versions are used for if they have same version of Java?

Then I downloaded the JDK 7 from Oracle and installed it.

Where a new  JDK is usually installed?

And final question : How can I choose which version should run by default by all applications?

In Win. I set JAVA_HOME to the C:/ProgramFiles/Java/.…
I put in Path : location to JAVA_HOME/bin and that's it.

Preferring a version of Java

Use Java Preferences in the normal way.

Depending on what you have installed in addition to Apple's distribution of Java, the first tab of the utility may appear a little different.

An example, without the familiar options for applets and Java Web Start:

There is some background reading on how this works at the command line level. The command line tool java_home reports back this preference setting.

$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/1.6.0_33-b03-424.jdk/Contents/Home

The /usr/bin/java placeholder app makes use of these settings run the preferred version of Java.

$ which java
/usr/bin/java

$ java -version
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)

Finally when configuring JAVA_HOME in a launch script for Tomcat or Maven you can hook into the preference system:

export JAVA_HOME=`/usr/libexec/java_home`

Answers elsewhere note that Java may be installed at several paths –

/System/Library/Java/JavaVirtualMachines
/Library/Java/JavaVirtualMachines
~/Library/Java/JavaVirtualMachines

– but for what's currently described in the question here, the JDK from Oracle on Mountain Lion, only one path is likely.


What causes chmod to not work on an ssh file in OSX? I am trying to mount private keys from USB stick. OSx does not allow me to change their permissions, why? How can I change them? In other words, how can I add private keys from random USB stick to ssh-agent?

I'll bet your USB stick is formatted as FAT, FAT32 or NTFS. OS X's Unix-style permissions are not compatible with FAT and FAT32 filesystems. Additionally, by default, OS X cannot write to NTFS volumes. Make sure the USB stick is formatted as HFS+.

And finally, the file containing the SSH private key must have permissions set to 600 and the folder containing the file must have permissions set to 700


I have an iPad 2, it is not charging at all. What can I do? I have tried a different charger, Everything I need to say is mentioned in the question.

Could be a simple issue, your charge port maybe full of dust / dirt.
Get a wooden cocktail stick and gently remove the dirt from the charge point, this will allow your charger to hit your iPad's charge connection points.


What are your tips for finding a replacement battery for mac book pro? The battery on my mac book pro (late 2008) running OS X Yosemite needs to be replaced. The battery only holds half capacity. What are your tips for finding a good battery. What battery do you recommend?

Practically all third party batteries for mac are s**t, go to Apple and buy an apple battery. Expensive but worth the money. I am speaking from a hard way of learning...
LS


iMac Safari web browser Just updated iMac 2011 model to High Sierra, when I search website it automatically goes into reading. I then have to click that site on reading list to open page as it doesn't open in the normal window as i would expect.

You need to reset Safari's preferences.

Click on “Safari” located in the menu bar in the top left hand
corner of the screen
Click on “Reset Safari...”
Place a checkmark beside all available options
Press the “Reset” button

If you arent able to reset Safari then you'll have to manually remove some files.

Click on the Hard Drive icon located on the desktop
Browse to “Users > (Users Home) > Library > Safari folder”
Drag every file except “Bookmarks.plist” into the Trash
Browse to “User > (Users Home) > Library > Preferences”
Locate “com.apple.Safari.plist”,
“com.apple.internetconfigpriv.plist” and
“com.apple.internetconfig.plist” and drag them to the trash.
NOTE: If “com.apple.internetconfigpriv.plist” does not exist,
ignore it and just trash the other two files
Restart Safari


Reuse an iMac's fusion drive? I have a 2013 iMac with a broken logic board and display. It's too expensive to repair, but I'd like to salvage the fusion drive. If I put the drive in an external case will it work?

A Fusion Drive is a combination of 2 drives, one Solid State (SSD) and the other a standard Hard Drive (HDD). You can remove the two drives and reuse them in enclosures as 2 separate drives.


Why does Page Down/Up using Fn+Down/Up not work on some applications? I have a Macbook. Fn+Down/Up keys work as Page Down/Up in some applications but not in every application.

Some critical applications that this key binding don't work are Firefox and IntelliJ Idea.

Is there any way to make this key binding work in those applications?

I just tested in my FF ver. 29.0.1 with Fn arrow UP and Down and it works on my MBA 10.9.3

More information on FF shortcuts.

For FF you can also customize the shortcuts.

I do not have the IntelliJ to test.

Some applications use the own keyboard shortcuts and override OS X settings.


Window too large when moved to second display When I move a window from a larger display to a smaller display, sometimes it's so large that the bottom right hand corner is outside the display, meaning that I can't easily resize it.

What can I do about this situation?

Try adding in a Keyboard Shortcut using system preferences. I have mine to execute the Zoom option located under the Window tab at the top of most browsers and applications. I changed the Command + Return + Shift from the default to my new shortcut zoom.

This will resize the window to fit the screen and if a different/smaller screen size is desired, you can easily resize it using the corners from here.

It is actually much easier to resize from this resized/"Zoomed" window because moving your mouse to any of the computer screen's edges will place you directly over the edge of the window allowing you do resize the screen without mis-clicking (example of mis-clicking: causing another window/application to become active or moving the position/orientation of the window altogether).

Just add in the application you want this shortcut to work for under the App Shortcuts option within the "Keyboard" -> "Shortcuts" sections of system preferences.

As long as any part of the top of the window is visible, then the following will work:

Hold down "Shift" while double-clicking then the window's title bar.
This will resize the window to fit your screen.


How do I sync all my apple devices? I have a MacBook Pro, an iPhone (4S) and just recently received my iPad mini through the post. I am wondering how I can sync all of my devices so that every contact, app and music are on all three devices.

So, when I delete a contact from one device it automatically deletes from the others. I have also just set up my iCloud account and wonder if that can handle syncing these three data classes.

 iCloud

— What it does do —

synchronize (only over iTunes bought!) music if specified
synchronize pictures (photo stream)
keeping track of your device-location
backups of your device

— What it doesn't do —

synchronizing application data UNLESS specifically implemented by the app
keeping applications in-sync — this is due to different device classes have different preferred applications. For instance, you usually use different apps on an iPad as you would on an iPhone


Is it possible to access the app data of third party apps that aren't listed under File Sharing in iCloud? I have an iPhone 6 Plus with a large library of photos stored in a somehwhat obscure third party photo frame app. The app imports photos from the photo library and saves its own copies to display in a slideshow. The owner of the device deleted photos from their library after adding them to the photo frame. As a result, the only place these photos are stored is in the app data of this somewhat obscure third party photo frame app.

I am trying to retrieve the original photo files from the app data. The app is backed up on iCloud but doesn't list its app data under File Sharing in iTunes so you can't access the data.

Is there a way to access the files stored in app data? I've already tried this terminal command:

ln -s ~/Library/Mobile\ Documents/ ~/Desktop/Real\ iCloud\ Drive

to show hidden folders in iCloud Drive - this shows some apps and their data but not the photo frame app.

Can I somehow download a copy of the entire iCloud Backup and navigate to them that way?

EDIT: I'm thinking accessing via iCloud because the files are stored there but of course they are also on the device itself so if it's more feasible to do it that way then I would love any suggestions for that too

You could try backing up the iPhone in iTunes and dig into the backup locally to see if the photo files are in the app's backed up data. I work on a tool that can help you dig into the backup files, Decipher Backup Browser: https://deciphertools.com/decipher-backup-browser.html

You could either look through the app's data in all files view, or try the all photos gallery view in DBB. Or if you want to contact me directly about searching around the backup, there's a contact link at the top of all of our pages.


How to change folder view in Finder Is it possible to change the way folder content is organised to show in vertical columns?

When viewing content by icon macOS Sierra seems to automatically sort in vertical rows from left to right. There don't seem to any options to change this in 'View Options'. Organising content vertically seems particularly confusing when viewing larger number of files.

current:
desired:

The only way I currently know how to do this is to change the icons so that they are bigger. You will not, however, get the files in two columns.

Press ⌘J
Set the "icon size"" setting to use large icons


getting `pip` to use `python3` instead of macOS-supplied python2? I don't really know much about python or pip so this may be an easy question but I’ve looked around and don’t really see an easy to understand solution, and the deadline is coming up soon, so it seems like it would be a good time to get a guide together.

Recently when I was using pip I saw this warning:

  DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

My understanding is that there is no way to upgrade the version of python provided by macOS, either in /usr/bin/python or /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7.

I have /usr/local/bin/python3 installed via brew but I have no idea how to tell pip to use that version of python instead of the macOS-provided version, or if that will break anything, etc.

There is no way to overwrite the existing System python(s) with newer versions. (Catalina comes with a version of python3.)

The command pip3 will specify that you want to install modules to python3.

python2 will of course continue to work after 1st Jan, and many people still have lots of scripts that they will continue to run.


Why is my iMac (late 2013) HDD so slow? My iMac's hard disk has been slow from the start. But recently it is becoming unbearable. Disk read and write speeds are consistently below 50 MB per second, without any applications producing any CPU load.

I do see that mds uses lots of disk I/O. Could this be the problem? If so, what can I do to alleviate it? I tried turning off the indexing with sudo mdutil -a -i off, but it did not help much.

How else can I debug this?

To finish this question: I had opened a bug report with Apple. They determined that a botched Aperture photo library migration lead to excessive disk I/O. In the end, I reformatted the whole Mac. Plus to make the machine more useable, I attached a 256 GB Thunderbolt SSD and created a FusionDrive, as per this blog (in german). There are lots of howtos explaining how to create a FusionDrive. This really gave the machine an incredible performance boost.


Upload to iCloud Photos without adding to Recents album? I'm trying to upload my photo album from my Hard Disk to iCloud, and make it accessible from my iPhone.

However, all the photos uploaded to an album are automatically added to my "Recents" album on my iPhone (in addition to the album itself).

I would like to use iCloud as a cloud storage service and be able to see the photos from my iPhone but without having them in "Recents" album.

macOS version: Catalina
iOS version: 13.1.2

Can this "Recents" album be suppressed / disabled or otherwise made not so prominent?

It's true that the Recents album does show imported photos first, regardless of when those photos were originally taken. I'm always slightly annoyed by this when I import an older SD Card from my camera.

Try to ignore the Recents album.

Instead, use the Photos tab section in the main view. These photos are arranged by date.

In iOS 13, they are given a nice Years / Months / Days view to quickly zoom in to times and events.


How do you md5 an entire disk in OS X? I want to validate a "dd" image of a USB disk in OS X using the terminal. The terminal command md5 works on the dd image but not on the entire disk.

$ dd if=/dev/disk2 of=image.dd conv=notrunc
1974152+0 records in
1974152+0 records out
1010765824 bytes transferred in 149.033958 secs (6782118 bytes/sec)
$ md5 image.dd
MD5 (image.dd) = 3efc7e341b1bf2d729ffcd9b6a313428
$ md5 /dev/disk2
MD5 (/dev/disk2) = d41d8cd98f00b204e9800998ecf8427e
$ md5 /dev/rdisk2
MD5 (/dev/rdisk2) = d41d8cd98f00b204e9800998ecf8427e

I tried using /dev/rdisk1 and got the same results. I am OS X Lion.

If you are not trying to checksum disk the running system resides on (this won't ever be consistent) you may try

dd if=/dev/disk2 | md5 -


Unstable external display with M1 MacBook Pro The late 2020 M1 MacBook Pro does not seem to be playing well with the LG UltraWide 38WK95C 38-inch external display directly connected with a USB-C cable. The display blacks out (as if the cable physically disconnects) every hour or so. The issue usually resolves itself within a few seconds but sometimes I have to restart the computer to get it in a good state. The problem occurs with both USD-C ports and does not exist with the late 2016 MacBook Pro.
How can I diagnose and fix this external display issue?

The problem seems to have gone away after updating macOS Big Sur from 11.0.1 to 11.1.


Speeding up keystroke automation? I'm on MacOS 11.2.1 . I have Automator-based AppleScript code for reading text from a file and then "typing" it into the application which is currently active. This works fine, but I need something faster. I have a 2 Meg file of text that I want to send into an app, and it takes a few hours using this Applescript code. Can anyone suggest a way to simulate typing faster than this?
on readFile(unixPath)
    set fhandle to (open for access (POSIX file unixPath))
    set txt to (read fhandle for (get eof fhandle) as «class utf8»)
    close access fhandle
    return txt
end readFile

set texttowrite to readFile("/path/to/file/containing/text")
tell application "[Target Application]" to activate
tell application "System Events"
    repeat with i from 1 to count characters of texttowrite
        keystroke (character i of texttowrite)
    end repeat
end tell

... where [Target Application] is the application into which the text will be "typed".
I need to do this instead of simply a "cp" command, because the target application is a gateway to a service on a different machine. That particular application offers no file transfer capabilities, which is why I need to do this via simulated typing.
Any suggestions about how to do this simulated typing faster?
Thank you in advance.
PS: This slowness has nothing to do with the fact that the target app manages a remote connection. If I use this code to send the data to an application on the same machine on which this AppleScript is running, the "typing" is just as slow.

Read the file, then extract the paragraph
Very simplified...
set theFile to open for access myPath
set fileContents to (read theFile)
close access theFile
set myParas to count paragraphs of fileContents
repeat with i from 1 to myParas
    set myText to myText & "\n" & paragraph i of fileContents
end repeat

tell application "app" to activate
tell application "System Events" to keystroke myText


Keyboard Shortcut for switching to Desktops #5 and higher How can we create a keyboard shortcut to switch to desktops #5 and higher? Under preferences, seems like #4 is as high as we go

The desktops you want to set in the shortcuts menu should exist when you open te preferences. When you add one with the settings screen open, it doesn't refresh the list.

Just open and close the preferences.


Merge Time Machine Backup Is it possible to merge to Time Machine Backups?

When I look inside the sparse-bundle which Time Machine generates then I see that the folder-structure ordered by dates. So theoretically I could copy the files from my old TM sparse-bundle into the new one. Is this possible?

I tried: it works.

Here is how:

I have a time machine volume and a backup of it. I update this backup every two months, using Super Duper.

Recently, several successive mistakes made my time machine volume loose its first two years of backups. I then had a primary time machine volume with all backups but first two years and a backup time machine volume with all backups but latest two months.

I decided to experiment. Starting from scratch on a new hard drive, I copied the backup time machine volume to the new hard drive with Super Duper (backup all files using erase and save option). Then I copied the primary time machine volume on top of that, again with Super Duper (backup all files, using copy files that are different).

I ended with a new working time machine volume including all backups, from day one up to today.


After I jailbreak my iOS device, is it still able to get updates? I've been reading about Android rooting and iOS jailbreaking. After Android rooting, it will not get any updates for the device. Is it the same with iOS? I mean after the jailbreak is it still able to get updates?

A jailbreak is specific to a single iOS version or group of versions. You can always update your iOS device, but if you update to a version without a jailbreak available, you won't be able to jailbreak.

For example, the latest unc0ver jailbreak at the time of writing supports iOS 11.0 to 12.4. When iOS 13 is released, you will still be able to update your device to this version, but the jailbreak will not be available, since the system partition is reset. Then when a jailbreak is released for iOS 13 you can jailbreak once again.


Escaping variable in script I'm using script.sh in an OS X Mavericks terminal containing only the following:

echo ${1}
ls ${1}

Now, when I call ./script.sh "/Users/me/some\ directoy\ with\ whitespace/", the echo command prints /Users/me/some\ directoy\ with\ whitespace/, but ls still insists on splitting everything up, so the results there are

ls: /Users/me/some\: No such file or directory
ls: directoy\: No such file or directory
ls: with\: No such file or directory
ls: whitespace/: No such file or directory

Notice the \ at the end of the first three error lines. How do I do this correctly?

(I'm aware that using both "" and \ in the input argument leaves the \ in my variable, but I assume I would need those.)

I also tried using ./script.sh /Users/me/some\ directoy\ with\ whitespace/ without the quotes, then making the script

echo ${1}
ls "${1}"

but that made the echo output not contain any \ now, and the ls output looks like this:

ls: "/Users/me/some\: No such file or directory
ls: directoy\: No such file or directory
ls: with\: No such file or directory
ls: whitespace/": No such file or directory

Notice that all it did was add the quotes without seeming to understand them as syntax.

It is somehow related to the IFS (input field separator) since if I make the script

IFS=*
ls ${1}

and run it as ./script.sh /Users/me/some\ directoy\ with\ whitespace/, it correctly shows me the content of the specified directory. I'm not sure why, though.

You don't need the braces. This should work just fine:

echo $1
ls "$1"

You don't want to use backslashes and quotes in the directory name. One or the other should be fine.


How to keep Chrome bookmarks in-sync with Safari I use Chrome mostly and bookmark often. I would like these bookmarks automatically synched into Safari. Is this possible?s

To clarify the previous answer.

Known issues with Xmarks+Chrome+Safari

I would like to add some remarks about Xmarks. The use of Xmarks for Safari and Chrome works mostly very well, but in some case, you can encounter conflicts issues.

Context

If you enable Chrome bookmarks synchronisation and if Xmarks plugin is in automatic sync mode (default setting), some conflicts can appear:

all your bookmarks folder will appear in double.
One will be empty, the other contains the bookmarks.

It can be boring to fix that kind of issue manually... Especially when you have a lot of bookmarks.

Hack/Solution

The only solution I have found is to:

Keep using Google Chrome synchronisation (bookmarks, plug-in and whatever you want).
Disable the automatic mode of Xmarks plugin (both on Safari and Chrome).
Then, each time you add a bookmark into safari or chrome think to overwrite Xmarks server with "upload" (see Xmarks advanced settings) and then, download the new bookmarks via "download". (the image below is an Xmarks for Safari screenshot - You have almost the same panel in Chrome Xmarks plugin).

Conclusion

Of course, that trick doesn't make your life easier and is impossible to use when you want to use Safari and Chrome in the same time (too many upload/download to do).


Is there any study on how which services/sensors consume the battery? I am looking for some study/comparison on how battery-consuming are specific services/sensors (3G, Wifi, GPS, Bluetooth, accelerometer) in the iOS devices.

Has anyone stumbled across something like that?

Unfortunately there is no simple answer to your question.  Battery life obviously depends on what is running and what your phone is doing when you are using it and when your not using it.

Hopefully this list will help you out:

3G uses more battery life than Edge.  The lower your signal, the more your phone has to work, thus using more battery, in order to keep that signal.  If you have poor signal, phone calls/internet usage will drain slightly faster than on a good signal.

Wifi uses less battery than 3G, but still an ok amount.  Signal issues can cause more usage like in 3g cases.

Wifi and 3G are still used while your phone isn't being used to access Mail if you have Mail Fetching turned on.  A lot of times people who have bad battery life are always fetching their mail every 15 minutes, even if there is no mail to check, it still does this.  I recommend turing that off or switching to a Push Email Account like Gmail or Mobile Me.

Also, Exchange Emails can sometimes get corrupted on your phone and drain battery life like crazy by constantly syncing and checking for mail over and over again.  Removing and re-adding the Exchange email has shown to fix issues with Battery Life in certain cases.

Also, close apps that are not being used anymore in your Multitasking App Tray.  A lot of times having 40 to 50 apps in there can cause a bit more battery drain.  Now this doesn't mean clear it every time you use an App, just every once in a while.

Same thing goes for restarting your iPhone/iDevice.  Every couple of weeks or so powering it off and then powering it on can clear up little things that could have been using slightly more battery life.

Bluetooth 2.1 Devices use a lot of battery.  Bluetooth 2.1, is one of the biggest killers of battery life.  If you do not use Bluetooth, turn it off now.

Bluetooth 4 Devices are considerably better at battery life, since BT 4.0 has a better low powered mode, but the problem is still with 2.1 devices. I can have BT 4.0 device but if it is paired with a 2.1 device, it will consume more battery life.

Accelerometer has never really come up ever as causing battery life issues or for draining more battery life than other things.  I wouldn't really worry about it.  Same thing goes for the compass inside the iPhone and Gyroscope.

GPS does use a good amount of battery, relatively between wifi and 3G standards, especially if you are constantly accessing it.  Still, you usually use this in a car, and if you are driving great distances then I would recommend getting a car charger anyway.  You can get them cheap and they are always useful.

Screen Brightness, the unrealized killer of battery life.  Always make sure your screen is at an optimal brightness, with Auto Brightness (energy saving) settings always on in the screen brightness section of the Preferences App.  This setting helps a lot.  I would also recommend having your brightness at 50 percent. It may seem really dim at first, but your eye will get used to it and it can save a few percentages.

I know its not the most perfect answer and doesn't give you extensive research study related material, but hopefully it will shed some light on the things you wanted to know.  I have a lot of experience with different battery issues and fixes when it comes to iPhones as a former Apple Employee.

I hope it helps you out.


Kali Linux auto boot I have just installed Kali Linux in a separate partition of an iMac with wireless keyboard and mouse and with rEFInd. When I turn on the Mac it boots into Kali Linux automatically and doesn't recognize the wireless keyboard or mouse. Pressing alt during the boot doesn't show me the menu to select the disk. Please anyone can help me?

The kali Linux system selection appears first so I think that it goes straight to Linux or that the keyboard is not recognized and I cannot change the boot disk.

Press cmd-r when booting to take it into recovery mode. Here you can click on Disk Utility and choose a startup disk/partition. You might need a driver to use the wireless devices with Linux.


Show hidden Characters in PDF I made some optical character recognition on a scanned PDF File. The original document contains special characters like öäü and so on. The problem is that sometimes the characters get recognized wrong (ex. ö=u), Preview will then let me highlight the character image ö but when copying the character it will output u.

Can Preview show me what the actual recognized characters are without the Image?

No, Preview cannot do this. What you have is a PDF document where the original image is overlaid on the recognized text. You will need a PDF editor to delete the image.

You could also select and copy the entire document, then paste it into a text editor and review the recognition there.


Getting VPN to auto-reconnect on connection drop I use the built-in VPN on Mac OS X 10.7.3. It's IPSec, FWIW. From time to time, it disconnects (probably an issue with my corporate server). Is there a way to get it to automatically reconnect? Sometimes I don't notice for a while, which is kinda annoying.

You could use the following AppleScript, save it as an application and set it to be a agent (no dock icon).

This script will setup a VPN connection when there is none. Therefore, it should also reconnect shortly after your connection drops. You can change the interval to check your VPN connection, it's 120 seconds in the script.

on idle
    tell application "System Events"
        tell current location of network preferences
            set myConnection to the service "VPN University"
            if myConnection is not null then
                if current configuration of myConnection is not connected then
                    connect myConnection
                end if
            end if
        end tell
        return 120
    end tell
end idle

I've explained how to set this up in this answer.


Error installing CocoaPods I am trying to install CocoaPods on my Mac device. When I run the following command:
sudo gem install cocoapods
it returns:
Fetching: cocoapods-core-1.5.3.gem (100%)
Successfully installed cocoapods-core-1.5.3

ERROR:  Error installing cocoapods: invalid gem: package metadata is missing in /Library/Ruby/Gems/2.3.0/cache/cocoapods-deintegrate-1.0.2.gem

What is casing this issue and how do I install CocoaPods?

I'd recommend using Homebrew to install CocoaPods.

If you are not already using Homebrew, it is a package manager for macOS, hugely popular among developers of all types. It makes installing packages like CocoaPods hassle free.

To install Homebrew, follow the instructions on the homepage

  Paste that at a Terminal prompt.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Homebrew requires Xcode Command Line Tools to be installed and setup (which I am assuming you already have as you are trying to install CocoaPods, implying you are developing for iOS).

Once Homebrew is setup, simply run:

brew install cocoapods

to install CocoaPods.


How to stop Safari from hijacking Amazon app links? Apple iPhone SE with iOS 13.5.1:
When I open an Amazon hyperlink from an email or imessage it will launch the Amazon app and before it can fully open, Safari will hijack the link and open Amazon in Safari.
I don't want Safari to do this. I want to view Amazon links in the Amazon app. Safari does not do this with other app links like Yelp and Quora. Quora links launch and open Quora app with no Safari hijacking.
I have tried clearing all cache and web data in Safari. I have deleted and reinstalled the Amazon app. It still does the same thing.
Google searches have become fruitless as it seems most people prefer to view Amazon in the browser vs. the app, which puts me in the minority and makes it difficult to find information on my problem (Opinion: Is it just me, or has the Google's search function degraded over the past few years?).
I haven't been able to isolate whether this is an iPhone/iOS problem or it is an Amazon app problem.
Edit: (Requested information)
I have the latest Amazon app installed v15.12.6
Here is the example link that gets "hijacked":
https://www.amazon.com/dp/1635616271/
Additional info:
Rebooted my phone and it made no difference.
For some reason I thought being on wifi vs LTE 4G would make a difference. It didn't.
I tested a few links from the "amazon.com/apple-app-site-association".
These links launched the app and were not kicked to Safari:
https://www.amazon.com/deals
https://www.amazon.com/gp/aw/h.html
This is a link found in the "apple-app-site-association" and it was kicked to Safari:
https://www.amazon.com/products
These links were kicked to Safari:
http://amzn.com/1635616271
https://www.amazon.com/dp/1635616271
https://www.amazon.com/dp/1635616271/ref=cm_sw_su_dp
In the "apple-app-site-association" I found this:
"/dp/??????????"
So according to the "apple-app-site-association" this link should not be kicked to Safari, but it does:
https://www.amazon.com/dp/1635616271
This link:
http://amzn.com/1635616271
opens in Safari and is then kicked to the Amazon app and then the Amazon kicks it back to Safari and Safari opens it up to:
https://www.amazon.com/dp/1635616271/ref=cm_sw_su_dp
Does all of this testing indicate a bug in the Amazon app with its URL handling? Declared associations are not being properly handled. Can anyone else confirm the behavior?

It's not Safari hijacking the link but rather the Amazon app reading the link it was passed and declaring that it can't handle the link, throwing it back at Safari to handle generically.

Amazon's website declares the links that should open in the app should the app be installed on your iPhone. You can download this list yourself by going to amazon.com/apple-app-site-association.
Opening a link on iOS which matches one of these links will instead pass the link to the Amazon app.
The app ‘opens’ the link (switching Amazon to the foreground) and the Amazon app ‘reads’ the contents of the link, attempting to navigate to a reasonable page within the Amazon app to reflect the intention of the link. This uses application(_:continue:restorationHandler:).
If for whatever reason the Amazon app was unable to complete the intention of the link, the Amazon app can return false ‘to let iOS know that [the] app did not handle the activity’. This occurs within the Amazon app code.
Since the Amazon app refused to open the link, Safari is opened as a backup and navigates to the link.


How to check which cellular network bands are supported by iPhone I have an iPhone 6 (European model) and will be travelling to Japan soon, where networks have different connectivity requirements.

I checked the specs from Apple and couldn't conclude whether it supports W-CDMA.

Is there way to check in the phone itself which bands those it support?

Thanks in advance.

EU phones will all be GSM.
You cannot cross the divide between GSM & CDMA.

Read this for a long but simple explanation - http://uk.pcmag.com/cell-phone-service-providers-products/11593/news/cdma-vs-gsm-whats-the-difference
… though having read that twice & my head is still spinning - I'm still not actually sure if the fact that 3G = WCDMA means it will work….
I always used to have to have a different phone to use in Japan, but that was several technology generations ago.

https://xkcd.com/927/  ;-)


MacBook Pro doesn't detect boot drive if turned off for ~5-10 minutes I'm repairing a 13" MacBook Pro Early 2011 (A1278). This will seem like a duplicate issue, but stick with me and you'll see something odd is going on.
TDLR; Fixed missing/undetected boot drive issue with new SSD and SATA cable, or so I thought. The issue still persists, but I've discovered it only happens when the MacBook Pro is left shut off for more than ~5 minutes! If I shutdown, then reboot within a few seconds or 2-3 minutes it works. If I leave it much longer the boot fails with the folder and question mark icon!
This MacBook Pro has the "question mark on folder" boot issue - here's a picture. This usually indicates a corrupt/failed boot drive or faulty SATA cable. I had the same issue on my own 2012 MacBook Pro a few years ago, and did the same repair (replace the cable and SSD upgrade) so I thought it would be easy.
The repair went smoothly. I got High Sierra installed on the new SSD by creating a bootable USB. Rebooted a few times afterwards to confirm all was well and considered it a job well done.
Unfortunately, when I tried to boot the MacBook Pro later in the day it displayed the error again on boot! I performed an SMC and PRAM reset and then it booted up. I assumed all was well.
I decided to verify my work a little later, and it failed to boot again!
It seems as though the issue occurs if the MacBook is left sitting without power for a while. If I leave it sit on the boot failure screen for a few minutes, then reboot, all is fine. I assume the original issue was never the old HDD or SATA cable, but something power related maybe?
I appreciate any ideas you have.

This sounds like a failing NVRAM (Non-Volatile Random Access Memory) chip - it's not holding the boot values.
When you do an NVRAM reset, it clears the pre-boot environment forcing your Mac to search for bootable volumes which it then writes to NVRAM.  After you shut it off, power is removed from the NVRAM chip and as the voltage dissipates, it loses or corrupts the contents of it's memory.  It could be the chip itself or the associated circuitry that supports it - without putting hands on, it's impossible to know.
You have to take it in for service.  There are board level repair shops that can replace the actual chip(s), or you may need to replace the entire logic board.


How to view the same file in different apps in iOS? I'm using an iPhone for the first time and I found that I can't view the same file in different apps.

I have have some PDF files added to Adobe Reader but I cant view them in a similar app that views PDF files. Same thing happens with songs, photos and videos.

Does it mean that I have to add the same files to all other apps again? If so, wouldn't that be duplicating the same files over and over again?

Is there a way to add the files once and use it in all apps like in Android?

Yes, you will need to add the file to all the apps. You should be able to use the system-implemented Open With option, but this requires the support of the app to transfer the file.

Due to the iOS sandbox, the apps aren't able to access the files from another app — the file must be duplicated to the second app.


Numbers: VALUE function does not recognize empty string I am using Apple Numbers and find it frustrating that cell arguments containing empty text (and sometimes contain numbers from other sheets) are not converted to a number of value 0, when referenced by a function that expects a numeric value.

For example, a function in cell:

=MAX(I5,0.5×J5)

with J5 being empty, yields an error message

The operator “*” expects a number but found “.”

So I tried to encase J5 with VALUE(J5), and got another message:

VALUE requires a string specifying a number, but found “” instead.

Is there an efficient way to treat all spaces as 0 for the countless cells that may have that situation?

IFERROR(VALUE(<cell>),0)

would return 0 for an empty cell (or any string that can not be converted into a value). I tried something like:

= MAX (I5, (0.5 x (IFERROR(VALUE(J5),0)))

and my initial tests were working.

Hope this helps


How do I speed up the network discovery of windows servers from my mac? I just bought my first MacBook Pro. One frustration I have is accessing my shared windows-based network assets. I have two servers on the network, but they seem to take forever to be discovered by my MBP.

Use Case:

I open my MBP
Once connected to WiFi, I open Finder and then Go > Network
I wait and wait and wait and wait for the windows-based network assets to be discovered

I'm not sure how long it takes because I usually just go about doing other things then check back. I think it could take up to a half hour though (more/less). Sometimes, even when I can see the server, it takes an unacceptably long time to connect to it.

Is there any way to improve this?
Is the problem a mac/pc thing?

Only using Finder the workaround that works for me in macOS 10.14.5 is:

In Finder menu bar select Go > Connect to Sever...
Use your windows machine IP address to make a Connect


Ensure emptying 'Recently Deleted' succeeds? I have deleted ~25,000 photos and videos from iPhone. They're now in 'Recently Deleted', and I want them permanently gone so I can transfer the remaining contents of the iPhone to a new iPhone.
When I click 'Empty' from settings, it takes some time, but the photos don't go anywhere, and the storage level of the iPhone doesn't indicate deletion.
How can I be sure 'Recently Deleted' is emptied properly?

Here's what I did
Go into Photos -> Recently Deleted
Click 'Select' (top right)
Slide your finger from the photo at the very bottom of the screen up to the top of screen (without lifting your finger), this should select everything on the screen, and now hold your finger at the top of the screen until all the photos in Recently Deleted have been selected, then press 'Delete'
Tip: if you have a lot of photos to delete, before doing the above, press on the three dots (...) on the top right and zoom out, that will allow you to select more photos per minute.
Note: for 25000 items, this took approximately 9 minutes.


third party content app document for app store i send multi time app for review in app store but not accept and it's need third party Document, but i don't find anything about it. there isn't any sample or example
my app work with my site api and get data from my site

the review result :

  The inclusion of third party content within the application, whether
  retrieved from the internet by the application or embedded in the
  application, is subject to the terms of the iOS Developer Program
  License Agreement. You must warrant that your application does not
  infringe the rights of a third party by providing documentary evidence
  that you have the rights to use this content.

  Acceptable documentation includes a copy of your contract with the
  copyright holder to your company, detailing your authorization.

please if have any idea or experiment about that , help me
Thanks

Update (22/2/2019)
i send a doc that include the website owner signed that i have right to use api and publish this app but it's rejected again .

the new answer of app store reviewer :

  Thank you for the message. After review of the documentation, we are
  requesting further documentation demonstrating your right to use the
  third-party content. Documentation must prove the third party content
  owners have agreed to distribute their work through your platform.
  Furthermore, please be sure to include dates, rights holders' names,
  your company's name, and relevant signatures.

Copyright Contract

  You must warrant that your application does not infringe the rights of a third party by providing documentary evidence that you have the rights to use this content.

Apple is asking for proof that you have the right to use the Third Party Content in your app.

You can do this by providing the requested contract with the copyright holder. A contract can come in many forms depending on the laws and countries involved. Apple does not provide examples because of this diversity.

Ultimately, Apple needs to know you accept responsibility and have the legal right to distribute other's work through your app.

What content do you include or make accessible in your app?
Do you really have the right to republish it?

Apple needs you to prove this.


How to transfer photos from my Macbook Air to an android smartphone? Not sure if this question has been asked before, so apologies if it has:

I have some photos on my MacBook Air, which I want to transfer onto my Android smartphone, which is a Lenovo.

I'm not sure how to do that and have not been able to find much info online.

Please let me know.

Thanks

A really quick Google search turns up two methods for doing this

Plug the Android phone into your Mac and use the Image Capture.app
Use the Android file transfer app


How can I sync sent mail from another device on my iPad? On iOS 6.0.2. Can't see nor search my Sent emails other than the ones I actually sent from the iPad. I'm using Yahoo Business Mail on IMAP settings.

The other device that is sending email probably isn't saving them to the Sent folder.

If you're using the Yahoo! website to send mail, you can go to Mail Options > General > Sending Messages to fix this. See the their support article for screenshots and more info: http://help.yahoo.com/l/us/yahoo/smallbusiness/bizmail/options/options-17.html

If the other device is using OS X Mail, go to Mail > Preferences > Accounts > Mailbox Behaviors and make sure "Store Sent messages on server" is checked.

For Mail on iOS, Settings > General > Mail, Contacts, Calendars > (your account) > Account > Advanced and make sure your sent mailbox is on the server.


Restoring track information for iTunes Match files I made the mistake of editing a bunch of songs at once. Now, the changes have propagated to all of my iTunes Match registered devices. I tried Advanced > Get Track Names, but I get the following message

iTunes cannot get CD track names for songs that were not imported using iTunes

The thing is, the songs were originally imported using iTunes before syncing with iTunes Match.
Is there an easy way to restore track information, or must I manually go through the tracks and fix them?

You must fix the track data yourself, however, that doesn't mean that you have to do it manually (but of course you can).

There is a myriad of software that aims to do this for you automatically. One that I can think of off the top of my head for Windows is TuneUp. It's a bit expensive, $40 for a year or $50 for "Lifetime". It runs along side iTunes and fixes it up when requested, or even automatically if configured.

There is plenty of other software I'm sure, some that aids the process of doing it manually, others that try to do it completely on it's own ala. TuneUp.


Where is Address Book in Mountain Lion? After I upgrade to Mountain Lion from Snow Leopard, I can no longer find "Address Book" in the application but only "Contact".

The application "Contact" does not allow me to add or remove groupings of contacts. Where is the good old address book?

In the new Contacts Application for Mountain Lion there are no buttons for group management, only menu items.

Under the File Menu, there are New Group, New Group from Selection, and New Smart Group… menu items.

When you have a group selected, under the Edit menu there will be a Delete Group menu item available.

To be able to select groups, you need to be in the proper view under the View menu: Groups.


Recreate an alias with the same name and timestamp programmatically Let us develop a utility to batch process legacy alias files.

Implemented as:

Finder File Service,
Automator Workflow,
Applescript,
Shellscript,
or whatever else that those the job.

Per each file in the batch this should be done:

Is the file an alias? (avoid other file types supplied by user error)
Get its filepath, filename, timestamp, label, tags.
Delete it.
Recreate it at the original filepath with the determined filename, timestamp, label, tags.

Followup: I filed a bug report to Apple, see below. Maybe Apple comes up with a solution. But I think some skilled AppleScripter(s) here can come up with a solution within minutes. Would be cool, if we find a solution here, and offer it to the whole macOS community.

Bug report to Apple, filed on 2017-01-10

Finder / HFS+ / filesystem — Refreshing legacy alias files to reduced filesize with batch process

A LONG LASTING BUG WAS LUCKILY FIXED:

In macOS Sierra the file size of aliases was finally reduced dramatically, from multiple megabytes in Mac OS X 10.7-10.11 systems down to only about 1 KB now in macOS Sierra 10.12. (Simply by not including the icon resources, which where mostly anyhow redundant being just a copy of a generic file type icon.)

PLEASE OFFER A FIX FOR THE BUG LEGACY AS WELL:

Depending on how heavily aliases are used on a system, there is the potential to save multiple GBs for some users.

I propose to Apple to offer a batch process for reducing the file size of legacy alias files. With an option to preserve the aliases' original timestamps, as they may have critical information value in some use cases.

Then you could do a simple Finder search, select the files of your liking (all or only certain) and then drag'n'drop them onto the batch process app or file service or Finder menu command.

CURRENT WORKAROUND WITH QUICKLOOK ONLY WORKS PARTIALLY

Finder > New window (cmd-N) > Search (cmd-F)
The search criteria show up, set them as follows:

"Kind" is "Other", type in "Alias"
You get a Finder search result window.

View as list and sort by size.

Then you have the top file size culprits on top.

If you QuickLook a file via SPACE-key then no alias recreation occurs.
Issue "File > Show Original" (cmd-R) on the selected file.
In the newly opened window, QuickLook the alias files with SPACE.

Then certain alias files get recreated. But not all!

Working, but only sometimes: PDF, JPEG, ZIP if BetterZip QuickLook plugin is the handler.

Out of these not all aliases get refreshed.

It seems to also depend on the file's overall or individual associated application (Finder "Open with" setting, Uniform Type Identifier (UTI), TYPE/CREATOR resource fork) and which QuickLook plugin handles the file type.

An recreated file has a dramatically reduced file size (bout 1 KB). Sadly it looses its original timestamp, but gets the current one (equivalent to /usr/bin/touch). I would love to keep the alias timestamp preserved.

Create a Service with Automator — Tested on macOS Sierra

Open /Applications/Automator.app
File > New (cmd-N)

Choose a type of document: "Service".

Service receives selected: "files or folders" in "Finder".
In the left pane navigate to: Actions > Library > Utilities > Run AppleScript.

Drag the "Run AppleScript" item from the library pane on the left to the source code pane on the right.

Clear the prefilled content entirely. Paste in the following source code:

AppleScript Source Code

use framework "Foundation" -- Cocoa-AppleScript

on run {input, parameters}
    repeat with thisItem in input
        tell application "Finder"
            if kind of thisItem is "Alias" then -- alias file only
                set parentPath to container of thisItem -- get the folder of this alias
                set {label index:l, comment:c, modification date:m, creation date:cr, original item:origPath, name:n} to properties of (item thisItem)
                if origPath is not missing value then -- not a breaking alias
                    set tagsList to (my tagsFor:(POSIX path of thisItem)) -- get the tags of the alias file (call an AppleScriptObjC handler)
                    delete thisItem -- move this alias to the trash

                    -- ** create an alias file **
                    set newAliasFile to make new alias at parentPath to origPath with properties {comment:c, creation date:cr, original item:origPath, name:n}
                    -- ** set the label ** (0 = no label)
                    if l is not 0 then set label index of newAliasFile to l
                    -- ** set  the tags ** ({} = no tag)
                    if tagsList is not {} then (my setTags:tagsList forPath:(POSIX path of (newAliasFile as string))) -- call an AppleScriptObjC handler
                    -- ** change the modification date **
                    set modification date of newAliasFile to m
                end if
            end if
        end tell
    end repeat
end run

on tagsFor:posixPath -- Cocoa-AppleScript handler
    set fileURL to current application's |NSURL|'s fileURLWithPath:posixPath
    set {theResult, theTags} to fileURL's getResourceValue:(reference) forKey:(current application's NSURLTagNamesKey) |error|:(missing value)
    if theTags = missing value then return {} -- no tags
    return theTags as list
end tagsFor:

on setTags:tagList forPath:posixPath -- Cocoa-AppleScript handler
    set fileURL to current application's |NSURL|'s fileURLWithPath:posixPath
    fileURL's setResourceValue:tagList forKey:(current application's NSURLTagNamesKey) |error|:(missing value)
end setTags:forPath:

File > Save (cmd-S): Give it a name like "Alias recreation".
Open System Preferences > Keyboard > Shortcuts > Services > Files and folders > Alias recreation, or however else you named it.

Assign it a shortcut. As cmd-L is used to create an alias (L as in "link"), I assigned it cmd-alt-ctrl-L.

Select one or multiple legacy alias files, and process them.

With your shortcut cmd-alt-ctrl-L.
or through the main menu: Finder > Services > Files and folders > Alias recreation.

Note: The batch process is very transparent and mistakes can be corrected. The deleted aliases are moved to your Trash bin. Should you have made a mistake choose the trashed alias file in question and run Finder > Put back (cmd-backspace). This will put the file back in its previous parent folder and open the parent folder in a new window. Then you have the recreated alias and the original alias with the suffix " copy" side by side and can make corrections if necessary.


Finder folder permission asking some folders on my mac asks your my password to rename, add, delete files in a folder. I checked the folder privileges in Get Info to compare with normal folders, it was the same but the result is totally different. Can anyone tell me how to disable or fix permission issues for finder folders? Thanks!

Generally speaking repairing permissions is a quick and easy task. head on over to /Applications/Utilities and look for Disk Utility. Launch it, select your HD and then click on repair permissions and let it do it's thing. That could take a couple of minutes or 15-20 depending on how messed up things are.

When I do this I usually quit out of ALL other apps and let disk utility do it's thing in peace. Then I run it again, and again until I get no more errors.

All of that assumes that it is a simple permissions error. It could be you are trying to modify a folder in a location that Apple does not want you changing things, the /Applications and /Applications/Utilities folder spring to mind.

If, however, these issues are on your desktop or in the folders Apple sets aside for your files (documents, music, pictures, etc.) then yes there is a problem and it MIGHT be more than permissions. Could be actual disk errors.

In Disk Utility you can "Verify Disk" but you can't "Repair Disk." That requires booting from install media, the recovery partition or the disk repair utility of your choice (my choice is Diskwarrior, YMMV).

If repairing permissions doesn't fix the issue AND you are working with folders Apple deigns to allow you to work with, use Disk Utility (or 3rd party tools) to repair the disk/file structure.


Numbers App not fuctioning right The Numbers App is not functioning correctly on my iPad Air 2,
can someone help me ? It's doubling all my spreadsheets, and not allowing me to delete the addional spreadsheets

Sometimes cloud sync can get behind. I would log in to Numbers / iCloud online and determine if you have duplicates and clean them out from the web interface on a computer browser.

https://www.icloud.com/#numbers

At that point, you can wait for Numbers / iCloud to clear on iOS or go in using iCloud Drive app and clean out the duplicates. You may have to do this on iOS if you don't have easy access to a Mac or computer browser.


"You need to restart your computer" freeze while waking up Yesterday I just closed my mbp and this morning I had the great pleasure to have this:

At the login (passwork) screen...

I had an uptime of more than 5 days but still ... I upgraded the memory from 4 GB to 8 GB (the Crucial kit) and since then I had this problem twice. Maybe it doesn't mean anything because I have the MBP for only 2 weeks and I upgraded the memory after a few days, so the statistics are maybe meaningless.

My question is: do you have this problem sometimes ? Should I check something in particular to try to avoid that ? Is it possible that the memory is incorrectly installed (very unlikely...) ? Is it in any case a memory problem ?

No, this is not a common issue and should not occur under normal circumstances. It's an indication that something unexpected (and unrecoverable) happened. That screen is the final net for catching a problem before your computer is completely locked.
If you just got new RAM, I'd try removing it an using the computer for a few days. If the problem persists, there might be a hardware problem and since the computer is new, you can take it to an App Store.
If you have "external" peripherals (drives, Audio interfaces, etc.) try working without them for a while.

Last but not least, act now that the box is new, don't let it "wait" because it didn't happen again in two weeks. If the above happened more than once in a short time frame on a new machine, there's something wrong. That's been my experience.


Change scaling algorithm for non-retina apps running in low resolution on a retina display? Regarding non-retina apps running in low-resolution mode on a retina display:

In the past, circa 2012 (ref), these apps were scaled with nearest-neightbour algorithm, where 1 pixel would become a group of 4 identical pixels. Confirmed in Apple Docs from the period

At some point since then, at least by 2016 (ref), these apps are now scaled with a bilinear (or similar) filter meaning that a single pixel does not get scaled up cleanly and the resulting group of 4 pixels is blurred with surrounding pixels

So, my question: is there a way to change the scaling algorithm back to nearest-neighbour?

I don't have a system on which I can reproduce your issue, so this is just a guess, but check out the advice on this forum post: https://forums.macrumors.com/threads/change-osx-scaling-mode-for-retina-screen-with-non-retina-content.1428540/
Namely:

Try using SwitchResX to enable 1:1 mode at your display's native resolution (I believe this will make your content very small; not sure whether that's a workable solution for you)
Use an external, non-retina display :)


Run shell script on specified external HDD mount I keep some files on an external HDD and I've wanted to know what is currently on it without connecting it.

I've modified this command to get a .txt file with tree-like structure of my folders on that HDD uploaded to my iCloud Drive when I connect it to my MBP.

This is my edited command which I have saved as .sh, now saving the file to desktop:

ls -R /Volumes/2TB/ sed -e '/^[^:]*$/d' -e 's/://' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' > /Volumes/SSD/Users/V/Desktop/File.txt

So far I've made a shortcut in BTT which runs the script but I would like it to run when I connect that HDD.

Someone suggested that I can could create a launchd with the StartOnMount key.
The problem is, as far as I understand from this thread, it's not possible to set up with specified volume.

Any ideas?

In this example the output of df is piped to grep which is looking to match the hard disk mount point- /Volumes/2TB. The exit status of grep determines the outcome of the condition and the ! reverses the logic.

if ! df | grep -q '\/Volumes\/2TB$'
then
    exit 0
fi

In a sentence this says, if grep does not match /Volumes/2TB then exit the script.

I would write the script like this to put it all together.

#!/bin/sh
#
#
if ! df | grep -q '\/Volumes\/2TB$'
then
    exit 0
fi

ls -R /Volumes/2TB/ |
    sed -e '/^[^:]*$/d' \
        -e 's/://' \
        -e 's/[^-][^\/]*\//--/g' \
        -e 's/^/ /' \
        -e 's/-/|/' >/Volumes/SSD/Users/V/Desktop/File.txt


No Calendars Sync - iCloud or Google I have two Macs, and iPhone and iPad. I have setup iCloud and Google accounts with Calendars on all of them. Its works everywhere, syncs and loads up great, except for 1 Mac.

One of them just won't sync any calendars, be it iCloud or Google. I enable the Google Account and then I just get no calendars download and appear.

Any help much appreciated, thanks.

On your Mac that isn't syncing, go to System Preferences > Internet Accounts. From the list of accounts in the left column of the screen, select the account that isn't syncing in. Make sure that "Calendars" is checked.

Next, open your Calendars app. Click "Calendar" (next to the Apple icon in the menu bar) > Preferences (NOTE: Clicking "Accounts" instead of "Preferences" will just send you back to System Preferences > Internet Accounts). In the Preferences pane, click "Accounts". Select the account that wasn't syncing. Then make sure that "Enable this account" is checked.

If the calendar still isn't appearing, make sure that you're not hiding the calendar. There is a toggle button in the Calendar app that hides or shows the list of calendars available to display. If you cannot see a list of calendars on the left column of your Calendar app, then click the "Calendars" button in the top left corner of your Calendar app. This will display a list of calendars on the left side of the app. Make sure that your missing calendars are checked. Unchecked calendars will not show up in your calendar view.


Find & Recover correct iTunes ratings etc. & Library from Time Machine I have at least 13 backups of my entire 7000 song iTunes library on an external drive using Time Machine. Unfortunately, a Sr. Rep. at iTunes support was misinformed and had me delete a folder that I later discovered contained all of my ratings, etc. Whoops. I do not know the date this folder was deleted as I didn't realize I had been a problem until later.

I have since continued backing up to Time Machine and replaced my internal hard drive, and now download new songs to a new iTunes library on my Mac. This library and my original 7000 song library and a copy of the deleted folder are on my Time Machine backup drive. The music library only is also on a second external drag-and-drop backup drive.

Another Sr Rep. suggested that I actually move EVERY huge iTunes library one-by-one from TM to my Mac to find the last one that included the ratings. It sounds like it would be easier to look for the folder with the ratings on Time Machine.

Is there an easy way for me to find the ratings folder that went with my large iTunes library on Time Machine — I backed up my Mac with TM prior to deleting the folder and continued to use Time Machine regularly. I am not even certain what to search for or what that folder is named or what it contains.
Once I find that folder that contains the 7000 song ratings, etc (what is the folder called and where is it nested?), what other folders do I restore?
How do I add the additional songs to that library from my new library on the Mac?  I assume I need to rename the new library first — There are fewer than 250 "new" songs in the current new library.

http://macs.about.com/od/itunes/tp/Restore-Your-Itunes-Music-Library-By-Copying-The-Music-From-Your-Ipod.htm

I know this isn't the answer you are looking for, but maybe it will help.


Swipe between apps but continue to see the menu bar What I really like about my Magic Mouse is that I can swipe between apps using two finger swipes.

But it only works for apps that are in full screen. That is okay, but I miss the menu bar when those apps are in full screen. I use full screen a lot, but purely because I want the swiping. I even miss the dock sometimes.

Can I have swiping and the menu bar at the same time?

Note that I have OS X 10.10.1.

Try placing applications in "maximized mode" in their own seperate desktop. Do this by OPT+Clicking the green button to make the window maximized (or resize the window), then drag the window, pushing it against the top of the screen. This will trigger Mission Control. Still holding the window, drag it to the "new desktop" icon in the upper-right corner to place the window in it's own desktop.

Screen recording of this: https://youtu.be/8QI-UkKmMPw

It may be slow to set up, but you'll still be able to use the two-finger swipe to move between applications, while still having the menu bar and dock.

To close desktops (which moves windows from that desktop into the next available desktop), enter Mission Control (F3), move the cursor to the top of the window, and hover your cursor over the desktop. A close icon should appear in the upper-left corner of the icon.

Hopefully this will be helpful.


OSX disable wake on USB Recently I've obtained a trackball, and I'm trying to use it with my Mac Mini running 10.9.5. The trackball is plugged in via USB port. The ball is rather sensitive, so it picks up very small movement, like from vibration of the desk.

So when I put my computer to sleep, quite often it wakes up from that movement. Sometimes I'm not even sure there is any movement. The computer just enters the sleep mode, I barely even breathe, and several seconds after the power indicator starts blinking it powers up again.

When I unplug the trackball, everything works fine.

So, is there a way to disable waking Mac from a particular USB device? If not, from USB entirely? Or maybe only pointing device movement (clicks would be alright)?

From a quick google it seems you are out of luck.

The basic reasoning is that you (normally) would want to wake from key or mouse press, and if these are connected via USB then the mac needs to detect activity on the USB, and rather than distinguish between clicks and movements it wakes on both.

Most of apples own mice are bluetooth, and mac os x has an option within the system preferences not to wake mac on bluetooth (either disable on move and click or just movement, I forget which).

Can you pull out the trackball's ball?  Turn it upside down, or you might just have to disconnect it.

Good luck!


What's the `._xxx` file in macOS? I created a index.php file under my phplessons directory:

before I used the phpStorm to open the directory, Apple's Text Editor opened it, now I have phpStorm open, but there is a ._index.php file alongside index.php file.

I don't know what's the ._index.php file is, but in it I find a string com.apple.TextEncoding.

What is this file and what is its purpose?

It's simply a temporary metadata file created by TextEdit app. You can safely ignore it.

File beginning with . are hidden files in macOS. Files beginning with ._ are metadata files created by apps in macOS.

If you do not wish to be bothered by such files, it's better to add it in your version control ignore rules (if you use one).


Delaying spotlight indexing to avoid the fan noise I am attending a meeting in a quiet room where everyone has a soft voice, and my mac decides to index for spotlight (the job is 'mds'), bringing the fan to 6200rpm. It's not too bad, just a bit distracting.

How do I tell mds that this is not the right time to do its job? Killing it to delay it could mean that it would choose to start a minute later.

Please note that this is not a case of initial indexing. I don't know (and I don't really care) why mds has a tendency to spend a lot of time not only after inserting a USB flash drive that the machine has not seen in a while, but also after removing that flash drive.

To turn off Spotlight indexing for all mounted volumes:

sudo mdutil -a -i off

See the mdutil man page for other options.


How to know if iPhone was used I need to know if someone has used my iPhone or not. Sometimes I can't recall the last time I used my iPhone and I've tried many things to view the log if that is even possible.

Is there a "Slide to unlock" history log maintained on iPhone? Or any other way to determine times when the iPhone was used?

Set a passcode on the device.  End of problem.