How can I disable CPU throttling and CPU disabling? On a 2011 17" MacBook Pro (i7, 10.6, 16GB ram) I do not have any options in the energy saver preference panel to control CPU throttling.  I need to be able to disable CPU throttling for short periods of time - or at least force OS X to a certain state and stay there so that I can get consistent results from test to test in a performance comparison situation.

Are there methods or apps that allow me to control the energy saver features and particularly CPU throttling and CPU disabling for recent (sandy bridge) Macs?

CHUD does not appear to support this machine (it doesn't correctly report the CPU type) and while I can manually disable hyperthreading and processor cores using /Library/Application Support/HWPrefs/CPUPalette.app it doesn't give me the option to tell OS X not to throttle anything.

This particular machine is a second generation Core i7, which includes Intel's Turbo Boost technology.

This is, essentially, a power management processor that has the ability to change the clock speed and disable/enable processor cores on the fly.  It requires no software intervention, the entire algorithm exists in silicon on the i7 processor itself.

While utilities to control it are starting to appear for windows, Apple doesn't provide a method to disable it, nevermind control it, and I have not yet found any utilities that would allow me to disable or control it on OS X.

So, at this point, the answer is that you cannot disable CPU throttling or power control under OS X for Turbo Boost capable processors - it's all automated inside the processor, and Apple doesn't have a public API to control it.


External monitor stays black after "locking" (or sleeping) I have a Mac Book Pro (latest 2017 touchbar model) which I am using in clamshell mode. Meaning: its lid is closed, and I work with two external monitors.

Both monitors are a bit older; they have DVI ports which connect via DVI/HDMI cable. Monitor 1 is then connected via a Kensington USB-C dock, Monitor 2 is connected via a StarTech HDMI<->USB-C adapter.

My problem: as soon as I lock my screen ... Monitor 2 will stay black. Meaning: I come back, I log into the system ... Monitor 1 works just as before. But Monitor 2 stays black. Although MacOs somehow still thinks the monitor is "there": when I turn to "displays" and look at "arrangement" - it shows all monitors. And windows that I "left" on the desktop space on monitor 2 won't show up on the other monitor.

I guess this might be caused by the chain of hardware I am using - but still it is extremely annoying to come back and find that monitor to be useless (I have to restart MacOs in order to get it back working).

Any ideas how to overcome / debug this issue are welcome.

( edit: same thing happens when I "sleep" instead of lock )

When I faced this issue, I pulled the StarTech Adaptors in and out multiple times and the issue would resolve itself. Now I found a better solution as described below.

I  went to System Preferences -> Display -> Arrangement and toggled the Mirror Displays checkbox (ie check and then un-check it again).


OS X 10.11 Disk Utility, encrypted dmg password and keychain In previous versions of Disk Utility there were checkboxes whether to store the password in the keychain or not while creating an encrypted dmg image. Now there are less options.

Does the new version of Disk Utility safe the password in the keychain by default when an encrypted dmg volumes is created?

Using Disk Utility (in El Capitan) you won't be asked at all to save the password to a keychain while creating the encrypted dmg. But after unmounting and reopening the newly created encrypted dmg you will be asked to enter the password and the option to save it to the keychain will be shown:


How to backup all files in my iphone? including the operating system files I want to edit some files in my iphone using ifile/ssh like in this information http://www.ifans.com/forums/threads/how-to-edit-itunes-apps-ipa-files-to-be-installed-on-unsupported-devices.370037/

is there a way to backup all files in my iphone first? including the operating system files
if its possible, i will use it to restore all files if the iphone crashed later

I am not sure, but I think you can still back up your iPhone with iTunes/iCloud even if it is jail broken. If you really want to back up iPhone as much as iPhone data without iTunes/iCloud there are paid/free third-party methods to do so.


stdlib.h file not found and macOS SDK package installer also not found I have macOS High Sierra 10.13.6 (For various reason I will not update)
and Xcode 10.1 installed alongside command-line-tools.

I am trying to compile a certain software that is attempting to open the following header file:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h

but it cannot find the file. When I manually explore the folder, the stdlib.h file is located at:

Developer/CommandLineTools/sr/include/c++/v1/stdlib.h

I have tried so many things, from uninstalling and reinstalling, to trying out older versions, etc. I tried to "manually" install it, but there is no macOS SDK package to install.

Apple has an installer for C++ libraries you can install.

xcode-select --install

If you have Xcode installed (or don't mind downloading it from the App Store) run it to validate all the command line tools are installed as well as additional tools. Lastly, once these are installed, check for normal software updates to ensure the command line updates are applied.

You might need to look at the output of the build script to see if you just need to reset the default location of the compile tools:

xcode-select --reset


VirtualBox 5.2 Won't Install on Mac OS 10.13 Trying to install VirtualBox 5.2 on a Mac running OSX 10.13. The installation fails with an installer message reading "The installation failed."

I've tried the 2 solutions I've been able to find and neither have worked.

I tried clicking "allow" in the "Security & Privacy" preference panel where the download gets blocked. Each time, I ejected the image before trying again with no luck.

I also tried entering sudo spctl --master-disable in the terminal before trying again, but still no luck.

After the failure, the application icon does still appear in the downloads folder, but I'm supposing this isn't a good installation and I'll run into problems using it? Thoughts?

This worked for me on High Sierra 10.13.4:

System Preferences > Keyboard > Shortcuts > Select 'All Controls'

Then:

System Preferences > Privacy & Security > Press 'Tab' until 'Allow' is selected > Press 'Spacebar'

Note: the Privacy & Security page may need to be unlocked before 'Tab' will work.

Hope this helps!

Credit to @dansanduleac's answer on GitHub


Homebrew putty installation does not make the putty command recognisable I would like to instal putty with use of Homebrew. I'm performing the following command:

brew install putty

which gives the seemingly correct output:

==> Downloading https://homebrew.bintray.com/bottles/putty-0.67.el_capitan.bottle.tar.gz
Already downloaded: /Users/thisuser/Library/Caches/Homebrew/putty-0.67.el_capitan.bottle.tar.gz
==> Pouring putty-0.67.el_capitan.bottle.tar.gz
  /usr/local/Cellar/putty/0.67: 11 files, 1.5M

However, the putty command is not recognised:

thisuser-541/41:~$ putty
-bash: putty: command not found

Update: Current stable version (.67) of putty can't be build with gtk+2 support on OS X using homebrew. This is a know issue #40951. It seems you can install from HEAD version (brew install --HEAD --with-gtk+3 putty) and for me that is also broken.

brew install putty by default installs from a pre-built bottle. The pre-built bottle for putty doesn't include putty, puttytel or pterm.

If you want putty then can try installing from source. First remove the installed putty formula by running brew remove putty. After that install putty from source by running brew install --build-from-source --with-gtk+3 putty.

NOTE: As of this writing building putty from source is broken with homebrew

If someone is getting an error like this: invalid option: --with-gtk+3, all installation options are removed with the latest version of the brew. source


What is Apple's serial number flagging procedure? My iPad was stolen a couple of weeks ago. I filed a police report, used Find My iPhone to locate the iPad, and was subsequently featured on the local news for a story...sadly, none of these routes did anything to recover my property. (Makes me think Find my iPhone is more of a cool novelty than a useful utility; the police couldn't get a warrant, because the app shows a spot on a map, doesn't give a specific address. But I digress...)

I remotely locked my iPad, but did not wipe it (I consider that route to be giving up), and called Apple. The representative said that they could flag my serial (contrary to what the internet believes), and that when someone tries to activate it, they will notify law enforcement.

No one at Apple Support seems to know how this process works. The latest guy I spoke with said that it is a small department, and there's no way to directly contact any of them. (I pictured like 3 old-time detective looking guys in suspenders, smoking cigarettes and wearing beat up derby hats...but I have problems ::shrug::).

Do any of YOU fine people have any insight into this process? I have an idea, but I'd just like to know if anyone has ever recovered a stolen device by this method.

Regarding the flagged serial number, I had this done for a client but nothing ever came of it, so either it wasn't ever activated or there is no official procedure for our country.

On a side note regarding tracking down a physical address. If your iPad is set to check email accounts such as google or your own hosted mail. As soon as it's online it'll put the originating IP in the logs which is something the police might be able to get a warrant for. Google actually lists all current active connections and 'recent activity' from IP and how long ago. It's listed in the bottom right corner (details). This could be useful in tracking down an address.


How to voice activate iPhone without touching it? How to voice activate an iPhone without touching it? Illinois' law states cell phone use must be hands free. I realize they intend for you to use a hands-free kit. How come when, at least when it rings, I can't tell Siri to answer it onto speaker phone? Why isn't she listening for commands like the star ship Enterprise?

At the moment is not possible, but this is one of the features of the upcoming iOS 8:

  With iOS 8, users won't have to have their iPhone or iPad in their hands to invoke Siri. Instead, the device will listen for the voice prompt "Hey Siri" to initiate.


Time Machine backup to Synology NAS stuck on 'Waiting to complete first backup' I recently bought a NAS (Synology DS218+) to help with backing up several Macs in my household using Time Machine. So far, each Mac has been backed up on individual hard drives.

I am trying to perform a backup of my internal SSD (500GB), as well as my my external HDD (around 1.1 TB of data). So, I am trying to backup 1.6TB at the moment via Time Machine as the initial backup.

My first attempt to get this to work, was by following Synology's instructions. I was able to discover the Time Machine folder on my NAS and TM started it's initial backup. After several GB of data transfer the backup stopped. No error message but not even near completion. Time Machine stated: 'Waiting to complete first backup'. Nothing happened after that. It transferred around 9GB of data but that was it. In case I did a mistake setting up the folder and user on my NAS, I reset the NAS and started from scratch. Same result... After a couple GB the NAS was again stuck and said 'Waiting to complete first backup'.

After some research I found a helpful Synology thread. I disabled HDD hibernation, disabled AFP. In a nutshell these are my current settings:

File share configuration:

I use BTRFS
"Advanced data integrity protection" is enabled
Encryption is disabled (for now - would like to have it but want to be able to get backups working first)

User configuration:

Standard user with a strong, random password.
Granted read/write access to Time machine file share and set quota of 3TB.

File services:

I have SMB enabled only - AFP is disabled.
Enabled Bonjour Service Discovery and Bonjour Time Machine broadcast via SMB.
Selected the Time Machine Folder

While all my first attempts were to get the initial TM backup to work over WIFI, I also tried connecting the NAS directly to my Mac. I enabled DHCP on my NAS, connected it via an ethernet cable to my Mac and started another backup. It got further than via wifi but again, it did not finish the backup. I let my Mac run over night, staying connected to my NAS, hoping the backup would finish... In the morning I was greeted by the same message again: 'Waiting to complete first backup'.

My Mac's power options are the following:

Prevent computer from sleeping automatically when display if off [ENABLED]
Put hard disk to sleep when possible [DISABLED]
Wake for network access [ENABLED]
Enable Power Nap while plugged into a power adapter [ENABLED]

Now, I am stuck too. I cannot think of what else I could possibly try to get Time Machine to backup to my NAS. This really has been some struggle so far... Looking forward to hear any thoughts and ideas :-)

Thank you very much in advance,

jrn

I've got a setup very similar to yours: a 480GB SSD and 1TB HD; both internal (718GB full backup reported in TM). I've been backing up to a DS213 successfully using AFP, and I'm setting up a DS418play using SMB. The Synology forums have conflicting posts regarding making TM work, including the one you reference. Another suggests TM has problems with DSM's SMB implementation, using SAMBA 4.4 (https://forum.synology.com/enu/viewtopic.php?f=64&t=139097). Nevertheless, I have both working for TM backups: AFP on the DS213 and SMB on DS418.

My working config seems the same as yours. Recommend you try these steps:

But, check your DSM SBM settings:
-> File Services -> SMB -> Advanced Settings

Max: SMB3; Min: SMB2
Transport Encryption: Auto
Enable Opportunistic Locking and SBM2 lease.
Enable SMB durable handles

Are you connected via Gigabit Ethernet vs wifi? Do this at least for first backup.
Reconnect to your NAS TM folder.

Turn TM OFF (stop auto backups)
Unmount the NAS TM drive
Restart Mac
Mount NAS TM drive: CMD-K, enter smb://NameOfNSA/tmFolderName
-- This name/folder should be broadcast via Bonjour from NAS
You should get login window: enter NAS TM user credentials (I
--I use a separate user for TM; Remember pwd in Keychain
Now Select this same "disk" in Time Machine prefs

If TM still won't complete, try..

Start over with NAS TM share

Turn off TM
Unmount drive
Remove the TM backup from DSM Shared Folders
Create a new TM backup using settings above
Restart Mac and setup TM as above

Try pruning down the size of your initial backup.

See if you can get a backup of just you SSD
Under TM Options, exclude your 1TB drive.
After successful backup completes, remove exclusion.
Backup again.

Even if this works, clone another backup of your drives. (TM is full of strange arcanery -- don't put all your eggs in one basket)

Update: I periodically see see an error saying "The networked backup disk does not support the required capabilities." In this case, reset the SMB Cache in DSM's SMB advanced settings. This will allow TM to back up again. For a while.


Which upgrade should I consider for my usage: RAM or CPU? I plan to buy the new 2017 13" MacBook Pro with Touch Bar for the new semester. However, I'm trying to decide between upgrading the RAM or the CPU.

I'm currently a Math major and plan to use it for things involving maths operations, like running Mathematica, factoring really big primes, graphing 3D contour plots etc. I'm also a bit of a gamer. Another consideration is that I really don't want the computer heating up, as I currently have the fan-less 2015 Retina MacBook and overheating is a common issue.

With this specific usage in mind, I'm really wondering what would benefit me the most: upgrading to the i7 processor or increasing the RAM to 16GB?

For starters, many users pay too much attention to overheating. Macs are designed to operate at a range of temperatures and to automatically protect themselves if they sense the temperature is above a safe level.

Secondly, you may get differences in opinion, but I'll try my best to answer this with facts.

While some i7 CPUs are quad-core, the ones offered on the 13" MBP are dual-core processors, just like the i5 CPUs.

Since all dual core i5 and i7 mobile processors support hyper-threading, there's actually very little difference between them in terms of a performance gap and battery usage. In fact, both options for this model also incorporate the same Intel Iris Plus Graphics GPU.

My personal recommendation would be to upgrade both if you can find a way to afford it, as this will increase it's longevity in terms of future compatibility with software/hardware.

However, if you had to pick and choose what you upgraded, then the upgrade to 16GB RAM would be the most beneficial, as the performance boost on the i7 will benefit you less than the extra RAM would.


How can I set the default width, height, and position of my Mac terminal app? How can I set the default width and height of my Mac terminal window so that it always opens the way I'd like it to. Currently, every time I launch the terminal app, I need to resize it.

One way to do it is

Set your window how you would like it,
Go to Window > Save Windows as Group...

Enter a name next to Save As:
Check "Use window group when Terminal starts"
Click Save

However, after you have launched Terminal, if you chose Terminal > New Window you will still have to resize the window. This is most useful if you want to have multiple terminal windows open at launch.

If you go to Terminal > Preferences > Profiles you can create a (or edit an existing) profile for a terminal window by column and row size which is available at the end of the terminal window title bar (Your screenshot shows a window 80 columns wide and 24 rows tall)

You can then set that profile to the default by pushing the default button (if the default button is ghosted out that group is already the default):


How can I make Safari cmd+number shortcut switch tabs instead of opening the bookmark associated with that number? I'm used to switching tabs with cmd+x where x is a number and takes me to tab x in firefox and pretty much every other browser I've ever used.
I like safari's speed and would like to try it a bit, but the cmd+x shortcut is burned in my brain and every time I use safari I end up screwing up.
I'd like to know if its possible to change this behavior, because this simple thing is a stopper for me.

In case you are coming from Chrome and want to use

cmd+[0-9] for switching tabs (instead of cycling through your preset top sites) take a look at:

github.com/rs/SafariTabSwitching

  Safari Tab Switching is a Safari SIMBL plugin which allow switching between tabs using Cmd+1-9.

Update:

Safari Version 9.0.2 (El Capitan) has native support for this:


Finder- Reopen Last Closed Window Finder does not seem to navigate to the last folder opened. For instance, when I am saving several files or images - it would be nice to (and used to ) open in the last place I placed something - now it defaults to "User" and I have to navigate each time - very frustrating.

In Finder, use the Go in menu => Recent Folders. This is the closest you can get to

  "open[ing] in the last place I placed something"

More Information:

If you don't like the default, you can change the default Finder window to open as well. Go to Preferences in Finder.


Powershell install keeps asking for a password I'm trying to upgrade my version of powershell to the latest version 7.0.1 using brew. The install seems to be stuck on disabling some ruby gems and is constantly asking over and over again for my password.  I've tried uninstalling as well and I get the same password loop over and over again.  I know I'm putting in the correct password as when I intensionally put in the wrong password I get the sorry message before it asks for my password again.

I'm a bit stumped as this point on what else to try besides removing the two folders that contain the powershell files.

How can I correctly uninstall powershell that was installed using brew if the uninstaller won't work?

The best step right now would be to uninstall and reinstall Homebrew. Sometimes Homebrew can be damaged and uninstalling and reinstalling it from the system will fix that.


Are you allowed to promote a Patreon page on your iOS app? Under section 3.2.2 (iv) of the App Store Review Guidelines, it says that the following is unacceptable:

Unless you are an approved nonprofit or otherwise permitted under Section 3.2.1 (vi) above, collecting funds within the app for charities and fundraisers. Apps that seek to raise money for such causes must be free on the App Store and may only collect funds outside of the app, such as via Safari or SMS.

Based on the above, what would be the implications of displaying a message such as "Support us on Patreon!"?

Let’s assume you’re not a charity or fundraising for one.

Technically, no since in 3.2.1 (vii) it says you’re allowed to promote voluntary giving, provided 100% of the funds go to the recipient — but Patreon takes a cut of the funds pledged / gifted.
Realistically, probably yes. If your app is otherwise fine, Apple might not reject you solely for having to pay processing fees.

As long as you’re not just trying to dodge in-app purchase, I would say make your app and submit it for review. Also, look at IAP for a tip jar I addition to the patreon option. People can and will tip you if they love the app. Also, worst case is you have to find a payment processor where you pay all transaction fees up front or separately so Apple can see 100% of the linked gift goes to you.

Also, if this is all your app does, don’t bother. You’ll need a compelling app that provides obvious value for free or paid and can’t just be a “here’s my patreon, fund me” shell.


Certain site doesn't open in browser I have strange issue and let me clarify that I am new to Mac.

OS: OS X Yosemite
Browser: Some (Chrome + Safari)

Issue: I am able to open google.com or youtube.com but I can't access a certain site. My machine's firewall is disabled.

I have tried the following so far:

Changed DNS servers: (8.8.8.8, 208.67.222.222 and 208.67.220.220) -> not working.
Ping test: success but still not able to open site.
Another test from Terminal window:  curl siteurl and even sudo curl siteurl : No success.

Error Message : Connection refused. ( On Chrome I can see the error code ERR_CONNECTION_REFUSED).

From the above error code I assumed that there might be an issue with the proxy settings but the are blank.

I have another Windows machine with a temporary proxy (Fiddler). Now I have specified this machine address as proxy server.

I have tried to access the previously refused site and it opened successfully.

What is the issue here?  What is a solution?

Use Network Utility to look up the site:

Verify you can reach ports 80 and 443 (and only use http for when port 80 is open and https for port 443)

Then enter the IP address instead of the DNS name in safari (or whatever browser). If your DNS is not working on the Mac, you can get the IP from another computer and verify the rest of the Mac works and focus on DNS.


How can I have dmg files automatically unmount when I trash them? A while ago, I used to have some kind of App or service that would automatically unmount a dmg file whenever I put the dmg file into the trash. This was really convenient, but I've since reinstalled OS X, and I've completely forgotten the name of the app that provides this useful feature. I still have backups of my old system, but I have no idea where to look. So, does anyone know of an app that provides this feature?

(Note: There are plentiful tutorials on how to achieve the reverse, i.e. auto-trash on eject, but this is not what I'm looking for.)

I found two options

Use a folder action on ~/.Trash to unmount any DMG getting moved into the trash can (see second part of this article, summarized below)
DMG Cleaner claims to be able to do this as well

Folder Action to unmount DMG moved to Trash

Create a new "Folder Action" workflow in Automator
Set Folder Action to work on ~/.Trash
Add a "Run Shell Script" action to the workflow
Set shell to "/usr/bin/python" and make sure input gets passed as arguments
Replace the content of the script box with the following script

import string, os, sys
lines = os.popen("hdiutil info").readlines()
should_eject = False
for line in lines:
    if line.startswith("image-alias"):
        path = line.split(":")[1]
        image_path = path.lstrip().rstrip()
        if image_path in sys.argv:
            should_eject = True
    elif line.startswith("/dev/") and should_eject is True:
        os.popen("hdiutil eject %s" % line.split()[0])
        should_eject = False
    elif line.startswith("###"):
        should_eject = False

Save the workflow


Create install media - lion -command not found I am trying to create a bootable usb drive in order to rebuild my sons old imac. I have followed the instructions given on this and other forums but am getting command not found when trying to run either of the commands

sudo /Applications/Install\ Mac\ OS\ X\ Lion.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ Mac\ OS\ X\ Lion.app —nointeraction

sudo /Applications/InstallMacOSXLion.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/InstallMacOSXLion.app

to create a USB installer. What am I missing?

Mac OS X Lion didn't come with the built-in ability to create a USB installer since a small USB flash drive installer came with Mac's that shipped with Mac OS X Lion and was also sold by Apple on a small USB flash drive.  It was also downloadable through the App Store.  It was the first release of Mac OS X to not come on optical media.

To create a USB Installer, from the downloaded Install Mac OS X Lion application bundle, you'll need to use a program like DiskMaker X (formerly Lion DiskMaker)

Surly because Apple sold the Mac OS X Lion USB Installer for ~$79 USD they weren't going to make it easy for users to usurp buying the product vs. making it themselves.  That changed with OS X Mavericks, being the first OS X release to include a built-in way to create a USB Installer.

To create a USB Installer for OS X Mavericks and later, have a look at: Create a bootable installer for OS X


Wife's data restored on my phone I have an new computer, and installed iTunes.  When I plugged in my iPhone, it asked if I wanted to restore my phone, or start as a new phone.  I said restore, but it restored my wife's phone data, and wiped out my email on 3 accounts.  How do I go back

If you have a backup of your iPhone on iCloud or another computer, you can restore from there. If you don't, you'll have to reset and setup as new.


Emails to iCloud from my server show 'This message has no content' Our donation website sends emails when a user signs up, donates etc. I've gotten many complaints that donors are getting blank emails. Upon further investigation it turns out that all these donors have apple emails i.e. @mac.com, @me.com @icloud.com etc...

So I got a hold of a Mac, created an email with the mail app for an iCloud account. Made a test donation, and received an email. When viewing on the mail app, I see on the left side as a preview of the text

  Thanks for donating to ... [the subject]
  This message has no content. [the body preview]

The right pane, showed the subject as well, but completely blank for the body.

Also worth noting, the same issue is on iOS (I borrowed my friend's iPhone 6 plus). However, on my android I used the outlook app and logged in to my icloud, and there the body text was indeed there!

I'm guessing it's possible the html of the email isn't parsed correctly by some Apple software...

All searches for the issue yielded solutions to a specific user experiencing this issue, but my issue is about the email message itself on an Apple email client.

Can someone point me in the right direction? Is there a specific html standard for apple emails?

It turns out the issue has to do with the content headers and how the email clients are interpreting them.

Originally, the HEADER was set to Content-Type: multipart/related; and the body was structured as

multipart/alternative
    text/plain
    text/html

It seems the iOS and apple clients weren't able to parse multipart/related correctly.

I solved it by changing the header to Content-Type: multipart/alternative; and then structured the body as

    text/plain
    text/html

Here is the mail library I was using https://github.com/opencart/opencart/blob/1.5.5.1/upload/system/library/mail.php

Similar discussion here https://stackoverflow.com/questions/19497672/multipart-messages-including-multiple-attachments-attachment-and-inline-wi

And here https://stackoverflow.com/questions/7766943/mime-multipart-related-structure-and-apple-mail-is-it-a-bug


How can make changes to a hard drive being shared with a Windows machine? So, this may be a unique issue and goes to show my ineptitude with Apple products. But, I have a hard drive that I share with my Windows PC that I use for storing all my pictures, music, and movies. The problem is that on OSX I'm not able to make any changes to the drive. I can't rename, add to it, or delete anything. I checked the Get Info on it, and for security it says I can only Read.

I've Googled all sorts of stuff and everything just keeps telling me to "click the lock". What lock?! Am I completely missing something?

You must install FUSE for os x to be able to make changes on a hard drive formatted in NTFS (Windows) https://osxfuse.github.io


Internal iOS update server for iPads (any/all iOS) Is it possible to setup an internal update server for iPads similar to the likes of OS X Server's update service (SUS)?

Current issues:

Bandwidth concerns
Do not want to jailbreak
iOS updates

Yes - both iTunes and the Apple Configurator act as a single download point that can then apply one update over USB to an unlimited number of iOS devices.

No - iOS devices do not apply for OTA updates from any update server in an analogous manner to Lion's SUS.

It is notable that Mountain Lion is announces to not ship with a SUS and instead have updates arrive from the Mac App store - so Macs are becoming more like iOS rather than the other way which seems to be the foundational premise of your question.


Is it possible to invoke play button using terminal? I want to control my media player (iTunes, Spotify, etc) using terminal. My goal was simply to trigger press on play/pause button using script. Is that possible?

You can control iTunes using AppleScript:

tell application "iTunes" to play

To run it directly from Terminal command line, you can use osascript:

osascript -e 'tell application "iTunes" to play'

To figure out what commands are available in iTunes, use the ScriptEditor app and open the dictionary of iTunes, see How do I find out the applescript commands available for a particular app?


How to "block" calls? How do we "block" calls such that no one is able to call through?

For example, I would not like anyone to call me for the next 60 minutes, but I do not wish to turn off the phone.

What's the best solution?

You have four options.

Turn on Do Not Disturb and lock the screen (or configure it to block all calls whether the screen is locked or not on iOS 7)
Place the phone in AirPlane mode - this disables the cellular data, SMS and cellular calls as well as WiFi. You can turn on WiFi while in AirPlane mode to access data and still be undisturbed.
Use your carrier to start call forwarding. It will send your calls to another number (google voice is a nice place to send them if you don't have another appropriate line). On AT&T, you dial the following to start forwarding, call: **21*1234567890# - assuming your other number is (123)456-7890. To stop the forwarding, call #21#
Remove the sim. If you have another sim (same carrier or unlocked phone) that would in effect turn off your primary phone service without deactivating the phone.


What WiFi adapter can I use to monitor a WiFi network on OS X from a MBP? I have MBP from early 2011 and Wireshark 1.8rc2 does not recognize it (under Lion).

What adaptors are compatible with it?

Alternatively, specify if there is a another software that I can use to monitor the traffic on a specific WiFi network (not encrypted).

Solved, the problem was that by default Wireshark did not monitor any interfaces but after going to the configuration they became visible and I was able to start monitoring them, even on promiscuous mode.


Losing administrative rights I have a handful of Mac's running Mavericks and up. Each Mac is generally used by 1-3 people.  Each person is a member of a specific AD group.

Pre-deployment we added that AD group to the "Allow Administration By" field with "domain\groupname" format. Pre-deployment and shortly after deployment, the end users were able to administer the Macs without issue.  They could escalate processes with their credentials.

Since then, none of the Macs recognize our users as administrators anymore, myself included (I'm in a separate AD group membership that was added at the same time).  We then started going into each user profile and checking the "Allow user to administer this computer" checkbox, which again worked for a time but no longer does.

We have started falling back on the local administrator user account to manually authenticate when needed, but we're not able to share that password with end users.

The following link is what I used for reference:
https://support.apple.com/en-us/HT202112

Is there something we're missing?  Why would the administrative behavior work for a time then just stop?

Edit: This is not a duplicate to AD User as an administrator on the Mac?. I have tried all of the steps outlined in the link I originally referenced.  The key issue is that I do actually get local administrator privileges for a short period, but then for some unexplained reason, all users but administrator lose their privileges and no longer escalate privileges.

This sort of pain isn't practically avoidable. The solution is to unbind your macOS computers from the domain and use a product like Nomad or Apple Enterprise Connect to get the password sync, kerberos certificates that allow single sign on without all the pain of binding.

Jamf Connect is the best of both worlds now - https://www.jamf.com/products/jamf-connect/

Alternatives are the open source Nomad (which exists alongside with it's commercial version Jamf Connect) and Enterprise Connect that integrates a local password without needing to bind to AD.

https://www.jamf.com/jamf-nation/discussions/17757/about-enterprise-connect
https://nomad.menu


How to assign different ReFit icons for multiple Mac partitions? I have 2 different OS X partitions on my Mac. I use ReFit to boot them.

But since they're both the same OS, it shows the same icon for both of them, which isn't their disk icon that I can change.

Is there a way to use a specific icon for each partition? Or is there an alternative to ReFit that will let me do this?

I, too, am dual booting 2 OS X's (Mountain Lion and Yosemite). This is because Yosemite is too heavy, so it's there only as a safety net!

If you are double booting Yosemite or El Capitan with another prior OS X, copy the rEFInd folder to this older OS X. This is because of the scheme Yosemite and El Capitan use to boot, and having the rEFInd files inside these partitions will require special installation instructions. In my case as I said, I have Mountain Lion and Yosemite, so the rEFInd folder is at the root of the Mountain Lion partition (volume).

But in the other hand if you are booting Yosemite and El Capitan (without an older OS X version as 3rd boot) then you'll have to go to the rEFInd page and read how to install rEFInd in these OSs.

This is how it's done:

Download the latest rEFInd from http://www.rodsbooks.com/refind/
The latest version (0.9.2) supports .png for icons, so no need to create .icns files.
Configure your icons and place them in the icons older. I have made a God fearing simplistic theme. If you use it may I suggest you keep the background as a reminder of to whom one day you will answer to! Download this theme (and the binaries). It's basically my rEFInd folder zipped.
Configure the refind.conf file to use manual boot stanzas. These are  hardcoded (in the config file, much like a grub file in linux) options so the name of the volume of your OS X cannot be changed without changing the configuration file. If you fail at this and change the volume name without updating the .conf file, that particular boot option will not be bootable anymore. But since you'll have two OS X's you can force Apple's bootmenu with Alt at the startup, boot the other volume and fix the .conf file. The proper basic necessary configuration is as follows:

scanfor external,optical,hdbios,biosexternal,manual

menuentry "Mountain Lion" {
    icon \rEFInd\icons\ml.png
    volume "Mountain Lion"
    loader \System\Library\CoreServices\boot.efi
    graphics on
}

menuentry "Yosemite" {
    icon \rEFInd\icons\yoyo.png
    volume "Yosemite"
    loader \System\Library\CoreServices\boot.efi
    graphics on
}

Explanation: In the scanfor line you'll have to remove the "internal" option so rEFInd will not scan for the partition (as they are defined with menuentry) or you will have 4 boot options, the two from the scan itself, and two from the hardcoded menuentry sections. Also still in scanfor you have to put the manual option so rEFInd will read the menuentry sections.
And the menu entry can be explained with this example:

menuentry "Name that Will Appear In The Boot Menu" {
    icon \path\to\the\icon.png
    volume "THIS IS THE EXACT NAME OF THE MAC VOLUME"
    loader \System\Library\CoreServices\boot.efi
    graphics on
}

Leave the "loader" option as it is. Because that is the default path for OX S' boot.efi (on all recent versions).

And finally the graphics on is to hide the rEFInd command like black screen when booting, so you get a nice graphical transition between the boot menu and the screen with the apple (Apple's boot screen).

I thinks this should cover. The end result should be (the rEFInd.zip at the top has this theme already) something like the following

Finally set the boot to be done using the non-yosemite/ElCapitan partition (or the partition where you copied the rEFInd folder to. To do this go to:  System Preferences > Startup Disk click the partition and press restart.

If things go horribly wrong and for some reason you cannot boot, try either Alt to choose a bootable partition (ie. Recovery)

Just a final note, App Store uses Spotlight indexes to identify apps, so before you launch App Store to update apps that are present on both OS Xs, be sure to unmount the Volume with the OS X that is not running so the AppS tore app can find the right one to update.


View App Store Download Progress (Downloading Maverick) I'm downloading Mavericks on my Lion, but I don't know how to see the progress. When I go to the purchases tab on the app store, I see a blank button:

Try rebooting.
Quit App Store, open Launchpad, find the partial download of Mavericks installer and click it. This usually resumes a download that was interrupted/paused.
Reset App Store by clicking Reset Application from the debug menu, then reboot and try again.

You can enable the debug menu by running the following command:

defaults write com.apple.appstore ShowDebugMenu -bool true


Does apple store my credit card information including name card number Hello community,
                i recently bought an apple developer account and paid $99 for it.
This is annual subscription, which will be renewed every year. My question is does apple stored my card information so that it can be used in future subscription or any kind of payment.
Or the payment process during purchase of developer account was one time process.

Main thing is that, if anybody who somehow has access to my apple ID and mobile can use that card for payment or fund transfer which was used during purchase of developer account?

If that card is saved then where can i see it and how can i remove it?

The security of Apple Store servers is closely monitored to prevent any unauthorized disclosure or use of credit card numbers and to protect the confidentiality of your personal information.

  The Apple Store uses the SSL (Secure Socket Layer) industry standard,
  the highest level of security available today for web-secured
  applications. SSL relies on a pair of public and private key
  technologies provided by Verisign, Inc. and based on a 40-bit
  encryption algorithm developed by RSA Data Security, Inc.

  Apple decrypts the data, determines your card’s payment network, and
  re-encrypts the data with a key that only your payment network (or any
  providers authorized by your card issuer for provisioning and token
  services) can unlock.

  Apple doesn’t store or have access to the original card numbers of
  credit, debit, or prepaid cards that you add to Apple Pay also. Your
  cards are associated with your Apple ID to help you add and manage
  your cards across your devices.

Source: More on its security with Card Payment's FAQ

You can remove your bank card from iTunes on an iOS device in Settings:

Tap Settings.
Open iTunes & App Store.
Tap your Apple ID (typically your email address at the top of the screen).
Tap View Apple ID.
Tap Payment Information.
Tap None under Payment Type.
Tap Done.

This will remove your card details from your Apple ID. Note that you won't be able to make purchases, download apps or make in-app purchases until you repeat the process but choose a card type under Payment Type (and enter your card details.)

If you're using an Apple Mac computer, you remove your card details from iTunes using the iTunes app:

Open iTunes.
Sign in with your Apple ID (if you aren't signed in already, then choose Account > Sign In).
Choose Account > View My Account.
Enter your Apple ID and Password and press Return.
Click Edit to the right of Payment Type.
Select None next to the Payment Method.
Click Done.

To access the credit card detail for your Apple Developer Program, you can do the following:

Log in to your Apple Developer Account.
Click the Membership menu.
Scroll down to the Settings section.
Click on Edit default debit/credit card.

and you will be directed to the Apple ID website.

Go to Payment and Shipping. and click on Edit.
Modify your desired credit card information.
The Save button will be enabled then click it to save the changes

Note: Once you uncheck Autorenew membership option, you can use it for a year and later it will not auto renew if you don't want.

Source: Apple Support


How can I get iOS7 on my iPhone 3GS I’m have difficulty downloading WhatsApp on my iPhone 3GS because it is running iOS 6, which WhatsApp no longer supports.

How can I update my iPhone 3GS to iOS 7?

There was a project for the iPhone 2G and iPhone 3G as well as the iPod 1G and 2G MB/MC called the WhiteDoor project, it was a custom firmware for the original iPhone that was designed to update the graphics, backport several features of newer iOS versions, and generally increase the scope of capability for the original iPhone so that it could still be used with modern apps and features.

It would seem that this project, called BlackDoor is the same idea as the WhiteDoor firmware, but designed for newer outdated iPhones (model 3GS is supported whereas WhiteDoor only supports up to the 3G.)

BlackDoor firmware comes pre jailbroken, and has both Cydia, Installous, and IPA Installer by default. You may be able to find a modern copy of WhatsApp that is compatible with your model of iPhone on Cydia, as I know software is often maintained for older devices on there. Alternatively you should be able to install an older version of WhatsApp that is compatible with your device through Installous, or directly through IPA Installer if you can find the IPA (iPhone Application file) for an older version of it.

In any event it would seem like a jailbreak would be the best bet for you going forward in general, given how long it has been since Apple dropped support for the iPhone 3GS it is pretty much the only way you will be able to get ahold of and install apps who have dropped support for iOS 6, or use any features exclusive to newer versions of iOS without buying a new iPhone.

Options for jailbreaking include using the Evad3rs method (probably the easiest for someone new to jailbreaking, and will keep all of your data, a quick search should provide all needed info.), backing up your data and installing the BlackDoor firmware (as previously mentioned it comes pre-jailbroken, info about it, instructions on how to install it, and downloads for it can be found here BlackDoor website). Be aware that if you intend to install BlackDoor it is based on iOS 3.1.3 so it will be a substantial downgrade, only use this if you aren't comfortable with jailbreaking your iPhone yourself.

Finally there is always the option of downloading a copy of the newest version of iOS 6 (6.1.2), opening it, injecting the jailbreak files, and required SHSH Blobs, creating a new custom firmware from the modified copy, signing it with a signature spoofing program like iFaith and manually installing it by putting the iPhone in DFU mode.

Obviously the last option is the most involved and I do not recommend attempting it unless you have a substantial amount of experience with jailbreaking iDevices. In any event though even if you can find an older copy of WhatsApp you will not be able to install it unless the device is jailbroken, as a jailbreak is required to install software without using the AppStore. Ultimately the Evad3rs method is probably the best option for you, and you can find it here if you are interested. Evasi0n.com


Apple Font Tools cannot install in Macbook Pro El Capitan I downloaded OS Font Tools, release 4 beta 1 (osxfonttools.dmg) and try to install in Macbook Pro El Capitan, but installation failed:

anyone knows the reason?

Here is how I did it. Get it downloaded from apple (here: https://developer.apple.com/downloads/?q=font ) and run these.

pkgutil --expand OS\ X\ Font\ Tools.pkg tmp
cd tmp
cd fontTools.pkg
mv Payload Payload.gz
gunzip Payload
tar -xvf Payload

Apologies if I forgot any parts but that is basically it.


How to make custom routes survive reboots? I use a VPN to connect to the network of my company and add some routes.

After connecting and addding the routes it works just fine. Is there a way to permanently add the routes so that they survive reboots? Currently, I run a shell script to configure them after connecting to the VPN, but I always need to be root to do this.

I'm not experienced with OS X but familiar with UNIX.

See this script (don't forget to change ADDRESS/MASK GATEWAY with your values ):

$ sudo mkdir /Library/StartupItems/AddRoute
# cd /Library/StartupItems/AddRoute
$ echo "{
        Description     = \"Add static routing tables\";
        Provides        = (\"AddRoutes\");
        Requires        = (\"Network\");
        OrderPreference = \"None\";
}" > StartupParameters.plist
$ echo "#!/bin/sh

# Set up static routing tables
. /etc/rc.common

StartService ()
{
        ConsoleMessage "Adding Static Routing Tables"
        sudo route add ADDRESS/MASK GATEWAY
}

StopService ()
{
        return 0
}

RestartService ()
{
        return 0
}

RunService "$1" > AddRoutes
$ sudo chmod 755 AddRoutes


How can I get the hexadecimal functionality of Digital ColorMeter back? I often used Digital ColorMeter to capture colours as hex codes for web development. For some reason, Lion's version has removed a whole load of functionality, including this. Some people have managed to copy over the Lion version with their Snow Leopard version, but my Mac tells my that it's required by OSX and can't be deleted. Can anyone work out a way to do the method described by these people?

Select View → Display Values → as Hexadecimal:

Now the main window displays hex values:

Also, Color → Copy Color as Text ⇧⌘C will now format the color like #C8D8E8 (instead of 200 216 232).


Open Favourites Page in Safari with Javascript I'm trying to make an extremely simple Safari extension that open the favourites page (the equivalent of Bookmarks > Show favourites), as that's what I think of as my home page and I'd like a button on the toolbar to do that, rather than have to do it via the menu.

Is there a javascript command to open this window or, failing that, to access the menu bar button so it can be clicked?

Navigate to the URL topsites://.

document.location.href = "topsites://";


Principle of resolution scaling via External monitor (GPU performance) I will demonstrate my idea on a 4K monitor, there are 4 options:

Native 4K
1692p
1440p
1080p

From What I undersrand, the 4K and 1080p should be on par when it comes to the GPU demands as the 1080p is derived (directly scaled, i.e., zoomed) from 2160p. However, 1440p and 1692p, respectively, are more demanding as macOS has to scale down from 2 times higher resolutions, i.e., 2880p and 3384p.
If it works that way, then by the same logic, if I list the GPU demands with the 2K and 5K monitors, then the scale would be as follows (starting from the least GPU heavy case):

(2K) 1440p native, (2K) 720p
(4K) native, (4K) 1080p, (2K) 1080p
(2K) 1152p
(4K) 1440p, (5K) native, (5K) 1440p
(4K) 1692p
...
...

Does it work that way or am I getting it all wrong?
I have been wondering about this for a long time as Windows uses a different mechanism, which is clear to understand.

It is not clear to me how your ranking is supposed to function.
You need to make a distinction between whether or not you're using HiDPI-mode ("Retina-mode"). This is very important.
You can run a 4k monitor at 4k resolution (as seen by the monitor) in two modes - either HiDPI Retina or native 4k. The HiDPI mode is the default chosen by macOS. In this case it will be labelled as "Looks as 1080p".
When running in "native 4k" everything is rendered 1:1. This means that user interface elements would typically look very small on a normal sized monitor.
When running in "HiDPI" mode, you'll see that it will be labelled "Looks like 1080p". I.e. text and user interface elements are the same physical size on the monitor as had you chosen a native 1080p resolution. However, text, video, pictures, etc. are actually rendered at 4k (3840x2160) resolution, giving you crisper text and full resolution video.
Whether or not "native 4k" mode or "HiDPI mode" is more taxing on the GPU depends on what applications you're running. If you're looking at a blank desktop, the "native 4k" mode should use the fewest resources on the system as a whole.
If you choose a different resolution, like for example 1440p in HiDPI mode, the system will actually render at double the size - i.e. 5120x2880 - and then scale it down to the 4k output for the monitor. In this case the system has to perform more work than it did for the "Looks as 1080p" HiDPI mode.
However, if you run 1440p in native mode, i.e. the output signal for the monitor is 1440p - then that is usually less taxing for the system than 4k native.


Why `find . -iname *.blend` does not find all blend files in external exFAT storage? When I issue the command

find . -iname *.blend

I get only one result (which is in the pwd). Adding -maxdepth 5 does not help either.

On the other hand find . | grep \.blend$ returns a lot of results (actually the tens of blend files in my tree)

Why is that? What can I do to fix it?

  Additional, maybe irrelevant information is that finder does not find anything at all when searching this drive

The shell expands *.blend before calling find if there is a matching file in the current directory.

Use

find . -iname '*.blend'

instead


File location of kernel extensions? Is there an easy way to make the mapping from kernel extension to the file it came from?

I can get the list of currently loaded kernel extension via kextstat. This gives me the bundle names, like com.AmbrosiaSW.AudioSupport or jp.plentycom.driver.SteerMouse. But how can I then find the actual file locations of these bundles? For example, the Ambrosia bundle is AmbrosiaAudioSupport.kext, and I can only find the bundle name in the Info.plist inside that bundle. I could grep the /System/Library/Extensions/ directory, but this does not necessarily contain extensions loaded after booting, and I assume there is a better way to do it?


Why does my MBP not fully wake? I tried asking on apple forums, and they said do a SMC reset. Tried it, and it doesn't work. It always happens. Here's a video of what I am talking about, watch through the full video: http://www.youtube.com/watch?v=25cWVrg8Bfw&feature

This is hard to answer outright but I don’t have the privilege of creating a comment thread and asking some questions first, so I’ll just offer some possible scenarios.

It is just slow. This can happen if you are low on RAM. It is difficult to be patient for this though because all you have is a blank screen, and it is very frustrating.
If it is like my Macbook, and you have a password set to auto-lock or auto-lock your display after 5 minutes, and it still does not appear like it is going to wake up, then go ahead and type your password in anyway without the dialog. This will usually unlock the display and bring it out of sleep mode in one fell swoop as it finally wakes up and registers the keystrokes.

If you don’t have a password set to lock or auto-lock your screen though, I am not sure what to suggest. I have used harmless keys like the arrow keys in the past, just pressing them and alternating between left and right until it comes out of sleep mode to force my computer to wake up, but this has extremely mixed results. There have been a larger number of successes tallied doing this, but not by very much, especially if I was low on RAM before.

As to why it is like this, the possibilities range from being low on RAM or just having a slow disk, to a bug in the operating system or more aggravating, a bug in the firmware. If you can duplicate it regularly, you can try taking it into the Genius Bar and see if they can work out what the problem is there, it might even be a known issue that has already been documented and solved for some on a case by case basis, or a software update may be in the works.


How to change the font smoothing setting from the command line? I'm trying to avoid installing lots of software willy-nilly, because like so many Mac users I don't have antivirus software. Case in point, I really like TinkerTool but I'd rather change my system wide settings from the command line than use someone's program for that.

So, how can I change the system-wide font smoothing setting from the command line?

Thanks.

It's defaults -currentHost write -globalDomain AppleFontSmoothing -int <1-3> as far as I remember


Restart needed to reconnect Thunderbolt Display? I was just reading the Apple Thunderbolt Wiki and stumbled upon this:

  25) If I eject a Thunderbolt device using the Taskbar tool or disconnect the Thunderbolt cable, can I reconnect it again without
  restarting?

  No. A directly-connected Thunderbolt device that is removed with the
  Taskbar tool or by disconnecting the Thunderbolt cable will not be
  recognized until you restart the computer.

Is that really true? Does that mean I would have to restart my macbook, if I was connected in the morning, unplugged it, put it to sleep, then went to the office and wanted to work on afterwards?

That only applies to using the Thunderbolt device under Windows 7. It's not the case when you're using OS X — you should be able to plug and unplug at will, without needing to restart.

It's not clear from that quote, but if you note, the index of Apple's Thunderbolt FAQ (from which this nugget came), items 21 through 27 relate only to using Thunderbolt devices under Boot Camp and Windows 7.


Removing the font toolbar in a new message In the Mac (mountain lion) mail.app (v 6.2), when composing a new message, I'm looking to hide the default font/styling bar that appears beneath the standard toolbar at the top of the window.

I've checked the view menu and found nothing and have also tried to customized the toolbar to no avail.

First go to View > Show Toolbar. Then, click this button:

That's all there is to it!


iMac reachability over sleep I've got an issue with my iMac...

Let me explain the configuration:

The router is connected to the internet, the WiFi is turned off.
Time Capsule is connected to the router with an ethernet cable, it's in Bridge Mode, the WiFi is set to 802.11 n only, the 5GHz is set to channel 36 and the 2.4GHz is set to channel 8.
Airport Express is connected to the network created from Time Capsule, it extends the network in 2.4GHz (this AirPort Express doesn't support dual bands).
Apple TV is connected to the network in 5GHz.
iPad 2 is connected to the network in 2.4GHz.
iMac is connected to the network in 5GHz.
iPhone 4S is connected to the network in 2.4GHz.
MacBook Pro is connected to the network in 2.4GHz.
The printer is connected to the network in 2.4GHz.

The trouble is:

When the iMac is in sleep mode, after a few hours it dissapear from the network. So I cannot access it while on the go with my iPhone through 3G network, neither from my Macbook Pro on the same network.

Well, I hope everything is clear to understand...

Thanks in advance

I found someone else with this specific problem.  My understanding is that Apple's Airport Base Stations simply "forget" the previously attached computer.

Two things to check:

Create a static IP address in network configuration on the iMac
in Airport Utility make sure you've created a MAC address based DHCP reservation for this iMac.  Apparently, the AEX AEB & TC will still "forget" but it might be longer now, like 6-8 hours.

The work around: using either and application or System Preferences > Energy Save schedule the iMac to "wake up" and turn back off every 6 hours or so if not being used.  This should re-up the IP.  Alternatively, DD-WRT router software supports WOL out of the box.  Wireless WOL is not part of the spec, however, I believe wireless WOL is an Apple deal.


Get low battery notifications for mouse earlier Is it possible to tweak the % that I get warning of low battery for my Magic Mouse 2?

I currently only get it at 2% at which point it's very close to dying so I have to stop what I'm doing and plug it in. A reminder about 10-15% would allow me to plug it in the next time I have a natural break.

For those willing to copy and run a bash script and add a cron job, here is a complete solution that is free and current (as of macOS Catalina 10.15.3) and requires no programming (I've done that part for you), just a little system administration:
Save this to a bash script like ~/.mouse-battery-check.sh:
#!/usr/bin/env bash
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin

# actual battery level
BATT=`ioreg -c AppleDeviceManagementHIDEventService -r -l | grep -i mouse -A 20 | grep BatteryPercent | cut -d= -f2 | cut -d' ' -f2`

# defaults to warn at 20%; accepts other number as 1st argument (useful for testing)
COMPARE=${1:-20}

if [ -z "$BATT" ]; then
  echo 'No mouse found.'
  exit 0
fi

if (( BATT < COMPARE )); then
  osascript -e "display notification \"Mouse battery is at ${BATT}%.\" with title \"Mouse Battery Low\""
fi

Open up Terminal and make the script executable:
chmod +x ~/.mouse-battery-check.sh
Now you can test that the script sends a desktop notification by running it when your BlueTooth mouse is connected (this tests for battery less than 101%, so it should always send a notification):
~/.mouse-battery-check.sh 101

To test again with the default setting (20%):
~/.mouse-battery-check.sh

When a BlueTooth mouse is not detected, the script will return, "No mouse found."
Checking Automatically
Now to test periodically and notify you automatically, add a new cron job:
env EDITOR=nano crontab -e

Add an entry like to check every 15 minutes:
*/15 * * * * cd ~ && bash ~/.mouse-battery-check.sh

(You can again pass the battery percentage as a parameter to the script here.)
Press Control+X then Y then Enter to exit the editor and save the cron job.
Compatibility
This has been tested on:

Catalina 10.15.3
Mojave 10.14.6
High Sierra 10.13.x in June 2018

Acknowledgements
For battery check, this answer:
adjust battery-warning-level of magic mouse
For notification, this answer:
How can I trigger a Notification Center notification from an AppleScript or shell script?
For cron jobs, this blog:
https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx.html
User sirclesam for compatibility testing.
Enhancement - also check keyboard (and maybe trackpad)
I modified the script above to check both Apple Magic Mouse and Keyboard.  With the addition of one word it could check Trackpads, or any other overpriced Apple Magic doo dads, as well.  I only have the mouse and keyboard so I started with that.   I also changed the default to 10% which still gives me a few days to plug it in.
#!/usr/bin/env bash
# Check battery level of Apple Magic Mouse and Keyboard and Notify if low

PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin

# Warn at 10% or according to first parameter.  Pass in 101 for testing.
COMPARE=${1:-10}

# Check each device.
# If you have a Trackpad please add the suitable token to this list and test it.
for HIDThingy in Keyboard Mouse; do
    # Determine battery level of Apple Magic Thingy
    BATT=`ioreg -c AppleDeviceManagementHIDEventService -r -l \
         | grep -i $HIDThingy -A 20 | grep BatteryPercent | sed -e 's/.* //'`

    if [ -z "$BATT" ]; then
      echo 'No $HIDThingy found.'
    elif (( BATT < COMPARE )); then
      osascript -e "display notification \"$HIDThingy battery is at ${BATT}%.\" with title \"$HIDThingy Battery\""
    fi
done


Unable to delete or archive mail Periodically, I keep getting an "x messages could not be moved to the mailbox xxx.  An error occurred while moving messages to mailbox xxx" popup (see below).  The only way I can resolve is to rebuild my entire mailbox, which takes a long time!  I am connected to an exchange server.  What is the likely cause of this issue?

I had the same problem and solved it successfully by rebuilding the mailbox (menu "Mailbox", then "Rebuild".


iPhone 6 Plus Sounds Stopped Working I've check all my settings, my phone is not in Do Not Disturb mode, but I cannot get my alert sounds (messages, phone calls, etc) to work. Only vibrate works. Toggling settings off and on does not work either.

If you can't play music either or listen to voicemails (to check the receiver and the speaker) then you have a hardware or software issue.

If you can play music and listen to voicemails, then you have a software issue or a configuration/setting mismatch with what you want the device to do.

Hardware issue - usually starts with eliminating software issues, but in this case observing the headphone port for damage might be a great quick fix.

Software issues, back up the device and test after restoring it and verifying the settings.


Automatic conversion between .ps to .pdf upon download onto Mac OSX? Is there any way to convert .ps to .pdf every time automatically as a .ps is downloaded onto a Mac machine? (Using Mountain Lion 10.8)

can Automator perform this task?
convert and then delete the .ps

It's annoying that it has to convert from .ps to .pdf in preview every time I open the file, and quick preview doesn't work on .ps.

You could use the Folder Action for that.

Right click on to your download folder

select Folder Action Set up:

Choose Covert PostScript to pdf action.

done

If you feel like modifying the script go ahead.


iPhone 4s iOS 9.3 here; How to adjust the sound balance of the audio in very small db increment? My right ear hears slightly less compared to my left, (around 1.6-1.8 difference than the left if Windows' Audio balance is to be used as reference).

I manage to change the audio balance just fine on my PC, Android, and WP, but on the iPhone I can't due to it's automatically setting the slider to 0 when it's near the centre... which is around where I'm at... Is there a way for me to adjust it to my circumstance?

The slider control is much improved on iOS 10 - I find that once I start to drag left or right, moving my finger below the slider substantially lets me see it move in very small increments and let go precisely where I wish.

I do use newer hardware, so you might be out of luck with iPhone 4s and iOS 9 if you can't get such a small fine adjustment with either a stylus or your fingers.


Timeouts in AppleUSBEHCI - how can I find out what is causing this? I'm getting timeouts on my USB every few seconds like this:

Jan  8 22:07:43 Thorstens-MacBook kernel[0]: USBF:  1722. 27    AppleUSBEHCI[0xffffff800b8b2000]::Found a transaction past the completion deadline on bus 0x24, timing out! (Addr: 6, EP: 1)
Jan  8 22:07:45 Thorstens-MacBook kernel[0]: USBF:  1724. 29    AppleUSBEHCI[0xffffff800b8b2000]::Found a transaction past the completion deadline on bus 0x24, timing out! (Addr: 6, EP: 1)
Jan  8 22:07:52 Thorstens-MacBook kernel[0]: USBF:  1731. 32    AppleUSBEHCI[0xffffff800b8b2000]::Found a transaction past the completion deadline on bus 0x24, timing out! (Addr: 6, EP: 1)

How can I figure out what is going on? Which of my USB devices may be causing this issue (other than disconnecting one after another)? What other ideas are there to avoid this problem? (Note: My USB hub is powered, which was one of the suggestions I had seen when googling the issue).

Thanks!

Here are the devices connected ty my Mac through a powered USB hub:

printer (HP Deskjet)
iPhone docking station
JBL iPod dock/loudspeaker (also powered)
a Pinnacle DVB-T antenna
a Garmin charger for my GPS watch
a Garmin ANT+ connector
an (unused) Logitech headset

Generate a system report (in Lion: About this Mac-> More Info -> System Report, or do a Spotlight search for System Information if you allow Spotlight to index applications.)

Click on USB; then look for the bus ID mentioned. Under that bus, look through the Location IDs of each device; this field is "Addr" in the error logs. Note that location IDs are unique only across a bus, not the entire system.

Once you've identified the device, I would try swapping it to a new port, either with another device on the hub or to a blank port on said hub.  If the errors stay with the device and not the port, my next step would be to plug the device into a direct port or swap cables.  If you still have issues with the device, look for firmware updates to the device.

If after troubleshooting the hub is suspect - note that some people have found the power adapters that ship with some cheap USB hubs to be very poor, not capable of delivering anywhere near enough current.  http://hackaday.com/2012/01/06/running-the-numbers-on-a-cheap-psu/

I would put the phone and garmin charger directly off the Mac's USB ports; among other things, your mac can supply twice as much current to your phone for charging.  See https://support.apple.com/kb/ht4049


What functionality does the in built Mac speech recognition have? At the moment I use windows speech recognition which is quite good out of the box.  Specifically, I find it quite good for the following:

List item
Dictation for emails
Macros for programming
Mouse clicking and dragging
Spelling character by character for command prompt/unix
shell

Does the in built speech recognition support all of the above?

Speech does support dictation, menu item and button selection, and some programs have "speakable items" for their own features.

It doesn't natively support the rest, but you can write scripts or Automator workflows to do what you want, and make them "speakable". When you've finished writing the scripts, use Speech to "Make this speakable" while each file is selected in the Finder, one at a time. This will put an alias in the Speakable Items folder, so make sure you put them somewhere where you won't then rename, move, or delete them.


Fixed-width text not appearing correctly in Safari after Lion upgrade I recently updated to Lion, and have found that at least some HTML tagged as <pre> or <tt> shows up looking like this

I've tried changing the fixed-width font in Safari. I've tried rebooting. The same page looks fine in Chrome, and when I copy the text in question out of Safari into BBedit, it looks fine. I'm at a bit of a loss.

From Apple Support Communities:

  Restart in safe mode than normal boot. If that doesn't do the trick, run Font Book and validate all fonts.


Is there any way to nest groups hierarchically in Apple Contacts? I have a huge number of contacts.  If there is absolutely no better way to organize them than a "flat file" list of groups, I may be forced to export each card individually just so I can have them in a directory structure.

The things I love about Apple Contacts are:

Integration with Mail.app.
Integration with Alfred PowerPack.
Pretty UI.

So this is really a two part question.

Is there any way to have hierarchically nested groups in Contacts.app?  And,
If not, is there any other application I could use that would give me this functionality without sacrificing other usability too much?

I have one possible not-so-great workaround myself, which I will post as a self-answer.  I'm hoping someone else has something better.

P.S.: Using El Capitan 10.11.6.

The only possible "solution" I have (which isn't really a solution but it's what I will do if nothing better is suggested), is:

Take everyone I don't routinely contact, export their vCards individually (not in batches) (this is so that quicklook will work), and delete them from Address Book (a.k.a. Contacts).
Use Contacts for my every day common contacts, and use either a directory structure and Quick Look, or some third party app, to organize all the rest of my contacts.

This compromise preserves integration with Afred and Mail.app for common contacts, and allows me to better organize unusual contacts.  But I'd prefer nested contact groups directly in Contacts.app.


New Mac Apple ID won't accept payment details Having just unwrapped my new Mac and set up Apple ID, I tried to download the updates waiting for me. I get a message saying "This Apple ID has not been used yet in the App Store. Please review your account information". When I try to do this, it will not allow me to proceed without credit card details, just to download free updates (!). OK, fine i will probably buy the odd App or two, but it will not accept my card details because I have a UK bank card with a Spanish billing address. I am from the UK but have lived in Spain for some years and never had problems using this card. I am stuck in this endless loop I cannot escape from and unable to update my new computer. i am beginning to wish i had bought that PC after all - can anybody help me?!

Ring them.
Or rather, get them to ring you - which they will, in English, to Spain

Start at https://getsupport.apple.com

I've had to do a similar thing in the past when setting up my folk's new Mac last year, British accounts, English speakers, Spanish address.

They are incredibly helpful & patient. You really won't regret having bought a Mac.


Cannot connect to Apple TV My Apple TV works perfectly as a stand alone machine. It plays the channels I want to watch.
However, Neither my MacBook Air, My iPads, my iPhone 6 and my iMac will no longer connect to AirPlay.
All these devices worked perfectly until recently, AirPlay was a wonderful method by which I could stream videos to the Apple TV for watching on the 'big screen'.

Now, none of them connect. they are all on the same wifi network and 'AirPlay' is switched on on the Apple TV.
Using the iPad, the 'Airplay' button is there, when I choose to play to Apple TV, the iPad says"PLaying on Apple TV" but nothing happens on the TV.
Both the MacBook Air and the iMac are unable to connect to Apple TV. The AirPlay button is there, and when I choose Apple TV, after some moments I get a message "Unable to connect to Apple TV"
Even though this says unable to connect to Apple TV, when I use iTunes to stream MP4 files, I go into the menu on Apple TV, Choose 'Computers' and I can access the MP4 files and they play perfectly.

But, as the computers 'cannot connect' I am unable to Mirror my computer screen, hence, I cannot use 'Beamer' to stream other file types such as .avi or .mkv from them to the TV.
Also, when I stream live TV from my iPads, they say "Playing on Apple TV", but the Apple TV does not respond by playing the files.

I have reset the Apple TV twice and everything is as should be as far as set up is concerned, and I have checked everything I can think of on the computers and have checked all the settings.

What's gone wrong? I hope someone has an idea that I haven't already tried over the last 5 days of searching for answers on the internet and checking settings on all my devices.

Try restoring the Apple TV to its factory setting via iTunes, Apple Support article here.  We've had a handful of Apple TVs with odd behaviour, and restoring via iTunes has fixed them.  You will need a micro-USB cable to do this.


Routing all traffic except a few IP-ranges though default gateway in Mountain Lion I am using VPN (Cisco IPSec) through the default Mountain Lion network preferences. In Lion (and also in Snow Leopard), I did the following to change the routing back to using my default gateway for all traffic, and thne set up a few routes for the specific IP-ranges that needed to go through VPN:

# Route traffic through VPN:
route -nv add -net IPRANGE -interface utun0
#...more lines for the different IP-ranges that should go through VPN)

# Route all other traffic through the old default gateway:
route change default DEFAULT-GATEWAY-IP

This seems to not work under Mountain Lion. The (new implementation?) of Cisco IPSec seems to dynamically add a lot of routes to the routing table as I visit them in the browser.

I have debugged this a lot (pinging, traceroute'ing), but still haven't found a solution.

The basic problem I'm trying to solve is just to route traffic for specific IP-ranges through VPN, everything else should act as I am not connected to VPN. Any other solution that achieves that will be fine with me =)

If you configure your VPN server to allow split tunneling, this will work without any need to configuree your vpn client or the network on the Mac.

http://www.cisco.com/c/en/us/support/docs/security/anyconnect-secure-mobility-client/119006-configure-anyconnect-00.html

  Split-tunneling is used in scenarios where only specific traffic must be tunneled, opposed to scenarios where all of the client machine-generated traffic flows across the VPN when connected. Use of the AnyConnect Configuration Wizard will by default result in a tunnel-all configuration on the ASA. Split tunnelling must be configured separately, which is explained in further detail in the Split Tunnel section of this document.


Why can't I clear the "Composer" field for tracks in my music library on my iPhone? I downloaded some music tracks from the iTunes Music Store and synced them to my iPhone. While browsing the music on my iPhone, I realized the "Composer" field was filled in with the names of the musicians who wrote the songs. However, I only use the "Composer" field for classical music, and leave it blank for non-classical music, so I went back to iTunes and deleted the contents of the "Composer" field for each track, and re-synced. iTunes showed that the files were being updated, but when I looked on my iPhone, it still had entries in the Music app's "Composer" tab. So I went back to iTunes again, and changed the "Composer" field for each track to "Blah", then re-synced. As expected, there was now only a "Blah" composer entry in the Music app. I then deleted the contents of the "Composer" field again (in iTunes) and re-synced. Lo and behold, there was still a "Blah" composer entry in the Music app! So then I unsynced all my music from my iPhone, and re-synced it—and there's still a "Blah" entry!

What do I have to do to get the Music app to recognize that the tracks don't have a "Composer" field anymore?! (iTunes must be one of the most frustrating pieces of software Apple has ever made.)

I don't understand why this is happening to you. My songs are set up the same way (classical has composer info, others do not) and the transfers are fine back and forth with my iPad and iPod when I edit the Composer field.

If you have a Mac, you could try this.

Drag a music file from iTunes to the desktop. Delete the file from iTunes and your iPhone and sync and make sure it's gone. Then drag the music file back to iTunes (with the iPhone powered down) and edit it. Drag it to the desktop, delete from iTunes and put it back, making sure that all the details are as you want them. Then sync to the iPhone.


Hangouts messages on High Sierra It seems like I cannot send messages on Google Hangouts via Messages after upgrading to High Sierra.

I still receive the messages because I'm authenticated.

Is there any hope to keep writing in Hangouts via Messages?

This is the original fix I saw on the MacRumors forum:

https://forums.macrumors.com/threads/gtalk-messages-solution-found-high-sierra.2073393/

  Go to system settings and go to Internet Accounts and delete your google account.

  Open Terminal

find ~/Library/Preferences -name "*iChat*" -delete

  then

rm -rf ~/Library/Caches/com.apple.Messages

  then

rm -rf ~/Library/Messages

  and reboot

  Now open Messages and add your google account via Jabber. Then go to preferences in Messages and go to Accounts and go to server settings and make sure settings are as follows:

  Server: talk.google.com
  Port: 5223
  Check Use SSL

  Then go to Account Information and Enable this account

  I rebooted again and then opened Messages and made sure my buddy list was there.

  Then I went to System Preferences and go to Internet Accounts and add your google account.

  Upon doing this a message popped up for me asking to Add Google Talk to Messages and WHOA it is working.

  I can now send and receive messages, have my calendar and everything as before.

  Before this I could receive messages and see buddies but couldn't communicate with them.


"Internet Sharing" via "Ethernet" is not working I'm using OS X El Capitan (10.11) on my MacBook Pro (Retina, 15-inch, Early 2013) and I'm trying to use System Preferences -> Sharing -> Internet Sharing feature and something isn't working...

I made sure that Share your connection from... is set to Wi-Fi as that's my source of internet, and To computers using... is set to Thunderbolt Ethernet as that's where my Raspberry Pi is plugged in via crossover ethernet cable.

I'm not seeing any IP address assigned via Network Utility on Thunderbolt Ethernet (not 100% sure if it should, but I'd assume it should).

Any help?

Apple Network Sharing is very unreliable across different OS and different network channels. I've lost a lot of time on this. Enough so that I'd suggest getting a simple good quality router and setting it up to pick up the wifi ethernet and redistribute it via ethernet. Make sure to set the access point router to act as a bridge (i.e. it would continue to obtain DHCP addresses from the central router). That way you can share to other devices on the master network.

You may find you get faster and more reliable internet on your MacBook Pro as well as the aluminum hulls are not particularly reception friendly, especially in comparison with a router with proper antennas which can be positioned as you like.

I'm doing something similar but using powerline adapters (more reliable than wifi) to bring the internet to the access point router.


How to make force-click in finder show info on item? How can I change the action of the force click in finder from preview (which I find useless most of the time) to Get Info (which I use very frequently)?

You can use BetterTouchTool to map a 2 1 finger Force Click to open Get Info. It's not possible to remap a single finger Force Click with BetterTouchTool. With BetterTouchTool 2.317c, it is now possible to remap a single finger Force Click.

Add Finder as an application so the gesture only takes effect in Finder.
Under Trackpads, add a new gesture of ‘2 1 Finger Force Click’ and choose the predefined action ‘Left Click’.
Choose ‘Attach Additional Action’ and enter the custom keyboard shortcut ⌘I.


Drawbacks to merging PDFs in Preview.app When PDF files are merged in Preview.app are there any drawbacks regarding compatibility with the PDF standard and Acrobat?

My procedure is to open two PDFs in Preview and drag the pages from the thumbnail drawer of one document to the other, then save.  I also delete pages be selecting the page thumbnail and pressing 'delete'.

When PDFs are merged in this way, are they really merged into a single PDF or is the first PDF just acting as a container file for the second?  Likewise, are deleted pages really removed from the PDF or just 'commented' out in the rendering engine?

Merged PDFs from Preview are perfectly valid and follow the standard. I've never found any incompatibilities with them.  It does merge it into a single PDF, and any pages that are deleted are removed from the file.  You can test this by checking file sizes first before merging, then after merging, then after deleting some pages.

The only drawback I've found with Preview is that the Apple code for writing PDFs seems to default to writing PDFs which are faster for Preview to render, but which are larger than typically put out by Acrobat.  (At the moment, I can't find the link that originally proposed this hypothesis... It's been a number of years.)  For example, you might open an Adobe-created PDF in Preview, immediately save it to another file, and notice that it has expanded.  This change in file size does not change the image quality in any way.

In general, the change in file size is not too much of a deal.  It's only in rare cases (such as 120MB scanned PDFs) that I worry about which app I use to create the PDF.


macbook pro appstore apple id is not editable I have bought used macbook pro and now I am trying to install my applications

when I open the playstore I found the old user apple id and it is not editable, how I can remove this and add mine

Any application downloaded from the App Store will have the account pre-filled like in your example. It would be best for you to complete each of these steps - most importantly the sixth step of a full erase and reinstall.

Since iWork and iLife are all free, you can re-download them once you wipe and reinstall the computer.

https://support.apple.com/en-us/HT201065


Share Desktop folders between admin and managed accounts? I'm thinking of trying to minimize distractions while doing homework by locking myself in an account managed by self-inflicted parental controls. My problem is, I don't want to not have access to my school files while I'm in the admin account. How can I give both accounts access to my school folders while keeping the convenience of having them on both accounts' desktops? (i.e. I'd very much like to not go to the Public folder every single time.)

Early 2011 MBP, OS X 10.10.1.

EDIT: Also a viable option, if anyone knows how to make it happen: A way to turn self-inflicted parental controls on and off at will despite being an admin.

From the either account but preferably the admin account ( I will assume you are in the Admin account) you can go to the users folders.

Part 1,

Select the the managed account home folder.
use cmd + i to get the info panel for the folder.

At the bottom you will see the allowed access to the folder.

This should show read & write for that user, and no access for everyone.

Click the padlock and enter your admin details.

Now click the + button and either choose your Admin account name.
The admin account should now be added to the list.

Now change its access to read & write.

You should now from the Admin account be able to open the managed user account's folder but not any folder inside.

You now have a choice.  Depending on what you want.

Part 2
If for example you want only to access the Documents folder and all the files and folders enclosed. Then repeat the process above Part 1 for the documents folder.

But this time, in the info panel for the documents folder, after you have completed the above Part 1 on it. You will see a action button (Cog) at the bottom of the panel below the list.
Click the button and then the Apply to enclosing items…

When you confirm, all the items in Documents folder will replicate the access given to the Documents folder.

Or you can do the above by drilling down to only the folders you are interested in using Part 1 and the final folder in that chainPart 1 & Part 2

Or of cause you can just do chainPart 1 & Part 2 on the home folder.

But I personally would just do the folders I need.


Keyboard shortcut to lock the keyboard, without locking the screen? My cat keeps walking over my keyboard.

Is it possible to lock the keyboard with a keyboard short cut but leave the screen running and all apps visible?

You can use KeyboardCleanTool (made by the developer of BetterTouchTool).

It opens the application window with a button you have to press in order to lock/unlock the keyboard.

Download it from BetterTouchTool.net


Where can I find the schematics/CAD model for MacBook Pro's components? Device: MacBook Pro (Retina, 13-inch, Mid 2014)

I'm looking for detailed schematics, preferably official Apple publications, describing and/or annotating the dimensions or other specifics of the components. I'm not looking for electrical layout diagrams.

My goal is to create an acrylic chassis inspired by the old iMacs to replace the aluminum. Any leads on the topic of this documentation is welcome, even if it's not everything.

The particular part I am interested in is pictured below:

Apple isn't known for making their computer parts user replaceable or making their parts public, because of this I would think it would be highly unlikely Apple would publish CAD files/designs of parts. Here are some possibilities I can think of for finding a CAD file.

Find a patent.
I'm not sure if Apple patented the chassis, but if they did you might be able to find the patent. If you're able to find it you could take the dimensions of it and turn it into a CAD file using a software like Blender, Fusion 360 or any other CAD application.
Contact a third party part manufacturer.
There are multiple third parties that manufacture Apple computer parts. One example of those companies is iFixIt. They provide some parts, kits, and guides for replacing certain computer parts. I took the time to find the parts you need. The bottom chassis is made up of two different parts. The first part is the upper case assembly, the second is the lower case assembly. If you contact them and explain your situation to them, they might provide you with CAD files, this isn't the most likely though.
Using a ruler and CAD software.
You've said you couldn't find any CAD files online so I won't mention that. That leaves one solution. Making your own CAD file, and just so you know, it's probably as complicated and time-consuming as it sounds. It's one thing just to make the part so it looks similar, but it's another thing to make it so it fits.

Good look finding/making the CAD file so you can make this part. I will look for a patent and make an update if I can find one.

P.S. Just so you know the part in the older macs is made out of plastic/rubber and not acrylic.


AppleScript in OS X 10.10 to Resize Safari window and take Screen Shot of that window and repeat with multiple sizes I would like to build an AppleScript Application that when run will do the following:

Open up Safari and navigate to a specific URL, or a line delimited file, or CSV. This is not required but would make generating multiple screenshots of different pages a lot quicker.
Resize the Safari window to one of a number of sizes
Take a screenshot of the Safari window with the filename being the url along with the screen size

I only got a partial solution, which works apart from a few small issues.

First of all, you can not store the URL in the filename (due to slashes and special characters) so you'd need to specify the Website name.

But more importantly, so far the CSV import is not implemented. Is CSV really a hard requirement, or could you get the list of URLs in a different format? If not, please update your question with exemplary lines of your CSV file. I'll work on it and update my answer as soon as possible.

on open_url(theUrl, theUrlName, x0, y0, xSize, ySize)
    tell application "Safari"
        open location theUrl
        activate

        set bounds of window 1 to {x0, y0, xSize, ySize}
        set windowID to id of window 1
        set the_state to missing value

        repeat until the_state is "complete"
            set the_state to (do JavaScript "document.readyState" in document 1)
            delay 0.3
        end repeat

        set theFolder to POSIX path of (path to desktop as string)
        set shellCommand to "/usr/sbin/screencapture -l " & windowID & " " & quoted form of (theFolder & "Screen Shot " & theUrlName & " " & xSize & "x" & ySize & ".png")
        do shell script shellCommand

    end tell
end open_url

set resolutionList to {{640, 480}, {1024, 768}}
set siteList to {{"http://www.apple.com", "Apple"}, {"http://www.google.com", "Google"}}

repeat with resolution in resolutionList
    set xSize to item 1 of resolution
    set ySize to item 2 of resolution
    repeat with theSite in siteList
        set theUrl to item 1 of theSite
        set theUrlName to item 2 of theSite
        open_url(theUrl, theUrlName, 0, 0, xSize, ySize)
    end repeat
end repeat


Impossible to key-press three near keys I have never noticed this before, but it seems like MacOS prevents certain key combinations to be pressed.
For instance, try pressing at the same time the keys z s and c on a standard Qwerty keyboard. This works and should write something like "csz". But if the three keys are all adjacent, for instance z s and x, MacOS drops one or two, or all of them, for instance giving you just "z" or "zx" or nothing at all. I've noticed this consistently across multiple Mac devices.
Since I'm programming a software that heavily relies on various key combinations (it's a virtual MIDI keyboard that transforms the computer keyboard into a MIDI controller), how to disable this behaviour?

This is a hardware limitation of the built-in keyboard (and most non-gamer consumer keyboards)
You have to get a separate keyboard which supports NKRO (N-Key Rollover).
There might be issues with macOS compatibility with some n-key rollover keyboards USB keyboard acting strange with MacBook Pro
So check if it's compatible before you buy


Best way to share iCloud storage across regions As is unfortunately the case, Apple is quite restrictive about what you can share across country borders. Copyrighted work I can see why, but iCloud storage...
I have a UK account that I joined in a family share with a non-UK account. I believe I initially changed my account store to non-UK to allow the link up, and then changed it back thinking that would do the trick.    This has led to the non-UK account being associated with the UK store, rendering previous purchase updates impossible.

I have a payment method for both the UK and non-UK regions, but would like to keep my UK account.
What would be anyone’s suggestions on how to circumvent this limitation?

It would appear that (at least with iOS 12), it is possible to use the main family share AppStore to receive updates for apps originally from another store. Not sure if intended, but it takes some of the pain out of multi country family shares


Change gtk theme for X11 apps I am using Zim note app http://zim-wiki.org in Ubuntu and I want to use the same in my OS X.

So I've installed Zim and can launch it through X11 from menu. But all GTK apps look ugly: bad fonts w/o antialiasing  etc, standard theme looks terrible

Is it any way to change it to any not so bad theme? (Ideally to yosemite like)

I use brew but I don't know package name for that (if it exist).

You need to copy one of the themes (from gnome-look or etc) to /Users/your_user/.themes and install gtk-chtheme via brew. There you can set theme which you want:

So now Zim looks as follow: