Safari seems to ignore my DNS Server I am using an Eero Pro 6 device for my home wifi connection.
The "Eero Secure" product offers to let you block certain domains. I have entered "reddit.com" in the block list, and it seems to work:
$ nslookup reddit.com
Server:     192.168.4.1
Address:    192.168.4.1#53

Non-authoritative answer:
Name:   reddit.com
Address: 192.168.4.1

192.168.4.1 is my routers IP address, and ends up redirecting to https://blocked.eero.com. All is good here, and this is what I want.
The trouble is that Safari (on my Mac, iPad, and iPhone) seems to find a way around this, and is able to load reddit.com without issue. No amount of dscacheutil -flushcache, Develop -> Empty Caches, rebooting, resetting safari, etc - nothing seems to work.
Does anyone have any ideas? Here is my scutil -dns:
DNS configuration

resolver #1
  nameserver[0] : 192.168.4.1
  if_index : 9 (en0)
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)

resolver #2
  domain   : local
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300000

resolver #3
  domain   : 254.169.in-addr.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300200

resolver #4
  domain   : 8.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300400

resolver #5
  domain   : 9.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300600

resolver #6
  domain   : a.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 300800

resolver #7
  domain   : b.e.f.ip6.arpa
  options  : mdns
  timeout  : 5
  flags    : Request A records
  reach    : 0x00000000 (Not Reachable)
  order    : 301000

DNS configuration (for scoped queries)

resolver #1
  nameserver[0] : 192.168.4.1
  if_index : 9 (en0)
  flags    : Scoped, Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)

edit: forgot to point out that I am using macOS Big Sur, and iOS/iPadOS 14.

Safari is not doing anything untoward here. My DNS based block for reddit.com worked fine - but not www.reddit.com, old.reddit.com (even though the Eero block includes subdomains), and so on. From the command line:
$ nslookup www.reddit.com
Server:     192.168.4.1
Address:    192.168.4.1#53

Non-authoritative answer:
Name:   www.reddit.com
Address: 192.168.4.1

Because of that, I expected Safari to resolve www.reddit.com to 192.168.4.1. However, www.reddit.com (and others like old.reddit.com) are actually CNAMEs:
$ dig -t cname www.reddit.com
... snipped output ...
;; ANSWER SECTION:
www.reddit.com.     300 IN  CNAME   reddit.map.fastly.net.

So, it looks like Safari looks up www.reddit.com, sees that it is a CNAME for reddit.map.fastly.net, and then resolves reddit.map.fastly.net and is able to load the page - while displaying www.reddit.com in the URL bar.
I am not saying Safari is doing anything wrong here - this seems like totally reasonable behavior - it was just unexpected to me.
I have now added a DNS block for reddit.map.fastly.net, and everything works as expected.


Automount'ed Samba Shares accessible via Command Line but hidden in Finder? I have 4 samba shares on a Synology DiskStation that I successsfully automount on my 10.9 / Mavericks based system under /Shares/ and when I open the command line I can go there just fine and list the files and directories just fine, however when trying to navigate to /Shares via the Mac OS X finder, the directory just seems entirely empty:

My /etc/auto_master looks like this:

#
# Automounter master map
#
+auto_master        # Use directory service
/net            -hosts      -nobrowse,hidefromfinder,nosuid
/home           auto_home   -nobrowse,hidefromfinder
/Network/Servers    -fstab
/-          -static
/Shares         auto_smb    -nosuid

... my /etc/auto_smb like this:

home -fstype=smbfs,rw,soft ://joerg:myPassword@nasHostname/home
Downloads -fstype=smbfs,rw,soft ://joerg:myPassword@nasHostname/Downloads
Music -fstype=smbfs,rw,soft ://joerg:myPassword@nasHostname/Music
Videos -fstype=smbfs,rw,soft ://joerg:myPassword@nasHostname/Videos

What am I missing here? Why aren't the shares displayed in Finder?

Perhaps the 'hidefromfinder' option in your auto_master setup file has something to do with it?

/net            -hosts      -nobrowse,**hidefromfinder**,nosuid
/home           auto_home   -nobrowse,**hidefromfinder**

From the auto_master(5) man page:

  The
       hidefromfinder option is used on maps that shouldn't show up as folders in the Finder; it causes the UF_HIDDEN
       flag to be set on the root directory of the map.


How can you unlock a Sprint iPhone 6 Plus? It was paid in full without a contract I purchased a Sprint iPhone 6 Plus 64gb off contract. I paid the full amount which was about $1,000. As of today (2014-09-24), how can we unlock the iPhone 6 Plus which is on Sprint? I am a Sprint customer.

Sprint phones CANNOT normally be unlocked for use with any other carrier in the U.S., with the exception of Ting mobile, which uses the Sprint network. Additionally, both Sprint and Verizon are on CDMA networks, so any restrictions imposed on transferring is fabricated by those companies for profit. Additionally, many new phones, including iPhones work with both CDMA and GSM, the only thing stopping you from transferring is the company.
Here is a lame excuse from an actual Sprint technician:

Betty S: Some Apple devices have an MSL code, while others do not, however, even unlocking the software using the MSL code will not enable these phones to operate on a domestic carriers’ network
Betty S: Apple phones sold for use on Sprint's network are designed with an external SIM slot and sold with a SIM card to operate on Sprint's network.
Betty S: Those devices are not enabled for use on a different domestic carrier’s network because the Sprint-specific CDMA requirements are hardcoded in the firmware of the device and downloaded for operation on Sprint’s network and specific frequencies.
Betty S: This is true even within Sprint’s Network, for instance between Sprint and Virgin Mobile. These phones, if sold through a Sprint channel were not engineered as a universal Domestic device.
Betty S: Even if these devices have MSL codes that can be unlocked, the SIM cannot be enabled for use on a domestic carriers’ network.

While the firmware being different is true, it is only that way to stop customers from leaving with their devices.


How often should one shutdown a MacBook instead of just closing the lid? I have found contradictory opinions on this. Some say Windows users tend to shut down but that it is not necessary, and I tend to do that too.
Others say it is preferable to shut down, as it does not take too much time to boot anyway, and that in this way the battery is protected. While others say that it is in fact better not to shut down to often, including for the battery, etc.
An interesting opinion - cannot find the link for that now - was that shutting down / restarting serves no purpose for Macs, except when that is needed after installing or upgrading applications or the system, unlike in Windows, where shutting down was (is?) very important. Also, that Macs do periodical system maintenance work during operation and even sleep, which eliminates the need for restart; possibly restarting would even come against all this, etc., and "not shutting down" is in fact a typical differentiating Mac feature. Is this true?
I need a competent opinion on this - not just a description of the most common use - preferably reflecting some advice from the manufacturer.
I have a Macbook Air.

Update after answer:
Although I got a good answer, a crucial point in it (that the system has to be shut down, but only from time to time) is not yet clear: how often should I shut down the system. So, I will bring my question down to this formula.
As pointed out by that answer, my question cannot be answered in relation to a tangible benefit for the system, but rather in relation to the battery life. So, I guess this last point can be answered by some information on how how is battery life dependent on how often the system is shut down.

Whether to shut down or keeping it in sleep state (by closing the lid) depends on the time usage in between. The short answer is:

If you use it daily, enter sleep mode is recommended.
If you rarely use it, shut it down.

So let‘s see the difference between each option.

We’ll start with this statement:

  An interesting opinion - cannot find the link for that now - was that shutting down / restarting serves no purpose for macs, except when that is needed after installing or upgrading applications or the system, unlike in Windows, where shutting down was (is?) very important. Also, that macs do periodical system maintenance work during operation and even sleep, which eliminates the need for restart; possibly restarting would even come against all this, etc., and "not shutting down" is in fact a typical differentiating Mac feature. Is this true?

It’s true that OS X has a periodical maintenance script that runs daily, weekly, and monthly. Each script has  a different purpose to remove logs, rebuild whatis database, and bunch of maintenances on user levels. I can say that it doesn’t affect our day to day usage. It’s more like system maintenance to clean up and sort logs.

In fact, for MacBook models, we should decide whether to shut down or enter sleep state by focusing on which method can keep the battery healthy. Healthy in the way the battery can maintain a maximum capacity in its lifespan.

Most of the MacBook models use Lithium-ion polymer batteries which requires low level discharge to get the maximum usage. Based on the explanation by Battery University:

  Similar to a mechanical device that wears out faster with heavy use, so also does the depth of discharge (DoD) determine the cycle count. The shorter the discharge (low DoD), the longer the battery will last. If at all possible, avoid full discharges and charge the battery more often between uses. Partial discharge on Li-ion is fine; there is no memory and the battery does not need periodic full discharge cycles to prolong life, other than to calibrate the fuel gauge on a smart battery once in a while

For the maximum battery health, you should use your MacBook Air at least until the it depletes to ±60% level before you keep it plugged in again.

It‘s okay to just close the lid without harming your MacBook. Beside, it can run the maintenance script on time.

The only time when you should consider shutting down is when you’re not going to use the MacBook for more than 36 hours. Apple recommends to discharge the battery around ±50% before shutting them down.

  If you don’t plan on using your notebook for more than six months, Apple recommends that you store the battery with a 50% charge. If you store a battery when it’s fully discharged, it could fall into a deep discharge state, which renders it incapable of holding any charge. Conversely, if you store it fully charged for an extended period of time, the battery may experience some loss of battery capacity, meaning it will have a shorter life. Be sure to store your notebook and battery at the proper temperature. (See “Notebook Temperate Zone.”)

I know I’ve emphasized too much on battery health in this answer, but instead of asking if shut down or sleep is better, the decision affects your battery health more than the performance of the operating system.

Feedbacks and corrections are welcomed in the comment below.


How to turn off shuffle in Apple Music on iPhone iOS 10.1.1? When I play any album in Apple Music on my iPhone 6 Plus, iOS 10.1.1, the tracks are shuffled. i.e. when I press the >> button some track other than the next one is played.

The only icon related to shuffling that I can see anywhere in the app is 'Shuffle all'.

When I play an album I want to hear the tracks in the original order. How do I achieve this?

It is somewhat hidden, but here's how to find the controls.

Start by tapping the bar at the bottom where you see the album art, currently playing song and play/pause and next song controls.

You get a sheet overlay which seems to end at the bottom of the screen, but if you scroll this down (drag up on the screen) you find the controls for shuffle and repeat.

Screenshots are from an iPhone 7, but I'd expect the controls to be positioned similarly on the Plus.

EDIT: In the updated iOS 10.2, the look of the controls have changed somewhat, and a hint showed up the first time I started playing music that the controls were available if I scrolled down.


Hide AppDelegate.scpt source code for macOS application - Xcode I have just finished building an Applescript Application with Xcode and I'm ready for exporting the whole thing.

As this app is not made for the App Store, but private distribution, I have followed this guide to export the .app to my mac.

Upon looking at the resources folder (Application.app/Contents/Resources) I am able to see the AppDelegate.scpt file containing the source code for this application.

This is my first application that I am exporting and my question is:
1. How do I hide/remove or garble the source code so that an ordinary user would not be able to see its contents?
2. What is the conventional way that everyday programmers export their application without revealing the source code (Xcode specific)?

Please help me understand so that I can deploy the app. Thanks in advance.

When you save the AppleScript file you have the option of checking "Run Only" - in that case the script is compiled into a new form that can be run exactly as the original script, but it is not meant for further editing/development.

It doesn't mean that the run-only file is complete protected or non-readable, but parts of your code, comments, etc. are not included or not easily readable.

If you want to do more you'll need a code obfuscator if you still want to use AppleScript - however I'm not sure if one exists on the market, or you need to develop your own.

Regarding the second part of your question - most programmers do not use AppleScript. For other languages such as Objective-C, C, C++, etc. the problem is not the same as their programs are ordinarily compiled before they can run, and in the process of compilation they are translated into a non-human readable form.

Some implementations of languages do not exhibit this behaviour - for example ordinary PHP scripts are interpreted or compiled at run-time. For PHP, Javascript, etc. you can buy obfuscators that helps "masking" or "hiding" the original source code while allowing the program to run.


Can I charge my MacBook Pro from an older iMac? After dropping my 2012 MacBook Pro, the build-in magnetic MagSafe charging system doesn’t seem to be working any more. Is there a way to charge it from an old (2002) iMac, to recover my files? Or any other way?

There's no other way of charging a 2012 MacBook Pro than through the MagSafe power port. If that has stopped functioning, you cannot charge the laptop as usual.
Your options are primarily:

getting the MagSafe power port repaired
taking out the battery and charging it externally and put it back
take out the hard drive or SSD (depending on model) and transfer data externally

To recover the files I would prefer the last option, taking out the drive. It is an ordinary SATA interface, so you should be able to buy a cheap USB-to-SATA interface at most computer stores, that would enable you to transfer the data to another computer.


Apply Computer Name and local hostname with System Image Utility I am going through trying to create a NetInstall image using System Image Utility and am curious about how the "Apply Computer Name and Local Hostname settings from a file" option works under the Apply System Configuration Settings task in the Automator Library.

Could anyone perhaps give some insight about how this works?

Try this format:-the Order is MAC Address, hostname (fqdn or not), Computer name (optional), Bonjour name (optional)

00:2c:76:8d:28:3b -automatic- Computer 1 Computer 1
00:2c:76:8d:28:2b -automatic- Computer 2 Computer 2
00:2c:76:8d:28:1b -automatic- Computer 3 Computer 3


Disable the internal keyboard of a MacBook Pro I'm looking for a solution to completely disable the internal keyboard of my MacBook Pro 13" Model A1278 (MacBookPro8,1).

I have no idea how it happened but when it is on, randomly, some letters are pressed without interruption for several minutes. So it is pretty much impossible to use it unless I find a way to disable the internal keyboard and use an external one (wired or wireless).

From this post on MacRumors forums:

  To disable the Macbook keyboard, type (or copy and paste) the following into terminal:

sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/

  To re-enable it, type (or copy and paste) the following into terminal (if copying and pasting, don't forget to copy a linebreak to make the command work):

sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext

  External keyboards will still work.

Tested to work on macOS High Sierra 10.13 and macOS Mojave 10.14.

Alternatively, you can use Karabiner, a 3rd party app for macOS has a feature which lets you automatically disable the internal keyboard of your MacBook when an external one is connected.


Character Picker stopped working in OS X Lion Character picker inexplicably stopped working tonight in OS X Lion.  I was trying to type in Spanish but now the keys which used to accept tildes or accents are merely repeating.

I tried entering the following command in Terminal and restarting my MacBook Air, but it didn't restore the Character Picker:

defaults write -g ApplePressAndHoldEnabled -bool TRUE

I also checked which keyboard I am using for input.  I am still using the U.S. keyboard, and that hasn't changed.

I tried logging out, restarting, and shutting down.

Is there anything else I can do to restore Character Picker?

You can try disabling it.

defaults write -g ApplePressAndHoldEnabled -bool FALSE

Then reboot. If you want to reverse this change, you can enter the following to change the feature back to be enabled.

defaults write -g ApplePressAndHoldEnabled -bool TRUE


What is the largest hard drive a Mac Pro 3,1 (early 2008) will support? What is the largest internal hard drive a Mac Pro 3,1 (early 2008) can support?

I read here that it's around 1.2 TBs is that correct?  Also I plan to run Proxmox on it, not Mac OS X (well, I might run it as a VM, but not directly on the bare metal).

I don't know any upper limit, but after checking more carefully, in mine I have

1 x 3TB
3 x 2TB
1 x 1TB [SSD in the spare optical bay, wired down into the 'secret' extra SATA slots]

Late addition
It appears that there is not necessarily a data limit but a physical limit.
New 6TB+ drives have the screw-holes in a different place & will not physically fit the HD sleds in a 3,1.
So it turns out that the limit is 4TB - the largest with the old screw-placement.

You can get replacement sleds for a 4,1 or 5,1 from OWC, but not for the 3,1


How can I boot back into macOS if Windows install in Bootcamp fails? This is what happens over and over while trying to install Windows in a Bootcamp partition.

How can I get back to macOS?

Shut off the computer. If you can not shutdown the computer, then hold down the power button until the computer shuts off.
Start the computer and immediately hold down the option key until the Startup Manager appears.
Select the icon represent the macOS operating system volume.
Hold down the control key and then select the circular arrow below the icon.

Note: On really old Mac models, you will only get a straight arrow when holding down the control key. If this happens, you will have to set the default startup operating system from the "Startup Disk" window in the System Preferences application.


Unable to delete .pkg files in /Library/Updates/ I'm doing my semi-annual look around via Disk Inventory X, and I'm seeing some .pkg files located at /Library/Updates/061-41421 with names like macOSUpd10.14.6.pkg and FullBundleUpdate.pkg weighing in at sizes like 1.7gb. They cannot be casually moved to the Trash and sudo rm macOSUpd10.14.6.pkg yields the Operation not permitted message.

Can anyone tell me what these are for? / Are they necessary to keep around? / If no, how do you remove them? And most importantly, why in the world would Apple keep these on board after the contents have been distributed via an update?

Thanks

Reboot in Recovery mode by restarting your Mac and holding Command+R. It can take more time to boot as
  usual, that's OK, just be patient.
  In the top menu go to Utilities and open Terminal.
  Type csrutil disable and press Enter.
  Type reboot and press Enter to reboot again.

Now delete the update .pkgs but the .plist files will contain wrong info, if any, about the download status etc. I am not sure if they have to be deleted or not.

<key>InstallAtLogout</key>
    <array/>
    <key>ProductPaths</key>
    <dict>
        <key>061-41421</key>
        <string>061-41421</string>
    </dict>

Also, disable automatic download from System Preferences  → Software Updates.

  Now you should re-enable System Integrity Check. It is there for a
  reason.

  Reboot in Recovery mode by restarting your Mac and holding Command+R.
  In the top menu go to Utilities > Terminal.
  Type csrutil enable and press Enter.
  Type reboot and press Enter to reboot again.

How to completely disable Siri on Sierra?


Can't resize IntelliJ window I'm running OSX Yosemite and using JetBrains IntelliJ 2016.2.3.

I can't resize the IDE window, except for the maximize or minimize buttons. What I want to do is use the mouse to stretch the borders of the window to make it smaller or larger. But as I hover my mouse over the borders or corners of the IntelliJ window, the cursor does not change and I can't grab the edge of the window at all.

Every other application window on this Macbook supports resizing normally, but somehow IntelliJ doesn't.

Strangely, I also run on the same Macbook JetBrains PhpStorm—another IDE product from the same company—and that window does support window-edge resizing.

I've read about some add-on products for OSX that assist in window resizing, but I'd prefer not to install a tool. This should work with plain OSX, shouldn't it?

I did eventually fix this, but it's still a mystery to me why it happened.

I shut down the IDE app completely, and made sure I am updated to the latest patch, and restarted. Now the window resize controls work!

I'm still interested in learning how it got into the state where the resize controls were not selectable, or if possible, how I can fix that without restarting the app.


Apple Knowledgebase pages often blank This seems to be rather hit & miss, but often a link posted on SE leading to
support.apple.com/kb/[reference code]
seems to just give a blank page, as though it neither loads nor times out.

Sometimes a refresh will load it correctly, sometimes not.

Is there any workaround to this issue?

Edit: I've tried the Remove all website data suggestion, which worked for about 2 days, so I'm back to the manual 'cut the kb number, paste it into the main page' method.

Update May 2019
There was recently a Meta question on this - Changing Apple links depending on region which concludes that, whilst support.apple.com/kb/[reference code] is the correct way to link these, caching/cookies sometimes upsets it & it turns out that removing kb/ entirely seems to fix it, leaving support.apple.com/[reference code] rather than any country or generic code at all as the simplest & potentially most reliable method.

Previous answer below

I've found the simplest workaround is to clear back the URL to just
http://support.apple.com/kb/
This will then usually quickly redirect to your own country, at the entry to the support portal.

Then simply paste the KB article code into the search at the top right of the page, et voilà.


MacBook not charging I have a 2008 Black MacBook. The battery indicator says 'Not Charging' and if I remove the power adapter it powers off instantly.

I had OS X installed, installed Windows (Not bootcamp, Windows only) and then reistalled 10.6.8. Since reinstalling OS X the battery has never charged.

The battery only has 68 charge cycles on it, so it seems strange it would have already died.

As suggested, SMC reset should be your first port of call.

If that doesn't change anything, try removing the battery and see if the system recognises the change. (Status should change to "no battery"/battery icon with an x). If it changes, that pretty much means that the battery is toast.

I'm guessing that your battery has failed as this is the most likely cause of these symptoms. Cycle counts aren't a sure fire way of determining battery health, they can just die.

If your battery is less than 12 months old, you are entitled to a replacement from Apple.


Using a Magic Trackpad 2 upside down The Magic Trackpad 2 seems nice... except it's upside down. The tall part of the device should be closest to the user, not furthest. As built, it's a finger torture machine! How can I switch the default orientation 180º?

Sebastian, there are some great news for you:

As of today, you can use your Magic Trackpad 2 upside-down with BetterTouchTool:

  BetterTouchTool 1.93 (October, 23, 2016)

  Fixed some little Sierra issues regarding keyboard shortcuts
  You can now choose whether a normal mouse button should trigger on mouse-down or on mouse-up (click the little gear icon left to the
  mouse button selection)
  You can now repeat an action while a mouse button is pressed (click the little gear icon left to the mouse button selection).
  Added option to mirror the Magic Trackpad orientation for upside-down usage. It's in the advanced trackpad options => General

See BetterTouchTool Homepage.


Safari loses web site "login" state after computer restarts I have a problem with Safari losing my web site login state after a computer restart. For example, if I am logged in to Facebook or StackExchange the before a restart, then after the restart I will be prompted to log in to the site again.

Simply restarting Safari doesn't cause the problem nor does logging out and logging back in - It only occurs on an OS X restart.

The other interesting thing is that if I log in and start Safari immediately after the machine restart then my web sessions are still active but after about 30 seconds I will be logged out of the site.

For example, if Safari automatically restores the tab with Facebook I will see my Facebook feed and then after about 30 seconds a pop up comes up asking me to log in to Facebook.

This only seems to affect my user account and only on this one computer and it seems to affect any site with a log in, but not "insecure" cookies.  It also doesn't affect the usernames/passwords stored in the Keychain.

I am running OS X 10.10.5 and Safari 8.0.8.

Update

I should have said I have already tried deleting

~Library/Safari
~Library/Caches/com.apple.Safari
~Library/Caches/com.apple.Safari.SearchHelper
~Library/Caches/com.apple.SafariServices

and, as suggested by @TonyWilliams

~Library/Cookies/Cookies.binarycookies
~/Library/Cookies/com.apple.Safari.SafeBrowsing.binarycookies

I seem to have resolved this problem by unchecking the "Reopen windows when logging back in" box on the restart dialog.  Once I did that I was able to log back in and then run Safari without it losing my site logins.

Interestingly I was then able to re-enable that checkbox and restart again without issue, so it seems that something in the restore process was borked.


I am having a near daily crash on my iPhone 4. Has occurred with every iOS 5.x release I took my iPhone 4 to the Apple store based on this problem. The iPhone crashes during calls, when spawning new apps, when navigating an existing app. They suggested it was due to too many concurrent Apps running. Since that time I have sought to keep the number of apps down, but continue to experience crashes. Any suggestions?

Your first step for troubleshooting should be to restore the phone. I'm surprised that they didn't tell you that at the Apple store. It might help you to set it up as a new phone instead of as a back up when you get the option. You would have to reinstall all your apps and reset all of your settings but it's the cleanest start.


How can I “Delete All” from Inbox mail folder? Is there a way to mass delete compiled list of emails on iOS devices (like can be done in os x)? I only know two options: select individually & swipe "left" and from bottom select "edit", then selecting each message individually. I tried solution described in similar question without success (described as iOS 7).

This was the only way at the time in iOS 8 - for newer iOS [possibly 13 onwards but unconfirmed], see iPhone/iPad Mail - rapid mass delete

If it is not already showing, from your Mailboxes view, select Edit & check the All Trash option. This will then be added to the bottom of your Mailboxes list.  Needed later.

From All Inboxes, or your chosen Inbox, select Edit, then Mark, Mark all as read [seems to make a difference, toggle unread/read just so it gets the idea].

Then Edit, check the first item, which enables the Mark, Move & Trash options.

Hold Move & keeping it held, uncheck the item you just checked.

Release Move.

The Move options screen should appear.
Select Trash.

Wait until all items have been moved [the graphics seems to do it immediately, but experimentation has shown it can take a while to actually move, if there are a lot.

Return to Mailboxes, select All Trash.

Edit, Delete All, done.

Caveat... It seems that if you open any individual Mailbox after doing this, they are all returned. I think you may need to wait for the Settings > Mail... > [mail account] > Advanced > Deleted Messages, Remove... period to expire, before it becomes permanent.


Torrent client for OS X that can be shared between multiple user accounts I am looking to transform my macMini into a media server that is shared by all my flat mates.

I want to fully share: the torrent client, the media centre application and the media library.

Now the question is what torrent client can be used between several accounts and preferably from Guest account also. If Guest account cannot be used, I will create a generic user instead of goest.

Still, I would strongly prefer a torrent client that is able to run as daemon, without requiring you to login.

You could use Transmission. But instead of just using the app set up the daemon and use the web interface or the remote client GUI to access the service.

This way you will be able to access the service even from other computers without having to open a user session on the computer.


Why does my Mac Pro boot to black screen with third-party video card when holding Option key? I have a Mac Pro 2012, and recently installed a new Gigabyte GTX 760 graphics/video card. I also have Windows 7 installed on this computer on my Bootcamp partition.

When I attempt to start up my computer and enter the "boot manager" by holding down the Option key, I get nothing. The computer chimes, but I see only a black screen, and have to hold the power button to shut off.

The normal OSX system boots fine if I don't touch anything, and I can only boot Windows if I select that partition while in OSX and restart.

I found that if I swapped back to the original video card, an ATI Radeon HD 5770, it boots to "boot manager" without a problem, and lets me select which partition on my drive to boot to.

After some research, I am gathering that this has to do with the EFI/BIOS process, but I don't really understand where that lies, nor what is going wrong.

If I'm understanding this right, here are some questions, but let me ask the most basic and important one first:

Why does it boot to a black screen with the NVIDIA GTX card?

and kind of a tangent, and might even be answered in your answers, but:

Is there EFI/BIOS on the graphics card itself?

I don't know the precise technical reason, but unless your NVidia is specifically flashed for Mac it doesn't load the drivers until you reach the desktop.

As you can see, this makes dealing with anything prior to that quite difficult.

For boot camp the simplest workaround is to define the startup disk before rebooting.

As you've noticed, keeping the old ATI for emergencies is a good idea.


Lion "hosts" File Bug I have some serious problems with the hosts file on my Lion 10.7.2. My hosts file is like following;

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

27.0.0.1 first.localhost
::1 first.localhost
27.0.0.1 second.localhost
::1 second.localhost

I have more than 2 local sites but I just cut is short.

I can't manage http://first.localhost/ to work. http://second.localhost/ works fine but http://first.localhost/ doesn't work. If I delete the last two lines (which corresponds to second) than http://first.localhost/ works.

How can I add more than one local site in my hosts file? I'm using Lion 10.7.2 which I upgraded today and all those problems arose after that upgrade.

Note: There is nothing wrong with Apache config files or any other file with the local web server, I know that it's the /etc/hosts file that causes the problem.

Thanks.

All additional entries to the HOSTS file must be above the:

fe80::1%lo0

Make sure there is at least one line break after the last entry. Like so:

127.0.0.1 LLL.localhost
127.0.0.1 LLL.localhost
#

Although you probably can't tell, there is another line following the # symbol. One more thing to mention, using Space instead of Tab between 127.0.0.1 and localhost might help too.


Is iWork for free for Yosemite Users? I just upgraded to OS X Yosemite and as far as I recall the presentation Apple said that iWork is for free now as well? The reason I ask is because there is still a price in the App Store.

Or is just the update for owners free?

Yes & No.

It's free for recent Apple hardware purchasers - though irritatingly I can get it for free on my iPhone but not my Mac...

However...
You can download the iWork 09 trial for free & App Store will then update it to the current version.

I'm not sure whether it's strictly legal or not, but I'm sure they could have shut it down years ago if they really didn't like it.

See How do I convert old Pages documents to Pages '13?

Extract :

Go to Softpedia

Click on External Mirror 1

This will download iWork09Trial.

Open the dmg & run the installer.

Run any of the 3 apps, then check App Store for updates.

Edit : After the release of Yosemite, you can no longer update to the latest versions of these if you are still on Mavericks or below. They are now considered "Incompatible Updates". Same for Aperture, iMovie & iPhoto


How do you give supervisor powers to SimpleMDM? I have an iPhone iOS 9 it has been place under supervision via Apple Configurator. I cannot seem to transfer supervisor powers to SimpleMDM.

How would I go about doing that?

Supervision is a mode that a device is put into. If you successfully put the device in Supervised mode, SimpleMDM will be able to take advantage of the added control. You can enroll the device as you normally would.


My external USB Keyboard types wrong Keys on Macbook Pro i have an external USB Keyboard connected to my owc thunderbolt 3 docking station to my MacBook Pro (15-inch, 2017) running Catalina 10.15.3 (19D76) and get a complete wrong keymapping, like qwertz becomes x4lz16.

If I use a direct USB adapter this also happens. Keyboard Sharkoon / Skiller https://sharkoon.com/product/Skiller

I can not find a button to update the keyboard when i am going to settings.

I have a Windows Boot Camp Partition, and running this in the same setup with only a restart not changing the hardware it runs completely as it should be.

I don't know how to solve this anymore and gave up after endless searches not finding me any similar problems. But maybe you know what up?

The Keyboard doesen't make any sense as i know, enter becomes ü..

I have another keyboard of this type and its the same problem. Another 2.ghz adapter keyboard by Logitech runs fine.

I fixed it: STRG+Shift+ALT+N with the wrong mapped keyboard


OSX Mavericks and OSX Lion Login Server At work, we are required to login to our work stations via an OSX Lion Server. I now need to update my iMac to Mavericks (for iOS7 and Xcode 5 support). Will the server need to be updated as well? If so, will every Mac in the office need to be upgraded as well (we are trying to avoid this scenario)?

Updating Server.app is not really necessary. OS X Mavericks clients are backward compatible with OS X Lion Server, in the same way Mavericks Server is backward compatible with Lion clients. It is only required to update Server.app if you want the new features available in the updated OS X Server, or if you wish to upgrade the host OS on the server (i.e. Lion Server.app is not compatible with OS X Mavericks).


How to kill Apple magic trackpad/keyboard connection messages Whenever I take my laptop away from my desk (to type on the couch), OSX goes crazy letting me know that my Apple keyboard is connected, now disconnected, now connected, now disconnected...  The message appears in an obtrusive grey box right in the middle of the screen.  I never want to see that box again.  Simply disabling bluetooth is not an option.

If you use the bluetooth menu item, disconnect from any devices that you don't want to show the message.

You could also automate that UI control with Automator. Open that and then make an automation action that uses the "Watch Me Do" tool to record the things you select.

That way you could assign a keyboard shortcut to have both devices disconnect and another to reconnect them when you wish.

Maybe someone else knows how to kneecap the messages, but this would work with what I know.


Can only one partition of old hard drive been transferred to new MacBook? I just took the hard drive out of my MacBook pro that broke down a few days ago and put it into an enclosure. My questions; If I buy a new MacBook pro, is it possible to ONLY transfer the  Macintosh HD partition  from the enclosure onto the new MacBook pro, WITHOUT transferring the Bootcamp partition  as well?

Thanks for your help!

I have not look at this related to Bootcamp in a few years, but I my searches indicate this has not changed.

Apple's Migration Assistant will only look for attached Mac OS X system volumes to migrate. It will not migrate Bootcamp partitions or other data on non-boot volumes.


Did I really Install GIT 2.0.1? I'm following instructions from http://coolestguidesontheplanet.com/install-update-latest-version-git-mac-osx-10-9-mavericks/

But when I type in "git --version", I'm seeing:

git version 1.8.4

Prior to this, I'd installed GitHub Mac and allowed it to install git. Is it possible that I have 2 git versions installed?  If so, how do I make sure that I'm actually using GIT 2.0.1?

You probably now have two versions of git installed. If you type

which git

in the Terminal, it should tell you which one is in your PATH. For me, the above command returns

/usr/local/bin/git

The instructions you mention apparently install another copy of git here: /usr/local/git/bin/git

You need to add this new location to your PATH variable. To do so, navigate to your home directory and edit your .bash_profile by typing

cd
edit .bash_profile

and add the following line to it:

export PATH="/usr/local/git/bin:$PATH"

Save the file, open a new Terminal window and try typing git --version again. Hopefully, it should now run the newest version.


How to differentiate between repeating events in Apple calendar? I have a list of repeating events in my Apple calendar that are set to run an AppleScript at certain times. However, if I happen to be away (vacation etc.) then when I switch my Mac back on it runs all the scripts that did not run while the computer was off. Annoying and long.

I tried to use some AppleScript code that checks that the script that wants to run is the one for today and today only (not for the days before etc.), but I could not find a way to discriminate between repeating events: they all have the same properties!

Anyone has a way around? macOS 10.12.4

You can store the date the script was last run and only run your script if the script hasn't already been run today:

property prev_date : ""
set curr_date to date string of (current date)
if prev_date is not curr_date then
  set prev_date to curr_date
  -- your existing code here
end if


iCal: How do I add new event types with new colors? So iCal has "Work" and "Home" as two of its default event types associated with the colors green and blue respectively.

How do I add a third event type, say "School", and set its color to be something other than blue or green, say red?

You can add one on iCloud or on your Mac. Just navigate to 'File' and create a 'New Calendar'.

And there, you'll be able to create a new calendar, and with 'Get Info' (right-click), you can choose your color.


How do you do command-line video screen capture on OS X with libav? On linux I can do something like:

avconv -f alsa -i pulse -f x11grab -r 25 -s 1400x1050 \
  -i :0.0+0,0 -vcodec libx264 -threads 4 \
  -acodec libmp3lame video.mkv

but of course the alsa and x11 driver should be different on OS X. How would this work to do command-line video screen-capture?

I found a solution that works really well. You're able to record with ffmpeg using an input device called avfoundation.

Details
More options
ffmpeg options

Here is an example command-line:

ffmpeg -f avfoundation -pix_fmt yuyv422 -i "1:1" -t 10 -vf crop=1280:720:1:65 -r 30 output.mkv

You may or may not get asked to specify -pix_fmt when this option is not included; it might be worth trying other formats to see if you get better performance.
As explained in the details link, -i selects both video and audio input. If you want to capture audio playing on your computer, you'll need something like iShowU Audio Capture.

To get that to work, you'll need to press Option + F11, select iShowU Audio Capture as an input device and as an output device. You'll notice that once you select it as an output device that you can no longer hear the audio yourself through your speakers or headphones.

A quick fix is opening Audio MIDI Setup, create a Multi-Output Device and adding iShowU Audio Capture and your normal output device. Select this new Multi-Output device in your sound outputs and there ya go, you can now hear the audio and have it captured.

Unfortunately you aren't able to control the audio levels now...if someone knows a solution to this please let me know.
-t is the time in seconds to record.
-vf is very useful for cropping and offsetting. The current setting is cropped to 1280 width 720 height, offsetting 1 pixel to the left and 65 pixels from the top. You'll need to use a third party tool to get exact pixel measurements of your screen.
-r is framerate.


Automating .ics import from Mail to iCal I've got a setup that will take all the events in a range of dates in Outlook 2007 (at work), create an .ics file for it, and email it to my home email address. The email comes with a few .gif files as well for prettiness.

Is there a straightforward, relatively failproof way to automatically take the .ics attachemnt when it is received in Mail.app and import it into a specific iCal calendar? The calendar I'd like to use is the default calendar that pops up in the dialog box.

I've done some mucking about with Automator - it sort of works, except that sometimes it 'finds' the .ics file multiple times, and so tries to import it multiple times... if it only finds the file once, it works fine.

EDIT Jan-19 - The "Add to iCal Automatically" solution in Mail.app's preferneces is better than what I had, but still not quite enough.
1. I don't see that it allows me to specify what calendar it's adding the event(s) to.
2. It's not automatic - I would need to open the email to do it. My intention is for an unattended workflow.
3. It's too broad - I only want .ics files that meet certain criteria (ie, only in emails from my work email address), not every invitation that I receive.

There is an option in Mail.app that you can set to automatically 'Add invitations to iCal'.


What is the net weight and outside size of the iPad mini box when new? What are the physical dimensions of one iPad mini box?

I want to order two iPads mini and then have them shipped in one box but I'm worried about the width, height, depth & size of the outer box because I'll do international shipping.

Precise measurements are very much appreciated as I wish to be specific about the rates & costs.

For the reference:

Length: 21.3 CM
Width: 14.7 CM
Height: 3.3 CM
Gross Weight: 0.5 KG


Back up MacBook without display How can I back up my MacBook when it's display is broken and I don't know if the computer is currently on or off or whether it is booting up correctly?

I've been keeping backups on an external HDD with Time Machine and asked a recent question about a problem I had with that - "not enough space on disk" - so please can answers to this question also explain how to back up if that is an issue?

The simplest method (assuming you have or can borrow/rent one) is plug in an external monitor. That may not be possible or practical but it has to be said...

The problem here is knowing if the Mac is on or off. You can check in a darkened room to see if you see ANY light change (keyboard, display) when hitting the power button. Also in a quiet room listen for fans or drives spinning up (assuming you have spinning drives and not an SSD) And often turning on a Mac will make some noise when it is powered on.

If you can get to the battery and take it our or disconnect it readily that would confirm it is indeed off.

You can usually shut down any computer (Mac or PC) by holding down the power button for 15 seconds or so. Once you do that hitting the power button will power it up.

Forgoing all of that you could just plug your Time Machine drive into the Mac and watch for the drive activity light. More than a 30 seconds or so of drive activity might be a good indicator that macOS was accessing the drive. Let it run overnight and then plug it onto another computer and check the date stamps on the sparsebundle and/or its contents to see if it was modified overnight.

There are likely other ways that I haven't thought of but those should get you started, unless you've already tried all of that...


The keyboard's plists of PressAndHold also can no longer be modified to add the new accents in El Capitan From OS X 10.8 to 10.10, I used to modify the PressAndHold keyboard plists to add the new Romanian and Slavic accents and some symbols, so I'm an hyperglot.

/System/Library/Input Methods/PressAndHold.app/Contents

From 10.11, they can no longer be modified.

Files in /System are protected by System Integrity Protection. If you wish to edit such files, you will need to disable this.

  To disable System Integrity Protection, you can do the following:

  Boot into the Recovery HD by restarting whilst holding ⌘R.
  Open Terminal (from the Utilities menu).
  Run the following command in Terminal:

csrutil disable

  Restart.

Source: Disable OS X El Capitan Rootless and permit write actions to System Integrity Protection locations

You can re-enable it once you've edited the file.


MacBook Pro 2016 (sans touchbar) – headphone jack not going all the way in I just bought a new MacBook Pro 2016 (without touchbar) and noticed that the headphone jack doesn't go all the way in and sticks out a couple of millimetres:

Despite that it seems to be working fine. However, I'm still worried that something might be broken inside and it will come up later.

Is it supposed to be that way on the new models?

My MBP 13" with Touchbar won't fit all the way in either. Probably this is Apple's intention.


Uk apple shop won't fix my phone under EU warranty My iPhone 4's button has stopped working properly.  I went to the apple shop today to get it repaired, and was told I had to pay £119 as it was 22 months old and outside of the one year warranty.   I then asked why it was not covered for a two year warranty due to EU law enforcing this, which then turned into a pointless argument of the guy at the genius bar continually saying "we only cover a one year warranty" in which I gave up and left.  I just do not understand however if I am right or wrong - should it have been covered?

This is a legal question, not a technical one BUT... the EU 'law' you are referring to is the European Directive 1999/44/EC.  In the UK, the Sale of Goods Act meets or exceeds most of the directive's requirements, overriding the directive.  The bottom line is, you are almost surely covered, do check what the Sales of Good Act says, see if these chaps chan help you

http://www.adviceguide.org.uk/consumer_e

and be ready to stir up as much trouble as you can.  I once had to deal with a faulty screen in a new MBP, I did complain, they guys at Apple were not helpful, I kept complaining, calmly (you cannot ever lose it in these situations, because you give the opponent an excuse to stop dealing with you) and after 30 minutes the manager basically rolled belly up and did what I told him he had to do all along.  Be prepared to ask to talk to mangers etc, and take note of times and names.


iPad: Newly installed apps don’t show up on Home Screens I am on my fourth iPad - and just as many iPhones — and I have accumulated a very large number of apps. I would like the luxury of going through them one by one and deleting the ones I don’t use. But it's taking a while to get around to it. In the meantime, when I download any new apps they just never appear on my screens. I can locate them using Spotlight search, but the icons don't appear on the Home Screen.

Since I want to organize them onto my first Home Screen, I need to be able to find them to move them. I have tried restarting, hard resets — I even tried the recent suggestion on how to add another Home Screen by dragging an icon to the right to create a new page, but it won’t work. I am on an 12.9” iPad Pro running iOS 12.1.2.

There's an upper cap on the maximum number of Home Screens that can be created on an iOS device. The count is a bit higher for iPad than for iPhone.

Once you hit the limit, any newly installed app doesn't show up on Home Screen, as no more screens can be created. You can still continue to install new apps as long as free storage space is available on your iPad.

You can search for an apps using Spotlight even if its icon is not visible. One way to view more apps is to organize apps within folders. A folder can house many apps (the limit varies between iPhone and iPad). Since a folder only takes up the visible are required for one app, you can see more apps when using folders than without one. (The maximum number of Home Screens or maximum numbers of apps in a single folder for a device are not officially documented and can be determined by experimenting.)

To create a folder, simply tap and hold on an app icon until all the icons start to wiggle. Now drag and drop an app icon onto another to house them into a folder. You can also assign a custom name to the folder to easily recognize it. However, you can not create a folder inside a folder.

Once you have organized apps into folders and are able to see the icons, you can drag to organize them on Home Screens as desired.

With iPad drag and drop support introduced with iOS 11, you can also quickly move multiple apps around.

Alternatively, if you have access to a Mac or a PC, you can also re-organize apps icons easily using iTunes.


Recovery mode behind corporate proxy Sierra I just wiped the hard drive on a 2010 mac pro using the recovery mode partition, but now when I try to reinstall (Sierra) I discover that it can't connect to apple because it has to go through the corporate proxy (because reinstalling the OS is obviously something that no-one in a corporate network would ever do…?).

I tried using networksetup in a terminal, but it doesn't seem to have it: I just get

-bash networksetup: command not found

when I try it.

I tried using a hotspot on my phone, but it still didn't connect so plan C is ruled out too.

What are my other options (Apart from doing the sensible thing and installing Linux)?

(I know the phone hotspot didn't work for you, but it worked for me, so I'm posting it as an answer for others' benefit.)

Background: Macs need to connect to the internet when installing macOS, even if you have a USB bootable installer. It needs to download info from apple.com. The problem is that it doesn't work when behind a proxy.

The workaround is to use your phone's wifi hotspot for the initial verification step. If you use a USB bootable installer, then it won't need to download the 5+ GB through your phone's wifi hotspot.

Create a USB bootable installer. https://support.apple.com/en-us/HT201372
Unplug any ethernet cables to your mac. Otherwise, even if you connect to your phone's wifi hotspot, it will use the ethernet adapter, which will fail in the corporate network.
Boot to the USB. Before you click on "Install macOS", choose the wifi network (your phone's hotspot).
Then continue the rest of the installation steps. If the wifi works, then you should see the License Agreement screen pretty quickly (less than 1 minute). If it's hanging more than 1 minute, it probably can't get through to the internet.

If you're using the USB bootable installer, you can turn off your phone hotspot after the install process has done a few reboots and is in the "Estimated time remaining..." phase.


Remote Desktop Connection session to windows server 2008 problem with licensing I cannot log in with my credentials using Remote Desktop Connection v2.1.1 (up to date) session to windows server 2008. Error states there's a problem with licensing. Tried from two different machines, both running latest version of RDC both running on OSX 10.6.8. This connection tested OK and ran for about two weeks. No updates have been made on either machine, or the remote server I'm trying to access. However, I can do this from a Windows machine using same credentials and IP address without a problem...

Any ideas on what to check?

Why not try another RDC app like CoRD. This will help you rule out the RDC 2.1.1 app


Can't update Java due to apparently newer version already installed I'm trying to update Java on my MacBook (OS X 10.9.5). When I download the most resent version (v8 update 40) from java.com and try to install it, it pops up an error box saying

  You are trying to install 1.8.40.27, however 14.9.0 is already installed

and that's it. In a terminal I get

java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

But Firefox → Tools → Add-ons shows Java 14.9.0 (and says it's outdated), though there is no option to de-install it.

So, how can I install the most recent Java 8.40? How can I uninstall this mysterious Java 14.9.0?

According to apple.discussions.com the install of Java8 should work after removing an older Java plugin with the following command:

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin


iPod Classic and MacBook 2020 I have just bought one of the new MacBooks which will cause me to jump a few version of iTunes. I believe that the new separated style wont work for syncing an iPod Classic.
Does anyone have any solutions that dont involve having to keep the old hardware just to sync an iPod. Two versions of iTunes installed simultaneously for example if that is possible?

From what Apple has posted, if you are using Catalina you will no longer be syncing with iTunes, you will be syncing with Finder.
See:  https://support.apple.com/en-us/HT201253

I believe that the new separated style wont work for syncing an iPod Classic....Does anyone have any solutions that doesn't involve having to keep the old hardware just to sync an iPod.

It's best to work with actual, solvable problems.  In this case, there's nothing to solve.  I did a quick Bing search and the very first video Will it Sync? The Original iPod and macOS Catalina provided the information to your question:
Catalina Finder will sync with the 1st Generation Original iPod


Automatically expose underlying files in iPhoto My wife and I use a blog on Blogspot to post pictures and videos of our kids for our far-flung relations.

Recently, we have had issues with posting videos from iPhoto to the blog. The blog uses a standard browser interface to get to the content.

After a lot of investigation, I found that the issue is that the iPhoto library (package) is exposing the thumbnail of the video to the interface, not the actual video.  The website can't process the thumbnail as a video (obviously) and this is causing us all sorts of grief.

This apparently worked fine until a recent update within the past month or so (per my wife).

Is there any way around this or am I stuck with having to manually locate and migrate the files to a temporary folder so we can share them?

Go to File > Reveal in Finder > Original File.

It will open a new Finder window with some obscure path, but don't worry, you don't really have to deal with that.

Just grab the file, drop it on the file dialog sheet...

and vuala! Your file has been selected. This little trick applies to any file and any native file dialog in OSX.

Quick and easy.

Note: As an extra tip, you can also drag the file directly to any "Choose File" button in Safari.

So there you go! First show the file, then drag it to the file picker. No temporary folders, moving or even remembering a path involved. Hope it helps!


How to prevent iMessage syncing without access to device I foolishly logged into someone's iPad with my Apple ID. This person is now receiving my full communications on iMessage. I know I can remove my account from that iPad but I don't have access to it. How can I stop the device from getting my iMessages without physical access?

Try changing your Apple ID password. That'll lock any device out of any service using your Apple ID without the new password. Good luck to you!

You can change it from your iOS Device, right in the iTunes or App Store at the bottom go to "Apple ID: [Your Apple ID here]", click on "View Apple ID" and change your password.


How to debug macOS firewall? My application layer firewall (ALF) is not logging or blocking macOS firewall (alf) socketfilterfw doesn't seem to be running properly on macOS catalina 10.15.2 ...

Any ideas on how to troubleshoot / debug the built-in macOS application layer firewall?

Check ALF launch daemon is running

$ sudo launchctl list | grep alf
275 0   com.apple.alf

$ ps -ax | grep socketfilterfw
0   529   0:00.01 /usr/libexec/ApplicationFirewall/socketfilterfw

have restarted a few times and reloaded launchdaeamons with launchctl unload and load with:

unload firewall for editing

$ sudo launchctl unload /System/Library/LaunchAgents/com.apple.alf.useragent.plist
$ sudo launchctl unload /System/Library/LaunchDaemons/com.apple.alf.agent.plist
$ sudo pkill -HUP socketfilterfw

load firewall

$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.alf.agent.plist
$ sudo launchctl load /System/Library/LaunchAgents/com.apple.alf.useragent.plist

console.log

socketfilterfw  setting fw.verbose fails
socketfilterfw  cannot open file at line 43353 of [378230ae7f]
socketfilterfw  os_unix.c:43353: (2) open(/var/db/DetachedSignatures) - No such file or directory

system.log

com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.socketfilterfw.467): - -Failed to bootstrap path: path = /usr/libexec/ApplicationFirewall/socketfilterfw, error = 108: Invalid path

socketfilterfw config

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
Firewall is enabled. (State = 2)

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getloggingopt
Log Option is brief

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getblockall
Firewall is set to block all non-essential incoming connections

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getallowsigned
Automatically allow built-in signed software DISABLED

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode
Stealth mode enabled

viewing alf.log and appfirewall.log -- empty

$ cat "/private/var/log/appfirewall.log" | wc -l
0
$ cat "/private/var/log/alf.log" | wc -l
0

running /usr/libexec/ApplicationFirewall/socketfilterfw  manually

sudo /usr/libexec/ApplicationFirewall/socketfilterfw -l (-l for "Do logging and run in daemon mode." )
The value of the token is 15675822025110658885

kill running FW

Changetrustmode sw_msg_hdr len: 8 type: changetrustmode (13)

BLOCKALLSYSTEMWISE

WriteRules sw_msg_hdr len: 88 type: proc_rules (1)  proc_name:  proc_id: 0 rule_type: 7 rules: tc: 0x1010 tl: 0x100 tb: 0x100 uc: 0x1010 ub: 0x100
TRUSTEDAPPS httpd

WriteRules sw_msg_hdr len: 88 type: proc_rules (1)
 proc_name: httpd proc_id: 0 rule_type: 2 rules: tc: 0x11 tl: 0x100 tb: 0x100 uc: 0x11 ub: 0x100

.
.
.

ALF: total number of exceptions = 9
ALF app_paths = 0x53600650 app_bundleid = 0x0
ALF: insert bundleid 0x0 alias 0x0 path /usr/libexec/configd to list
ALF app_paths = 0x536007c0 app_bundleid = 0x0
ALF: insert bundleid 0x0 alias 0x0 path /usr/sbin/mDNSResponder to list
ALF app_paths = 0x53600830 app_bundleid = 0x0
ALF: insert bundleid 0x0 alias 0x0 path /usr/sbin/racoon to list
ALF app_paths = 0x536008a0 app_bundleid = 0x0
.
.
.
ALF: total number of explicits = 7
Changelogmode sw_msg_hdr len: 8 type: changelogmode (12)  flag: 0x1
Changelogopt sw_msg_hdr len: 8 type: changelogopt (15)
Adding SCDynamicStoreCreateRunLoopSource to runloop
alfCallback name = com.apple.alf object = FirewallDaemonstarted
zsh: killed     sudo /usr/libexec/ApplicationFirewall/socketfilterfw -l


Have to enter password twice after losing battery power? El Capitan If I let my mac run flat, when I plug the magsafe back in and power it back up, it boots up with the black background and apple logo, the first logins screen is slightly greyed, after entering my pass, the screen goes black, then the normal login screen appears, I have to reenter my pass to login, this version of El-Capitan is not the public beta. How can I resolve this or is it just a current issue with El-Capitan?

That first screen sounds like the FileVault password prompt, which appears before the user login prompt when a FileVault-enabled computer is initially powered on.


iCloud bookmark sync with Chrome Apple's iCloud makes syncing of Safari bookmarks easy between Safari on Mac or PC and IE on PC.

However I'm using the Chrome browser on both those platforms and I'm wondering if there's any workaround to have Chrome bookmarks synchronized with iOS devices either by using iCloud or another service / package.

Well, as a workaround, you could use Xmarks.

Syncing your bookmarks with Xmarks works with both Chrome and Safari, so anything you add in Safari will appear in Chrome and visa versa.

That way you can also add a bookmark in Chrome, it will sync to Safari over Xmarks and then out to your iOS devices with iCloud.

Probably not what you wanted, but it will work. It's what I ended up doing.


Spotlight search to Bluetooth settings hindered by "Bluetooth file exchange" My issue is as small as they get, but I like optimising my workflow. So I go to my Bluetooth settings multiple times a day; to switch headphones or when some other wireless peripheral acts up. I do this via Spotlight search and then type "blu". But then it finds "Bluetooth file exchange", and only after a second or two it shows a list of other options, like so:

So I have to wait 2 seconds every time; instead of the usual fraction of a second. I figured I just change the name to "File Exchange Bluetooth" or something, but that doesn't seem possible.

What do?

P.S.: According to XKCD I'm allowed to allot 2 hours to solving this problem.

In Finder open /Applications/Utilities.

Next open System Preferences then choose the Spotlight preferences. Select the Privacy tab.

Now drag Bluetooth File Exchange from Finder to the Spotlight Privacy tab to exclude it from Spotlight (this will work because what is seen as app in by Finder in macOS is actually a folder, although you have to right click it in Finder and Show Package Contents to see it).

Now try Spotlight again with "blu".

If any other apps come up before Bluetooth preferences, drag them also into the Spotlight privacy pane.


Is it possible to find out if a Mac was simply powered on (power button) but not logged into any account yet? Sorry if this is a basic question:

Is it possible to find out when a Mac was simply “powered on” (like just pressing the power button) and brought up to the login screen that shows the User Accounts, but NOT logging into any accounts ?  So basically just starting up and then shutting down again without actually going further. Or would that mean that it’s too early so no logs/records/timestamps are created yet at that point ?

(I found some discussion here about logs but it doesn’t talk about just powering on: https://unix.stackexchange.com/questions/14127/how-to-know-when-and-which-user-logged-into-the-system-under-mac-os-x-last-is-n)

Thanks !

You can view this information using the last command in Terminal.app.

The last command brings up the login history in LIFO order. Each entry contains the name of the user who logged in, the local time the login occurred, and the duration of the login session.

Shutdowns and restarts are logged as pseudo-users named 'shutdown' and 'reboot,' making it a simple matter to see who (if anyone) has logged in since the last startup, or if multiple shutdowns/restarts occurred without anyone logging in between them.


I am trying to erase and reformat drive with snow leopard, but don't have the install DVD I have a 2009 MacBook Pro running Snow Leopard, and I'm selling it to someone. Want to erase and reformat the drive but I don't have the Snow Leopard Install DVD. Is there any way to do this?

The Apple Store online sells the Snow Leopard Install DVD for approx. $20.
Link provided- http://www.apple.com/shop/product/MC573Z/A/mac-os-x-106-snow-leopard or you may need to purchase a replacement DVD that came with your computer. I would call them first.


Spotlight not finding folders, files, or apps in High Sierra I can't be sure it's related but after I turned on File Encryption Spotlight just stopped working on files folders and apps. I tried all the advice I saw in this post on this forum and more, including reinstalling the OS and resetting parameter RAM and deleting the .Spotlight-V100 folder.

I found the answer today and it took so long I thought it was worth posting both the question and the answer here.

I found the answer on this post in an Apple Community forum.

The key was to rebuild the Launch Services Database - I didn’t even know that was a thing. You need to use the terminal and run this command:

sudo /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain u -domain s -domain l -v

Takes a minute or so to complete and you get a lot of lines with errors. Then I continued with the advice in the post to rebuild the indexing with the following

sudo mdutil -i on /
sudo mdutil -E /

After running for just a few minutes I started to see apps show back up in Spotlight.

Hope I can save someone else a few weeks of pain and searching.


How to export a slo-mo video with the slow motion intact and without losing quality? I have a nicely exquisite slo-mo video.  I would like it to export to my computer.

Simply copying the file by plugging into the USB cable loses all the slo-mo edits.
Doing an export via Share by Email seems to lose the quality (it compresses it).

I don't want to export it to YouTube, Facebook or anything like that.

How can I get it to my computer so that I can email it to my friends?

The reason importing it directly onto your computer doesn't appear to work is due to the way the iPhone plays back slomo videos.

The video itself isn't shot in "slomo", so to speak. Rather, it's shot at 120 frames per second, a typically higher frame rate than normal video recording.

This is significant because if you were to playback that video at 30 fps, the videos would appear to be playing in smooth slow motion because there is 4 times the frames to display. So, when you playback a video the iPhone is converting the selected section of the 120fps video into 30fps, giving it the slow motion effect -  the whole video COULD be watched at a normal speed with no problem. When you import the file onto your computer, it is just a 120fps video file - it doesn't know when or where to convert it to 30fps, which is why it appears as if it "lost" the slomo when really it's playing in its native 120fps.

You can easily restore that slomo effect with almost any video editing software by slowing down the video (to 30fps, or any other speed for that matter) , just as your iPhone would do - you just have to do it manually (which could be better in some cases).

Alternatively, you should be able to imessage your video from your phone to your Mac without any considerable quality loss.


Find out what is playing audio Lately I've been getting lots of bugs: songs from Safari playing without me starting them, or pausing youtube but it doesn't support but Safari says there is no sound from the tab, closing the tab doesn't stop it, or accidentally pasting a URL into Spotlight then being unable to stop the audio that starts playing.

I would like to know how to

Find out what is playing audio
Stop it

Or, just 2 actually.

I want to stop unwanted audio from playing.

This happens on brand new Catalina 10.15.2

If this happens in Safari, the tab for a site that is playing audio
will have a small speaker icon on it. See the image below which shows 3 tabs in the top of my Safari window. Clicking on the
speaker icon stops it from playing. See the middle tab in the image.


Install macOS Sierra using a newer Mac to be deployed on an older Mac? Any problem with using a newer Mac laptop to install macOS Sierra onto an external hard drive, then install into an older Mac laptop? (assuming both Macs are Sierra-capable, obviously)

Are there any issues with booting and running an older Mac from a macOS created with a newer Mac? For example, does the Sierra installer install drivers specific to the Mac on which the Sierra installer app ran?

This should work fine; the installer will install all drivers needed for all supported Mac models, so you can move drives between models pretty freely.

Update: Starting with High Sierra, this is no longer supported. The OS itself will be fine, but unless you run the High Sierra installer on that computer, and with a live Internet connection, the computer's firmware may not be properly updated to support the new OS. According to Apple support article HT208020:

  If you try to use a monolithic system image [equivalent to
  transferring an HD with the OS installed], required firmware updates
  will be missing from the installation. This causes the Mac to operate
  in an unsupported and unstable state.

See this TidBITS article for more info.

BTW, just to give you some idea of the possibilities for trouble: there was an issue with Mac OS X v10.2 (yes, long ago) where if you installed it on an iMac DV model that hadn't had its firmware updated, it did something bad to the video configuration, and the display would be blank. The display would remain blank, even if you booted back into an older version. This made it really hard to run the firmware updater and make the computer usable again. I was working in a repair shop at the time, and we had a lot of iMacs come in with this problem.

I suspect the current firmware compatibility worries have to do with compatibility with the new APFS volume format, so the worst that should happen is that an un-updated Mac won't be able to boot from a High Sierra volume in APFS format. Probably. Maybe. No promises, though.


When you upload a file from online storage to a website, does the file get stored in the Mac? Online Storage can be dropbox, google drive whatever. You only have files saved there but not on the mac. But when you upload from the online storage directly to a website, i am guessing the file has to go thru the mac, and does it get stored somewhere in the mac, then?

If you get prompted to download a file then it would be saved on your mac which I doubt that this is the case since these websites usually build these based on API's available from Dropbox or Google Drive etc. where you'd be prompted to logon and usually even with some sort of authorization that the website wants gain access to your personal information


Aperture and Rosetta problem I've had to buy an older Intel Core Duo Macbook to replace a stolen one. I've installed Aperture 2.1 from an old disc. It won't open, I get a message saying something like: "You can't use this version of Aperture with this version of Mac OS X. You have Aperture 2.1." I'm running 10.6.8.

I rang Apple, the reply was 'it won't run on your machine, there's nothing you can do. But I can make it work for you it will cost £35.' I declined that offer. I have an Imac running Snow Leopard with Aperture 2.1 running OK.

I've tried to install Rosetta (to see if that would open Aperture)from my Snow Leopard install disc. I get a message telling me the installation was successful, but I can't find it anywhere on my hard drive. Any ideas?

Running Aperture under Rosetta will be a painful experience.  It will not be swift.
Note also that working with different versions of aperture on a common library is a good way to get corruption.  Apple doesn't recommend running aperture on non-local disks either.  I've tried it, and while pictures are present, seaches return far too few results.

If you bought Aperture through the App Store, you should be able to unlist your stolen mac at the store, and install it on your newer mac for no charge.  If the current old mac book won't run the current aperture version, then I think that there are older versions on the Mac web site.

Finally, once you authorize the new laptop on the app store, you can just share the apps folder from your iMac, and drag and drop the Aperture.app folder from the older iMac to your laptop.


How to list audio card IDs from terminal I am developing a script which deals with sound recording.

As user potentially can have multiple sound cards attached, I would like to give him/her a chance to select desired one. The software I use for actual recording asks for numeric "Device ID".

Is there any way to retreive list of Device IDs along with soundcards' names from command line (terminal)?

system_profiler is the tool in mac OS to show hw or sw configuraion.

Get the datatye you want to look for using --listDataTypes.

$ system_profiler -listDataTypes | grep Audio
SPAudioDataType

Then fire the command,

$ system_profiler SPAudioDataType
Audio:

    Intel High Definition Audio:

      Audio ID: 128

        Headphone:

          Connection: Combination Output

        Speaker:

          Connection: Internal

        External Microphone / iPhone Headset:

          Connection: Combination Output

        Internal Microphone:

          Connection: Internal

        S/PDIF Optical Digital Audio Output:

          Connection: Combination Output

        HDMI / DisplayPort Output:

          Connection: Display

    Devices:

        Built-in Microphone:

          Default Input Device: Yes
          Input Channels: 2
          Manufacturer: Apple Inc.
          Current SampleRate: 44100
          Transport: Built-in

        Built-in Output:

          Default Output Device: Yes
          Default System Output Device: Yes
          Manufacturer: Apple Inc.
          Output Channels: 2
          Current SampleRate: 44100
          Transport: Built-in


Problem setting up Outlook 2011/2016 with Google-apps email I have an email address managed Google Apps (it uses the imap.googlemail.com and smtp.googlemail.com servers, but the part after the @ is not gmail but the domain of my university). I use exactly the same settings in Thunderbird and Postbox (see here), but couldn't manage to make it work with Outlook 2011 nor 2016.

I get this error:

Any ideas?

You need to add your password in the corresponding field for this options to appear.

Use your email address (complete with the @domain.tld) in the "User name" text field.

Check "Override default port", and "Use SSL to connect" on both servers.
On IMAP use port 993
On SMTP use port 465

Click "Add account".

Select your newly created account and click on More options... under "Outgoing server"

Select "Use Incoming Server Info" for authentication.

If the same settings are working on other clients, it may be the that there is no TLS setting on Outlook. Sometimes it requires a little fiddling to find the right security protocol / port combination, but the above worked for me on my university issued email, which is hosted with Google Apps.

Also, triple check your email address, as the error shown implies an authentication problem and I've banged my head on the keyboard trying to figure out what was wrong many many times, only to discover a typo was the culprit.

This are the recommended settings for any IMAP client from Google, which differ from what you described (on the servers).

  Incoming Mail (IMAP) Server - Requires SSL

  imap.gmail.com
  Port: 993
  Requires SSL:Yes

  Outgoing Mail (SMTP) Server - Requires TLS

  smtp.gmail.com
  Port: 465 or 587
  Requires SSL: Yes
  Requires authentication: Yes
  Use same settings as incoming mail server

  Full Name or Display Name: [your name]
  Account Name or User Name: your full Gmail address (username@gmail.com). Google Apps users, please enter
  username@your_domain.com
  Email address: your full Gmail address (username@gmail.com) Google Apps users, please enter username@your_domain.com
  Password: your Gmail password

  If your client does not support SMTP authentication, you won't be able
  to send mail through your client using your Gmail address.

  Also, if you're having trouble sending mail but you've confirmed that
  encryption is active for SMTP in your mail client, try to configure
  your SMTP server on a different port: 465 or 587.

Just to get a final look at a generic configuration:

Note that it does not work, as the credentials and domain are fake (yellow dot to the left of the account). Also, the "Override default port" under "Incoming server" is deselected, as 993 is the default port for SSL, so you can safely ignore my recommendation on that matter and just click the SSL checkbox


How does one export all contacts from iCloud? How does one export all contacts from iCloud in some sort of standard format? I would prefer to keep a backup in case my sync goes bad and I'm yet to find a way to export all my contacts. I would hate to lose hundreds of contact details if my sync from the iPhone goes bad.

I just had a massive heart attack after attempting to switch Apple ID accounts...

I originally shared an itunes account with my brother so that we could share apps etc...

But after changing Apple ID's and reconnecting to the cloud, i lost all my contacts...

Luckily they were stored in the Cloud with the old iTunes ID. If you log into iCloud and select all your contacts on the settings button (bottom left) it says Export vCard. Click this and you can Export all your contact information as a .vcf file which you can then back up onto an external harddrive etc...

Hope this helps!!


Mac Pro 5.1 Windows 10 EFI Boot (Separate Drive) I've installed Windows 10 EFI with this Tutorial and it worked fine. But when switching from Windows to OSX using the Bootcamp "Boot to OSX..." it just rebooted into Windows again. Then I unplugged the Windows drive and it booted into OSX, but now if I choose "Windows" from System Preferences->Startup Disk it just reboots to OSX.

Is the only way of switching OS in this configuration by using a helper card and pressing alt on boot?

My current setup:

Mac Pro 4.1 (flashed to 5.1)
2,66 Quad Xeon
RX480 graphics card
Bay 1 OSX SSD Drive
2nd Optical Bay Windows SSD Drive

I have installed it on 2 separate drives. Windows being in EFI mode, and during the installation I did not use any Boot Camp crap, but I had to leave only 1 empty drive for Windows 10 install and boot from Windows 10 DVD in EFI mode. Then I created the Windows partition from scratch and installed Windows.

Download the bootcamp drivers from this link. I did update Windows and installed Boot Camp 6 drivers by running msiexec /i BootCamp64.msi from Administrative CMD window, which is located in Boot Camp\Drivers\Apple directory. Then I connected all the other drives.

In macOS High Sierra I installed Boot Runner from Twocanoes. From the recovery partition's terminal I executed:

csrutil enable --without nvram

so the Boot runner can boot Windows. After logging back into macOS High Sierra, logout. You will come to the Boot runner's startup disk screen. Select Windows and it will reboot to Windows. If you want to go back to macOS, select macOS High Sierra option in the startup disk of the Boot Camp manager (in Windows)

I have migrated my internal Windows drive to Sonnet Tempo SSD Pro Plus SATA III PCI Express Card. Unfortunately, due to the fact the drives on this card are recognized as external, I guess Boot Runner does not populate an option to boot directly from this drive. As a workaround though I can select the SSD as a boot drive from the Boot Camp manager in my internal Windows drive which works like a charm.


Safari creates Zero bytes instead of actually downloading files Each time I Cmd+S an .mp3 or .mp4 file, it saves it, but as it turns out, as an empty Zero bytes file. Even if I'm explicitly choosing Save As and Format=Page Source, it doesn't work. I doubt this is an expected behaviour as it has let me down several times since some of the files are no longer online.

This issue is very similar to After Maverick, Safari will not download PDF files, but the solution there doesn't work for me as I don't even have that "Allow Plugins" checkbox in my version, nor do I use any.

I have Safari 11.0.3 on Mac OS Sierra 10.12.6

This is very frustrating. Please help

Got the same problem again, googled my own question.

As it turns out, where exactly you right-click makes a difference. I happened to be doing it on a progress bar, and that gave me the "Save Page As" option, which results in zero-bytes downloads. However, if you right-click the timer or the controls, it gives you a whole other dropdown with some media-related options, one of them being Download Video As, which works properly.

So the answer is:

Cmd+S won't work;
pay attention where you click and make sure you save via the media content-related dropdown.


Cracked my ipad 3 a little. What should I do? I have cracked the screen of iPad only down the middle and a little on the side.

I have only had for about 6 months what should I do?

If you purchased the AppleCare extended warranty for your iPad before you broke it, you can get your iPad replaced for a fee of, I believe, US$60 from the Apple Store or an authorized Apple dealer. If you did not purchase the AppleCare extended warranty before you damaged your iPad, there is nothing you can do other than pay the full price plus labor for a replacement screen.

If you do get it repaired, or purchase a replacement, by all means buy a good case for your iPad to protect it from further damage.


mount encrypted sparseimage as home directory before login There are several ways (loginhook, launchdaemon etc.) to automount a sparsebundle before logging in, but there's none without writing down the password in plaintext for automount an encrypted sparsebundle.

Reading out the password from the keychain requires to unlock it before, therefore it's not possible to automate the process without user action.

#!/usr/bin/env bash -e
# SOURCE: http://risponderetag.wpdev8.com/p/35966.html

SPARSEBUNDLE_PATH="/Users/Shared/username.sparsebundle"
SPARSEBUNDLE_MOUNT_PATH="/Users/username/"
KEYCHAIN_PATH="/Users/username/Library/Keychains/login.keychain"

# Check existing states
if [ -e "$SPARSEBUNDLE_MOUNT_PATH" ]; then
    echo "Already mounted."
    exit 0
fi

# The mount command uses security find-generic-password
# to get the password from the keychain store
MOUNT_PASSWORD=$(security find-generic-password -w -D "disk image password" -l username.sparsebundle $KEYCHAIN_PATH)
printf $MOUNT_PASSWORD | hdiutil attach -stdinpass -mountpoint "$SPARSEBUNDLE_MOUNT_PATH" "$SPARSEBUNDLE_PATH"

For further informations see:

Can I mount an encrypted image BEFORE Finder loads?
http://techanic.net/2012/10/14/programmatically_mounting_encrypted_disk_images_in_os_x.html

Question (EDIT):

Are there other ways to pass a keychain password without using plaintext or user interaction?

So depending on the actual use case you are working with I may have an answer for your dilemma. If the location you are mounting to exists prior to actually mounting your disk, logging in before mounting the disk will create a default user filesystem with its very own login keychain. You can log in to a different account, mount the disk and save the password to the keychain, copy the password to the system keychain, and (after unmounting the disk) transfer the password to the unmounted user account login keychain. That item will exist prior to mounting so the disk can be automatically mounted on login. So you should be able to use that password with launch agents. Go into the password options and allow all applications to use it so you are not prompted for anything after it is in its final location.

If you cannot get launch agents to work, you can always write a short applescript app to refresh your finder to have the proper desktop to display and put it in the login items of the unmounted account so that it executes after the drive is mounted

delay 5
do shell script "killall Finder"

Put that into the /Users/Shared folder or something so it can be accessed before mounting and the mounting process does not interfere.

So that "kind of" does not require user interaction at least beyond the process of logging on. I hope that helps!


Why are my audiobook chapters out of order? Every time I add an audiobook from mp3 files via iTunes, the chapters are completely out of order even though they have the correct Track numbers in iTunes:

It's sort of the same solution to "Songs show up as individual albums in iOS Music app."

Make sure the files have the correct tags for album, artist, track, and title.

Then in iTunes:

1) Upload the first track to Music.

2) Upload the rest of the tracks to Music. (Or you can upload all the tracks including the first one -- iTunes will ignore the duplicate first track.)

3) Select all the tracks in iTunes, right click, then select Get Info > Options > media kind > Audiobook, and click OK.

iBooks should list the audiobook in order now.

The key is that the first track of the audiobook must be uploaded first.

P.S. You can also upload multiple audiobooks by doing steps 1 and 2 on the first audiobook, then repeat for the other books. And then select all and do step 3.

Or do step 1 on each audiobook, then do step 2 on all the audiobooks together in one go, then select all and do step 3.


Automator: Decode Decode64 selection and display output in a new TextEdit window I would like to display a service in a context menu for a selected text which is a base64 string. The service has to decode it to string with a base64 via terminal script and display an output in a new TextEdit window.
I have a service in an Automator app which has a script shell with input as arguments and command:
"$@" | base64 --decode

There is a connected "New TextEdit document action" to the shell script.
This display empty window
If I change the command to pbpaste | base64 --decode and I will copy a base64 string to clipboard then the service works correctly.
How to pipeline the input argument, which is a base64 selected string, to 'base64 --decode' command?

I know the question is about TextEdit, but for anyone who would rather do this in BBEdit, you can create a TextFilter to process the selected text.
#!/usr/bin/python

import sys

def decode64(myString):
    return myString.decode('base64')

input = sys.stdin.read()
print decode64(input)

If you want to use python3, it's even easier:
#!/usr/local/bin/python3

import sys, base64

input = sys.stdin.read()
print base64.b64decode(input)

Save this to: ~/Library/Application Support/BBEdit/Text Filters, then you can access it from the Text Filters menu.


MacBookAir kernel_task at 300% and rising I have a MacBookAir5,1 connected to a Thunderbolt Display.

When it gets very hot, PID 0 "kernel_task" uses ever more CPU until reaching 340% and slowing the Mac down sufficiently to make me restart it.

I found a proposed solution at this site but it says to "move the ‘plist’ file for the model identifier we discovered earlier out of that directory" which does not apply to me because my installation of Mountain Lion does not have a plist for my 2012 MacBook Air. system_profiler tells me that I have a MacBookAir5,1.

I tried a few things. I figured that since overheating appears to cause this, I should try not to overheat the poor Mac. However, I neither understand why Mac OS X' reaction to overheating is to use 340% of CPU time nor did I manager to keep the lid open and still convince the Airbook to use the Thunderbolt Display as its only display.

I tried running from battery, assuming this would make the CPU run slower and not overheat, but when I remove the power cable from the Airbook, the Thunderbolt Display just turns black, only recovering after several minutes when I reconnect the power cable.

What's going on?

Could you have a look at the 2 main system logs to see what your MacOS may be busy at.
With a terminal or an xterm window, the 2 following commands fired when the
problem appears may help you diagnose it:

tail -f /var/log/kernel.log

tail -f /var/log/system.log

To help anyone help you, next time this kind of problem arises, could you run the following command (within a terminal or an xterm window again):

top -o cpu

and grab a copy of the topmost 10 lines to put them back within your original question as here:

Processes: 50 total, 3 running, 47 sleeping, 243 threads                                                                                12:18:07
Load Avg: 1.40, 1.53, 1.28  CPU usage: 5.97% user, 7.14% sys, 86.88% idle    SharedLibs: 5044K resident, 9292K data, 0B linkedit. MemRegions: 10733 total, 769M resident, 15M private, 1479M shared.
PhysMem: 755M wired, 1363M active, 641M inactive, 2760M used, 1207M free. VM: 120G vsize, 1041M framework vsize, 2798981(19) pageins, 173(0) pageouts.
Networks: packets: 61207/73M in, 66123/6062K out. Disks: 877183/26G read, 171220/22G written.

PID   COMMAND      %CPU  TIME     #TH  #WQ  #POR #MREG RPRVT  RSHRD  RSIZE  VPRVT  VSIZE  PGRP PPID STATE    UID  FAULTS    COW    MSGSENT   MSGRECV   SYSBSD    SYSMACH   CSW      PAGEINS
1530  mdworker     17.1  06:56.12 4/1  2    82+  384+  39M+   16M    143M+  196M+  2586M+ 1530 1    running  501  1946213+  727+   881948+   219072+   6484219+  676187+   679401+  1914+
0-    kernel_task  14.0  07:55.29 69/4 0    2    757-  22M    0B     130M-  75M    2355M- 0    0    running  0    26279     0      33251333+ 32358872+ 0         0         10243109 0
1522  mds          12.6  14:55.33 9    8    118- 862   361M+  6052K  239M+  1334M+ 3736M+ 1522 1    sleeping 0    13373455+ 1286   12149111+ 6697348+  16039295+ 6938357+  3331251+ 1819924+
[...]

This is an example of a problem (no I don't have the same problem ☺) where my Mac was overheating like a fool.
Here the 2 processes involved are mds and mdworker and are caused by Spotlight indexing an external drive of 500 Go of backups
which I just plugged on.
The 2 involved tasks regularly topped to 200% cpu alltogether. Spotlight is very inconspicuous about this behind the scene heavy business. It does just display a small point at the center of its looking glass within the menu bar.

When I finally clearly saw what was happening under the hood, I decided to let spotlight finish its job, and one hour later, the temperature, the processors and the fans returned to a normal life.

Finally, since your OS (Mountain Lion) is Lion or more recent, I advise you to read this great explanation on sysdiagnose and if you feel comfortable reading system logs, try it.


Gtk2 randomly crashes I have a small program in C that I wanted to add a GUI to, so after looking around I decided to use GTK+. I installed gtk2 using MacPorts (version installed was gtk2 @2.24.18_1+x11).

I am compiling my program with

gcc -Wall -Wextra -pendantic `pkg-config --libs --cflags gtk+-2.0` myprogram.c -lpthread -o myprogram

There are no errors during compilation, but when I run it, after some amount of time I will get random errors appearing such as:

Gdk:ERROR:gdkregion-generic.c:1110:void miUnionNonO(GdkRegion *, GdkRegionBox *, GdkRegionBox *, gint, gint): assertion failed: (y1 < y2)

Gdk:ERROR:gdkregion-generic.c:337:void miSetExtents(GdkRegion *): assertion failed: (pExtents->y1 < pExtents->y2)

Assertion failed: (ret != inval_id), function _XAllocID, file xcb_io.c, line 529.

Fatal IO error 35 (Resource temporarily unavailable) on X server /tmp/launch-7OAilk/org.macosforge.xquartz:0.

Assertion failed: (! xcb_xlib_unknown_req_in_deq), function dequeue_pending_request, file xcb_io.c, line 179.

It looks to me like these errors are caused by a bug in Gtk/Gdk/XQuartz, is there any easy way to fix this?

I am running OS X Mountain Lion 10.8.4, XCode 4.6.2, and XQuartz 2.7.4 (xorg-server 1.13.0).

This seems actually to just be a result of my poor programming. I was trying to perform drawing from a thread which was not the same thread that called Gtk_Main, resulting in undefined behaviour and the various error messages above.


Where can I find statistics on download amount on OSX? I'd like to buy a mobile broadband service, but there's a limit in gigabyte per month I can download.

Before i buy, it would be great to know what i currently consume, bandwidth wise. Is this statisti available anywhere on a vanilla OS X system? Should I get an additional application?

Activity Monitor will show your network usage for the current session, but this gets reset when you reboot. However, if you're just looking for a rough estimate of how much data you use before you get your mobile service, this may suffice. After you get your service, you will probably find that your carrier has a way of checking via a website.

Regarding bmike's answer, I believe he's talking about iOS.


Switch Twitter Accounts in Safari? There's add-ons for Firefox to do this, switching twitter accounts without having to sign-in 3-5 times a day is really time saving if you have more than 2 accounts, CookieSwap do the job, is there any possible extension can do the job for safari?

There is no add-ons on Safari who is doing that.

Chrome :
https://chrome.google.com/webstore/detail/swap-my-cookies/dffhipnliikkblkhpjapbecpmoilcama

Mozilla :
https://addons.mozilla.org/fr/firefox/addon/cookieswap/

By the way, I think you have to post your wish here : https://www.reddit.com/r/SomebodyMakeThis/


How to determine wasted space by large chunk size on macOS RAID array? Working on a system that was created with a macOS RAID array with 256k chunk size for the members. The drive was originally to be used for video and image editing and storage, but has now become a multipurpose drive that has a lot of smaller files on it.  How can I determine the amount of wasted space on the drive that might be caused by this large chunk size?
If it is too considerable I believe I'll move these files to another drive and recreate the array with smaller chunk size commensurate with the usage now.

The chunk size of your RAID array does not determine how much space on disk a single file uses. Therefore no space is actually wasted due to having a larger chunk size than optimal.
The amount of space wasted is instead determined by the file system block size, which is independent of the RAID array chunk size. On macOS, you're typically looking at APFS, which uses 4096 byte blocks - or HFS+ which uses 512 byte sectors that are typically grouped together in allocation blocks of 4096 bytes (unless you have a RAID drive that is more than 16 TB, then it is larger).
You can determine your allocation block size by running this command in the Terminal (change the device node to match your disk setup):
diskutil info /dev/disk2s1

Unfortunately lots of "myths" and wrong information has circulated regarding RAID chunk sizes, as it has been seen as a form of "dark arts" to choose the right size. It is essentially hard to choose the optimal chunk size from a long list of options without actually benchmarking with the actual data and operations done on them.
However, in your case you actually have the type of setup you want. If you have many small files, you actually want a big chunk size on your RAID. If you have fewer, large files, you want a small chunk size on your RAID.
Unfortunately some have heard the opposite advice here. That comes from the fact that if you have a single disk, you want the opposite - i.e. for storing few, large files you want big blocks, and for storing many, smaller files, you want small blocks. This is because you want to minimize the number of block operations per second with large files to optimize throughput, whereas for smaller files, you want to optimize for latency by having smaller blocks and thus more operations per second.
However, on a RAID-system with many disks - things are ofcourse different. When dealing with large files, you want to distribute the workload evenly over many drives to optimize performance. This means relatively small chunks so that you can get many drives working for you at once - each with their own small chunk. On the other hand, when you're dealing with small files, you want to ensure that most operations can be completed by a single drive only, so you get the lowest latency possible. This means a large chunk size to ensure that your data is contained in a single chunk that can be processed by a single disk.


Set iOS Appstore notification default style When submitting to App store can we have the default setting on the notification center set to Alerts rather than banners?

No. Anything within Settings.app in iOS devices is in the explicit control of the user of the device. Third party apps are not given access to change system settings and cannot set them to specific values (either while submitting an app to the App Store or during first run or at any other point in time).