How to view my custom VPN service listed in a terminal in order to export it?

Use networksetup or scutil
You can use it to at least establish/ disconnect connections to the VPN.
Use this command to connect the VPN configured with the name "myVPN":
networksetup -connectpppoeservice "myVPN"

Disconnect from the VPN
networksetup -disconnectpppoeservice "myVPN"

When you want to check the connection status
networksetup -showpppoestatus "myVPN"

The "system configuration utility" or scutil command provides access to network configuration, too.
To connect to your VPN use this command:
scutil --nc start "myVPN"

Run the following command to disconnect from the VPN:
scutil --nc stop "myVPN"

If you want to check the connection status, use:
 scutil --nc status "myVPN"

Let's make it even better
Github Code
#!/bin/bash
#
# Provides some basic utilities for VPN connections.

readonly cmd="${1}"
readonly vpn="${2}"

err() {
  echo "$*" >&2
}

validateCmd() {
  if [[ -z "${cmd}" ]]; then
    err "Command must be provided: [connect, disconnect, status, list]"
    exit 1
  fi
}

validateVpnName() {
  if [[ -z "${vpn}" ]]; then
    err "VPN name must be provided as second argument"
    exit 1
  fi
}

isConnected() {
  networksetup -showpppoestatus "${vpn}" | grep -qv "^connected$"
}

enterPassword() {
  sleep 1
  osascript -e "tell application \"System Events\" to keystroke \"${1}\""
  osascript -e "tell application \"System Events\" to keystroke return"
}

connect() {
  if ! isConnected; then
    err "Already connected to '${vpn}'"
    exit 1
  fi

  local readonly password="$(security find-generic-password -s "${vpn}" -w)"
  if [[ -z "${password}" ]]; then
    err "Unable to find VPN password in keychain"
    exit 1
  fi

  scutil --nc start "${vpn}"
  enterPassword "${password}"
}

disconnect() {
  scutil --nc stop "${vpn}"
}

status() {
  scutil --nc status "${vpn}"
}

list() {
  scutil --nc list
}

main() {
  validateCmd

  case "${cmd}" in
    connect)
      validateVpnName
      connect "${vpn}"
      ;;
    disconnect)
      validateVpnName
      disconnect "${vpn}"
      ;;
    status)
      validateVpnName
      status "${vpn}"
      ;;
    list)
      list
      ;;
    *)
      err "Unexpected cmd '${cmd}', must be one of [connect, disconnect, status, list]"
      exit 1
      ;;
  esac
}

set -e
main "${@}"
set +e

Open the script in an editor and add this code. Let's say it's called vpnConnection.
Add #!/bin/bash so that it can start without further ado
echo `'#!/bin/bash'` > ~/vpnConnection.sh && chmod +x ~/vpnConnection.sh

./vpnConnection.sh list show all VPN connections
./vpnConnection.sh connect "myVPN" Connect to the VPN "myVPN" and automatically enter the password
./vpnConnection.sh disconnect "myVPN" disconnect the VPN "myVPN"
./vpnConnection.sh status "myVPN" view the connection status for VPN "myVPN"


Go to System Preferences -> Network.

On the left sidebar click Wi-Fi and then "Advanced" at the right bottom corner.

Now choose the tab Wi-Fi and you'll see a list of all the wireless network you joined. Drag networks in the order you prefer (e.g. the domestic network should be the first).

Update: on the same screen, if you want to remove some of the networks your computer has joined simply select the network name and then click on the - (minus) button to remove it (Note: your computer will not join automatically that network again). If you want to stop listing networks, on the same screen, uncheck the option "Remember networks this computer has joined"


How can I make a Keynote file non-editable?

To make a Keynote presentation non-editable, you can export the slides as images and replace all the original slides with the images.


Can you explain this Wi-Fi Calling dialogue?

You ask a number of questions which I'll try to cover. Most of these questions are answered officially in Settings, Cellular, Wi-Fi Calling, About Wi-Fi Calling & Privacy. Note that arrangements vary by country and carrier so you'll have to check there for the exact details (for example, some countries have emergency call location requirements). However, here's a brief summary:

Your current country is sent to the carrier. This is because some carriers do not allow out-of-country Wi-Fi calling due to regulatory reasons, and because they want to charge you roaming fees. It is also necessary in routing emergency calls.
Your cellular identity is sent to the Wi-Fi network operator. This is because some Wi-Fi network operators allow you to authenticate to hotspots via your cellular subscription (EAP-SIM is the protocol name), and will charge differently/free for Wi-Fi calls or cellular subscribers.
The "other setting" is in Settings, Privacy, Location Services, System Services, Wi-Fi Calling.
The last question about preferring Wi-Fi is carrier dependent. The carrier sets the threshold of signal where it wants to use Wi-Fi or cellular. When my carrier initially introduced the feature, it only used Wi-Fi when the cellular signal was weak, whereas another carrier had Wi-Fi calling for years set theirs to always prefer. At some point my carrier changed it so it always prefers Wi-Fi over cellular, likely as they became sure they had adequate capacity.


iPhone 4s is giving me trouble, can someone help me troubleshoot?

You have two different issues:

For the Hotmail issue:

Since we don't want to use this account and use the new one, they are still registered with the old Apple ID. To get them with the new Apple ID, you will need to delete the app and redownload the app with the new Apple ID

For the wrong email entered issue:

Go to appleid.apple.com
Choose manage my account
Sign in with the email as it was typed in incorrectly
It will say it is not verified and will give you an edit option on the side of the email address
Type in the correct email
Verify your account for the new Apple ID

I would correct the issue with the new Apple ID first. Then:

Go to Settings> iTunes and App Store option.
Tap on the Apple ID logged in
Choose sign out
Sign in with the corrected Apple ID

Then delete the apps and redownload with the new Apple ID


How to share Mac audio over Skype with the microphone?

Turns out I had some strange Core Audio driver issue.  Every time Skype was running, process "coreaudiod" would fire up and begin to hog CPU like crazy.  I fixed permissions on my boot volume and it fixed a bunch of stuff related to iTunes, which apparently also fixed whatever was going on.

Once the coreaudiod issue was resolved, here's the setup that is working perfectly:

Skype "microphone" (input) set to Soundflower (2ch)
Aggregate Device created, consisting of Built-In Microphone and Soundflower (2 ch.)
Reason set to use the Aggregate Device
SoundflowerBed set to output to Balance.

Now all I have to do is create an audio track and enable monitoring, and I can hear myself in the mic, while normal Reason audio flows out both to Skype and my Balance to my headphones, and all is well with the world.


Two drobo NAS on one network causes premature  'Server has closed down' events.

Have you tried placing each in it's own NetBIOS Domain Name to keep them from chatting/colliding on a shared port or name?


You could install ffmpeg, a command line tool for audio/video conversion, and then create an Automator service invoking a shell command.

For installation of ffmpeg please refer to their website. Once you have installed it, find out the location of it with this command:

$ which ffmpeg
/usr/local/bin/ffmpeg

Then, open Automator, create a new Service, change the dropdown menu "Service receives selected" to "files or folders" in "Finder", then add the action "Run Shell Script". Select Pass input "as arguments" and in the textbox, write

for f in "$@"
do
    /usr/local/bin/ffmpeg -i "$f" -acodec libmp3lame -ab 128k    "${f%.m4a}.mp3"
done

where you replace /usr/local/bin/ffmpeg with the path to ffmpeg on your computer.
That's it!

Now, you can open the Finder, go to a directory containing *.m4a files, select files you want to convert, right-click, go to Services and select your newly created service. There will be no progress bar shown, but ffmpeg will convert your files one after another.


How do I download the free Swift Programming Language book (Swift 5 Edition) from the Apple Books Store?

Assuming you are using iCloud Library for Apple Books, the location for the raw .epub files (can be accessed from the terminal.app) is:

/Users/<YourUserName>/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents

As for opening books downloaded from Apple Book Store in Windows/Linux, the books are DRM protected (even the free ones).

Source:

http://apple.stackexchange.com/questions/296462/ddg#297650


You have to have the Date Created column displaying in Finder, for that option to be available.
In the View menu, select Show View Options, then tick the Date Created box.  If you have a Finder window open, you'll see that column pop into view. (If you haven't, it will be shown in subsequent Finder windows).

After that, the Arrange By > Date Created option should work.


Just install "Shell Integration" and it will be automatically installed for you.

On the iTerm2 Menu, just click "Install Shell Integration"

You should then see the output indicating that imgcat is installed:

$curl -L https://iterm2.com/misc/install_shell_integration_and_utilities.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2694  100  2694    0     0   2890      0 --:--:-- --:--:-- --:--:--  2890
Downloading script from https://iterm2.com/misc/bash_startup.in and saving it to /Users/allan/.iterm2_shell_integration.bash...
Checking if /Users/allan/.bash_profile contains iterm2_shell_integration...
Downloading imgcat...
Downloading it2dl...
Adding aliases...
Done.
--------------------------------------------------------------------------------

The next time you log in, shell integration will be enabled.

You will also have these commands:
imgcat filename
  Displays the image inline.
it2dl filename
  Downloads the specified file, saving it in your Downloads folder.


The culprit here is actually your browser -- the device you are using is actually reported to the website by means of your browser's "user agent". The user agent tells the website what device and browser you are using. So, it makes sense that the only way to fool the Angry Birds website is to send a different user agent.

I'm assuming you can't jailbreak your iPad and modify the browser, but there is a method to modify the Safari user string without jailbreaking. However, you do need to be able to sync the iPad with your computer. Here is a link with instructions. Aside from that, you might be able to find a web proxy to change your user agent, but I don't know of any that will do that. Let me know if this helps.


Why do some websites have weird scrolling mechanics?

Your first example scrolls fine for me, however in both Safari and Chrome https://dlinkers.com/ scrolls abnormally (too) fast.

This has nothing to do with you, your browser, or with Macs in general. The blame is the website/web developer. There is JS somewhere telling it to scroll weird. I am too lazy to find it but its definitely there. If you want to test, disable JS on your browser and while to content won't load (again, more crappy design by the web devs) it will scroll properly.

TBH there's no solution to the problem other than contacting the company. When I come about sites with crappy design, unless I really need it, I will click off and find an alternative site. You don't deserve my business if you can't get basic things correct on your site.

One other solution is manually scrolling with the scroll bar on the right. Permanent viewing of the scroll bars can be enabled in System Preferences > General.


How to revoke 3rd-party apps Twitter integration on iOS 11?

I finally found the answer to my own question.

"iOS integration" itself is actually listed among all those apps and it has a revoke button. Once you revoke this, all apps authorized through iOS integration will disappear.


AFP can't write because of locked volume

Probably some permissions and/or the settings are set wrong on your Raspberry.
I suspect the external drive or a shared folder on the external drive to have wrong permissions set. Compare that with the your home folder on the Raspberry where you probably have full r/w access.

Please try this as a first step. You may apply special settings/configs later.
Below i assume that your external disk is sdb and contains one ext4 volume sdb1 with the name seagate. The volume/partition itself should not be owned by pi but by root!

First stop netatalk with:

sudo /etc/init.d/netatalk stop

Unmount your external volume after checking the the mounted volumes with df or cat /proc/mounts to get the identifier of your external disk:

sudo umount /dev/sdb1

First we have to fix your mount point:

The following permissions should apply (check this with ls -la on the Raspberry):

For /mnt

drwxr-xr-x  3 root root  4096 Apr  6 13:52 mnt

Check that the folder /mnt contains a folder seagate with ls -la:

drwxr-xr-x  3 root root 4096 Apr  6 13:52 .
drwxr-xr-x 22 root root 4096 Apr  6 11:21 ..
drwxr-xr-x  8 root root 4096 Apr  6 14:14 seagate

Add the folder if necessary with sudo mkdir /mnt/seagate and change permissions and ownership accordingly with chown and chmod.

Get the UUID of all volumes with sudo blkid. You should get a similar output like that one:

/dev/sda5: UUID="7a7dd5de-758e-4488-b78d-dd7f7c61cfbc" TYPE="swap"
/dev/sda1: UUID="9b4285a8-3290-469a-91f3-7517f286856e" TYPE="ext4"
/dev/sdb1: LABEL="seagate" UUID="522e7f4c-ee90-4265-82c1-e46f48f969b5" TYPE="ext4"

sda1 and sda5 are your internal main and swap partition. sdb1 is the first volume on your external disk.

Check with sudo nano /etc/fstab if your fstab file mounts the volume of the external disk at /mnt/seagate. Replace the UUIDs below with those found in your setup.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=9b4285a8-3290-469a-91f3-7517f286856e /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=7a7dd5de-758e-4488-b78d-dd7f7c61cfbc none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
UUID=522e7f4c-ee90-4265-82c1-e46f48f969b5" /mnt/seagate/     ext4    errors=remount-ro 0       1

Remount sdb1 with sudo mount /dev/sdb1 and check the mountpoint with df. It should look like this:

...
...
/dev/sdb1   8256916  170156   7667332    3% /mnt/seagate

Now create a base folder for the user pi:

sudo mkdir /mnt/seagate/pi

Move all your personal folders to pi with:

sudo mv /mnt/seagate/folder sudo mv /mnt/seagate/pi/folder

Example:

sudo mv "/mnt/seagate/Film - 1" "/mnt/seagate/pi/Film - 1"

Then apply ownership recursively with

sudo chown -R pi:pi /mnt/seagate/pi

Reapply ownership and permissions of /mnt/seagate/lost+found with

sudo chown -R root:root /mnt/seagate/lost+found
sudo chmod 700 /mnt/seagate/lost+found

Now you have to check netatalk and fix it if necessary:

Locate the following startup options and change them as noted below in /etc/default/netatalk with sudo nano /etc/default/netatalk:

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Go to the end of the file /etc/netatalk/afpd.conf. It should look similar to this:

# default:
- -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword

Now configure the shared volumes in /etc/netatalk/AppleVolumes.default near the end of the file:

~/              "Home Directory"
/mnt/seagate/pi "pi-seagate" allow:pi

The first is the directory to share, the second is the name visible in the "Connect to Server" -> "Volumes to select" window and later on your desktop and the third is/are the allowed user(s).

Restart netatalk with:

sudo /etc/init.d/netatalk start

Try to connect to the share(s) with your Mac OS X 10.10 client by entering: "afp://ip-address" in 'Go to...' -> 'Connect to Server'.


How to generate an automatic bash/script

You need to process each mp4 file individually:

cd folder_2
for m in *.mp4; do
    a="${m%.mp4}".avi
    if [[ -r "/path/to/folder_1/$a" ]]; then
         echo touch -r "/path/to/folder_1/$a" "$m"
    fi
done

Run once to verify that the generated output makes sense, then remove the echo and rerun.

PS: This assumes that the names of the video files don't contain the string ".mp4" as such.


Solved by running

sudo languagesetup

Solution from the ‘If there’s more than one user account on your Mac’ part from the Apple KB article Change the language used at the login screen on your Mac.


The touch ID data is stored in the secure enclave so the data storage there and the update of iOS is really not related in any direct way with the functioning of that software and hardware.

You can troubleshoot this the same as most iOS issues where you don't know if it's hardware or software by making a backup (or two - one to iCloud and one to iTunes) and then erasing all content and settings and then trying the "problem" task. In your case, after removing all your data and settings, you would test one or two fingerprints by adding them.

If that fails, then restore the iPhone from a iTunes. Repeat the test. If it fails, you have a hardware issue. If it works, then you can try loading your data from the backup and then trying one final time to see if the hardware and OS that work to save your fingerprint also work with your apps and settings.


CPU throttling on Macbook with bad battery and Catalina

The CPU throttling due to battery is triggered by the firmware and it doesn't make any difference what version of macOS (or other OS) you are running.

However it is easy to override the throttling on a MacBook if you use Windows as a OS but not if you run macOS.  If you don't want to replace the battery and the programs you want to run are available on Windows that would be the easiest/cheapest option.

I have a late 2012 MacBook Pro with a i5-3210 CPU which has a base clock of 2.5 GHz and max Turbo of 3.2 GHz.  It has no battery as it swelled too much to fit in the case so I removed it.  Like you I've no intention of getting a replacement and so in macOS the CPU is now throttled to 1.2 GHz.

With Intel Power Gadget you can easily see it.

The reason for this is that the EFI firmware sets on BD PROCHOT which is a CPU register (msr 0x1FC) usually used to tell the CPU that some other component (GPU or whatever) is overheating.  This will cause the CPU to throttle even though it is not itself overheating.  This is described in Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 4: Model-Specific Registers

Although there are various macOS utilities to change other MSR (such as Turbo Boost Switcher) I can find no way to turn this one off in macOS.  This is quite surprising as people facing throttling due to removed batteries is a fairly common issue.  I tried to write an EFI program to do this myself but could not get it to work - see Stack Overflow question How to make changes to msr 0x199 from EFI stick?.

On Windows however there is a program called ThrottleStop which easily lets you turn off BD PROCHOT. As you can see with it set on (as it is by the MacBook firmware) the clock is limited to 1.2 GHz.

If you turn off BD PROCHOT and set the multiplier to 25 you can get the 2.5 GHz.

In theory it is possible that at peak load you could take more power than the power adapter alone can supply resulting in a shutdown.  This is perhaps the reason Apple set this register on.  However this has never happened to me and I've been running it like this almost 24*7 for the last couple of years.

If you did find it was shutting down you can set the multiplier to a lower number to reduce peak power draw.  You can even set a higher multiplier for increased performance if you wish but I never felt the need.


How to disable notifications from automated "shortcuts"?

There is a way but it requires Screen Time to be enabled.
You need to go to Settings ▶ Screen Time, search for See All Activity, scroll down to Notification section (it’s shown only when you got 1 or more notifications from shortcuts after enabling Screen Time), and there you can manage shortcuts notification permissions, style, etc.


I've experienced this as well. The error is actually related to the settings of diplay sleep and computer sleep:

  In System Preferences > Energy Saver the timers for display sleep and computer sleep must be greater than the time of auto logout after inactivity in System Preferences > Security & Privacy.


Importing photos from iPhone to iMac. Can I get just edited, or just unedited and not both?

I understand your frustration with this issue! When you edit a photo on iOS, it keeps the original and creates a text file with an .aae extension containing instructions of the changes/edits made to the original file. iOS renders the original file per .aae file which makes it look like it’s an additional image. The Photos & Lightroom MacOS applications do the same.

I use the native MacOS application Image Capture to import my media. You can click on your device, select the photos you want and drag and drop them to whichever directory. This method also exports the associated .aae file separately as a text file.  If you happen to export a live image, this method will also extract the cover image as an image and the motion of the Live Photo as a video file.

If you want to extract/save an edited file, just make sure you share, copy or upload the edited file somewhere like your mail or messages.


iPhone 6s - Calendars and contacts - birthday information

Edit: Confirmed it works

Did you try:

- Open the Calendar app
- Click on 'Calendars' at the bottom
- uncheck all birthday calendars

The birthday calendar should be under Others at the bottom


I'm not aware of a setting for just clicking on the icon with the mouse other than a default for turning it off...

defaults write com.apple.dock show-expose-menus -boolean

You can change the behaviour of when you drag a file onto a dock icon though...

Go to Finder Preferences and at the bottom of the general tab there is "Spring-Loaded folders and windows"

You can dis/enable it and change the delay time.


How to choose the correct resolution for a 5K2K monitor on macOS?

Try the 3360 x 1417 scaling mode for a while. That's exactly why it was introduced to macOS as an option -- so that HiDPI displays can actually be made usable instead of having everything tiny. No it won't be perfect, but there's no perfect answer here. After doing your regular workflow for a few days, you'll know if this mode is acceptable to you.

For desktop use, most people are comfortable when the apparent display resolution is around 100 to 110 ppi. People with lower visual acuity tend to prefer a lower resolution around 80-90 ppi.

You purchased a display with a native ppi of 164 ppi, which is much too high to be comfortable. The most performant scaling mode is 2:1 which would give you a ppi of 82, which is too small to be comfortable for most people.

Next time you find yourself purchasing a display, try to find something around 200-220 ppi (looks like 100-110 ppi at 2:1 scaling). Because your laptop has a limit on how many pixels it can push, that means you're looking at a maximum diagonal size of around 29" (at 5K) to get the picture quality you're looking for.


Will not using battery in MacBook make it last longer?

Apple says that:

  Rechargeable batteries have a limited number of charge cycles and may
  eventually need to be replaced and disposed of.

Naturally, if the battery has not been connected, no charge cycles have passed.


Resolution of iPhone photo stream upload!

Yes, I can confirm to you they are exact the same.
Photo's are exact the same format and file-size.

You can also verify this yourself by connecting your iPhone to your PC using the USB cable and get one picture from it. Check the size, resolution and format.
Now open your Photostream and do exact the same.


How can I turn off push notifications for individual apps in iOS 5?

There is no way to disable push notifications. They are handled by Apple's servers and will be sent to your device even if you uninstall the program.

Disabling all the app's respective settings under the Notification Center will only hide them. Refer to Apple's developer Push documentation for more details.

Specifically, look at the Apple Push Notification (APN) Service, which "transports and routes a notification from a given provider to a given device." Apple says the following about the APN:

  Sometimes APNs might attempt to deliver notifications for an application on a device, but the device may repeatedly refuse delivery because there is no target application. This often happens when the user has uninstalled the application. In these cases, APNs informs the provider through a feedback service that the provider connects with. The feedback service maintains a list of devices per application for which there were recent, repeated failed attempts to deliver notifications. The provider should obtain this list of devices and stop sending notifications to them.

—Source

In short, Push notifications are handled outside of the device. To stop them, once a program has been installed, means the developer of the program must remove your device from the list (or the notification must fail enough for the APN to stop sending them entirely). As a user, there is not way to "stop" them, just hide them from within iOS.


You can erase your iPhone from the iCloud website or from any other device that you've setup with Find My iPhone.  Here are instructions for doing the erase.

When you erase your iPhone, your data in iCloud is safe and won't be erased.  When you get your new iPhone, you can restore the backup to the new device, if you want.


Some apps that 'update' their dock icons with information (e.g. Mail, App Store, myriad third-party apps that might 'monitor' things such as temperature, processes, network connections) can definitely cause big resource draws. I've had the whole machine move in slow motion because of this.

As a result, I generally turn off any dock icon updating, or as Apple calls them, 'badges', both from Apple and third parties, regardless of nature/flavour/complexity. I much prefer my information to reside in the menu bar anyway (where possible), and it generally doesn't eat up so many resources. This way I avoid the behavior in question, that I have only ever had intermittently, not constantly like you did (obviously this is not guaranteed to be what was causing your troubles).

You could also try deleting the dock cache file* (at least in Lion/10.7): com.apple.dock.iconcache inside…

/private/var/folders/**twodigitfoldername**/**crazystringalph+nums**/C/

Some people just go into Terminal and type:

sudo find /private/var/folders/ -name com.apple.dock.iconcache

…however, this shows you all users' dock icon cache file. That's why I prefer to move through the GUI filesystem, because the other users' folders will be unreadable, so you can just find this through browsing/elimination. It's the only one you can actually read.

To get started

Make sure Finder is the front-most application
Press ⌘ cmd + ⇧ shift + G
Paste/type in /private/var/folders/ and click Go.

*Note: when you update the Finder dock icon this is one of the steps included in the process for Lion.


How can I get Quartz Composer to save files after the first time?

After some trial and error, I discovered that Quartz Composer has a problem with directories that have a Spotlight-related entry in their Access Control List (ACL).

Using Terminal, you can see if a directory has a Spotlight ACL entry with ls -dle and looking for output that contains a _spotlight entry, e.g.:

$ ls -dle ~/Documents
drwx------+ 303 userx  staff  10302 20 Aug 12:21 /Users/userx/Documents/
 0: group:everyone deny delete
 1: user:_spotlight inherited allow list,search,readattr,readextattr,readsecurity,file_inherit,directory_inherit

To get Quartz Composer to save to the directory more than just the first time, remove the Spotlight entry from the directory's ACL with chmod, e.g.:

$ chmod -a# 1 ~/Documents

(here we remove the entry whose index is 1, which corresponds to the _spotlight entry gleaned from the ls -dle command).

Another way to do this is to use the Finder's "Get Info" menu command.  You will see a '_spotlight' entry in the "Sharing & Permissions" section.  Select it and click the "minus" sign button to get rid of it.


That was never gonna work, apple stop signing everything under iOS 7.1. So u cant downgrade at all. Unless you have an iPHone 4 with SHSH blobs and downgrade to iOS 6.1.3


Inspect what a program is doing when it seems to hang

Why yes you can inspect running programs. It’s technical, but very doable.
Open up the Activity Monitor and look for the program you see hanging. Select it with the mouse / pointer. Then click the gear and rather than forcing it to quit, choose System Diagnosis...

https://support.apple.com/guide/activity-monitor/quit-a-process-actmntr1002/10.14/mac/10.15

You should be presented with a pretty lengthy Privacy Notice, which I recommend everyone read and make screen capture if you want to read later. Then let the process run. It first gathers all the time-sensitive information about that specific process - what it’s doing, what memory it has asked for, what files and network connections it may have, then this tool packages all manner of very detailed information about just about everything on the system. Logs, errors, file systems, network setup, etc...
The main items to look at are the samples - and if this is something you wish to do often, you can even get Xcode which has an “instruments” app that attaches to running processes to look in to them and determine why they hang.


Hooking up Dell printer 2155 CN to OS X 10.9

The Dell support told me today the Driver for Mac OS 10.8 doesn't support Mac OS beyhond the 10.8 version... so, I guess you can not use your printer until they upgrade the driver :-(


MacBook Pro 8,2 (Early 2011, 15'' Unibody 2.3 GHz i7) - OS crashes randomly, after log in screen goes all white

Many condolences. The 15" MBPs from 2011/2012 had a very high frequency of hardware failures on the logic board, specifically the onboard graphics. From recollection, it was a manufacturing fault that was not suspected by Apple's hardware designers until large numbers of them started to fail in the wild, leading to a class-action suit against Apple, which was kept very quiet. AFAIK, there is no economically sound way of fixing this issue.


Should I change my password if I see an iOS popup that someone tried to login from an unrecognized city?

There are a number of valid reasons why this could happen:

You're using a VPN service that is causing you to show up in a different city
You're being incorrectly geolocated to another city broadly within your region of the world.

Aside from that though (and assuming it's not a phishing message you see), it seems that someone is getting your password, and not only should you be changing it, but also trying to figure out whether you've got a keylogger, are getting phished, etc.


Mac OSX : How to protect daemon process from stopping by root/admin

I'm not a developer or a guru in all of the available keys with launch daemons, but that is kind of a tall order as by design, root can do anything.  I'm thinking you would basically be creating a security "virus" that would have a helper mechanism reload the daemon if it gets unloaded.


Cannot move files from one drive to another in Mac OS X El Capitan 10.11.3 (they copy instead)

To move a file to a different drive from the one it is on drag the file to the new location while holding down the Command key. The green '+' sign on the cursor should not be displayed.

To create an alias hold down Command-Option while dragging the file. A curved arrow icon will be added to the cursor to indicate an alias will be made.


Adding unset zle_bracketed_paste in ~/.zshrc file ZSH will treat newlines in snippets as ↩.


iPhone turns itself off with lots of charge left

It appears your battery is faulty.

If you have an iPhone 5, check the iPhone 5 Battery Replacement Program to get a free replacement.

If you have an iPhone 6s, check the iPhone 6s Program for Unexpected Shutdown issues to get a free replacement.

If your phone is under warranty or AppleCare extended warranty, you may be eligible for a free battery replacement. Even if it is not under warranty, go to the Apple Support webpage, "Start a service request" and fill in your problem details so Apple can help you.

If you have a Mac, you can find information about your battery by plugging into your computer and installing the free CoconutBattery app to check its health.


Which is correct, iTerm or Terminal? (Option as Meta or Esc+)

Neither is correct nor incorrect.
The ESC control code is part of the ANSI escape sequences which was used to send control codes to early terminals like the VT-100.  Emacs used many of these Esc sequences to control how the the user interacted with the program.
The Meta key first showed up in 1970 on the SAIL (Stanford Artificial Intelligence Labs) keyboards, MIT’s Lisp computers and ultimately Sun Microsystems (my alma mater as tech companies go).  It appeared as a diamond key.
The Meta is a modifier key similar (in function) to what the Apple Command key was.  On modern keyboards, it maps to ALT (Option) or the Windows key on PC keyboards.  If a computer lacks the Meta key, you can send the ESC sequence.
Either one is fine, iTerm (IMO) seems to take a more global approach to connecting to various *nix machines where Terminal is Apple/OpenStep (since Apple acquired them) and uses a Meta key.
In the end it’s what you’re more comfortable with - Esc or Meta/Option


How can I specify the C++ version to use with Xcode?

Click on a Project file, then Build Settings and find C++ Language Dialect.

Use this to get an error:


This answer resolved the issue for me: Can't login with Google using Internet Accounts


I had this problem with Pages. I made a backup of my iPad to iTunes (just in case) and then I deleted the apps from the iPad through iTunes, then I clicked Sync and the apps were gone, then I just reinstalled them through the App Store and they worked again. Strangely, this happened again, but with Pages and Numbers this time and I didn't have enough space on my MacBook to back my iPad up again, so I gave up. Fortunately, when I installed the iOS 9 Public Beta from Apple, both apps were fixed. iOS 9 Public Beta 2 is pretty buggy, so update at your own risk. You may just want to wait until iOS 9 comes out in the fall (probably late-September) if the app is not too important.


Built-In Trackpad and Keyboard Unresponsive after Sleep or Restart

So, correct me if I'm wrong, your problem occurs when you open your MacBook Pro?

Resetting your PRAM won't work. Try resetting your SMC. This is responsible for the responses when opening and closing your lid.


Connect the device to iTunes (over Wi-Fi or USB), then select to backup the device. This will backup the contents of the device to ~/Library/Application Support/MobileSync/Backup/ which can be copied to an external drive. To restore from backup, copy the folder back and restore from this backup.


Add someone to contacts through Game Center?

No, this is currently not possible.

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

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


Using Airport Express as a wireless repeater - Significant drop in wireless speed

Any time you try repeat a wireless signal you'll sacrifice data speeds.

This "feature" isn't highly pushed on the Airports because of this. I've seen no consumer wifi routers/repeaters that do this well.

Your best bet is to run an Ethernet cable and setup the airport express as a second access point. Use the same SSID and password as your Extreme and your devices will pick the stronger signal.


Cannot recover space after deleting Windows partition in bootcamp

Your disk has an APFS container, followed by a ‘Microsoft Basic Data’ partition called ‘datashare’, then free space. You can't join non-contiguous partitions.
Either delete the partition named 'datashare', or create a new separate partition in the free space.
You can perform these operations by choosing Partition from the toolbar in Disk Utility.


Finding and Renaming Mislabeled Duplicates

In this situation, renaming files is not the way to go!

As you stated in the OP, "There's almost 500,000 files, so doing this manually is not practical.", and as mention in my comment to the OP "I'd recommend checking out Gemini 2 which you can download a copy for free and run it to see what it finds. If you like the results you can consider purchasing it."... But I really didn't clarify why I mentioned an app that detects and deletes duplicates.

1. Make a new and current Time Machine backup of the e.g. Macintosh HD.
2. Use e.g., Gemini 2 to delete all duplicates from the recovered files.

What, delete all the duplicates!? ... Yes, with a current Time Machine backup of the e.g., Macintosh HD, why do you need to keep any duplicates!? You don't, as you'd already have properly named duplicates, and modified copies as applicable, of the files on the Macintosh HD on the Time Machine backup. Therefore, does it really make sense to waste time to rename any duplicates of the recovered files? I say No!

Now the files that remain in the recovered files are unique and you can decide from there how you want to proceed. You'll certainly have a much smaller number of files to decide whether or not you want to keep them, but it will not be an easy task to rename them to a meaningful name, as they are after all unique and do not have a meaningful name.

The files that do remain from the recovered files could be broken down into two groups, OS/Apps and User Data, the latter of which has more importance than the former. It should be relatively easy to create the two groups and get rid of the OS/Apps group as most of those files will be older than the current OS and of no real value. The User Data files, some may be files you've deleted from the Macintosh HD over time and the others may be modified copies of the deleted files and  modified copies of the current files prior to the mishap. These are the ones you'll want to retain to search through as needed.

The most important thing in this situation is to have a current Time Machine backup of the e.g. Macintosh HD, and isolating unique User Data files within the recovered files, and is really the only point of sifting through the recovered files! Not messing around wasting time renaming files you already have on both the e.g. Macintosh HD and the Time Machine backup.

Note that I am a licensed user of the Gemini 2 app, but have no other affiliation with the developer MacPaw.


How to resolve permissions errors on OS X Lion after Homebrew install

EDIT: The problem is now fixed in Homebrew:

https://github.com/mxcl/homebrew/commit/8aa4f9dd3bbd885350776171d3d9403d381e1a59

If you still experience the problem, update Homebrew like this:

brew update

If you want to know what the problem was, I have kept my original answer below.

Ignore the permisson issue for now

I am experiencing the exact same problem and in my opinion the problem is in brew doctor rather than in your and my installation.

I think you should ignore the issue rather than changing the ownership of /usr/local. Alternatively, you could fix your local brew doctor script until a fix is released. See below.

I don't consider it correct to make /usr/local owned by a specific user. I have more than one admin user on this machine. You should leave /usr/local owned by root:admin as owner and group.

My investigation

Like for you I have a /usr/local that is perfectly writable by my user which is also a member of the admin group:

$ ls -ld /usr/local/
drwxrwxr-x  14 root  admin  476 22 Jun 23:33 /usr/local/
$ whoami
mgd
$ dscl . -read /Groups/admin GroupMembership
GroupMembership: root mgd rgd

Let's test that the dir is really writable:

$ ls -l /usr/local/newfile
ls: /usr/local/newfile: No such file or directory
$ touch /usr/local/newfile
$ ls -l /usr/local/newfile
-rw-r--r--  1 mgd  admin  0 23 Jun 14:52 /usr/local/newfile

Further investigation into the brew doctorcode led my to the conclusion that the use of the ruby function Pathname.writable? is causing the problem. Consider this interactive Ruby session:

$ irb
>> require 'pathname'
=> true
>> Pathname('/usr/local').writable?
=> false

Function Pathname.writable? says /usr/local is not writable even though we know it is.

Using Pathname.writable_real? instead gives the correct result – it says that the dir is writable:

>> Pathname('/usr/local').writable_real?
=> true

This should be fixed in /usr/local/Library/Homebrew/cmd/doctor.rb. You can fix it in your own installation while waiting for a fix.

The difference between the two functions are (according to the Ruby docs here and here):

writable?(file_name) → true or false: Returns true if the named file is writable by the effective user id of this process.

writable_real?(file_name) → true or false: Returns true if the named file is writable by the real user id of this process.


Is it possible to detect the current power input on a MacBook?

There is a straightforward way to determine instantaneous* battery charging current, assuming you have developer tools installed:
ioreg -rw0 -c AppleSmartBattery | grep -o -e '"ChargingCurrent"=[0-9]*'

The number is specified in milliamps.
However, this is not going to be the same as the current entering through your AC adapter (this is most apparent when the battery is fully charged, in which case the current will be 0), so it may not help you with what you're doing. I'm not aware of a place where that information gets published, although the PMU must certainly measure it.
Similarly, you can view the instantaneous* voltage of the battery, in millivolts, with
ioreg -rw0 -c AppleSmartBattery | grep -o -e '"Voltage" = [0-9]*'

which, when multiplied by the above current, will give you the power being delivered to the battery (in microwatts, so divide by a factor of 1,000,000 to get watts). But, again, it is not the same as the power being delivered by the AC adapter.
You can view more power-related parameters with
ioreg -rw0 -c AppleSmartBattery

Update:
I experimented on two systems – a T2-based MBP with Catalina and a non-T2-based MBP with Big Sur – and found that the former has the keys AdapterPower and SystemPower contained in the BatteryData dictionary property of AppleSmartBattery:
"BatteryData" = {"StateOfCharge"=98,"PMUConfigured"=0,"DesignCapacity"=8790,"QmaxCell1"=9017,"AdapterPower"=1101610469,"SystemPower"=1104635067,"ResScale"=244,"QmaxCell2"=9048,"QmaxCell0"=9082,"CycleCount"=69,"Voltage"=12503}

So this is a promising source for determining both the power being delivered by the AC adapter as well as the power being consumed by the system. These, along with the earlier battery charge current & voltage that I showed, could give you a pretty complete picture of the power situation.
I couldn't figure out the units at first, since the numbers are too high to be W, mW, and even µW, and too low to be nW. Then I remembered that some keys are stored as floating point values, and when I converted 1101610469 into an IEEE-754 float, I got the very reasonable-looking 21.1552219391, which means that it's published in units of watts.
You can therefore – on at least certain hardware or software – view the AC adapter power consumption with
ioreg -rw0 -c AppleSmartBattery | grep BatteryData | grep -o '"AdapterPower"=[0-9]*' | cut -c 16- | xargs -I %  lldb --batch -o "print/f %" | grep -o '$0 = [0-9.]*' | cut -c 6-

and system power consumption with
ioreg -rw0 -c AppleSmartBattery | grep BatteryData | grep -o '"SystemPower"=[0-9]*' | cut -c 16- | xargs -I %  lldb --batch -o "print/f %" | grep -o '$0 = [0-9.]*' | cut -c 6-

This uses lldb to do the IEEE-754 conversion, so you, again, will need developer tools installed. It is also very straightforward to write a small CLI tool that uses the IOKit framework to dump these out without needing Xcode installed on the target system, if you needed to have that.
* - Note that these values only seem to update once a minute or so, so they aren't truly instantaneous.


Easy solution to resize, crop and print a passport photo of 35x45mm?

Here's a web tool that does it - it's for US passports, but presumably the size guidelines are similar or the same for the UK

http://travel.state.gov/_res/flash/cropper/FIG_cropper.html#


Short answer: whichever suits you.

If your Unix background is mainly from Linux, you’re probably used to GNU commands. As you’ve noticed, they can be different from other Unix/Unix-based operating systems. Depending on how complex your scripts are, you can either:

make simple changes (like using ls -R . instead of ls . -R), which will work in most (if not all) Unix/Unix-based system and not only on GNU-based ones,
or install the GNU utilities from MacPorts if you think that there’d be too many/complex changes, or if you prefer to stick to the GNU commands you’re already used to.

If you want to take some time and write portable scripts, do it. If you think that’s not worth it, then don’t. Just bear in mind that not every Unix/Unix-based system uses GNU by default.


How do I contact Apple support to have the email address
  separated from the non-existent company and abandoned
  developer account?

devprograms@apple.com


Syntax error: No operation specified when trying to resize Ubuntu VM

The | in such context always means use "either|or|else".

So use either:

VBoxManage modifyhd "/Users/user/VirtualBox VMs/Ubuntu/Ubuntu.vdi" --resize 20000

You have to use the absolute path to the file or the relative path starting from the current directory.

or:

VBoxManage modifyhd <UUID> --resize 20000

The UUID of the medium has to be registered. Registered images can be listed by VBoxManage list hdds (see Section 8.4 of the VirtualBox manual, “VBoxManage list”)

Sidenotes:

Resizing does not work if the guest has snapshots (prior to version 4.3.*) nor will it work on 'fixed' drives. When doing anything that could prove as destructive as this should you make a mistake, backup the *.vdi file before you start.

After resizing the disk you have to extend the contained partition!

Download the Gparted live cd or what ever partition manager program you wish and mount it to the guests virtual CD and boot the guest.
From here you can expand the primary partition to use the new space.

You can download the Gparted Live CD from here.
If you have issues where Gparted fails, try with Parted Magic here.
Parted Magic is no longer free to download (at least from the source).


MacBook without battery kernel_task 100% CPU utilization

The procedure mentioned here, involving the removal of one specific system file, will probably disable the sensor check and prevent the kernel task from gobbling up your CPU, while waiting for your battery: https://apple.stackexchange.com/a/146381/226332


How do I see the dock in a fullscreen window in OS X?

It appears that the trick is to move the cursor to the bottom of screen like I normally would, but KEEP MY FINGER ON THE TRACKPAD when I get there.  If you take your finger off of the trackpad, the dock won't appear, but if you keep it there then it will.

(There are other reports that moving the cursor to the bottom of the screen and then repeating the same action again can make the dock appear, but I had inconsistent results with that technique.)


macOS: Wrong Bonjour name stuck in hostname

The man page for hostname says:

  To keep the hostname between reboots, run `scutil --set HostName name-of-host'.

Also, the name in the Sharing prefs pane you mentioned, is that the name that isvisible right there when you open the pane, or the one you can edit when you click the "Edit..." (or similar - in German it's "Bearbeiten...") button?


You can turn the function into a shell script and define the shell to be used in the first line

#!/usr/local/bin/bash

# the content of your function goes here

Then make the shell script executable and put it somewhere into your PATH.


Cannot save changes made to Parental Controls profile

The following steps seem to have resolved this issue for me.  (Sadly I don't know if this will help anyone else, since the whole Parental controls system seems very complex and buggy, and I don't really understand what is happening here.  But I thought I'd note it here anyway.)

Delete all unnecessary user accounts (created during testing).
On all remaining accounts, tick "Allow user to administer this computer".  (Here, I'm trying to ensure Parental Controls is disabled on all accounts and hopefully cause some kind of reset, since I'd noticed that a new managed account I'd created had the same issue - and so the issue wasn't with the individual accounts, it was with the entire machine.)
Reboot.
On the account that needs to managed, untick "Allow user to administer this computer".  (I found it immediately turned back on again: some Mac wrestling may be required.)
Quit System Preferences.
Reopen System Preferences and check the "administer this computer" change has stuck.
Press the Show All button in System Preferences.
Cross fingers, wave a chicken in the air, etc.
Open the Parental Controls preference pane.
Set up Parental Controls again.  For me, the settings then stuck and worked.


I had the same issue.  I found this thread that says the betas work om El Capitan and Sierra for the most part.  Good luck!

https://github.com/jackaudio/jack2/issues/144


How to use ImageMagick to bulk crop empty space on png files?

To trim a single image:

convert /path/to/original.png -trim +repage /path/to/out/trimmed.png

To trim each png in a folder:

cd /path/to/folder
mkdir ../out
for f in ./*.png; do
  convert "$f" -trim +repage "../out/$f";
done


Connection to Wireless Network always breaks down

Could be one of many, many things.  Have you tried altering the security settings on the router?  Are you close to the router?  Strong signal strength?

Have you tried connecting other laptops?  Is the behaviour different?

Try opening your console (/Applications/Utilities/Console) and connecting.  Show the log list and switch to the system log.  Watch it, connect to your wireless network, and wait for it to disconnect.  Look through the log from the time you connected to the time it disconnected, and see if there are any messages which might indicate what's going on.

Your question is not specific enough, yet, for a proper answer.  Give us more to go on.


Yes, you need to find UPnP Controller for Mac.

For example http://oss.linn.co.uk/trac/wiki/Kinsky is one of freeware. You can drag files to your UPnP device to play. Create playlist. Start streaming from UPnP server serources etc.

Hope this helps!


Is there a keyboard shortcut to organize or align two finder windows?

As far as I know, there is no "out of the box" way or any system shortcut, to be able to align or arrange Finder windows.  However, using Script Editor.app to create an AppleScript to set the bounds (size and location) of the finder windows, you can then bring your finished AppleScript code into Automator.app by creating a new document in Automator and selecting "Service" as the new document type.

The next step would be adding a run AppleScript action to the workflow, then paste the previously mentioned AppleScript, which we compiled in Script Editor.app, into the run AppleScript action in Automator

Next you would save and name the Automator service (I named it "Arrange Finder Windows").  After this, your new service will be available in system preferences at which point you can assign it a keyboard shortcut.

Now let's take a look at the process involved in creating the script in Script Editor.app, to manipulate the Finder windows.  Using my 15" MacBook Pro, I have 5 different Display Resolutions I can choose from.  What I'm getting at is, if my current display resolution is set at "Default", whatever code I create which will manipulate finder windows, Will function correctly only when I'm using the default display resolution.  At a later point if I decide to change my Display either higher or lower, the code I created while using the default display, will actually place the Finder windows in different locations as they were originally meant.

In short, the goal here is to be able to align and arrange Finder windows(processing from one up to six windows) no matter which Display Resolution I am currently using.

This first part of the following code sets property values for all five different display resolutions I can choose in system preferences

-- ALL POSSIBLE DISPLAY RESOLUTION VALUES IN SYSTEM PREFERENCES --
property displayRezolution_Lowest : {0, 0, 1024, 640}
property displayRezolution_Lower : {0, 0, 1280, 800}
property displayRezolution_Default : {0, 0, 1440, 900}
property displayRezolution_Higher : {0, 0, 1680, 1050}
property displayRezolution_Highest : {0, 0, 1920, 1200}

This next snippet of code will retrieve the actual display resolution currently being used on the monitor

-- GETS THE CURRENT DISPLAY RESOLUTION BEING USED --
tell application "Finder" to set getRezolution to get bounds of window of desktop

This next snippet determines which script object to run based on the current display resolution.  (I created five different script objects, one script for every Display resolution... Each of which contains different values for the bounds of the finder windows

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --
if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

Here is the full script which will be placed into Automator

-- ALL POSSIBLE DISPLAY RESOLUTION VALUES IN SYSTEM PREFERENCES --

property displayRezolution_Lowest : {0, 0, 1024, 640}
property displayRezolution_Lower : {0, 0, 1280, 800}
property displayRezolution_Default : {0, 0, 1440, 900}
property displayRezolution_Higher : {0, 0, 1680, 1050}
property displayRezolution_Highest : {0, 0, 1920, 1200}

-- GETS THE CURRENT DISPLAY RESOLUTION BEING USED --

tell application "Finder" to set getRezolution to get bounds of window of desktop

-- DETERMINES WHICH SCRIPT TO RUN BASED ON THE CURRENT DISPLAY RESOLUTION --

if getRezolution is equal to displayRezolution_Lowest then
    run script displayRezolutionLowest
else if getRezolution is equal to displayRezolution_Lower then
    run script displayRezolutionLower
else if getRezolution is equal to displayRezolution_Default then
    run script displayRezolutionDefault
else if getRezolution is equal to displayRezolution_Higher then
    run script displayRezolutionHigher
else if getRezolution is equal to displayRezolution_Highest then
    run script displayRezolutionHighest
end if

--  INDIVIDUAL SCRIPT OBJECTS   --

script displayRezolutionLowest
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{0, 22, 517, 366}, {518, 22, 1024, 366}, ¬
        {0, 294, 517, 638}, {518, 295, 1024, 639}}
    property savedBoundz3 : {{0, 22, 342, 640}, {343, 22, 684, 640}, {685, 22, 1024, 640}}
    property savedBoundz2 : {{0, 22, 517, 640}, {518, 22, 1024, 640}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionLower
    property savedBoundz6 : {{438, 410, 879, 800}, {0, 22, 437, 409}, {438, 22, 879, 409}, ¬
        {1, 410, 437, 800}, {880, 22, 1280, 409}, {880, 410, 1280, 800}}
    property savedBoundz5 : {{657, 410, 1280, 800}, {0, 22, 437, 409}, ¬
        {438, 22, 879, 409}, {1, 410, 656, 800}, {880, 22, 1280, 409}}
    property savedBoundz4 : {{657, 410, 1280, 800}, {0, 22, 656, 409}, {657, 22, 1280, 409}, ¬
        {1, 410, 656, 800}}
    property savedBoundz3 : {{846, 22, 1280, 800}, {407, 22, 845, 800}, {0, 22, 406, 800}}
    property savedBoundz2 : {{648, 22, 1280, 800}, {0, 22, 647, 800}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionDefault
    property savedBoundz6 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 959, 891}, {961, 457, 1440, 891}}
    property savedBoundz5 : {{0, 22, 479, 456}, {480, 22, 959, 456}, {961, 22, 1440, 456}, ¬
        {0, 458, 479, 892}, {480, 457, 1440, 891}}
    property savedBoundz4 : {{722, 22, 1440, 456}, {0, 22, 721, 456}, {722, 457, 1440, 900}, ¬
        {0, 458, 721, 900}}
    property savedBoundz3 : {{0, 22, 479, 900}, {480, 22, 959, 900}, {961, 22, 1453, 900}}
    property savedBoundz2 : {{0, 22, 715, 900}, {716, 22, 1438, 900}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHigher
    property savedBoundz6 : {{560, 530, 1120, 1050}, {1121, 22, 1680, 529}, {0, 22, 559, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}, {560, 22, 1119, 529}}
    property savedBoundz5 : {{560, 530, 1120, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 559, 1050}, {1121, 530, 1680, 1050}}
    property savedBoundz4 : {{829, 530, 1680, 1050}, {829, 22, 1680, 529}, {0, 22, 828, 529}, ¬
        {0, 530, 828, 1050}}
    property savedBoundz3 : {{1130, 22, 1680, 1050}, {0, 22, 551, 1050}, {552, 22, 1129, 1050}}
    property savedBoundz2 : {{834, 22, 1680, 1050}, {0, 22, 832, 1050}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

script displayRezolutionHighest
    property savedBoundz6 : {{1277, 22, 1920, 602}, {0, 22, 632, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}, {633, 22, 1276, 602}}
    property savedBoundz5 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {1277, 603, 1920, 1200}, ¬
        {0, 603, 632, 1200}, {633, 603, 1276, 1200}}
    property savedBoundz4 : {{961, 22, 1920, 602}, {0, 22, 960, 602}, {961, 603, 1920, 1200}, ¬
        {0, 603, 960, 1200}}
    property savedBoundz3 : {{1277, 22, 1920, 1200}, {0, 22, 632, 1200}, {633, 22, 1276, 1200}}
    property savedBoundz2 : {{938, 22, 1920, 1200}, {0, 22, 937, 1200}}

    tell application "Finder"
        if (count of every window) = 6 then
            set theBoundz to savedBoundz6
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 5 then
            set theBoundz to savedBoundz5
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 4 then
            set theBoundz to savedBoundz4
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 3 then
            set theBoundz to savedBoundz3
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 2 then
            set theBoundz to savedBoundz2
            repeat with theWindow from 1 to count of theBoundz
                set theItem to item theWindow of theBoundz
                try
                    set the bounds of Finder window theWindow to theItem
                end try
                delay 0.1
            end repeat
        else if (count of every window) = 1 then
            run script centerWindow
        else if (count of every window) = 0 then
            return
        else if (count of every window) is greater than 6 then
            return
        end if
    end tell

    script centerWindow
        property sidebarWidth : 259
        property theBoundz : missing value
        property theBoundz_1 : {163, 76, 876, 547}
        property theBoundz_2 : {260, 119, 1060, 652}
        property theBoundz_3 : {305, 73, 1126, 812}
        property theBoundz_4 : {353, 122, 1324, 868}
        property theBoundz_5 : {466, 201, 1467, 1129}

        property displayRezolution_Lowest : {0, 0, 1024, 640}
        property displayRezolution_Lower : {0, 0, 1280, 800}
        property displayRezolution_Default : {0, 0, 1440, 900}
        property displayRezolution_Higher : {0, 0, 1680, 1050}
        property displayRezolution_Highest : {0, 0, 1920, 1200}

        tell application "Finder" to set getRez to get bounds of window of desktop

        if displayRezolution_Lowest is equal to getRez then
            centerFinderWindow(theBoundz_1)
        end if
        if displayRezolution_Lower is equal to getRez then
            centerFinderWindow(theBoundz_2)
        end if
        if displayRezolution_Default is equal to getRez then
            centerFinderWindow(theBoundz_3)
        end if
        if displayRezolution_Higher is equal to getRez then
            centerFinderWindow(theBoundz_4)
        end if
        if displayRezolution_Highest is equal to getRez then
            centerFinderWindow(theBoundz_5)
        end if

        on centerFinderWindow(theBoundz)
            tell application "Finder"
                try
                    tell its Finder windows
                        set its current view to column view
                        set its bounds to theBoundz
                        delay 0.1
                        set its sidebar width to sidebarWidth
                        delay 0.1
                        set its toolbar visible to true
                        delay 0.1
                    end tell
                    tell its Finder windows
                        set its sidebar width to sidebarWidth
                    end tell
                end try
            end tell
        end centerFinderWindow
    end script
end script

Be sure to set the property values to  your monitor's available Display Resolutions, at the top of the script

To set the size and locations (Bounds) of the Finder windows, manually position and size (with your mouse) each finder window.  Then in Script Editor, run this following code then simply copy the result coordinates and paste them back into the main script

tell application "Finder" to set getRezolution to get bounds of window of desktop
tell application "Finder" to set theCount to count of every Finder window
tell application "Finder" to set theBoundz to bounds of every Finder window

Here is an example running the Automator service (which can be invoked by a keyboard shortcut) in Finder, starting with six windows, then all the way down to one window...


It is very easy to do this:

Open a new Finder window.
As you resize the window, hold the Command ⌘ (not Alt / Option) key. Close resized window.
Then hold the Alt / Option key as you right click on Finder in the Dock and click Relaunch.
Any Finder windows opened after this will open at that size.

Note: This does not work for windows opened from folders on the desktop.


A restart of the iOS device solved the problem for me.


In Yosemite Mail, setting Signature to None does not remove signature like in Mavericks

It seems that this has finally been fixed in El Capitan (I'm currently using Mail 9.2 on OSX 10.11.2).


Karabiner-Elements: How to disable a group of keys in a simple way?

EDIT: I just added two "[ ]" brackets to the final "to":[{ -part, as their lack got s.o.an [error] !

==========================================================================

So, here is a "final version" (some notes to/from a first attempt are appended at bottom):

... some sample code that excludes any typing except letters "a" & "b".
This example is set to only work in TextEdit (for testing purposes) but of course you can change/delete this "conditions" (in last manipulator).

– The "Excluding" is prepared by Shft-Ctrl-A which solely sets "none_but_ab" to true (1).
– Next in line is a Stop-manipulator (security first); it sets "none_but_ab" to "0" after holding "x" 2 sec.
– Both following parts out-put our "a" and "b" letters, excluding them from following annihilation.
– The fatal last manipulator grabs "any: key_code" and renders it to "none" …
– Be careful with your Stop-mechanism: singular keys work best, modified combos may fail!

– Some more ideas:
By adding "command" ("shift") to the last "from", you could prevent app-Cmd-shortcuts (capital letters).
Karabiner El. can start before login (Preferences > 'Copy the current …'); "password" would be affected!
I also would like to know how "Shift" could be applied to "any":"key_code", forcing capital letters, or if numbers can somehow be "selected". Well, let's see …

{ "description": "=============  vk_none but a,b  ============= ",
   "manipulators": [
        {
           "from": { "key_code": "a",
                     "modifiers": {
                         "mandatory": ["left_shift", "left_control"]
                   }              },
             "to": [
                    { "set_variable": {
                      "name": "none_but_ab",
                      "value": 1 }    }
                   ],
           "type": "basic"
         },
         {
           "from": { "key_code": "x" },
     "parameters": { "basic.to_if_held_down_threshold_milliseconds": 2000 },
"to_if_held_down": [
                    { "key_code": "x" },
                    { "set_variable": {
                      "name": "none_but_ab",
                      "value": 0 }    }
                   ],
           "type": "basic"
         },
         { "from": { "key_code": "a" },
             "to": [ { "key_code": "a" } ],
           "type": "basic" },
         { "from": { "key_code": "b" },
             "to": [ { "key_code": "b" } ],
           "type": "basic" },
         {
     "conditions": [
                    { "name": "none_but_ab",
                      "type": "variable_if",
                      "value": 1 },
                    { "bundle_identifiers": [
                              "^com.apple.TextEdit" ],
                      "type": "frontmost_application_if"
                    }
                   ],
           "from": { "any": "key_code",
                     "modifiers": {
                          "optional": ["any"] }
                   },
             "to": [ { "key_code": "vk_none" } ],
           "type": "basic"
                   }
                   ]
}

(Here are some remains from a first (deleted) answer at this:

note the twisted "any: key_code" part that calls every key, including "modifiers…any"

Interestingly 'from-to' units within{manipulators: …} Karabiner.json are worked through from top to bottom until one is executable.
So if you want particular letters (a, b) to work nonetheless, you must call them previously.

Starting value for any variable is "0" … values will "live" while Karabiner is running!

… while experimenting I made my monitor sleep, but when I typed my pw – one letter simply was not recognised. I had to start from an external drive and change my code. )


getElementById not working with AppleScript

Close you need to specify who to tell, in this case document 1

tell application "System Events"
    tell process "Safari"
        tell menu bar 1
            click menu bar item "File"
            tell menu "File"
                click menu item "New Private Window"
            end tell
        end tell
    end tell
end tell

tell application "Safari"
    open location "https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/"
    delay 3
    tell application "System Events" to keystroke space
    tell document 1
        do JavaScript "document.getElementById('two').click();"
    end tell
end tell

Also when working with radio buttons, I would suggest:

document.getElementById('two').checked = true;

Also you can escape quotes (don't need to in this example, but good to know)

do JavaScript "document.getElementById(\"two\").checked = true;"


Where does the Messages beta pull my buddy picture/user icon from?

Gmail may be set to synchronise with your Address Book.  Go to your address book, and select the "me" card that you will previously have chosen as your own identify within Address Book.  Whatever picture is being used by your "me" card (or potentially by whatever card has a matching email address as the one your messages app is linked to) should be the one Messages uses.


What CAD software is depicted in screenshot

The software is called SketchUp. I believe this may be the pro version.


Can't delete keychain items with UI, but command line works fine

I notice you say, "If I now redo the search in Keychain Access…" implying that you began by searching when you weren't able to delete the item. Find it in the list without searching and then delete. It's just a dumb bug. I have found I sometimes can delete a single item after searching, but not multiple, and sometimes there's no problem at all. ¯\_(ツ)_/¯


iMac Wi-Fi detects internet networks but it doesn't connect to any, but my other PC connects fine to them

Assuming you've already tried rebooting the iMac, you could try totally removing your Wi-Fi service, restarting your Mac, and adding your Wi-Fi service back again to see if that resolves the issue.

While you don't specify your version of macOS, the steps below should work:

Go to Apple > System Preferences > Network
Select the Wi-Fi service on the left-hand side
Click on the cog icon at bottom-left and select Make Service Inactive
Now delete the service by clicking on the minus sign (i.e. the - button) at left of the cog
Click on the Apply button
Exit Network preferences
Restart your iMac
Go to Apple > System Preferences > Network
Click on the plus sign (i.e. the + button) at left of the cog
In the pop-up window, ensure that Wi-Fi is selected from the drop-down menu
Click on the Create button
Make sure Wi-Fi is on

Let me know if this resolves the issue.


Where are Profile Manager Configuration Profiles Stored on OS X?

The profiles appear to be stored in

/private/var/db/ConfigurationProfiles/Store/ConfigProfiles.binary

I'd not recommend tampering with it, though.

To see what profiles are installed, and then remove one, assuming you can sudo to the user, you could try:

root$ sudo -u chymb profiles -L
chymb[1] attribute: profileIdentifier: com.stackexchange.apple.test
There are 1 user configuration profiles installed for 'chymb'
root$ sudo -u chymb profiles -R -p com.stackexchange.apple.test


Can I install OS X onto a separate external drive partition?

Yes!

As the disk is the correct format, it will show in the disk list in the installer (click Show All Disks). You can install any version of OS X on a partition of the correct format, regardless of where the partition is located.

The OS X installer doesn't partition the disk for you though; do this first in Disk Utility.


Since the newest Airport Extreme routers don't support SNMP, how can I monitor bandwidth usage on my network?

PFSense, DD-WRT/Tomato, Peplink, or some other router in front of the Apple AirPort Extreme will likely be the best solution.  Don't think there's an easier way unless you're running on a single machine for your whole network (not likely).  All the routers I mentioned support realtime traffic monitoring.  NetGear Nighthawks have this capability too.


MATLAB and Objective-C in Sublime Text 2

You may want to have a look at /Users//Library/Application Support/Sublime Text 2/Packages/Matlab.sublime-package. It's a simple ZIP file containing a bunch of XML (Plist) files.

In the Sublime Doc for syntax definitions you'd be able to find a documentation of how to create (and edit) syntax definitions.

For an example have a look at the perl syntax definition, it contains a key named "firstLineMatch" which is not used in the Matlab syntax definition. But you could add one and create a file magic for/in your Matlab files.

Update : I just gave it a go and it doesn't seem to work. Do be fair TextMate can't do it either.

Update 2 : After some more investigation: The question about firstLineMatch came up in the Sublime Forum. The file extension is taking precedence over firstLineMatch right now. So there's not much that can be done. With firstLineMatch working you could do nice things. And this would mean that no file magic would be necessary since the syntax of Obj-C and Matlab files is different.


OSX recovering ownership after bad chown command

OS X Yosemite (10.10) and older:

Applications → Utilities → Disk Utility
Select the startup disk from the list of volumes.
Click the First Aid tab.
To check permissions, click Verify Disk Permissions. To repair permissions, click Repair Disk Permissions.

Source: https://support.apple.com/en-au/HT201560

You can also do it from Terminal using the diskutil command.

OS X El Captian (10.11):

Applications → Utilities → Terminal
To verify permissions:

sudo /usr/libexec/repair_packages --verify --standard-pkgs /

To repair permissions:

sudo /usr/libexec/repair_packages --repair --standard-pkgs /

Type your password when prompted. You'll need to be root or a member of the admin group.

Source: http://osxdaily.com/2015/11/04/verify-repair-permissions-mac-os-x/


Using a virtual machine as a network tap on a mac server

In bridged mode, the VM's port gets its own Ethernet MAC address. If VMNet acts like a switch, you might not see packets destined for the Mac's network node, which I assume is the point of this exercise.

Yes, the virtual port needs it's own IP address as well.

Internet sharing just passes along traffic not destined for the machine that is sharing. It is not a network bridge (it runs as a NAT IIRC), so it won't pass along broadcasts either.


Is it possible to have pixelated graphics on a MacBook Pro due to a defunct trackpad?

It's very common for one component it's connected electrically to another component to cause noise and other issues. Whether it's the most likely cause is debatable, but Apple's service centers have direct access to engineering and a huge wealth of repair data so they would be my first authority to go to determine what is likely and what is not.

Without the detailed diagnostics from your specific repairs as well as the actual service manuals it's hard to second-guess Apple.

Apple provides a nice (IMO) warranty of 90 days and any repair, so it's hard to see how they would be scamming you.  If you set down and catalog each interaction with AppleCare, have you spoken with them 10 or 20 times?

Also you need to collect all of the written estimates and repair details to know what components have and have not been examined by a technician.

The only time I've known Apple executive relations to be unable to resolve A customer issue is when Apple has already bent over backwards to accommodate their responsibilities and person requesting the repair is the one being unreasonable.  I certainly wouldn't accuse you of that with the little data presented, but if you really still unsure collect the facts and data you have and give it to someone who is somewhat impartial and have them give you their opinion.

Also, a final note - unless you are running stock OS or an apple benchmark, I've seen all sorts of gfx card mods and graphics tools cause exactly what you see. My guess is Apple knows other parts to be good and is guessing the trackpad is the most likely of the ones that remain in tested.

I would ask them the cost of a depot repair, and you'll have to be Ok with paying for it if they replace parts - even if the benchmark fails to run. If your Mac boots the normal OS fine, I would not pursue further repairs till the situation deteriorates.


You can disable OTA updates by installing the Apple TV beta profile on your iOS device. If you are an Apple Developer you can obtain the beta profile from the Downloads section. Installing this profile changes the software update catalog location to the one used for Apple TV updates, and therefore iOS reads the catalog and finds no updates suitable for iOS.

If your device is jailbroken, you can install NO PLS RECOVERY which prevents your device from entering recovery mode initiated by iTunes, preventing iTunes from updating the device.

It's not possible to prevent someone with physical access to the device from entering DFU using the buttons on the device and restoring iOS.


Cancel Apple Music subscription > Subscribe in future > Playlists lost or not?

From this Apple Discussion:

Apple does not retain your details indefinitely and whilst there is no grace period but I believe if you resubscribe within 30 days you will continue to access the music in iTunes Match.
I would add that your playlists are dependent on what is in your iTunes Library and included in your iCloud music library.
If you have all your music downloaded to your computer and you resubscribe later, iTunes Match will scan your library again to determine what can be matched and needs to be uploaded. Once you turn on iCloud music library on your iOS device, you should see your playlists. You will need to download if necessary.

Summary
Your playlists and data aren’t retained


How can I remap keys on an external keyboard, but keep the default layout on the internal?

KeyRemap4MacBook also supports device-specific settings:

<?xml version="1.0"?>
<root>
  <devicevendordef>
    <vendorname>KINESIS</vendorname>
    <vendorid>0x05f3</vendorid>
  </devicevendordef>
  <deviceproductdef>
    <productname>ADVANTAGE</productname>
    <productid>0x0007</productid>
  </deviceproductdef>
  <item>
    <name>modifierkeys</name>
    <identifier>modifierkeys</identifier>
    <device_only>DeviceVendor::KINESIS, DeviceProduct::ADVANTAGE</device_only>
    <autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::FN</autogen>
    <autogen>__KeyToKey__ KeyCode::FN, KeyCode::CONTROL_L</autogen>
    <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
    <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
  </item>
</root>

You can see the vendor and product IDs from EventViewer.app. If it can't remap any keys on the external keyboard, try uninstalling other keyboard or HID drivers.

See the source for the key code values and predefined settings.


One way of doing this:

Delete the texts above the un-timestamped text until the relevant message is assigned a timestamp. In this case you will just have to delete one message.


Mac Mini 2018 Ethernet option 1 vs. 10 GB

10 GB/s transfer speeds are faster than 1 GB/s transfer speeds.

From the Mac mini purchase page

  Mac mini has some of the most versatile ports and connectivity options
  of any Mac, allowing it to serve and adapt to a wide variety of
  situations and workflows. Mac mini comes standard with
  10/100/1000BASE-T Gigabit (1Gb) Ethernet using an RJ-45 connector. For
  network connections that are up to 10 times faster, Mac mini has a
  10Gb Ethernet option. The 10Gb Ethernet option supports Nbase-T
  industry-standard 1Gb, 2.5Gb, 5Gb, and 10Gb network speeds using an
  RJ-45 connector. With 10Gb Ethernet, Mac mini will provide higher
  connectivity bandwidth for sharing files between desktops, working
  with high-performance network storage, or large-capacity data loads.