Mac's internal Bluetooth no longer works; is it possible to use a Bluetooth-via-USB adapter? My MacBook's internal Bluetooth stopped working.* My MacBook's System Information says "no information found" under "Bluetooth". Is it possible to use some kind of USB to Bluetooth adapter to connect with the wireless Mac keyboard and Magic Mouse?

* (The problem was not solved by doing any of the highest rated tips: restarting, reinstalling, etc.)

Yes, you can. USB Bluetooth adapters work just fine on the Mac.


How does giving Apple my CCV code confirm I am a parent of my child? I am setting up iCloud account for my child (just created a family). After setting nickname and entering my child's data, I am prompted for CCV code for my card, and it says:
"confirm you are the parent or legal guardian of this child by entering the security code for the card, Visa (**** 1234)" - last 4 numbers are from my card.
I can't understand - how does it confirming I am a parent?! And why is this even needed?

It confirms you are owner of the card - or at least have it in your hand.
Presumably, that is considered a minimum identity check, assuming the last names match. Sending in a photocopy birth certificate seems a bit 1980s these days ;)
The CARD Act of 2009 says that to have a credit card in one's name they must be 18 years old with a verifiable source of income or be 21 years of age.  Asking for the CCV of the card when setting up the child's account is just Apple's due diligence that the card associated with the parent's account is "in hand of an adult" and that the parent is aware the account is being created.


APFS decreases space randomly Since I upgraded to macOS High Sierra, one week ago, I have noticed that each time I wake the computer from sleep, the space left on the drive have decreased by a, somewhat, random amount.

I have very little free space on my drive - too little actually - so I usually keep an eye on it during each session I'm using the computer.

My first notice was that the assumed left space of about 6GB was only about 5. The day after the space was down to ~150MB! I did some cleanup, removed Xcode derived data, cleaned out cashes etc, and restarted. I think I got back to about 3-4GB.

Fast forward to the day before yesterday. Then I cleaned out a lot of junk and I had about 17GB of free space. Yesterday I only had just below 16GB, and today I only have ~10GB. After a reboot I got 12.5GB, but I also removed about maybe a 500MB yesterday, so I should at least have more than 16GB if everything was working the way I was expecting it.

What I have tried to 'solve' the problem is to see if closing apps increases the space - and it does - but not that much so I regain all 'lost' space. I also cleaned out cashes and Xcode derived data. But since I did this the first time, there is usually not much of a gain here.

I have a MBP Retina, i7, with 16GB of memory and ~500GB of disk. The computer is from 2013, I think. I regularly  use Xcode, Safari, iTunes, Messages. Sometimes also Affinity Photo, Aurora HDR, Luminar and qbittorrent.

Searching on google, it seems like I'm the only one having this kind of problem. Or is there someone else having similar issues with decreasing space on the drive?

All help on this issue is welcome!

In my experience, there are two major culprits for this unexplained disk usage:

Time machine
Swap

One possibility is time machine. If you open Disk Utility, you may see a section labelled "Other Volumes", these are likely to be time machine backups. If you do see this, then you can open a command shell and enter:

df -h

On my machine, I get output similar to:

Filesystem                                                             Size   Used  Avail Capacity   iused               ifree %iused  Mounted on
/dev/disk1s1                                                          465Gi  442Gi   18Gi    97%   5512606 9223372036849263201    0%   /
devfs                                                                 196Ki  196Ki    0Bi   100%       678                   0  100%   /dev
/dev/disk1s4                                                          465Gi  5.0Gi   18Gi    23%         5 9223372036854775802    0%   /private/var/vm
map -hosts                                                              0Bi    0Bi    0Bi   100%         0                   0  100%   /net
map auto_home                                                           0Bi    0Bi    0Bi   100%         0                   0  100%   /home
map -fstab                                                              0Bi    0Bi    0Bi   100%         0                   0  100%   /Network/Servers
com.apple.TimeMachine.2017-10-19-174031@/dev/disk1s1                  465Gi  428Gi   18Gi    97%   5078237 9223372036849697570    0%   /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Smakolyk/2017-10-19-174031/Smakolyk
com.apple.TimeMachine.2017-10-19-072101@/dev/disk1s1                  465Gi  423Gi   18Gi    97%   3858374 9223372036850917433    0%   /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Smakolyk/2017-10-19-072101/Smakolyk

Here you can see that I have local two time machine backups, and these will be using space. Apple have more information about local time machine backups.

You can disable local snapshots with:

sudo tmutil disablelocal

This should turn off the feature and free up the space. You can turn it back on with

sudo tmutil enablelocal

The second option is swap, this you can most easily see in /var/vm:

$ ls -lh /var/vm
total 10485760
-rw------T  1 root  wheel   1.0G  9 Oct 08:30 sleepimage
-rw-------  1 root  wheel   1.0G 18 Oct 14:00 swapfile0
-rw-------  1 root  wheel   1.0G 18 Oct 15:09 swapfile1
-rw-------  1 root  wheel   1.0G 19 Oct 21:25 swapfile2
-rw-------  1 root  wheel   1.0G 19 Oct 09:11 swapfile4

As you can see, I have 4GB in swap on my machine, and this is also taking up space on the disk.


Why does my MacBook Air 2013 wake from sleep every minute on Mavericks? I'm having issues with my MacBook Air 2013 waking from sleep into Dark Wake every minute since I upgraded to Mavericks. Whenever it's been to sleep and goes into standby it keeps waking up. This is what pmset -g log looks like:

2013-10-25 06:52:41 CEST DarkWake               DarkWake [CDN]  : Using BATT (Charge:60%)                                   45 secs
2013-10-25 06:53:26 CEST Assertions             PID 18(powerd) Released InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:45  id:0xe00001348 [System: No Assertions]
2013-10-25 06:53:26 CEST Sleep                  Maintenance Sleep: Using BATT (Charge:60%)                                  16 secs
2013-10-25 06:53:28 CEST SlowResponse           PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)                    1996 ms
2013-10-25 06:53:28 CEST WakeRequests           Clients requested wake events: None
2013-10-25 06:53:42 CEST Assertions             PID 18(powerd) Created InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:00  id:0xe0000135c [System: No Assertions]
2013-10-25 06:53:42 CEST DarkWake               DarkWake [CDN]  : Using BATT (Charge:59%)                                   45 secs
2013-10-25 06:54:27 CEST Assertions             PID 18(powerd) Released InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:45  id:0xe0000135c [System: No Assertions]
2013-10-25 06:54:27 CEST Sleep                  Maintenance Sleep: Using BATT (Charge:59%)                                  18 secs
2013-10-25 06:54:29 CEST SlowResponse           PMConnection: Response from com.apple.apsd is slow (powercaps:0x0)                    1831 ms
2013-10-25 06:54:29 CEST WakeRequests           Clients requested wake events: None
2013-10-25 06:54:45 CEST Assertions             PID 18(powerd) Created InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:00  id:0xe0000136f [System: No Assertions]

And so on throughout the entire night. The console says 2013-10-25 06:41:20,000 kernel[0]: Wake reason: ? for every wake, so I guess my only shot is trying to figure out what DarkWake [CDN] means which there doesn't seem to be any info on. Also, this is while the Mac is on battery and with pmset -g darkwakes 0 (I.e. Power Nap turned off for battery).

My workaround was to disable sleep using sudo pmset -b standby 0. Not really a fix but a temporary workaround until I revisit the issue.


How do I check my Mac's RAM? I know there is MemTest86+ for PCs, but what can I use to see if my RAM is actually good in an Apple product? Whether it's a MacBook, MacBook Pro, iMac or Mac Pro? What symptoms would show that RAM is bad?

I've had bad RAM that still allowed the machine to boot - a stick of memory in my Mac Pro apparently failed gracefully overnight.

The first step would be to check system profiler to see if the memory is being recognized. If indeed it is, there's a version of MemTest for OS X: http://osxdaily.com/2011/05/03/memtest-mac-ram-test/


How can I create two separate, isolated wifi networks with one Internet connection/modem? My scenario:

I just got a "smart" sprinkler device that needs to connect to the internet over WiFi
I do not want to put that device on the same network as my other Internet-connected Macs and devices in the home
I have one Airport Time Capsule and one Airport Extreme
I also have an unmanaged gigabit switch
I have Comcast cable Internet service with one cable modem. I don't think I have a static IP from Comcast.

Question(s):

Is it possible with the equipment I have to create two separate WiFi networks that can't see each other?
If so, would that be adequate protection for my Macs and home devices if the smart sprinkler somehow got hacked?
If yes to both of the above, how do I set it up?

So far, I've been able to create two WiFi networks, but haven't been able to get them both connected to the Internet without them obviously sharing the same underlying network. For example, I can print from WiFi network #1 to the wireless printer attached to WiFi network #2.

Any thoughts?

Apple networks do this well with the guest network. All the "suspect" devices only get to go to the internet and not infect / snoop / attack the trusted machines on the proper network. Many other network vendors have the same idea - either by making separate VLAN for the sequestered / DMZ devices as needed.

It doesn't make sense to address each of the separate questions since each would be a long several paragraphs. Perhaps narrow down on one item once you've chosen to set up your network and can document it and ask the subquestion with details needed for a more narrow answer.


How to set two-sided printing as default in Mountain Lion Preview? Every time I print from Preview app I need to manually click on "Two-sided" checkbox. This is annoying when I have a bunch of documents to print. Is there any way to set "two-sided" as default?

In the print dialog you should save a new preset. Below you can find the steps to do so.

Open the Print dialog. It will look something like this:

Check the Two-Sided box.

Go to the Presets drop down list and click Save As...

Type a name for the preset in the dialog and choose if you want this preset available for all your installed printers or just this one.

Now choose that preset in the dropdown list. The next time you will print something the preset will be automatically active, so it will print two-sided as default.


How is Apple repairing iPhone 5 with damaged glass at the genius bar? iMore reported back in September that Apple retail stores would soon gain the capability to replace the glass in front of the screen in the store.

Has anyone had a repair quoted or performed for an iPhone 5 where Apple didn't replace the entire unit?

I've heard of out of warranty replacement phones for $229. Also, I know that there are 3rd party services that will do this repair. I'm asking about replacing just the glass in an Apple retail store.

$150 without being covered by Apple Care warranty is a sweet deal. Our company purchases back the broken LCD from repair shops around the USA and this is really going to be stiff competition. There isn't anyone offering iPhone 5 LCD replacement for under $150 in any retail repair shop around the US. Their all between $160-$200. In the past Apple's repair prices haven't seemed like a business model they wanted to focus on. I'm left scratching my head at what this could mean for their future plans to compete with the boom of iPhone repair shops. I suppose it might not be as big of a deal since there are only so many Apple Genius Bar locations nationwide.


How to have Mail.app in Lion sort messages within a thread oldest to newest (like gmail) In Mail.app on 10.7 Lion, When I select an email thread, it shows all the emails within that thread in the right-hand pane, with the newest message first. How can I change this to sort from oldest to newest (the way that gmail shows messages when you are viewing a thread)?

Go to:

Preferences -> View Tab

Then uncheck the bottom item labelled "Show most recent message at the
top"


Average start up time for Macbook Pro running Lion? I have a new MacBook Pro 13 inch 2.4GHz and I am noticing that the start up timeis about 60 seconds from power on to launching Safari.

Is this an average start up time?

Yes. Your start up time is dependent on how fast your hard drive is, how full it is, and how your OS is running. If you're running a normal 5400 RPM drive with around 50% of the storage space filled, 60 seconds is about normal. A few things you could do to help this out are:

Reset the SMC

Shut down your MacBook Pro
Plug in the MagSafe adapter and make sure it is charging
Simultaneously press the shift + alt + control + Power buttons and hold them for about 10 seconds. Let go after that.
Restart your Mac (and move on to the following suggestion):

Reset the PRAM

Press the power button to start up your MacBook Pro
Hold down the following keys:⌘ + alt + P + R until you hear the start up chime sound twice.
Let go and boot normally.

Disk Repair

Open Disk Utility from /Applications/Utilities
Select your startup volume, probably named "Macintosh HD"
Click on Repair Disk

Permissions Repair

Open Disk Utility from /Applications/Utilities
Select your startup volume, probably named "Macintosh HD"
Click on Repair Disk Permissions


How to remove duplicate and unclickable Dropbox folder shortcut in Finder sidebar? Here is a screenshot of my Finder sidebar with the non-functional duplicate Dropbox folder shortcut:

How can I remove this non-functional duplicate Dropbox folder shortcut from the sidebar?

I have tried uninstalling Dropbox and deleting the following directories:

/Library/DropboxHelperTool
~/Dropbox.dropbox.cache

My /Library/Contextual Menu Items is empty despite what is written in the Dropbox uninstalling instructions.

It was a broken folder reference, and it could be removed by holding cmd+alt and dragging the shortcut off the sidebar.

Reference: How can I remove a folder that no longer exists from my Finder sidebar in Lion?


Customize touch bar on lock screen? On the 2016 MacBook Pro with touch bar, most Apple applications allow you to customize the touch bar. It's also possible to change the control strip in the System Preferences.

However, I can't find a way to change the touch screen buttons that are displayed on the lock screen. I would like to add the backward/forward media buttons besides the play button.

Does anybody know how (or: whether) this is possible?

There is no way to customize it yet. Seems to be ample space to place them around the "Play" icon.


Is system maintenance software required? If so, what is the best? On Windows computers, people often use third party software like SystemCare in order to keep their system functioning at top performance.

Are there Mac equivalents that monitor startup, configuration and the like?  How necessary are they?  What is the best general purpose package?

Are there Mac equivalents that monitor startup, configuration and the like?

OnyX, Snow Leopard Cache Cleaner, iTweax are some options.

  How necessary are they?

Not very. Any optimization that needs to be done is already built into the Mac OS X.

  What is the best general purpose package?

Can't help you there, I don't use such utilities.


Reinstalling Mac OS X on Macbook with swapped hard drive? I don't know much about Macs, so when my girlfriend asked me to repair her old Macbook, I tried to swap out the hard drive from my junker laptop. I got it all changed and now the boot manager shows a single partition for Windows. However, I am a little stuck on how I am to boot into Mac OS X to reinstall it?

I was able to get a dump of the App Store version of Mac OS X Lion, and upon placing that on a USB drive with TransMac, it was recognized by the boot manager. But unfortunately, on choosing it, a large NO symbol was shown and the computer shut down.

This question has been answered here.

Basically do the following:

To start Recovery, hold down the Command + R keys while booting. The interface is pretty straightforward after that and you should be able to figure it out.


How to Download m3u8 stream to local HD in OS X? The file in question looks like this:
https://example.com/somenumbers/somenumbers/somename.ts.m3u8
The file in question isn't a live stream. It's a recording.
I've tried using the ffmpeg library using various commands but the resulting file was either not downloaded at all due to "corrupted" error, or was downloaded but was heavily corrupted.

You can use FFmpeg for this.

For example:

$ ffmpeg -user_agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.8 (KHTML, like Gecko) Version/9.1.3 Safari/537.86.7" -i http://185.38.12.60/sec/1503173737/363333397f6b65370bfc740ca4dea8c3f8dd2a93419f7748/ivs/12/b1/2ec5e15ba2a6/hls/tracks-4,5/index.m3u8 -c copy pd.mkv

User Agent is important key for many online cinema.


What happens if I update an app using its built-in ability that I built/installed through MacPorts? Will I break MacPorts ability to manage and update that same app?  Would it even allow me to do so?

For example, both MacVim and iTerm2 have a "Check for Updates..." function built into them.  If I built/installed those apps through MacPorts, and then updated them using the "Check for Updates", would I lose the ability for MacPorts to manage the app's version?

Probably not as Macports keeps information about what versions are installed etc in a database /opt/local/var/macports/registry/registry.db So when a new version comes out from Macports it will compare with this db.

However if you have done an update otherwise then why do you want macports to update it as the versions won't be as expected.


Make volume buttons only control headphones? I'm trying to use soundflower and co. to record desktop sound, but I'd like to be able to adjust the volume of my headphones simultaneously.

The volume buttons adjust soundflower if I set the system sound device to soundflower and use LineIn to PlayThru to the headphones (same problem with soundflowerbed), or the volume buttons don't work at all if I use an aggregate device.

What can I do to make the volume buttons control the headphones and not soundflower (which I always want to be at max)?

I did eventually get around to solving this using ControllerMate and Multi-Output Devices instead of LineIn.

Using Audio MIDI Setup I created a Multi-Output Device that outputs to both Soundflower and my headphones:

Now use this device for system-wide sound output.

Then using ControllerMate and an accompanying AppleScript I was able to 'bind' the volume buttons on the headphones (I use Apple's standard earphones) to controlling the headphone/speaker volume only:

(Apple Mikey HID driver is what ControllerMate calls the controller associated with the buttons on the headphones)

The AppleScript for lowering the volume:

set volume alert volume ((alert volume of (get volume settings)) - 100/16)
set volume (alert volume of (get volume settings))*7/100

and for increasing it:

set volume alert volume ((alert volume of (get volume settings)) + 100/16)
set volume (alert volume of (get volume settings))*7/100


Quick and easy way to batch convert multiple HEIC to png or jpg on macOS? Is there a quick and easy way to convert many HEIC files to png on macOS?
Example
Suppose we take some live photos on iPhone, airdrop them to MacBook, and we want to upload them to a site that only accepts .png files.

I've noticed if you simply change the extension from .HEIC to .png (e.g. in the above image), then as far as I can tell, the image file is treated accordingly by programs and it 'works'.
However, I guess the underlying file hasn't changed, so it could still contain live photo information (I think), which a normal png wouldn't have, which, in a worst case, could be a security risk or in less severe cases simply be an annoyance.
What I know so far
The best I can do right now is go through the files one by one renaming them. I would really like to know what other solutions are available (via point and click and terminal), and have a strong preference for not having to download any external software.

This answer is what solved for me. It's based off @user3439894's extremely useful comments
To convert all .HEIC images in a directory to .png
Open terminal. cd to the directory where the .HEIC files you want to convert are stored.
for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images
The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)
for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

sips documentation: https://ss64.com/osx/sips.html


How do I get the multimedia keys on my keyboard to do anything? I have a Sierra mac with a MS Natural Key 4000 keyboard.  It's got a bunch of special keys that I'd like to do stuff with.  Out of the box, only volume up/down/mute and play/pause work do anything.

I tried using BeardedSpice to bind these keys.  It didn't respond when I hit them.  Karabiner-EventView wasn't any better - I could see other keys being typed, but these ones didn't trigger anything.

Got it!  USB overdrive heard the keys and let me map them to arbitrary osascript.  http://www.usboverdrive.com/USBOverdrive/News.html


Are these normal temperatures? I just got a new MacBook Pro 2017 128GB no-touchbar, bought it in the refurb.

I'm doing a bit of Photoshop ( I know it's not the best MBP, but I really need it right now for work ) and I have Safari ( 6/7 tabs ) running with Spotify, and I feel like my MBP is too hot. Here are the temperatures according to iStats

I feel like it's really way too hot, but perhaps I'm mistaking. I heard the max temperature is 100°C, so I'm pretty far from that.

What do you think ?

Thanks !

Totally normal if on the low side. If your CPU is less than 15% idle, I expect you to get to 85 C internal for CPU proximity and higher for all the on die thermocouples. Running just unde 100 C is how the silicon is designed to operate at max thermal generation and high sustained load.

Also, if you use the command line tool to check temperatures or thermal load once every 15 minutes instead of having graphs checking every second you may find your CPU runs much cooler. After all, having those graphs update live in real time prevents the CPU from sleeping.

 pmset -g thermlog

Lots of people are surprised or at least concerned by temps:

Are these temperatures alright?
CPU Die temperatures reaches 90° C, is that normal?
Is it normal for a 27" iMac to have CPU core temperatures around 95C under 100% CPU load?
Retina MacBook Pro running very hot?

From an engineering standpoint, the MacBook Pro and the iMac in the Mac Pro and iMac Pro all have the same power envelope design and push their CPU to 100 C when the work is available.  Once the CPU is at Max normal operating load then the kernel task begins to idle potential work so as not to exceed the final design for the processor.


How to disable sidetone (voice feedback) on USB headset on macOS Catalina? I have a Plantronics C5220 USB-C headset and when I use it on Skype I can hear myself in the headset speakers, that's what they call "sidetone" (or voice feedback).

Apparently there is a native option on Windows OS to disable it, I wonder if there is any way to achieve that in macOS ?

I have already been through sound settings and midi/audio settings.

I got an answer from the Plantronics (Poly) support team, all their products have sidetone enabled.

On macOS, the driver (Plantronics Hub) they provide is not that good and doesn't allow to disable sidetone which is probably firmware enabled.

I've also tested the headset with the 3.5mm jack on my smartphone and the sidetone is not present that why I tend to think that the sidetone is handled by either Plantronics Hub or headset firmware.


Graphic noise in OSX I've been experiencing a strange thing in my MBP 2010 and only in OSX, haven't noticed this when I boot into Windows.

Noise happens for a second or two when changing state - loading pages, switching windows etc., this is the extreme occurence:

Here is the video of this, but less extreme (the section above the edit box jitters).

What could be causing this? It seems to be getting more frequent...

I'm sorry to break the bad news, but your GPU has failed. This is a known issue for your machine. Your model was subject to a replacement program for the logicboard due to a defective GPU, though it no longer is active. Apple may or may not still replace your logicboard. It is ultimately at the discretion of the store manager. If you don't qualify, your other option would be a flat rate repair, for ~$300, which Apple will repair anything wrong with the machine for this fee. Just googling around, other options exist that may prolong the life of your machine.

Ultimately though, this is a hardware issue for which no online troubleshooting exists. Best of luck.


How to clear display settings cache How do I clear the "cache" (remembered settings such as whether to mirror or have two separate displays or what my preferred resolution is for a monitor)?

Try deleting

users/YourUserName/Library/Preferences/ByHost/com.apple.preference.displays.[long number].plist

Reference


Non-destructive File/Folder Replace While testing WordPress 3.5, I took the old copy of a site, and copy pasted the 3.5 from the zip file.

Part of a WordPress install is the folder wp-content containing all the uploads and themes plugins etc. This folder now no longer contains all of that stuff because I clicked replace.

How do I replace the files in that folder, not the folder itself? Right now it's the same as deleting that folder and then moving the new folder in its place.

Under Windows, the files in the folder, not the folder itself are replaced, right now i'm lucky I have a backup to copy from but I could very easily have lost that date considering every other platform I use follows one paradigm and OS X another

Some people have suggested I should click on merge, this would be great if I could, but no merge option is provided:

Select the folder you wish to copy.
Press command + C. This will copy the folder to clipboard.
At the destination, press command + V. This will copy the folder to your current folder. If a folder with the same name exists, you will be give options to Stop, Merge or Replace.

Quirk: This doesn’t work if you try to move (by dragging), not copy, a folder from one place to another. However, if you still wish to use dragging and dropping, drag with the option key pressed. This will copy, instead of move, a file/folder from one place to another.

This is what you will see if you copy a folder named “Temp” to a folder named “untitled folder” which already contains a folder named “Temp”.


How can I get the window bounds for "Adobe Illustrator" in AppleScript? Apparently, Adobe doesn't have a single mechanism in place for people using a laptop and additional monitors with their products. As an Adobe CC user who primarily works from a laptop that connects to a larger monitor at home or school, ALL Adobe CC products open with a pop-up window that is outside of the monitor bounds. So you can't move, or adjust, anything.

It effectively locks the product.

The only workaround is to disconnect the monitor, wait for everything to shift over to the LapTop window where it makes sure to open everything inside of the monitor bounds. Then reconnect the monitor, and move everything over. Which is a MASSIVE time waster when you're dealing with 8gb of RAM and MASSIVE graphics files.

I've started learning AppleScript JUST TO FIX THIS RIDICULOUS GLITCH.

BUT... AppleScript and Illustrator don't work with windows and bounds together.

Can someone help me with whatever script I would have to write to get (and set) the Adobe Illustrator window bounds?

Here's a piece of code that just gets desktop's dimensions and transfers them to another application's first window.
Exchange "TextEdit" with Illustrator's process name and build yourself a Service in Automator (open "New", choose Service, draw "Do AppleScript" to right, insert this code ...).
Give it a shortcut via [ System Preferences > Keyboard > Shortcuts > Services ] and get going!
Hope this helps ...

tell application "Finder" to set myBounds to bounds of window of desktop

tell application "System Events" to tell process "TextEdit"
    set position of window 1 to {0, 20}
    set size of window 1 to {item 3 of myBounds, (item 4 of myBounds) - 20}
end tell


Safe to change TMPDIR? I recently installed Open MPI, and it's complaining

PMIx has detected a temporary directory name that results
in a path that is too long for the Unix domain socket:
Temp dir: /var/folders/**/*****************************/T/openmpi-sessions-501@host*******************************/*****

This question suggests setting TMPDIR to /tmp. Is that safe? Will it mess up other programs?

There can be security flaws that result from the careless use of /tmp; malicious local users may be able to delete arbitrary files or possibly even run arbitrary code under your user account, depending on how bad the /tmp flaw is. A solution that remains within the char sun_path[104] limit on unix domain sockets (see /usr/include/sys/un.h for the definition) is to create a temporary directory and use that for MPI:

$ mktemp -d /tmp/mpi-XXXXXXXX
/tmp/mpi-zUN9SQo6

which leaves 86 characters for the socket file to use (104 minus one for the trailing NUL minus 17).

Depending on where and when you set TMPDIR other programs could easily be messed up, notably tmux or screen that then may not then be able to locate their control socket. If possible, scope the custom TMPDIR setting as close to the MPI calls as possible, e.g. with a shell function or alias along the lines of

alias mpi4py='TMPDIR=$(mktemp -d /tmp/mpi-XXXXXXXX) mpi4py'

This would create a unique temporary directory for each invocation; the directories in /tmp are pruned automatically. If a shared or more persistent directory is needed /var/tmp is typically more suitable

$ mkdir /var/tmp/mympi

and be sure to confirm the directory did not already exist in the event a far too clever local attacker has already created that directory (unlikely, but this is why mktemp -d was created). Then, in your shell profile the alias might look something like

alias mpi4py='TMPDIR=/var/tmp/mympi mpi4py'

This form is again more suitable if there is shared state necessary between different MPI command invocations.


Why does my iPad automatically capitalise Bono but not the edge? Can anyone please tell me why my iPad automatically capitalises "Bono" but not "the edge"?

English is hard.

One is easily distinguishable as a proper noun. Bono is not a common word that would be anything other than a name. Like Sally or Andreas. The OS can capitalize occurrences of Bono with a high degree of confidence that you were referring to a proper noun.

The other is not easily distinguishable as a proper noun. There is no way to tell if the sentence:

  I played guitar near the edge

is referring to you playing guitar near a precipice or near another human who has the legal name Dave Evans.

You can create a text shortcut to automatically expand a text snippet you enter like tedge to The Edge if you like. You can find shortcuts in the Settings app under General > Keyboards > Shortcuts.


How do I prevent files from being saved as .webarchive Whenever I want to save files like .csv files that were open in a safari tab, it forces me to either name it as .csv.webarchive or .webarchive. Is there a way to disable this?

Here is another small tip, for downloading files like csv, pdf, mp3 etc, that are opened and viewable in a Safari tab/window and have been accessed directly through their urls (e.g. the url address in safari address bar is something like: www.example.com/mycsv.csv, or www.example.com/mymovie.mp4, and so on...)

Go and click inside the address bar, so it gets active.
Hold the ALT key down, and stroke once the ENTER key.

Safari will reload the current page, and immediately will start downloading the current file.


Capture month end values in Apple Numbers Is there a way to capture a cell value at a specified time in Numbers. For example if you have a stock portfolio and wish to capture month end values can this be done?

I am sorry that I don't know how to do what you are specifically asking for but I reckon it is not a trivial thing to do. In case you can't figure it out, I think either of the two below might be an alternative for you.

You can use the stock() function in Numbers to calculate the value of a stock portfolio with the latest closing prices. You can open this file within the first day of every month and it would give you the value of the portfolio at the closing prices of the last day of trading of the previous month assuming you will also be connected to the internet when you open the file.

You can then either record the value of the portfolio somewhere else such as another table in Numbers or save the table calculating the value of the portfolio to another file or sheet in Numbers as a whole by copying it first and then pasting it using Paste Formula Results menu option under Numbers' Edit menu at the top. The drawback of this option is that if you open the file calculating the value of the portfolio at a later date than the first of the month, it is likely to calculate the value of the portfolio for a date later than the end of the previous month.

Alternatively, you can use the stockh() function to calculate the value of a stock portfolio for any past date. You would of course need to know the exact number of shares per stock in the portfolio at the given past date for this to work.


Use *Two* Thunderbolt/Firewire adapters on MacBook for 400 and 800 devices? I'm completing an audio recording setup.

Equipment:

Macbook 13" Retina late 2012 with Two Thunderbolt ports
One Focusrite Saffire audio interface (Firewire 400)
One OWC Mercury external SSD drive (Firewire 800)
I already own One Thunderbolt/Firewire adapter

Question: what is the optimal setup for these devices? Specifically, will I get full Firewire 800 speeds if I purchase a second Thunderbolt/Firewire adapter and run the external FW800 drive alone on that port?

I gather from reading other threads that, if I am to use only the one adapter, I would place the FW800 drive first in the chain, and the FW400 audio input last. However, it also appears that, if the FW400 device "talks a lot," it can still slow down the speed of the FW800 device. So, the question is whether that same behavior might happen even if the devices were each on its own adapter through separate Thunderbolt ports?

One might presume both devices would operate at optimum speed if on separate ports, but perhaps the internal architecture of the Macbook still handles them as if on one port?

Thanks.

Each Firewire controller will be treated independently by OS X, and each controller will have its bandwidth set by the slowest device connected. So you could daisychain your devices but will only see 400Mb/s throughput, requiring you to use separate Firewire adapters if you wish to see your OWC drive running at full speed.


Caps Lock key mapped to a second Control key, reset after wake in Mountain Lion I'm running a clean install of Mountain Lion. I have my Caps Lock key mapped to a second Control key.

Whenever I wake my computer back from sleep, it re-sets itself to the Caps Lock key. This did not happen in Lion.

Has anyone else experienced this bug after upgrading?

I have the same issue on a 2010 MacBook Air with its internal keyboard. Not every time it wakes up, though. I did a clean install of Mountain Lion. I didn't have such an issue with Lion on the same machine.


Fixed tab-spacing for TextEdit on Mac Is there a way to set a fixed number of spaces for a tab indent? If not, can someone recommend a program that is simple like TextEdit, but also does have fixed tab spacing?

If meaning of 'tab indent' is 'tab stop' in TextEdit User Guide jargon then you can follow instructions in Set tab stops (short: while ruler visible manually drag tabs stop width)


How to reinstall OS X when Recovery isn't working? My wife has a MacBook Pro that she bought new in 2012. In 2013/14 it had an issue with the system files and when she took it into the Genius bar at Apple they reinstalled the OS (wiping all personal data in the process). At this point they also upgraded her to the latest OS X at the time. I'm not sure what version this was but I assume Mavericks or Yosemite for reasons that will become clear.

At the weekend the laptop seemed to grind to a halt and lockup while we were browsing the web. After waiting for several minutes to regain any kind of response, we did a hard reboot using the power button. On restarting the system showed a grey screen and a flashing directory symbol with a '?', then switched to the Prohibitory symbol. Unfortunately the warranty has no expired so any trip to the Apple Store will be quite expensive.

I've been reading various articles and posts for the last few days to try and work out how to fix this, as follows:

Apple Hardware Test comes back OK.
Booting from the local Recovery partition (Command-R) does not work. Every time I try this it boots Internet Recovery instead. This means that I cannot reinstall the version of Mac OS X currently on the disk. Running diskutil list in Internet Recovery I can see that the Recovery partition exists on disk0 but I assume it is corrupt in some way.
I have ran 'First Aid' in Disk Utility a number of times in a Verify/Fix cycle. It says that it has fixed the disk but there still seem to be issues in the fix log (checksum errors, etc.). Another strange note here is that it shows the 500GB disk as having all space used except 37.5MB. This wasn't the case when the laptop was working.
Finally, when I run the Internet Recovery and select Reinstall OS X it tries to install Mountain Lion and gives me an error saying that the laptop cannot be 'upgraded' as it is running a newer OS (presumably Mavericks or Yosemite)

So my question is: What is the best course of action to get out of this bind? My thoughts are:

Is there a way to get the local recovery partition working?
Is there a way to determine the version of OS X installed on the system from the recovery tool?
Is there a way to obtain a disc copy (without paying as we already have it installed) of Mavericks or Yosemite so that I can reinstall from media?
Finally, is my only option now to do an Erase and then Install OS X from the Internet Recovery tool?

Any help much appreciated.

My recommendation would be to completely wipe the existing OS so that the OS X installer does not give you any errors about "upgrades".

As mentioned by Apple, I would boot the Mac while holding Command (⌘)-R. Once you are in OS X Utilities, select the Disk Utility option. In Disk Utility, select the drive containing the existing Macintosh HD partition, and then click the Erase button. Format the drive as OS X Extended (Journaled) with the GUID Partition Map. Once the drive has been erased and reformatted, exit Disk Utility.

Back in OS X Utilities, you should now be able to select Reinstall OS X which will guide you through reinstalling OS X Mountain Lion on the freshly reformatted disk without giving an error about any existing OS.


Does FDE encrypt all partitions? I have two partitions, one for boot.

Now I've enabled full disk encryption, looks like the one for boot is encrypted. But what about the other one? I'm not sure if it's also encrypted.

How can I verify that?

You say you "enabled full disk encryption" -- what exactly do you mean by that? If you mean FileVault, it's not truly full disk encryption (as ecnepsnai said), it's full volume encryption for the startup volume, and your second partition is not encrypted. If you did something other than turning on FileVault, it'll depend on what you used.

If you used FileVault, it is possible to separately encrypt your secondary volume in Finder by right-clicking on it, and choosing "Encrypt" from the shortcut menu. This is based on the same "Mac OS Extended (Journaled, Encrypted)" volume format that FileVault uses, but rather than automatically using your login password to unlock the volume it'll need a plain password just for the volume.

You can record this volume password in your keychain so it'll be able to unlock and mount the second volume after you log in, or optionally use Keychain Access to move the volume password from your login keychain (available only after you log in) to the System keychain (accessible anytime OS X is running) so it can mount the volume even before you've logged in.

And a technical note: even with both volumes encrypted, you still don't quite have full disk encryption. There's an invisible partition named Recovery HD that holds (among other things) the booter file that asks for your account password at startup, and uses that to get access to the main volume. That must be available before the "disk" is unlocked, and therefore cannot be encrypted. There's also a (also hidden) EFI partition used for firmware updates, which also aren't encrypted.


Am I limited to using Apple's In-App purchase for charging for in-app consumables? I'm building a book app where you can read one book for free, but if you pay, you have access to all the books until the end of your subscription (30 days).

My query is regarding this item in the App Store review guidelines:

  3.1.1 In-App Purchase:

  If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels,
  access to premium content, or unlocking a full version), you must use
  in-app purchase. Apps may not use their own mechanisms to unlock
  content or functionality, such as license keys, augmented reality
  markers, QR codes, etc. Apps and their metadata may not include
  buttons, external links, or other calls to action that direct
  customers to purchasing mechanisms other than in-app purchase.

I understand I can't use an external link to pay, but:

Do I need In-App purchases?
Can I use external payments like Stripe?

No. You don’t need in app purchases if you can just have a log in to identify people that already have a subscription external to the app.

See 3.1.3(a) “Reader” Apps of the review guidelines.

Yes - if you are a valid reader app and not required to offer IAP alongside the external purchase, you can then use stripe or anything else on your external payment system, but you have to host, design, collect everything externally.

You are not prohibited from having an external payment or subscription like Netflix or many other apps do. Some are blended like Major League Baseball where there is IAP for people who want to pay (and of course IAP pays Apple a cut per the agreement on purchases and subscriptions that you have available in your terms as a developer). And people can bring a paid subscription and log in from external to the app, and those pay nothing to Apple.

Everything hinged on strict adherence to what Apple defines “unlock within the app” which is in summary (as I understand it):

There can be no link or mention in the app how to find the actual payment terms. You can offer a sign in, but you can’t say it’s for payment.
You can’t have functionality that unlocks to mimic IAP or use the API or payments through Apple.

Tons of apps have trial subscriptions when they use IAP - look at Omni Group for OmniGraffle and such.... I believe you will run afoul of Apple review if you deliver everything and then force someone to pay later if that “pay later” isn’t explicitly IAP using Apple as the payment processor, but you can find that out by initially shipping no paid functionality and only do the log in.

For this potential wrinkle, see 3.1.3(a) and 3.1.3(b) and 3.1.5(a) of https://developer.apple.com/app-store/review/guidelines/

Then once your app is approved, let Apple review know you have a question for a future change. They will tell you exactly what’s allowed and what’s not during review in my experience.


Avoiding all apps reopening when OS X crashes Sometimes my computer will crash and restart due to unknown errors. It usually happens when I'm working on something so a few apps are open. OS X has this annoying feature where it tries to reopen all apps when you restart. You can disable it when manually restarting, but it still does it if the computer restarts after a crash.

I think this feature was built to save time, but all it does is waste more time than it's worth, because whenever the computer restarts from a crash I usually just restart it once more (this time with "Reopen apps" disabled) just to get to a workable state. The problem is it'll keep spawning apps and preventing the restart from happening.

Disabling this feature would prevent me having to restart after a crash altogether. Is there a way to stop OS X from doing this?

Permanently prevent macOS High Sierra from reopening apps after a restart

Works in macOS El Capitan, Yosemite, Sierra, High Sierra.

Solution: deny OS X access to the file it uses to store your session state.
It prevents reopening apps even after reboot/shutdown from Terminal, from AppleScript, and system crash.

GUI method

Open Finder
Cmd+Shift+G (Go to folder)
Copypaste ~/Library/Preferences/ByHost/ and confirm
Find the file starting with com.apple.loginwindow
Doubleclick (opens in TextEdit)
Remove all content and save the empty file. An additional confirmation dialog may appear.
Right click, Get Info
Lock the file (check the checkbox)

GUI method (undo)

If you wish to undo this change later and re-enable the feature, simply delete this file and the OS will recreate it.

Open Finder
Cmd+Shift+G (Go to folder)
Copypaste ~/Library/Preferences/ByHost/ and confirm
Locate the file starting with com.apple.loginwindow
Simply delete it

CLI method

Open Terminal.app
Make the file owned by root (otherwise the OS will just replace it)

sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*

Remove all permissions, so it can't be read or written to

sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*

CLI method (undo)

Re-enable "reopen all apps" after login

sudo rm -f ~/Library/Preferences/ByHost/com.apple.loginwindow*


ETA for WorkGroup Manager 10.10 Anybody have any idea if / when Apple is planning on releasing WorkGroup Manager for 10.10? I dug around Google but couldn't find anything. Otherwise, I'm not upgrading.

Sorry but things do not look good for Workgroup Manager.

From http://support.apple.com/kb/ht1822:

  Note: Workgroup Manager and previous versions of Server app are not compatible with Yosemite.


How can I create a well-structured PDF with macOS? I'm trying to put together a text-based PDF that will be read with a screen reader. In order to make the reading process as straightforward as possible I've used a hierarchy of three levels of headings. I originally created the document in Google Drive, but if I try to export a PDF from there all my headers disappear in the PDF document. If I export from Drive to Word then the headings are retained, but they disappear when I create a PDF from Word by using the built-in macOS PDF creation function.
How can I retain my headings when I create a PDF in macOS?

In Word for Mac 2019 (Version 16.41 (20081900) if I go to File -> Save As and choose File Format PDF it displays an option, "Best for electronic distribution and accessibility (uses Microsoft online service)".  It then asked permission to use the online service.  When testing in macOS Preview the Table of Contents shows Heading Two and Three assuming Heading One is the title.  Setting an actual title with the title style now shows the Title and the 3 headings in the PDF table of contents.
So I think this will work without needing more advanced PDF tools such as Adobe Acrobat.
You might want to produce an actual Table of Contents in Word that might help as well but it wasn't necessary.  I just applied the Heading Styles in Word to the headings and made the body portions the normal style.
Also in Word there is "Check Accessibility" under the Tools menu.
Tested doing same in Pages and that produces a table of contents with the style headings as well in PDF.  But Word allowed for collapsing the headings while Pages generated the headings in a linear fashion in the table of contents.


Minimum disk partition for Windows installation increased to 48 GB? I am currently on Mac OS Mojave 10.14.6. Boot camp assistant is not allowing me to reduce the Windows 10 partition size to a value lower than 48 GB. I only have a 256 GB SSD and 48 GB seems to be a lot. I read online and watched a few videos on Boot Camp and most of them stated that Boot Camp requires a minimum of 30 GB. (They are probably outdated?)

Microsoft's minimum system requirements indicate min disk space as 32 GB. Is there any way to override Boot Camp assistant to allow for a lower size partition? Is 48 GB the new minimum space requirement?

My only intention of using Windows is for playing games off my external hard disk.

I am also considering to install Windows 7 or 8.1 to save some space while maintaining compatibility with games. Thus, allocating 48 GB is not optimal.

Boot camp assistant is not allowing me to reduce the Windows 10 partition size to a value lower than 48 GB.

That sounds about right as a practical lower limit for Windows 10. The Microsoft system requirements you're referring to are the absolute minimum resources required for the operating system to be installed; using Windows with that little disk space will be painful, and you are likely to have difficulty installing and using even basic desktop applications, let alone games.

(Running games from an external hard drive is inadvisable. Not all games will even run from an external drive, and performance will suffer heavily.)

  I am also considering to install Windows 7 or 8.1 to save some space while maintaining compatibility with games.

Don't. Both of those operating systems have exited their mainstream support phases, and the extended support phase for Windows 7 is ending in January 2020. Using them for a new system is a bad idea.


macOS Mojave won't install updates past 10.14.1 due to requirement for APFS formatting I have a MBP 2012 I upgraded from High Sierra to Mojave after it came out as GA. I don't recall if I was asked about upgrading to APFS when Id id that, but at this time the main volume is Mac OS Extended (Journaled).

My current About This Mac...version is Mojave 10.14.1 (18B75). Now, when updates are advertised from the App Store, I'm unable to upgrade because 10.14.3 is required.

No OS updates show in the App Store, and when I searched for the updaters (10.14.2 Combo, etc), I can't install because the installer reports "macOS 10.14.2 Update can't be installed on this disk. This Mac can only install macOS on APFS-formatted drives."

I tried the search results recommending to boot in Recovery Mode and use Disk Utility, but APFS is not available as a type.

I have good backups and I can reformat the boot volume if I need to, but I have not done this before. Should I get a 10.14.3 installer to do this and boot from an external drive? The only guies and message boards I've found just keep saying to install 10.14.3 (I can't) or convert the disk in Recovery Mode (APFS is not available as an option.)

Any known-good ways to get my 10.14.1 upgraded so I can keep getting App Store updates?

I had the same problem. After multiple searches, the only way I found to get the drive updated to APFS was the following:

Full clone of internal drive to external drive using SuperDuper! (Carbon Copy Cloner would also work from what I've read)
Reboot from external drive
Reformat internal drive as APFS
Full clone of external drive to internal drive using SuperDuper!
Reboot from internal drive

It feels like there should be an easier way to do this, but I couldn't find it.


Where to insert a custom item in /etc/hosts file? The default /etc/hosts file looks like this:

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

If I want to insert a custom item, should I insert it after the first line?

127.0.0.1   localhost
127.0.0.1   website.dev
...

Or should I add it after the last line?

...
fe80::1%lo0 localhost
127.0.0.1   website.dev

I've seen both, but can anyone explain what the difference is?

You can add it anywhere you want in the body of the file.

Additionally the following works also:

127.0.0.1   localhost website.dev website.org

and for me even this works (but I don't think it's recommended):

127.0.0.1   localhost, website.dev, website.org

For the sake of a better overview I prefer:

127.0.0.1   localhost
127.0.0.1   website.dev
127.0.0.1   website.org
255.255.255.255 broadcasthost
...IPv6 stuff...


Is it possible to add an app to your wishlist in the desktop version of the App Store I love adding apps to my wishlist on the iPhone or iPad.

I would only find it normal that the same thing can be done with the Mac OS X version of the AppStore.

Obviously, this feature should be located under the little arrow of the price tag, right under the app's icon:

But it's not the case:

It seems that gifting an app from the Mac OS X version of the App Store isn't there either.

As we can see in the 3rd image, it isn't on the right-hand side either.

So, am I missing something, or is the desktop version of the App Store a diminished version of the iOS's?

You're not missing anything, it is as you suggest. Make a feature request since the feature doesn't exist.


cron queueing bash and python scripts I'm currently looking to understand and get comfortable with crontab queues on my macbook pro. I recently solved an issue where my simple bash script would not execute. It turns out I had to move my bash script and its output in the /Users/myusername/ path. Before I had it in the /Users/myusername/Desktop/. This post can be found here - https://stackoverflow.com/questions/64110897/simple-bash-script-doesnt-cron-properly?noredirect=1#comment113370465_64110897
My question: Do all of my bash and python scripts need to be housed in /Users/myusername path always? Is there no workaround?

Question:

My question: Do all of my bash and python scripts need to be housed in /Users/myusername path always? Is there no workaround?

Answer:
No. You can locate your bash and python scripts anywhere you like. However, there are additional requirements:

Your cron jobs run with a different ENVIRONMENT than when you run them; e.g. $PATH. Consequently, you should use a full path specification for specifying your scripts in the crontab; for example use:

* * * * * /opt/local/bin/python3 /some/dir/you/choose/myscript.py

On my Mac (Catalina) I've found it necessary to give "Full Disk Access" privileges to cron. YMMV on a different OS version. Here's how:

System Preferences -> Security & Privacy -> Privacy tab:

At least while debugging your cron job, you should consider redirecting any error messages (stderr) to a file - otherwise they wind up in /dev/null which is not helpful! Continuing with the above example:

* * * * * /opt/local/bin/python3 /some/dir/you/choose/myscript.py >> /Home/<username>/MyCronLog.txt 2>&1


Deleting a network user profile from computer My computer is hooked up to a school domain, and a few people used it to log on. Now, the accounts of the other users are still here. I don't have any of their files, but just the empty shell accounts OS X creates by default. It's still about 250MB per user (from the default stuff OS X puts in, plus caches they used while browsing etc.).

Can I delete these user folders safely (with sudo)? Or do I need to do some Directory Services magic to make sure OS X knows the users are gone?

EDIT: The users aren't in my "/Search/Users" DirectoryServices list, nor are they in /etc/passwd. Their user folders are shown as being owned by numeric IDs, rather than their actual names.

You do need to do some Directory Services magic because normally /etc/passwd doesn't really exist on a Mac and is being created each time you access it from the records in Open Directory.

To remove your users from the terminal, run:

dscl . -delete /Users/username

Where username is the user you want to remove.

Otherwise, you should be able to do this from the GUI by going to System Preferences -> Users & Groups -> Select the user from the user column and remove it with the minus.  It will ask you about removing the user's home directory and you want to say yes.

---Edit---

Check if the users exist in the system with:

dscl . -list /Users

If they don't exist, then you are safe to remove the home directories located in the root of the filesystem at /Users/username.


Apple Watch 3 - How to track movement in tennis? I have both an Apple Watch and iPhone. When I play tennis, my iPhone lays on the table. What setting do I need to set, in order for the watch to track my movement?

Currently it tracks the movement of the iPhone, so during my training, it stays at 0KM for the whole time. It works like this regardless if I use Endomondo or the Workout app.

we have also developed a smartwatch app for the tennis players - BestShot

It tracks both the tennis swings and the health data, combining it in a game performance scorecard, which can be accessed on a phone companion app. We have been working on it for a year and we are now testing it with a few tennis players and coaches. Hopefully you will find it useful too.


How to get Alfred to run a terminal command and open one app twice? I often need to run multiple copies of an app, like VLC.
For this I use the terminal and run a command similar to:

open -n /Applications/VLC.app

How can I create a shortcut with Alfred to run this one command if I type a keyword like vlcnew?

If you have the PowerPack, you can create a workflow.

Workflows can run bash scripts in terminal, post notifications etc..


Merge all music into iTunes I have collected about 50GB of music on my PC across a few folders with plenty of duplicates.

I just installed iTunes and synced an iPhone and its associated iTunes/Apple ID account, which created a library and copied a few hundred songs into it.

Is there a way to import all music from designated folders on the PC into iTunes, including de-duping?

To import music copy it to the folder \iTunes Media\Automatically Add to iTunes

Apparently there is no native bulk deduplication functionality.

One can identify duplicates within iTunes by going to View -> Show Duplicates.

However to bulk deduplicate presently one needs to find third-party utilities.  Most are not free.

I tried the shareware iTunes Duplicate Song Manager, but not only did it miss about half of the dupes found by commercial programs, but it also failed to remove them from the iTunes index when it removed the files.  For $12.95 Dupe Away managed to clean everything up and find the other obvious duplicates.


Enter individual numbers into iPhone contacts I have a list of phone numbers:

Joe Blow (123) 456-7890
Steph Smith (234) 345-5678
Iggy Ziggy (876) 756-7550

Is there a way to import these individual numbers into iPhone contacts without typing them in by hand?
(or receiving a call/message from them)

If you put them into a vCard (.vcf) file and if your iPhone is synced to iCloud, you can import them via the settings in Contacts on iCloud.com as you can see below:

There are also 3rd party service options such as Google Contacts as you can read from this article with specific directions if you want to import them from a CSV file.


VLC in Mac does not show video window I have just installed VLC for Mac, after I added a video file to my play list all I can see is this window + the audio played.

Please let me know how can I show the video playback?

That's the playlist window.

On Mac OS X:

Press CMD + OPTION + P to switch modes, or click on Window > Playlist.

On Windows:

Press CTRL + L to switch modes, or click on View > Playlist.


How to display a folder knowing its path? How can I display a folder in a different Finder window knowing its path ?

In the "Go" Menu in Finder there is a "Go to Folder..." menu item.

Alternatively you can use the shortcut:  Cmd ⌘   Shift ⇧  G

You can

Open a new Finder window
Use either of those commands
Type the path in the dialog that appears


Commands not found in Terminal except echo In my terminal basic commands are not found like:

mds-macbook-pro:~ ZILLURRAHMAN$ ls
-bash: ls: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ env
-bash: env: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ edit
-bash: edit: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ open
-bash: open: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ vi
-bash: vi: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ tail
-bash: tail: command not found
mds-macbook-pro:~ ZILLURRAHMAN$ ls
-bash: ls: command not found

But echo is working. Like: mds-macbook-pro:~ ZILLURRAHMAN$ echo $PATH
“users/ZILLURRAHMAN/desktop/bioinformatics/bow-tie/bowtie2-2.2.3/BT2_HOME:??

I can call up programs like pico using their full path like /usr/bin/pico.

The issue is that your PATH is messed up. The reason why echo works is because it is a builtin command in the shell so the shell does not use your path to find the executable.

You need to see what script file had an export PATH in it which set it to “users/ZILLURRAHMAN/desktop/bioinformatics/bow-tie/bowtie2-2.2.3/BT2_HOME:?? which has many error in it.

The usual files are ~/.profile ~/.bashrc or ~/.bash_profile for more see many question on bash


How do I download Mac OS Sierra or High Sierra without an Apple ID? Couldn't find an official source for an installer/download of supported Mac OS versions. Everything I found goes to the App Store which prompts for an Apple ID.

You can't, the Mac App Store naturally requires an AppleID and entering it is just part of the process to verify the user.

I can really only think on one way and that is to get a friend who has downloaded the installer to give it to you as a file or a portable USB installer, more on that here.
I am sure you have a valid AppleID, else just create another one, as it is much less complicated to just go the "standard" way and enter one if it prompts for one, than to have to worry about the legitimacy of other sources.

So to sum up, there is an option in the System Preferences' App Store tab to decide when to prompt for a password. This may be what you are looking for. Else the answer is no, as Apple likes to know who it's software goes to.
I hope that helps, please let me know if you require clarification.


Thunderbolt Daisy Chain to Non-Thunderbolt Monitor w/LG 34UM95 at end of chain I recently purchased a LG 34UM95. I planned to use the Thunderbolt daisy-chain feature to add another non-Thunderbolt monitor (mini DP --> HDMI) as the second link of the chain. However, it doesn't work when plugged in, and LG support informed me the daisy chain will only work with a monitor of the same model (e.g. another 34UM95).

Anyone know of a workaround for this? I thought a normal Thunderbolt chain could terminate with a non-Thunderbolt monitor.

(For clarity, my setup: MBP 15" Late 2013 -- Thunderbolt --Thunderbolt --> LG 34UM95 -- MiniDP -- HDMI --> LG E2360)

It's doable, one simply must include a TB device between the two monitors.

Computer->TB Monitor->TB Device->Non-TB Monitor

The TB device can be any dock, drive, etc. that has TB-in and TB-out ports (2 x TB ports).

The technical details have to do with the way TB carries and decodes display signals.  TB can carry 2 signals.  Essentially, each TB device can only decode 1 x display signal (there's more to it, and technically TB devices could decode 2 signals, it just ain't happenin' right now).  So your initial TB monitor can decode one for viewing on itself and pass the other along...but it isn't decoded.  You need a second TB device to decode that second signal.  If the second device is a TB display, then you're in-like-Flynn.  If not (like in your case), you need another TB device to decode the signal before it hits your non-TB monitor.


Installing OS X Lion on an iMac I have a new iMac where I need to install OS X Lion. The HDD is erased, but the newer iMacs don't come with bootable CDs.

But I do have a MacBook Pro OS X lion CD. My question is whether can I install OS X using this CD rather than downloading the whole thing?

The OS X install disks that used to ship with new Macs were specific to those machines, and can't be used on different models. You're going to have to use Lion Recovery to re-download and install Lion, or go to an Apple Store, they can reinstall it for you if your internet connection isn't sufficient.

It's also likely that the install DVD for your MacBook Pro is for Snow Leopard, any machine that shipped with Lion didn't come with install media, just a recovery partition.


How can I find out which kernel extension has been updated? I received a notification on Big Sur that an extension was updated and this must be authorised in System Preferences. It is 'System software from developer "Apple Inc."'. I find this odd:

I didn't receive any such notification in the past about Apple's own software (although I have occasionally received similar notifications about third party software). I would expect kernel extension updates to only occur via official software updates, which presumably do not require such warnings (or, if anything has changed there, then Software Update process is at least clearly happening rather than silently taking places in the background).

I had not performed an update of any kind immediately preceding this (that I know of).

FortiClient had just run. I believe it does some self-updating. I have a dim view of the software; it is always trying to be invasive and is regularly refused rights for various unnecessary installations of its own.

I see the situation as potentially risky: it is possible that either someone is pretending to be Apple who isn't, or that someone is trying to modify an Apple extension.
How can I find out which extension is being updated and which process initiated this? I did not have much luck looking in Console logs or kext command-line utilities. None of the files in /Library/Extensions or /System/Library/Extensions appear to have been modified recently.

The name of the software developer and the contents of the kernel extension is cryptographically signed to ensure that it cannot be tampered with. Therefore I do not think it is likely that someone is pretending to be Apple, or that they're trying to modify an Apple extension.
However, I do think it is likely that some software you've installed (presumably FortiClient) has attempted to install an Apple kernel extension. I.e. an authentic Apple kernel extension that either wasn't installed before, or was installed in a version that the software wasn't compatible with - and so that developer has made the software so that it attempts to install the right version of Apple's kernel extension that they want to use.
I wouldn't exactly say that's a good way of doing things - and certainly not without informing the user - but it does sounds like a thing that could happen in practice without it being nefarious.


How to go truly Flash-free in Mac OS X? After the Mountain Lion install I'm trying to now go Flash free. Really, really 100% Flash free. This is fine for 99% of content out that I access, but sadly there are some videos that I still cannot get to without Flash.

I do know about the popular post by Gruber, however I'm not interested in installing Chrome because (1) I hate the heavy handed way Google forces itself into your system with its hidden daemons etc. and (2) you're still installing a Flash client on your system. I don't want a Flash client, period.

I see that such solutions do exist for iOS. To name a few:

iSwifter
Cloud Browse
Skyfire

But sadly no such options appear to exist on the Mac :( In fact iSwifter was promised to the Mac earlier but there hasn't been a peep about this since.

What I'm looking for is some kind of web-based service either with a native Mac client app or simply a webapp that would:

Allow me to render the entire site server-side in Flash and send me the video feed in some decent app or webapp (ala iSwifter), or
Have some server side scraper of the swf file that finds the reference to the actual .mp4 and passes that along to you (ala Skyfire).

So far the closest thing I've found to this is ClipConverter, but sadly its supported list of services, though decent, is nowhere near extensive enough to cover all the obscure websites that I use which all roll their own crappy swf wrapper around the mp4/flv content.

Examples

Some people are suggesting client-side-only approaches like ClickToFlash. These are good but the problem is that any particular Flash based video service / wrapper needs to be explicitly supported by it so by definition cannot catch 100% of all content, only a dedicated server-based Flash renderer like iSwifter can do that. Here are some concrete example videos that require Flash which most solutions don't handle:

http://www.destructoid.com/let-s-get-physical-with-quantum-conundrum-232175.phtml
http://www.gamespot.com/deadlight-2012/videos/video-review-deadlight-6389587/
http://www.escapistmagazine.com/videos/view/zero-punctuation/6083-Inversion (this one has an HTML5 link but you need to pay to get in. That's plain wrong)
http://www.imdb.com/video/imdb/vi771138841/

Before answering, you can test your solution with the above links. Thanks!

I use ClickToPlugin, which converts some Flash videos to HTML5 (this has the added benefit of letting you download them by right-clicking and choosing Download Video). It works for YouTube, at least, and for the videos on the second and third webpages you linked (though not the first).


Where are Terminal.app profiles files located? I just recently reinstalled OS X and forgot to back up all my sweet 'profiles' aka colour schemes. It would be very helpful if I could find the location of these so I can recover them from backup.

The original answer is spot on; here's more detail on how to restore everything.

Unless you've exported them from the Profiles window - you'd end up with things called "sweetprofile.terminal" - it's a little complicated.

Make sure the Terminal app is closed. Go to your Library folder, and find the .plist file and .savedState directory:

~/Library/Preferences/com.apple.Terminal.plist
~/Library/Saved Application State/com.apple.Terminal.savedState/*

Rename com.apple.Terminal.plist to com.apple.Terminal.plist.bak, and do the same with the savedState directory. Makes it easy to get stuff working again when something goes wrong, and anyone looking at it knows it's a backup file.

Copy the file and folder from the backup to the same places on your system drive:

/Volumes/bu/Users/you/Library/Preferences/com.apple.Terminal.plist
/Volumes/bu/Users/you/Library/Saved Application State/com.apple.Terminal.savedState/*

Open the Terminal up and it should all be restored.

If you've done a migration or a clean install, your preferences might be messed up. Take a look at the permissions of items in ~/Library/Preferences, and take a look at your backup; same with the Saved Application States. If they aren't correct, Terminal is likely to just overwrite whatever you're trying to restore. So in this case:

Make sure Terminal is closed. Duplicate the .plist file and .savedState directory, and add .bak to the end of the original files.
Assuming the .plist file, .savedState directory, and the files in .savedState have the correct permissions, open them - the ones called "copy," - one at a time, in a plaintext editor.
Open the file from your backup next to what you're restoring, so you'll have com.apple.Terminal.plist next to com.apple.Terminal.plist copy.
Copy the contents of the file on the backup over to the file on the system - into the file named "copy."
Do all the files, including the ones inside com.apple.Terminal.savedState, and then remove the word "copy" from the end.
Open Terminal, and you should see all of your profiles. If strange things like windows not opening happen, try going fullscreen and back, and other things like that, and close and open the program again.


Xcode will not launch correctly; works correctly with another account on the same machine I have an issue where Xcode will not launch. The blue light shows under the icon, but nothing else seems to happen.
I've already grabbed the latest version from the App Store and reinstalled, didn't fix the issue. Please help.

Log shows the following (two lines only, edited for easier reading):

Jan 19 22:11:15 Jason-McClurgs-MacBook-Pro Xcode[2089]: Unable to find either a
    loadable database or a Nodes.xml configuration file
Jan 19 22:11:15 Jason-McClurgs-MacBook-Pro Xcode[2089]: Error loading docSet
     file://localhost/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/:
     Error Domain=com.apple.DADocSetAccess Code=12 "Documentation set could not be read."
     UserInfo=0x400ac5340 {NSLocalizedDescription=Documentation set could not be read.,
     NSLocalizedFailureReason=Unable to find the database or 'Nodes.xml' configuration file.}

It doesn't explain the root cause, but I did get the app to run, by creating a new account and starting the app under that account.


Apple Store - Mavericks/Yosemite Stuck at "Downloading" and actually does NOT continue to download? Good day everyone. I've been at a bit of a bind as of late. I was trying to download Mavericks/Yosemite off of the Apple Store. I open it up, log in, then go to the "Purchased" tab. I scroll down and download OS X Mavericks. A confirmation pop up opens:

I then hit Continue to let it download through but I notice that it's just stuck at "Downloading", as seen in the screenshot below:

It has been sitting like that for roughly 5 minutes. Now, I don't know what to do and how to proceed. I've tried rebooting my laptop but that didn't do anything good, the same issue persisted.

This was the same case for Yosemite.

Any help will be very much appreciated. Thanks.

Look at the Launchpad icon in the Dock.
If it's downloading there will be a thermometer [which I've since been informed is actually called a determinate progress bar] under it showing progress.

Bear in mind the download might be as much as 6GB, so 5 minutes isn't really much at all unless you have a really fast connection.

If you rebooted, dropping the connection, then you might have to poke at it a bit to get it going again. It ought to auto-resume, but sometimes gets stuck.
If it did, click Launchpad, find the partial download icon, then hold  Opt ⌥  & click the X in the top left corner.
Go back to Purchased & start over.


MacBook Air is stuck at "Downloading Additional Components" I recently reset my MacBook Air to its factory settings. I am now reinstalling os x yosemite but the installing process is taking forever... is it the wifi that's having problems? Or is it just my laptop? Is there a way to fix this, make it faster?

I was downloading OS X Mountain Lion and was faced with the same issue. I had to look for a faster internet connection and it worked. Try that.


Why is my /usr/local/bin only accessible by root user? Which rights to fix it? I recently wanted to use pod to update the path of a framework.

Cocoapods is installed and can be find here :

/usr/local/bin/

But surprise! It is set to root only access :

ls -l /usr/local
drwx------   504    wheel  bin/
drwxr-xr-x@  john   staff  include/
drwxr-xr-x@  john   staff  lib/
drwxr-xr-x   root   wheel  share/

So I can't use pod because in any case :

pod install realm

  heeeyy dude, you can't access pod cause you are not root .!.

sudo pod install realm

  heeeyy dude, you can’t use pod as a root! .!.

I feel that this folder shouldn't be set as 'root only' because:

It is in the env PATH of the usr
gem install pod in it?
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html basically says :

  '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs.

I know Linux isn't a BSD but still, it doesn't look that much different no o.O

Finally here are my questions:

I searched and there is no user with the uid 504, is this suspicious?

(I checked it with ""dscacheutil -q user | grep 504"")

What are suposed to be the rights and owner on the folder?
Is there someone who had the same problem?
Any idea about why this happened?

The /usr folder is protected by System Integrity Protection (SIP) and owned by root, as are all of its contents, with the sole exception of /usr/local (and its subdirectories).

The root user is uid 0, not 504. The 500-series should be user- or app-created accounts. /usr/local/bin on my system is owned by my username "tubedogg" in group "admin", and has drwxrwxr-x as the permissions.


Convert domain account to local account I see this Apple article on converting a local user account to a network user account: http://support.apple.com/kb/ht5338

However, I'd like to do it in reverse. I'm comfortable with some of the steps, but for example this I'm not sure what the opposite is:

sudo scp -Epr /Users/username root@server.example.com:/Users/username

What are the steps required to convert a domain user to a local user on Yosemite?

Sierra must have changed something because this did not work. The account attempts to log in, then there were a ton of messages asking for the admin password because the Library needed to be repaired. Then there was an error that a valid keychain could not be found (because the account did not have access to any of its own folders.) In the past, an ACL reset would fix that, but that's not possible with Sierra (or at least I haven't found a reliable way to do it.)

What I did instead was:

From an admin account, delete the Mobile User account, but do not delete the home folder.
From Terminal, rename the user's home folder to remove the "(Deleted)" tag. You can also rename it to anything you want at this point, such as "johnspartan" instead of "spartanj117"
Create a new local account, using the same name as the account you just edited. Select "Use Existing Folder." (If you don't see the prompt, you mistyped something. Cancel and double-check the previous step.)
Log out of the admin account, and log into the newly created account. All should be there, minus the Mobile account tag.


Is there a way I can take pictures and videos out of iCloud without losing metadata? I'm sure there isn't a way to do this w/o losing data, but is there a way I can take pictures and videos out of iCloud (I have over 100 GB of media) download it, with lossless size and metadata (live effects/edits) intact? If not, what's the next best option? I'm done paying $9 a month for storage.

If you have Photos set to keep the originals on your Mac you already should have everything in your Photos library. Nevertheless syncing may fail sometimes so to be on the safe side you can request the content of your iCloud library directly from Apple:

Go to https://privacy.apple.com/
Log in with the Apple ID used for iCloud
Select the option to request a copy of your data
Scroll down to request your photos (and other iCloud content if applicable)
You can select the size of the ZIP files Apple creates. As you will have to select each file individually afterwards, go with the largest size (if your Internet connection is stable)

It will take up to seven days for Apple to prepare your downloads, you will get a mail with a link.


Continue call on FaceTime in MacBook When I make a call through FaceTime in my MacBook, I can switch to my iPhone and continue the call from there by just clicking on the top green bar that appears with the caller name. But can I do the opposite and switch back to my MacBook?

What I'm looking forward to understand is, how can I:

Start a call from FaceTime in my MacBook
Pickup the call in my iPhone
And then pickup again in my MacBook

You should be able to transfer an ongoing call over FaceTime from your iPhone to your MacBook. Let's double-check that you have things set up correctly.

Obviously, you'll need to use the same Apple ID on both devices and, based on your description, I assume you've got this all set. Now make sure you do the following:

On your iPhone, go to Settings
Swipe up and tap on FaceTime
Now check what options you have listed/ticked for where you can be reached by FaceTime.
Make sure the Apple ID / iCloud account you've used on your MacBook for FaceTime is listed and ticked:

If it's not listed, tap on Add an Email... to add it
If it is listed but not ticked, then tap on it to enable it

Exit Settings

This should rectify the issue.

Let me know how you go.


I have a new phone number but I'm getting texts from my old number I have a new phone number. For some reason, I'm getting text messages from my old number on the new number. How is that possible? I've also sent text messages from my new number and the recipient sees that it's coming from my old number. Wish I could post a screen shot.

I am still using the same phone. I just changed the phone number.

Also, when someone calls the new number, there's no voicemail message but if they call the old number, they hear my greeting.

It might be because your old phone number is still tied to your iMessage. Go to Settings > Messages > Send & Receive and unselect your old phone number.


Can I back up my iPhone 5S to more than one MBP? I have a 5S that's backed up to my home 13" MBP, as have every other iPhone before it.

I am getting a 6, and want to back up the 5S to restore to the 6.

I have a second MBP, a Retina 15", at work and I'm wondering if I can simply back up the phone to this Mac and restore from there -- so I don't need to drag the home MBP to work.

Can I back up my iPhones to more than one MBP?

No, your iPhone can only be associated with a single iTunes Library. You can, however, copy the backup folder from you MBP to somewhere else. It will be in

~/Library/Application\ Support/MobileSync/Backup/


How to find Wi-Fi password when it's not saved in the keychain but Mac automatically connects to it My Mac laptop automatically connects to a Wi-Fi access point every time I switch it on.

When I go to Keychain Access to check the password; I enter the system password as prompted and click Allow. But when i check the box Show Password the check suddenly disappears and NO PASSWORD is shown. It stays blank.

How do I retrieve the password for the access point?

To exclude a malfunction of Keychain Access.app, you could try the security command in Terminal (to be found in /Applications/Utilities/, or search with Spotlight):

security find-generic-password -D "AirPort network password" -l "network name" -w

Replace "network name" (without the quotes) with the wireless network's actual name.
Hit enter and a window will pop up and ask for administrator credentials.  Enter those and click "Allow" to find the password as output in Terminal.


Does iOS 13 (aka, iPadOS) provide better support for connecting a webcam to an iPad? Does iOS 13 (aka, iPadOS) provide better support for connecting a webcam to an iPad?

If it did, then an iPad would become an excellent device for supporting video conferencing, since using its USB-C connection you could then connect it to an in-room speakerphone, videocamera, ethernet, and power, and use the iPad's screen for displaying remote participants.

My understanding is that the only thing that stops this from working right now is that in iOS 12 the iPad does not natively support connecting to video cameras.

There has been no mention of enabling video or audio streaming over the usb-c connector. The two features they are adding is to allow your iPad as a monitor for your mac, and now you can use a thumb drive or external drive via a usb-c and access the files via the file browser on iPadOS.

"Connect an external hard drive, SD card reader, and, yes, even a USB drive." https://www.apple.com/ipados/ipados-preview/

You might be able to wire something up via homeKit. But you'd need to be doing wireless, and there may even be wireless solutions to this day. But they are no adding anything new for native wired audio/video over usb-c.


iBooks preview not working? I recently converted one of my books into an iBooks format using Author. However when I connected to my iPad and went into 'preview', I saw my device, clicked it, but the 'preview' button to enable the previewing process was faded and I could not click it. Has anyone actually used the preview feature enough to give me some help? Thanks!

Had the same issue with my iMac running Lion and iPad 1. The iPad was visible but greyed out, as was the preview button.

Here's what worked for me:

Connect iPad to Mac
Open iBooks on iPad
Click on preview in Author
Close iBooks on iPad
Cancel preview and tap on preview again
Open iBooks on iPad again

Not sure why or how, but it worked for me.

Good luck!


Where did the list of flagged message go in Mavericks Mail? In Lion and Mountain Lion Mail, the "Mailbox List" included an entry for flagged messages, with an sub-entry for each kind of flag. This appears to have been removed in Mavericks Mail. Is there a (perhaps hidden) setting to restore this, or is it gone; and if so, how can I get a list of my flagged messages (of each kind).

I've tried creating a "Smart Mailbox", but that doesn't seem to work.

I had this problem -- the "Flagged" folder disappeared from the Mail app and no longer contained any flagged messages, even though I could see that my messages still had flags if I logged into the iCloud website and looked at them there.

For me, the solution was to rebuild my Inbox in the Mail app.  Select the mailbox you want to rebuild ("Inbox" in this case), go to the Mailbox menu, and select "Rebuild" at the bottom of the menu.  It could take a minute or two, depending on how many messages you have.  Suddenly Mail recognized all the flags again, and my Flagged folder re-appeared with my flagged messages in it.


Why has moving emails from my inbox in Mail.app become so slow? Sometime in the last few weeks, Mail.app has become painfully slow when moving an email out of the inbox and into a folder. I have five email accounts that I check in Mail.app—one is pop3 and the other four are IMAP (gmail or google apps).

Moving an email from the pop3 inbox to a local folder still works fine. However, when I drag/move an email from the inbox of an IMAP account to a folder, the email in the inbox turns gray and stays there for 2-4 seconds. This used to not be the case. In the past, even though the move might take time to replicate on the server, in the inbox of Mail.app the email would immediately be removed.

I've captured a screenshot of the behavior showing the grayed out emails.

Did something change in the last Software Update? I installed the OS X 10.6.6 update on 6-Jan-11, so that could account for when this problem started.

I'm running Mail.app ver 4.4 (1082) on OS X 10.6.6.

Under the View menu, check Hide Deleted Messages. That way, messages marked for deletion are no longer shown, and will be processed the next sync (like they used too).

It is possible you activated it unintentionally (it's just a ⌘+L away on the keyboard).


Is there a way to bring back swipe to unlock in iOS10 I there a way to restore the swipe to unlock in iOS 10?

No, not with the stock, non-jailbroken device.  Apple has decided to move away from that method of opening the iDevice.  I don't see them changing their mind and putting it back so it's probably best to learn how to use it going forward.


Mac OSX : How to password protect an .app or other folder from deleting/moving by user/admin/root I'm working on a security agent. Wherein I do not want to allow any user/admin/root to delete my security agent application normally.

If user/admin/root try to delete the .app file then OS should show password dialog. If user knows the password then only it should be deleted.

Any pointer on this would be helpful.

Disclaimer

This answer is not intended as security advice for regular users. Setting your Mac's securelevel to 1 could potentially cause certain software or hardware drivers to malfunction, so I advise doing your own due diligence and independent research and testing to determine whether there could be any undesirable consequences to performing these steps.

Section 5.4.2 of the below-linked article about BSD's features related to security restrictions on the super-user is a good place to start. http://docstore.mik.ua/orelly/other/puis3rd/0596003234_puis3-chp-5-sect-4.html

In case that link breaks in the future, the most important section of the article lists the effects of setting kern.securelevel=1:

  Write access to the raw disk partitions is prohibited. (This forces
  all changes to the disk to go through the filesystem.)

  Raw access to the SCSI bus controller is prohibited.

  Files that have the immutable flag set cannot be changed. Files that
  have the append-only bit set can only be appended to, and not
  otherwise modified or deleted.

  The contents of IP packets cannot be logged.

  Raw I/O to the system console is prohibited.

  Raw writes to system memory or I/O device controllers from user
  programs are prohibited.

  Some access is denied to the Linux /proc filesystem.

  Additional kernel modules cannot be loaded.

  The system clock cannot be set backwards. In addition, it cannot be
  set forward more than a maximum of one second, and it can be set
  forward only once per second (effectively, the clock can be pushed at
  most to double time).

  This list is not comprehensive.

TLDR: setting kern.securelevel=1 could have more consequences than what's described in the below steps. Be careful.

That said, I have tested out these steps on a regular iMac with OS X 10.10.2 and did not notice any problems as a result. In the past, securelevel 1 was the default setting for OS X, and manpages in OS X 10.10 still indirectly indicate that 1 is the default setting (they say you must reboot in single user mode to remove schg, which requires securelevel 0).

However, in reality, securelevel 0 has been the default setting since OS X 10.5. When the online community learned that Apple quietly changed the default to 0, some sysadmins on Apple Discussions threads called it "unconscionable" of Apple to do this. I've also found some security guides online that say setting kern.securelevel=1 is an important step to take for securing your Mac. YMMV.

Answer Summary

As long as you set a firmware password on a Mac, you can make any file on that Mac unable to be deleted by anyone, just by using this simple Terminal command:

sudo chflags schg /path/to/file

Next make sure your Mac will always boot to securelevel 1 by doing:

sudo vi /etc/sysctl.conf

Once in vi editor, type i to enter insert mode, then type kern.securelevel=1. Next hit enter, then colon, then type wq and hit enter.

Lastly in Terminal type:

sudo chflags schg /etc/sysctl.conf
sudo sysctl kern.securelevel=1

Now that securelevel is 1 and the schg flag is set, the file cannot be deleted unless the system is rebooted into single user mode.

If a firmware password has been set, you need that password to get into single user mode. Further you need it to get into target disk mode or change the startup disk.

With the schg flag set, even root cannot delete the file. Nobody can modify it from the Finder or Terminal. It will appear locked in the Finder, but the locked checkbox will always remain grayed out, no matter what, even with an admin password. In the Terminal, sudo rm /path/to/file will now fail, saying "Operation not permitted". Also, sudo SetFile -a l /path/to/file will fail with, "ERROR: Unexpected error. (-5000)". :D

To delete this file, someone will need to use the firmware password to reboot into single user mode, then unset the schg flag using this command:

sudo chflags noschg /path/to/file

After that it can be deleted.

UPDATE: Critical Extra Steps Necessary for Answer to Work

Update added Wed. 18 Mar. 2015 ~1:20 PM PDT: it came to my attention in the comments to this answer that someone with sudo access on the system could delete the protected file by renaming the /private/etc directory, then copying all its contents except the sysctl.conf file into a new /private/etc directory, and restarting. This would cause secure level to revert to zero.

To prevent this, after performing the above steps, you should also perform the following commands:

sudo chflags schg /private
sudo chflags -h schg /etc

The first command makes the /private directory and its subdirectories unable to be renamed. The second command makes the root-level symbolic link to /private/etc impossible to rename or delete. (The -h argument makes chflags act upon the symbolic link itself, instead of acting on the target of the symbolic link.)

Main Caveats

If you're on a Hackintosh or Mac Pro with an unofficial PC graphics card that has not been flashed with official Apple firmware or something functionally identical to that, this trick won't work. I am not sure if they can boot to single user mode, so if you establish the sysctl.conf file, and set it to schg, it may be like that forever. Which means any files set to schg can never be deleted.
There may be some physical ways to reset the firmware password by removing RAM or delete the file by removing the SSD/HDD and attaching to another computer.

Explanation of Answer

To set a firmware password for your Mac using the steps shown when you google, "how to set a firmware password on a mac". Briefly the steps are:

Reboot in recovery mode
Select Firmware Password Utility from the Utilities menu and set the password
...
PROFIT!

Explanation of Caveats

Note that on Macs with removable RAM, a hacker may be able to reset your firmware password by changing the amount of RAM, then clearing your PRAM a bunch of times. So on Macs like that, take appropriate physical security measures to prevent manual access to the computer's internal components.

Suffice it to say you must get to securelevel 0 for chflags noschg to work, and normally the only way to get back to securelevel 0 is to reboot in single user mode. Again this might be impossible if your Mac lacks Apple firmware. If you're paranoid/unsure, can see your current securelevel by typing sysctl kern.securelevel in Terminal; it should always be 1 after the steps have been followed unless you're in single user mode!

Further notes

As far as I know, and correct me if I'm wrong, but the only way around a firmware password (other than resetting it through the RAM removal trick) is to remove the primary hard disk or SSD from the computer in question, and access it from another computer using a SATA to USB adapter, or something similar. (Government agencies and/or Apple might have a secret, classified backdoor... but if they're after you, then you probably want to delete files, not prevent their deletion :D.)

So, technically speaking, setting schg only really solves your problem with 100% infallibility if you're on one if the newer Macs without replaceable RAM and without a replaceable hard drive (i.e. a Retina MacBook Pro, MacBook Air, etc.) and you set your EFI password, because those are the only Macs without removable RAM or a removeable SSD. (Of course if someone takes out your drive just to delete a file, again, you probably have worse problems, like, dude where's my hard drive?)

The 21.5" iMac's lack of "user-replaceable" RAM makes it a lot harder to circumvent the EFI password and steal RAM, which is probably why Apple made it that way, as it's intended heavily for use in schools where kids can and will circumvent any security measures :D (I know because in my day we used to hack right past AtEase on System 7 to play Marathon...)

On non-21.5" iMacs you can prevent the RAM-removal/firmware-password-reset trick by investing $40-50 in a Maclocks-brand lock for iMac. It goes into the security port and has a metal plate that covers up the power socket where the release for the RAM hatch is. With that physical lock in place, someone would need a diamond saw or similar to delete your schg-protected file... and if people are taking diamond saws to your computers then you have a lot worse problems to worry about than a file getting deleted, like, dude, where's my computer?


How do I get LibreOffice 4.0 running on an iBook G4? My brother just got an iBook G4 running 10.4.2 (Tiger), and we were trying to get LibreOffice 4.0 (the latest version) installed. The machine insists that the LibreOffice package is damaged or incomplete. However, my MacBook Pro, which runs 10.7.5 (Lion) runs the same package just fine.

Sorry folks, the problem turns out that I wasn't using the PowerPC package - I was using the Intel package.


Missing Night Shift after upgrading to 9.3 I don't see Night Shift after upgrading to IOS 9.3. I was using beta 9.3, but deleted the profile after I didn't see Night Shift in Display & Brightness after upgrading

Is there something I am missing?
 Using Ipod Touch 5th Gen.

Night shift isn't supported on your hardware. See the footnote 1:

  Night Shift is available on iPhone 5s or later, iPad Pro, iPad Air or later, iPad mini 2 or later, and iPod touch (6th generation)

https://www.apple.com/ios/updates/


No longer receiving iMessages from an iCloud email address I have just got a new (2020) iPhone SE, and having an issue with iMessages.
I was previously in a group conversation - most of the recipients are phone numbers (with iPhones), but one is an iCloud email address. Since I got the new phone, I can't see any messages from the person using their iCloud address. And they don't see my messages. Everyone else in group chat can see our messages fine.
What's going on here? I've tried turning imessages on and off. Any other tips?

If another iCloud account can’t see your messages, it could be as simple as they have blocked you. It could be more complicated that Apple thinks they blocked you so they would have to work with Apple support, but you can’t really tell what’s happening to someone else’s iCloud account by design.
If you send them a message that’s about all you can know was Apple accepted it from your device.