hdiutil: Creating case-sensitive image fs for Steam I'm attempting to use Steam on my Mac, but I set up my system to have case-sensitivity.

Steam has a thread for setting up an image file with a case-sensitive file system, however, I'm finding that it doesn't work.

Regardless of whether I create the sparse image from Disk Utility or from hdiutil, I get a mount-error.

hdiutil: attach failed - no mountable file systems

However, as far as I can tell I've created the file correctly?

#!/usr/bin/env bash
set -e

MOUNTPT="/.000"
SPARSEIMG="/Users/Shared/Steam/steam.sparseimage"

if [ ! -e "${MOUNTPT}" ]; then
    echo "sudo mkdir -m0777 ${MOUNTPT}"
    sudo mkdir -m0777 "${MOUNTPT}"
fi

if [ ! -e "${SPARSEIMG}" ]; then
    hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 32g "${SPARSEIMG}"
fi

hdiutil attach -mountpoint "${MOUNTPT}" -nobrowse "${SPARSEIMG}"

Can anyone tell me what I am not doing correctly?

UPDATE:
The image that's created mounts properly in Disk Utility, but does not with hdiutil

It's a better practice to leave all uppercase variables for the shell and use lower and or mixed case for user variables in scripts. You need to preface the hdiutil attach ... command too with sudo if using /.000 as the mount point.

Here's my version of the script which works.

#!/bin/bash

set -e

mountpt="/.000"
sparseimg="/Users/Shared/Steam/steam.sparseimage"

[ ! -d "$mountpt" ] &&  sudo mkdir -m0777 "$mountpt"
[ ! -e "$sparseimg" ] && hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 32g "$sparseimg"

sudo hdiutil attach -mountpoint "$mountpt" -nobrowse "$sparseimg"


Does Health.app intelligently count step from multiple sources? I recently bought an external tracker to track various activity and I wonder, whether I should disable tracking on my iPhone?

E.g. let's say my tracker reports that I made 1000 steps and my iPhone reports that I made 850 steps within same period (carried both devices together). What will be the result score?

See answer in this thread, and official Apple KB item here.


Stickies App Stopped Remembering Note Position I'm in OSX 10.10.2 and like to use Stickies (as a quick text dump before moving on). I have perhaps 100 notes and everything was fine until recently when the app stopped remembering the position I had dragged a note to.

I tried removing a fair number of notes but the problem still persists - drag a note, switch app and come back, the note is back where it started. Restarting doesn't help.

I can't see any other issues with the app.

Is there anything I can try before rage-quitting and switching to real post-it notes?

Try this:

Quit Stickies
Open a Finder window
Navigate to ~/Library/Saved Application States/
Look for com.apple.Stickies.savedState and Trash it
Relaunch Stickies

Hopefully that helps. :)

NOTE: This will reset the positions of ALL your current Stickies.


How to configure Mac screen sharing to ONLY listen on localhost? I'm tunneling through ssh, so I would prefer screen sharing to only listen on local host for additional security. Is there a configure file I can edit to specify that ?

You have to execute this in Terminal:

sudo defaults write /Library/Preferences/com.apple.RemoteManagement.plist VNCOnlyLocalConnections -bool yes


How to change encoding in Mail in OS X Mavericks? Normally I would open Mail.app, click Message → Encoding → [One of the Cyrillic encodings]. But since the upgrade I don't see text encoding option in Message menu.

How to change to use one of the Cyrillic encodings?

It seems you're not the only one with this problem.

I found a KB article on Apple's website that clearly specifies that Message > Text Encoding should be available in the Mavericks version of Mail:

http://support.apple.com/kb/PH14955

It says "Mavericks" in the title and is current as of Nov 6, 2013.

I've filed a bug report letting the OS X team know.


Change / correct desktop to display mapping I have a Mac Book laptop with Mojave. I use two desks (in different location) each having two Dell monitors that I connect via display port to the laptop.

It works well, however when I switch between my desks the desktop are mapped to different monitors. The windows and icons that were on my left monitor at my other desk are now on the right monitor, conversely the windows and icons that were on the right monitor are now on the left one.

Note that the display arrangement is correct, I can move my mouse from one screen to another in the same way that they are physically set (which is the same at both location).

Hence my question: how do I fix the desktop (which contains windows and icons) to screens to have the window placed in the same way regardless where I work?

It looks which desktop is map to which screen depends on the port the screen is connected to. The (retro) Mac Book pro that I have has two display ports. I must be consistently inverting in which port I input the cables from one location to the other.


Does Time Machine reserve additional disk space? I have a 1.25TB partition that I use for Time Machine backups. When I am in the system preferences for Time Machine on my Mac, it states there's 525GB of 1.25TB available. But when I browse to the partition, there's only two sparse disk image bundles present (one for my wife's laptop and one for mine), and the total size between the two of them is only 83GB. So why does Time Machine think there's already almost 750GB of disk space already being used? Does the Time Machine partition reserve space for future use and adjust the report of available disk space accordingly?

edit

Here's the (relevant) output from df:

Filesystem                                         Size   Used   Avail    Capacity   iused     ifree       %iused  Mounted on
...
//foobar@Extreme._afpovertcp._tcp.local/TIMACHINE  1.1Ti  764Gi  401Gi    66%        200229312 105076638   66%     /Volumes/TIMACHINE-1

Time Machine does an incremental backup. Thus it doesn't delete saved filesystem-objects that are changed on the source, but rather adds them up. Time Machine offers an interface that let's you browse through your backup history. You can access it through context-menu of the Time Machine-icon in the menu bar. If it ain't there, you can activate it in the system preferences.


How can I set up a virtual machine on my MacBook Pro? Ideally, I'm looking for free or low-cost solutions...  I'd like to test out a variety of operating systems (windows, linux, mac os, etc).

Any help is appreciated!

You could try VirtualBox.

From its webpage :

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).

Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7), DOS/Windows 3.x, Linux (2.4 and 2.6), Solaris and OpenSolaris, and OpenBSD.

VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Sun ensures the product always meets professional quality criteria.

I'm using it since I realise I didn't have to pay for having a good virtualization software on Mac OS X.

I can tell you it works really well, it's easy to setup and very stable.


Native Youtube app suddenly stopped working on iPad 1 It's been some weeks now, whenever I try to used my Youtube app, it tells me it's impossible to connect to Youtube. Since it's an iPad 1, I have had trouble finding information online.

Did Google or Apple stop supporting the app? Is it finally obsolete? Is there another app I could use that works on iOS 5?

Just to be clear, I did not tinker with my device. I did not change its parameters, I did not jailbreak it, it connects to the Internet just fine and I've tried the app on different Internet connections. Also, this is not a login problem, the app just refuses to let me browse videos, whether I'm logged in or not.

Thanks for your help.

Solution (Seems Bullet Proof)

Note: It is not a network issue, it is software.  Native YouTube App worked on 3st gen iPhone OS 5.1.1 on same network where iPad 1 OS 5.1.1 did not.

I tried all suggestions found on internet and after 2 days I found no more options to try. This issue goes back years and no help from Apple! F..kng Frustrating!!!

But I learned enough from those suggestions to come up with this solution below.

Warning: I have only tried this with (2) iPad1 (mine and a friend) which is why I wrote "seems" bullet proof.  Also, you must only use the PC which is tied to your device.  The native YouTube device will be repaired BUT not all of your other apps will be restored if you use a different computer. If this happens, then simply reinstall each app on your device through the app store. (When I did this on my friends iPad the apps had not lost their data...Woo Whoo!)

Let's Get Started.

Backup your iPad 1
Download legacy OS ( In my case it was OS 5.1.1)
Easiest way is to open it in iTunes rather than save it to your computer
Plug your device in and open iTunes.
When your device appears, click on restore. It should now display the version of the OS you just downloaded.  (When I first tried this, iTunes wanted to upgrade my iPad 1 to OS6.1 which deletes the native iTunes app)
When the reinstall is complete iTunes should ask you if you want to restore or configure a new install. (tell it to restore the copy you saved in step 1)
Enjoy a fully functioning Native YouTube App, with Favorites restored as well.

No guarantees of course, but I hope this helps.


Mac OS/X won't let me mkdir /usr/share/tomcat6, even as root Running MacOS Sierra (10.12.6)

me $ sudo su root
sh-3.2# bash
bash-3.2# pwd
/usr/share
bash-3.2# mkdir tomcat6
mkdir: tomcat: Operation not permitted
bash-3.2# chmod g+w /usr/share/
chmod: Unable to change file mode on /usr/share/: Operation not permitted
bash-3.2# chflags nouchg /usr/share/
bash-3.2# mkdir tomcat
mkdir: tomcat: Operation not permitted
bash-3.2# chmod g+w /usr/share/
chmod: Unable to change file mode on /usr/share/: Operation not permitted

I have a web app that expects to find log files in /usr/share/tomcat6/logs/.  Since such a directory doesn't exist, I'm attempting to create /usr/share/tomcat6, and then make a soft link from there (called logs) to the actual logs directory.

How do I defeat OS/X and get my way?

That's because the /usr folder, with the exception of /usr/local, is protected by System Integrity Protection (SIP).

Check this Apple support page for more details on SIP. This answer gives details on how to disable SIP and more info.


Weird folder setup in Big Sur compared to Mojave. Lots of questions I just upgraded to Big Sur from Mojave.
Why are there 3 Applications folders in Big Sur?

One listed on main hard drive which seems to contain everything
Another in system folder: only some programs here. These are also in main folder
For the third go to System/Volumes/(hard drive name)/   all apps in this folder.

In this same folder I see the all the folders and files from my previous Mojave system. Should they be there? What do I do with them? Weird place to store files.

Everything is correct.  This is all due to the split of the system volume (Macintosh HD or whatever you called it) into a read-only volume and a read-write volume.
Start by looking at the disk with Disk Utility.  Press Command-2 (or tick Menu -> View -> Show All Devices).  You should see something like this (the names will be different):

Within the APFS container you can see two volumes.  In myself case BethSSD and BethSSD - Data.  In what follows replace these with your own system volume name.
BethSSD is the read-only (highly protected) volume created by the macOS install and has the same content same on every Mac with the same version of macOS.
BethSSD - Data is a read-write volume and contains everything not part of the read-only volume. As well as your files, it includes all the application you have installed.
So we have two volumes and both will have applications - so Finder does some trickery to show them as one.
Taking your three locations (but in a different order) and a fourth:
2 The applications on the read-only volume are the Apple macOS applications and can be seen in /System/Applications.
4 (what you have not seen): In Terminal do ls /System/Volumes/Data/Applications. Here you will see all the applications you have installed - but none of the inbuilt macOS apps.
1 and 3. macOS combines the two locations above into one using "firmlinks". These are what you are seeing as/System/Volumes/<name>/Applications as well as /Applications.
I hope that helps.  To go much further requires much mind bending!


Install XPDF in Mac/OS How we can install XPDF via Mac Ports? Or if another methods for the installation of XPDF in the Mac/OS platform exists?

You can install it using homebrew too.

First you need to tap homebrew/x11:

$ brew tap homebrew/x11

Then you can easily install it with:

$ brew install xpdf


Download 'El Capitan', 'Mavericks' or 'Yosemite' from external link The HDD of my MacBook Pro (2012) dies and I bought a new one. The problem is that I don't have another Mac to download the OS from Apple Store...

Someone know from where can I download the OS El Capitan, Mavericks or Yosemite to install it and then download 'El Capitan' and from Apple Store and make a clean installation?

If you've updated your MacBook Pro with the newest firmware update you may start to Internet Recovery Mode and reinstall the original OS X (probably Lion).

Install your new HDD
Detach any external drive (especially any external Time Machine backup drive).
Restart to Internet Recovery Mode by pressing alt cmd R at startup.
The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot to a recovery netboot image which usually is loaded from an apple/akamai server.

I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.
In the opening window choose Disk Utility.
Partition your drive: 1 (or more) partition, GUID partition table, Journaled HFS+.
Quit Disk Utility and open Restore OS X
Choose your new volume to install OS X there.
After successfully installing and configuring OS X, open App Store and install the latest OS X (El Capitan).


How do I display text in the middle of a dialog as well as a new line? I am currently making an AppleScript and would like to know how to do the following things.

Display text in the center of a display dialog
How to create a new line inside the dialog

To create a second line use \n or just hit enter when you want the new line:

display dialog "Test\nTest2"

or

display dialog "Test
Test2"

About the center alignment, I think that is not possible.


Why does Notes only show a sub-set of the Share extensions enabled on my Mac? I'm really enjoying the new version of Notes.app, now that I can set the text size to something I can read. But one aspect continues to bug me, and maybe it's some setting I haven't found. The first image above shows the list of apps in my Share menu, as listed in Safari, but in Notes it is a smaller list.

I would like the 'Add to Together' share item to be available to me in Notes.

It's up to the individual share extension developer to tell the system which inputs are compatible with their extension, and to then implement the necessary code to be compatible with each.


Can I force AirDrop to work on High Sierra without WiFi hardware? Note - my IMac doesn’t have a functioning WiFi card.

The workaround to this before High Sierra was released now doesn’t work for me without a Wi-Fi Card to enable AirDrop.

*additional information: My Wi-Fi Card was removed or disabled due to damage. AirDrop continued to work just fine over ethernet. The lack of a Wi-Fi Card might be what is causing AirDrop not to enable it self in High Sierra.

Is there any third-party app or system modification that performs the same functionality on 10.13?

Please note that my answer has not been updated after it was made clear that the Wi-Fi hardware had been disabled/removed.

You can add AirDrop to Finder favourites by going to Preferences->Sidebar and ticking the box next to AirDrop.

If it's missing from there, you can reset the Finder settings by deleting the following files:

~/Library/Preferences/com.apple.finder.plist
~/Library/Preferences/com.apple.sidebarlists.plist

Log out/reboot/force quit Finder to reload the settings.

The Apple support page says AirDrop is supported on 2009 and newer models


iOS8.1.3 will not update I have the iphone 6 and it will not update past the current OS 8.1.3

The process gets as far as the terms and conditions screen and will not go any further.

Have tried turning the phone off and on but still the same.
Have also done the two button reset but still no joy.

The next solution to try might be to backup/restore your iPhone.

The Apple Store can help you with this, but probably not free of charge unless your iPhone is under warranty.

Fortunately, you can do it yourself, but you'll need to be able to log into iTunes with the same Apple ID that is used to identity you on the iPhone on a computer, and you'll need to be able to connect to that computer using a USB adapter cable.

If you can do that, then here's a pretty good description of the process:

http://www.uberphones.com/2011/05/restore-your-iphone-and-keep-homescreen-organized/.


How do I lock my screen without making it sleep on macOS 10.11.3? I tried control+shift+power button as well as command+shift+power button. Neither seem to work.

You can set up a hot corner for screen saver, and have the security settings to require your password immediately after the screen saver starts. This means when you go to leave the computer, you just move the mouse to a specified corner of the screen and BAM it's locked.

First, you would open System Preferences, and then go to "Desktop & Screen saver". Then click the "Screen saver" tab in the top middle.

Click on the "Hot Corners" button in the bottom right. Here, you can select a corner of the screen to attach an action to.

I'd suggest one of the bottom corners for this. Since there are menu buttons in both top corners on a Mac, you don't want to accidentally trigger the screen saver every time you want to open the Apple menu or Notification Centre. I have the bottom left corner on my set to display sleep, but you can choose "Start screen saver" for a corner as well.

Second, you will need to go back to the main System Preferences page, and click "Security & Privacy". In the General Tab, you can tick the box for "Require password X minutes after sleep or screen saver starts"
The "X minutes" bit is a drop down box and you can choose from Immediately or 5 seconds, up to 8 hours.

Now whenever you want to lock the screen, just move the mouse right into the corner you selected before leaving the computer and when someone else tries to use the computer, it will ask for your password.

Edit Jan 5th:
As of High Sierra (10.13), there is an option in the Apple Menu to lock the screen, which does not cause the system to sleep. Works a charm. You can also press the Control, Command and Q keys as a shortcut


Open Firmware Password complexity I couldn't find an Apple doc stating Firmware Password complexity limitations, e.g. length and allowed special characters.

Does anyone know if Apple states this information somewhere?

I don't want to be in a situation where I try to enable a complex password to find out that for some reason I'm locked out and I need to turn to Apple.

Apple Support Document HT1352 states:

  Use a secure password that contains both numerals and letters in the
  first eight characters.

I assume from this statement that OF ignores the 9th and succeeding characters in the chosen password, but I haven't tested to see if this is the case. Further down in the document, an image of the Firmware Password Utility window states unambiguously that passwords composed of letters and numbers only should be entered:


Can a mac be infected by a microsoft trojan? My friend owns a Mac with Microsoft Office installed and executed (with macros enabled) a trojan horse, AFAIK a W97M/Downloader variant. By fetching some information from the wild, that trojan usually tries to install some executable and/or script file specifically crafted for a Windows OS.

My questions are:

is it correct to assume that this kind of threat is mitigated by being run on a Mac OS?
Is it enough to say him to just remove the doc file?
Any suggenstion for handling this kind of malware?

I'd like to avoid installing a malware removal tool as I have absolutely no experience and I'm fearing of worsening the situation.

It seems that this particular trojan horse works by downloading and then executing an .exe file. Those files are not executable on macOS (in general), and thus wouldn't work.

However, if you copy the .exe file to a Windows computer, open it from Bootcamp on your computer or copy it to a virtual machine running Windows on your computer - then you could potentially execute it and get infected.

Note that there is a (slight) risk that the .doc file you've received was specifically tailored for macOS. I haven't heard of such a variant of the W97M/Downloader, so it is probably not the case.

I would advise removing the .doc and the .exe (and other files downloaded) - and then running a full virus scan. If you have backups of the machine, I would also advise comparing your current hard drive contents with the contents of the backup to detect any other alterations that might have been done.

The best advise regarding these types of malware that comes through email is simply to never open attachments in emails, unless you have verified that the email was sent by someone you know.


Can connect to router but not internet My MacBook (El Capitan 10.11.2) one day cannot connect to the internet via wifi. It work solidly beforehand.

My router setting has not changed. Nor have any device white/black-listing.
Other devices can connect to the router and internet fine.

ping 192.168.1.1 works
nslookup stackexchange.com works
nslookup stackexchange.com 8.8.8.8 fails
ping stackexchange.com times out

Interestingly if I connect to the Router's wifi guest, it works fine.

So a desktop that's connecting to the router via ethernet cable experience the same exact problem! Many other devices operated fine. This allow me to pinpoint the router is messed up somehow.

A power down restart on the router fixed everything.


Sending and receiving text messages (SMS) over iPhone 5 with Bluetooth from Win7 I have tried to connect my iPhone via bluetooth to my Windows 7 PC.
After following some suggestions online, I updated the Broadcomm drivers from here: http://www.broadcom.com/support/bluetooth/update.php

The iPhone now connects, and I was surprised to find an interface for sending messages (MAP MAS-iOS)

As well as the option to connect to the device to send SMS messages:

When I pressed Connect I got a functional little interface that shows the battery and reception of my phone:

However, when I try to send a text it keeps disconnecting. I can't identify any specific errors.

Has anyone managed to get text messaging via iPhone to work? I couldn't find anything online that shows success (or failure) and I feel like I am very close...

The iPhone doesn't support sending text messages over bluetooth (for security purposes according to apple).


Is there a way to set multiple artists for one song? I have an album that contains many songs, some of which are performed by several artists.

I do want all the songs to appear under one album in the albums, and when I am browsing by artists, so under each artist I should see this album and the songs he participated.

How do I set more than one artist on a song?
How do I make it appear in the library the way I described above.

There is no easy way to do this, you only have one artist field per track.

What you could do is listing the name of all artists in the artist field and then create smart playlists with rules for "Artist contains".


On Mac, ⌥ S types ß (beta). What about alpha? I can use ⌥ + S to type the greek letter ß (beta) in any application, which is very useful.

However, what about poor α (alpha)? Is there a shortcut for it?

Currently, I either copy & paste it from another source or switch the keyboard to greek temporarily. Both methods take a lot of time, and copy & paste often results in formatting problems as well (the source format is preserved).

Is there a shortcut to quickly type alpha, or a way I can create it (through an app or messing with hidden system settings for example)?

I am using OS X Yosemite 10.10.5

ß isn't beta. It's the (german) sharp s. The greek beta looks like this: β.

The fastest method probably is:

enable the greek keyboard layout permamently in System Preferences -> Keyboard -> Input Sources
defining and enabling a free keyboard shortcut in System Preferences -> Keyboard -> Shortcuts -> Input Sources -> Select next source in input menu (e.g ShiftAltSpacebar)

To type α/β/γ/ε etc., you just have to switch the keyboard layout with ShiftAltSpacebar, hit A/B/G/E etc. and switch back to your common keyboard layout with ShiftAltSpacebar. If you have more than two keyboard layouts enabled (e.g. US, Greek, Hex) you may add a second keyboard shortcut "Select previous source in input menu" and hit that one to get back or you have to rotate through all your layouts with the "Select next source in input menu"-shortcut until you reach your common layout again.

Karabiner/KeyRemap4MacBook offer a remapping of the right Option/alt key to temporarily switch to the greek keyboard layout in the presets (the greek keyboard layout has to be enabled):

In Lion this doesn't work properly and interferes with Spotlight. I had to turn off the Spotlight shortcuts in System Preferences -> Keyboard -> Shortcuts -> Spotlight. One might add a customized remapping by modifying a copy of the original source to get it working without disabling the Spotlight shortcuts:

<?xml version="1.0"?>
<root>
  <item>
    <name>Change input source temporary</name>
    <item>
      <name>Change input source to Greek while you are holding down right option key.</name>
      <identifier>remap.change_input_source_temporary_greek_option_r</identifier>
      <autogen>
        __KeyToKey__
        KeyCode::OPTION_R,
        KeyCode::VK_NONE,
        Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::VK_CHANGE_INPUTSOURCE_GREEK, KeyCode::VK_WAIT_100MS,
        Option::KEYTOKEY_AFTER_KEYUP, KeyCode::SPACE, ModifierFlag::OPTION_L, ModifierFlag::SHIFT_L, KeyCode::VK_WAIT_100MS,
      </autogen>
    </item>
  </item>
</root>


How can I restore file permissions to get my Mac booting again? Out of curiosity, I set the permissions on my hard drive from "everyone" to "no access". The drive then turned into a blue folder with a red circle on it. I restarted and now I’m stuck at the gray screen with the Apple logo. What can I do to get it back to normal?

You should be able to do the following:

Boot up while holding the "Option" key (or command + R for lion and mountain lion users
Since this is a Lion (or later) system, one of your boot options is "Recovery" - pick that
Once the recovery partition boots up, go to the menus and select "Disk Utility"
Find your Macintosh HD drive in the list on the left, select it
Go to the First Aid tab
Select "Repair Disk Permissions"

This will take a little bit, based on the size of the disk, but you'll be up and working. After the permissions are repairs, it's a good practice on HFS+ (your filesystem) to choose "Repair Disk" also.


My Today Extensions in El Capitan are all missing I was using my Mac over the weekend when I decided to change the song on iTunes from the Today Extension in the sidebar. I swiped to bring the sidebar into view and

Hmm... not there (also no Weather, etc.) OK, I'll open up the Edit interface and

ok, nothing there either. I'll just open up "Extensions" in System Preferences and turn things on

Nothing there either (there should be a fourth entry on the left hand side for "Today Extensions")

I have a second machine at work that doesn't have these problems. Both on the same version of El Capitan.

In the interest of full disclosure I am running El Capitan 10.11.1 beta 3 because I didn't opt out of beta updates to the GM quickly enough (was on beta 1 when I first noticed) but like I said my work machine is on the same version/beta and doesn't have these issues. And I was on beta 1 for days before I noticed.

Any idea what I can do to get my extensions back?

(also, my Time Machine backup outgrew my hard drive so rolling back isn't an easy option)

Figured it out.

There's some solutions for Yosemite I found online but none of them worked for me.

Turns out part of the issue is that El Capitan introduces System Integrity Protection (SIP) which is causing the bug, or it's preventing the fixes from working, or something.

Anyway I got the answer from here. Basically you just

Reboot in Recovery mode (CMD+R at the chime)
From the recovery menu pick Terminal
Run this command to (temporarily) disable SIP: csrutil disable
Reboot into El Capitan
Verify that the extensions are back in the sidebar and in system preferences
Reboot in Recovery mode again
At the Terminal re-enable SIP with run csrutil enable
Reboot back into El Capitan. Everything should still be back and all is well.


How to have "say" wait when used in a series of pipes? I'm trying to figure out how to be notified that multiple stages have been reached in a series of piped commands.
For the sake of discussion, lets say I have a command like so that any part of it could take a long time. I want to be notified when each "stage" has completed by having the script say something.
netstat -a | stage_complete.sh "netstat" | grep -v WAIT | stage_complete.sh "grep done"

where stage_complete.sh is a simple bash script to say the argument text, and pass stdin to stdout.
stage_complete.sh
OUT=$*
say "$OUT"
cat /dev/stdin

This idea works fine - except that say doesn't "wait" for the word to complete - it just starts to say the phrase, and then immediately continues on, so if my commands run quickly, then it says "netstat" and "grep done" at the same time, overlapping each other.
How can i make say wait? or have it queue up text, and only say it once the previous text has completed? Note that I've noticed that commands like so wait for each other to complete:
say one && say two && say three
but can't see how to make that work in my pipes!

Turns out all I had to do was consume all of stdin at the start of my script... I don't want it to process stdin as it's received, but when the entire previous command in the pipe chain completes.
So my stage_complete.sh script is simply this, which works for my use case!
stage_complete.sh
#!/usr/bin/env bash

OUT=$(cat -)

MSG="$*"
say "$MSG"

echo "$OUT"

Note: I figured this out by asking the question in another stack exchange (unix), over here


Improvements of the iPhone 6 over the iPhone 5s All,
I have (at work) the choice between a:

16 GB iPhone 6 (A1586)
32 GB iPhone 5S (A1457)

I'm concerned about the smaller capacity of the newer phone.  I do usually run out of space on my phone.

Obviously the screen is bigger on the iPhone 6.  Are there any other notable benefits that would lead me to pick the smaller capacity newer phone, such as:

Processing power
Hardware features
Software benefits/incompatibilities

Appreciate your thoughts, and understand it's subjective to some.

Size vs features will end up being subjective.  Most notably the CPU in the 5s is the A7 and the 6 contains the A8.  Each generation of processor brings a jump in raw power. from A7 to A8 25% inc in processing and 50% increase in graphics with a 50% Reduction in power consumption due to new manufacturing process.  Each version of the iPhone typically come with better battery life.  However, If these are used then the life of the battery will depend on past treatment.  An iPhone battery will only respond to finite recharges and life diminishes over time and use.

Additionally the camera will always have improvements.  A great read on many iPhone cameras can be found at http://snapsnapsnap.photos/how-does-the-iphone-6-camera-compare-to-previous-iphone-cameras/

Motion sensor capability is about the same.

Finally, both phones will be supported by iOS 11.


How can I map the "Archived" folder to "All Mail"? I would like to map the "Archived" folder that's created when you Archive mail to the "All Mail" folder in my Gmail account.  How can I do this?

For some reason stackexchange isn't letting me comment on the approved answer.

In any case, jtbandes' comment is incomplete, you have to set the custom app shortcut as:

"Message>Move To>All Mail"

Note the lack of spaces between the words. This is critical; it won't work otherwise. Simply typing "All Mail" will trigger multiple, redundantly named menu items with the keyboard shortcut.

I've assigned mine to Command-Y to approximate the Gmail shortcut.

I learned this from a comment by LaraCroft_NYC at https://discussions.apple.com/thread/2572960?start=0&tstart=0


Terminal shows hostname from old machine, not new machine Right now I have a Mac Mini. I migrated macbook pro data from a time machine, but I didn't do it from the beginning of my startup. I used the migration assistance to migrate the data. However, I'm getting my macbook pro name in my terminal command line, why is that?

Name-Macbook-Pro:~ name$

Why am i getting this? I'm on my Mac Mini, I guess its from the migration but will it affect anything else? How do I change this?

That part of the prompt is the hostname (\h) by default. Normally changing the computer name from System Preferences also changes the hostname:

The settings are stored in /Library/Preferences/SystemConfiguration/preferences.plist:

<key>Network</key>
<dict>
    <key>HostNames</key>
    <dict>
        <key>LocalHostName</key>
        <string>Lauris-iMac</string>
    </dict>
</dict>
<key>System</key>
<dict>
    <key>ComputerName</key>
    <string>Lauri’s iMac</string>
    <key>ComputerNameEncoding</key>
    <integer>0</integer>
</dict>

This changes the system hostname:

sudo scutil --set HostName My-MacMini

It adds <key>HostName</key><string>My-MacMini</string> under System. If the system hostname has been set, changing the computer name or local hostname from System Preferences won't change the prompt.


What is Remote iCloud Backup? It was listed on a slide in the iOS 11 keynote. What does it do and how does it work? My best guess is that I can initiate an iCloud backup by signing into iCloud online?

https://imgur.com/a/JLfwe#2TjEs9c

It certainly looks like that. However, there seems no way to trigger it yet (maybe it will be added to a iOS 11.x future update).

There's no trace of it on iCloud.com but something appears if look up another device in iOS > Settings > Apple ID (top) > Another Device (Bottom)

In my case it only shows - and inaccurately says Last iCloud Backup: Never so it looks like it's not fully supported yet


Mounting cue/bin files There are many suggestions on the internet on how to use cue/bin files on a Mac.

Is there a native way of mounting cue or bin files and seeing them as Volumes in Finder?

Alternatively, are there any tools—in the vain of Daemon Tools on a Windows machine—that provide this functionality?

I would very much like avoid converting the files I have.

I use binchunker to convert .bin/.cue files to a single .iso file on my Mac. You can obtain binchunker via Homebrew or Macports.

Here's some more info from the manpage:

bchunk - CD image format conversion from bin/cue to iso/cdr

SYNOPSIS
       bchunk [-v] [-p] [-r] [-w] [-s] <image.bin> <image.cue> <basename>

DESCRIPTION
       bchunk converts a CD image in a ".bin / .cue" format (sometimes ".raw / .cue") to a set of .iso and .cdr tracks.

       The  bin/cue  format is used by some non-Unix cd-writing software, but is not supported on most other cd-writing pro-
       grams.

       image.bin is the raw cd image file. image.cue is the track index file containing track types and  offsets.   basename
       is used for the beginning part of the created track files.

       The  produced .iso track contains an ISO file system, which can be mounted through a loop device on Linux systems, or
       written on a CD-R using cdrecord.  The .cdr tracks are in the native CD audio format. They can be either written on a
       CD-R using cdrecord -audio, or converted to WAV (or any other sound format for that matter) using sox.

       It  is  advisable  to  edit  the  .cue  file to either MODE2/2352/2048 or MODE2/2352/2324 depending on whether an ISO
       filesystem or a VCD is desired, respectively.  The format itself does not contain this feature and  in  an  ambiguous
       case it can only guess.


MacBook Pro internal display resolution wrong I've got an early 2013 MacBook Pro with an external display connected via HDMI to the in-built port. The system shows that the resolution of built-in display (15-inch Retina) is 2880 x 1800, while the external display max reso is 1920 x 1080. So if I have a large picture / application on the external display, I should be able to drag it to the internal one and have still screen estate to spare. This isn't happening. Here are images of this very page, first on the external screen, then without resizing dragged to the internal one:

I can't change the resolution of either display in Display Preferences. OS is Mojave 10.4.5, and as far as I am aware everything is up to date. Can anyone suggest what's wrong, and what could I do to fix this?

This is the correct behavior. The actual resolution of the panel is 2880 x 1800, but macOS scales the UI to simulate 1440 x 900 @ 2x by default.

You can change the scaling factor in Display preferences to "create" more screen space. If you set it to the highest setting, 1920 x 1200, then you'll be able to drag a window from the external to the internal display in the way you're expecting.


Terminal "osascript -e" commands What commands can be used with the osascript -e argument?

I know of the command osascript -e "set Volume x" where x is 0-7.  Is there anything else I can use instead of set or Volume?  Or some documentation you could link me to?

osascript is a tool to execute AppleScript within a shell/script.

Here is Apple's introductory guide:
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html

Additionally, you can open Script Editor.app (in /Applications/Utilities if your on OS X 10.11).  From the menu bar select Window > Library to browse library documentation.


HD failure - recovery possible if system can't see drive? I've got a 2.5" SATA HD in an enclosure, plugged into a Mac Pro (trying to see if I can use Data Rescue II to recover anything). Unfortunately, my system is not seeing the disk, either in Disk Utility, nor "diskutil list." Does this automatically mean there's no way I'll be able to recover the files, and we should try a company that specializes in data recovery?

Before trying a data recovery company, you can try:

putting the disk in another enclosure, in case the problem is in the SATA/USB bridge
starting the Mac on another OS, such as a Linux Live DVD, which comes with other disk utilities, including HFS+ read/write.


My MacBook Air won't connect to wifi I bought a new MacBook Air and was able to connect to the internet at first but now it won't connect.  I have other devices as well as other computers on wifi but my Mac won't connect.  When I try and click on the wifi, it tells me that it can't be joined.

How can I troubleshoot?

Option click the wifi icon in the menu bar and select Wireless Diagnostics.

Follow the instructions and post a second question if you get stuck with a specific step or can't narrow down the issue.

Also, carefully read the help guide on how to be specific and show how your research such as what version of OS X and what router is not working as expected.


How do I change the UI language in Snow Leapoard? I'd like to change my MacBook's languages of the UI. How would I do that in Snow Leopard?

Open System Preferences, and then Language & Text. Drag the language you want on top and then log-off (or restart) your computer.


Some Application keeps creating folders I opened a write-protected and locked PDF-file with the Preview app. Originally it was located within a folder at the desktop.
Afterwards, I moved the file within its folder to a different location.
After some time, the containing folder reappeared at the desktop but without any content in it.
It has been some days since then and I rebooted several times. The folder just keeps reappearing. I delete it, it somehow gets recreated by some application after some minutes.
I even unlocked the PDF-file, moved it back and forth. I also deleted the folder with sudo in the terminal. It says that "staff" is the owner. But it keeps reapperaring.
What could I do? Can I see why the folder was created?

I found the solution: It was the default download location of firefox. I changed it, deleted the folder, it never got recreated ever since.


Good Text List transformation Software Let's say I have a list of items like so:

default
cube
page
concave
zoom
linear
fade
none

and I want to change it to the following:

'default'   => t('default'),
'cube'      => t('cube'),
'page'      => t('page'),
'concave'   => t('concave'),
'zoom'      => t('zoom'),
'linear'    => t('linear'),
'fade'      => t('fade'),
'none'      => t('none'),

Are there any GUI based projects that could let me do this. I know the Mac has Grep Built in and there is also Text Wrangler that allows for GREP, but I find that these are too complicated (especially for short simple lists). Are there any GUI solutions?

The Unix shell is probably the best text list transformation software.

$ sed "s/^/'/;s/$/'/" <<< cube | awk '{printf "%-12s=> t(%s),\n",$1,$1}'
'cube'   => t('cube'),
$ sed -E "s/(.*)/'\\1' => t('\\1'),/" <<< cube | column -t
'cube'  =>  t('cube'),

Or write throwaway scripts in some scripting language:

puts "cube
page".gsub(/^.*/) { "'#{$&}'".ljust(11) + " => '#{$&}'," }

Even if there were GUI applications for tasks like this, it would probably be more useful to learn (or get faster at using) scripting languages or text editors.


Apple Keyboard with Numeric Keypad on Windows-7 I am using Apple Keyboard with Numeric Keypad on Windows 7 and its numeric pad is not working on windows 7, it was working OK on windows XP, what I can do to make it work on it too?

Hah! I actually use a mac keyboard as the normal keyboard on my windows boxes. I like the laptop-feel and the aluminium.

This is easy to fix.

Push "Clear".

The "Clear" key on the numberpad gets mapped to the "NumLock" key on windows.

If you want to fix the swapping of the alt and "Command" keys, KeyTweak works well.
It can also let you set the additional F-keys (e.g. F13-F19, which are not real F-keys) to be  whatever you want. I have them mapped as media keys (next-track, pause, etc...)


Can macOS Mojave run 64-bit version of Adobe CS6? I have ordered a new 27" iMac with macOS Mojave. I use 64-bit version of Adobe CS6.

Will macOS Mojave run it?

As noted in this answer, you should be able to run Adobe CS6 in macOS Mojave 10.14.

Another user shared their experience here and was able to use CS6 fine.


How to resize windows on OS X Is there a way I can resize the current app window with a combinations of keys? One of the things I really hate is when chrome resize to small window and then double click doesnt work for full window.

A very good app that I currently use is Spectacle. It is not an official app of the App Store, but it is open source and it does perfectly what you are looking for.
Just download the app, open it and it's done. There are a lot of pre-defined shortcuts for dealing with the window size the way you like, like in this pic:

As you see, if you click on the "glasses" icon, you can see all the shortcuts to minimise, maximise or just change the size of the window.
Of course, these keys are fully customisable. I really like this app.


Kernel Panics and Three Beeps Here's the log from my problem report. I'd really appreciate if someone could take a look at it. I should also mention that my computer has been freezing and beeping three times. I removed google drive from my computer as I had seen it caused problems with previous versions of OS X, and I reinstalled the OS. Neither has fixed the issue.

I have a 13 inch 2011 Macbook Pro. OS X Mavericks 10.9.5.

 Anonymous UUID:       92DD52E1-7A31-2D1C-094A-3C09E0C092A4

 Wed Oct  1 11:54:48 2014 panic(cpu 3 caller 0xffffff800f0dc43e):
 Kernel trap at 0xffffff800f1e2e9d, type 14=page fault, registers: CR0:
 0x0000000080010033, CR2: 0x00000000000deadf, CR3: 0x000000000870502b,
 CR4: 0x00000000000606e0 RAX: 0x0000000000000000, RBX:
 0xffffff801c5aea50, RCX: 0x00000000000deadf, RDX: 0x0000000000000000
 RSP: 0xffnfff80a9ea3d70, RBP: 0xffffff80a9ea3d70, RSI:
 0x000000004463b6a5, RDI: 0xffffff801c5aea50 R8:  0x0000000000000001,
 R9:  0x0000000000000000, R10: 0x0000000000000000, R11:
 0x0000000000000246 R12: 0x0000000000000000, R13: 0xffffff801c5aeaa0,
 R14: 0x0000000000000000, R15: 0xffffff801bfc88d0 RFL:
 0x0000000000010246, RIP: 0xffffff800f1e2e9d, CS:  0x0000000000000008,
 SS:  0x0000000000000010 Fault CR2: 0x00000000000deadf, Error code:
 0x0000000000000002, Fault CPU: 0x3

 Backtrace (CPU 3), Frame : Return Address 0xffffff80a9ea3a00 :
 0xffffff800f022f79  0xffffff80a9ea3 Model: MacBookPro8,1, BootROM
 MBP81.0047.B27, 2 processors, Intel Core i5, 2.3 GHz, 4 GB, SMC
 1.68f99 Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 384 MB Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz,
 0x80CE, 0x4D34373142353737334448302D4348392020 Memory Module: BANK
 1/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE,
 0x4D34373142353737334448302D4348392020 AirPort:
 spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom
 BCM43xx 1.0 (5.106.98.100.22) Bluetooth: Version 4.2.7f3 14616, 3
 services, 15 devices, 1 incoming serial ports Network Service: Wi-Fi,
 AirPort, en1 Serial ATA Device: WDC WD5000BPKT-75PK4T0, 500.11 GB
 Serial ATA Device: MATSHITADVD-R   UJ-898 USB Device: Hub USB Device:
 BRCM2070 Hub USB Device: Bluetooth USB Host Controller USB Device:
 Apple Internal Keyboard / Trackpad USB Device: FaceTime HD Camera
 (Built-in) USB Device: Hub USB Device: IR Receiver Thunderbolt Bus:
 MacBook Pro, Apple Inc., 22.1

Beeping usually indicates a problem with RAM, though I think it can indicate other hardware problems too.   According to Mac computers: About startup tones:

"3 successive tones, a 5 second pause (repeating): This indicates RAM does not pass a data integrity check."

Google Drive is probably installing a driver of some sort that is currently incapatible and causing problems.  Confirm that you're running the latest version of Google Drive's software and update your OS if any updates are available.

Google addresses this problem here with a link to an update which sounds exactly like the problem you're having.


I found 15GB large file in ~/Library/Safari called ContentBlockerStatistics.db-wal. What is that and what to do with it? I run out of space and when was looking what to clean up, I come across ~/Library/Safari/ContentBlockerStatistics.db-wal
The size is about 15GB, I tried to open it with SQLite db manager but it is asking for password.
What is this file about, why it is so large and what the password could be?
I'm running MacOS Big Sur.

TL;DR

~/Library/Safari/ContentBlockerStatistics.db-wal is the log file for ~/Library/Safari/ContentBlockerStatistics.db
It can't be read directly and gets emptied once you quit Safari.
~/Library/Safari/ContentBlockerStatistics.db can be read with sq3lite
If ~/Library/Safari/ContentBlockerStatistics.db grows too big it can safely be removed while Safari is not running

Using the standard tools of macOS
$ file ContentBlockerStatistics.db*
ContentBlockerStatistics.db:     SQLite 3.x database, user version 1, last written using SQLite version 3032003
ContentBlockerStatistics.db-shm: data
ContentBlockerStatistics.db-wal: SQLite Write-Ahead Log, version 3007000

So ContentBlockerStatistics.db is a database and the -wal file is the write-ahead log where all DB changes are written to while Safari is running. You can't browse the write-ahead log and the DB is locked while Safari is running. If you close Safari the write-ahead log content gets emptied.
$ file ContentBlockerStatistics.db*
ContentBlockerStatistics.db:     SQLite 3.x database, user version 1, last written using SQLite version 3032003
ContentBlockerStatistics.db-shm: data
ContentBlockerStatistics.db-wal: empty

To see what's inside ContentBlockerStatistics.db use sqlite3 (or any third-party MySql browser).
$ sqlite3 ContentBlockerStatistics.db
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
sqlite> .schema
CREATE TABLE FirstPartyDomains (firstPartyDomainID INTEGER PRIMARY KEY AUTOINCREMENT,domain TEXT NOT NULL UNIQUE ON CONFLICT FAIL);
CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE ThirdPartyDomains (thirdPartyDomainID INTEGER PRIMARY KEY AUTOINCREMENT,domain TEXT NOT NULL UNIQUE ON CONFLICT FAIL);
CREATE TABLE BlockedResources (firstPartyDomainID INTEGER NOT NULL,thirdPartyDomainID INTEGER NOT NULL,lastSeen REAL NOT NULL,FOREIGN KEY (firstPartyDomainID) REFERENCES FirstPartyDomains(firstPartyDomainID) ON DELETE CASCADE,FOREIGN KEY (thirdPartyDomainID) REFERENCES ThirdPartyDomains(thirdPartyDomainID) ON DELETE CASCADE,PRIMARY KEY (firstPartyDomainID, thirdPartyDomainID));

FirstPartyDomains seems to contain the domains you visited
ThirdPartyDomains seems to contain any domains referenced from the first party domains


Samsung SSD in older Imac (24" Alu)? Trim support? I have an older 24" iMac (Model 8.1 with Mountain Lion) and would like to extend its life a bit by adding a 256GB SSD.  Samsung SSDs seem to be coming down in price (and are possibly well reusable if the iMac retires at some point) and I've looked at the tear-down of the model which appears to be doable (no glued parts).

Does anyone have experience with putting 3rd party SSDs in an older machine?  And if so, will it support SDD TRIM?

I installed a (Samsung) SSD into a late 2008 Aluminum MacBook, which worked fine.

Apple does not automatically support TRIM for drives that aren't their own, but it can be enabled, for instance with this app: http://www.groths.org/trim-enabler/

Worked for me, just needs to be re-enabled after every system software update.

And yes, my MacBook is now a lot faster, so installing an SSD can definitely breathe new life into an old machine.


How can I find what program is preventing my Mac from going to sleep? My Mac is set to go to sleep after 5 mins of inactivity, and typically this works fine. But every week or so I find that my Mac no longer goes to sleep and nothing I have tried stops this behavior.

So far I have tried:

resetting the SMC and NVRAM a number of times
starting up in Safe Mode
checking that my Energy Saver settings have not changed (Sleep is still set at 5 mins and I have not opted to prevent the Mac from sleeping when the display is off)
quitting all running apps and using Force Quit to relaunch the Finder
updating all my programs to the latest versions
updating macOS to the latest version (currently macOS Mojave 10.14.5)

I have never installed anything to prevent sleep.

The only course of action that works is a full restart, which is highly inconvenient.

How do I work out what program is stopping my Mac from sleeping?

You’ve done a pretty good job so far of troubleshooting this yourself and there are many things that prevent sleep out of the box and by design.

What I would do next is exactly what you’re asking about - a targeted check to see if an application is what’s stopping your Mac from going to sleep.

To do this, follow these steps:

The next time your Mac isn’t going to sleep, open Activity Monitor
Click on the Energy tab
Now you’ll see a list of applications with a number of columns, one of which should be headed “Preventing Sleep”
Now check to see if any applications have a “Yes” listed in this column

IMPORTANT: If an application has an expansion triangle to the left of its name, make sure you expand it to confirm whether anything is preventing your Mac from going to sleep. For example, web browsers such as Safari often have multiple windows/tabs open and one of these could be preventing your Mac from going to sleep. However, this will not be obvious unless you click on the expansion triangle.

If so, you can force them to Quit by selecting them and pressing optioncommandQ
Now wait to see if your Mac will go to sleep

Notes:

If you don’t see a “Preventing Sleep” column at Step 3, then go to View > Columns > Preventing Sleep to display it.
If no applications are listed as preventing sleep, then let me know via the comment box below and we'll proceed with other steps.

For people that like command line options - there is an assertions log that shows what is going on - things that make the Mac think you are active, things that will block sleep, etc...

pmset -g assertions

This is the same information that the activity monitor shows, just more detail and you can see items come and go by letting the log run:

pmset -g assertionlog

One nice thing about command line is you can ignore everything that doesn't have "sleep" in it:

pmset -g assertionslog|grep -i sleep


Why is .bash_history periodically wiped? This is the second time it's happened.
I just tried grep-ing some historical commands and came up empty. a look at my bash history shows that it's practically empty. Like it's been wiped clean.
I use iTerm2 and on MacOS 10.13.6.
I see there's a .bash_sessions directory with some sessions saved but I guess this is probably an iTerm2 thing to preserve sessions for some reason or another.

There can be multiple reasons as to why this happens - I'll try to outline how it works below.

However, I can say that the other answer you have received here is not correct. HISTFILESIZE and HISTSIZE will not cause your history to "sometimes" being entirely wiped out or almost wiped out. Only by setting them to 0 you would get nothing in the files - but it would happen every time, and not by chance. In addition, what you describe with the file being "almost wiped out" cannot happen due to it being set to 0.

You're actually on to the right thing yourself by mentioning .bash_sessions. That is not an iTerm2 "thing", but rather how it works by default on a standard macOS install. Apple has built-in per-session history on top of a regular bash install.

This means that if you have multiple terminals running (for example multiple tabs), each of those will have a seperate history tracked in .bash_sessions. If you reboot your Mac and the terminal windows are restored, you'll find that each still have their own history - and only their own history.

When you close down a bash session, Apple's system will merge the history for that specific session into the global .bash_history file. Then when you open a new terminal (and thus bash session), it will start with that merged history containing history from potentially multiple sessions.

This is all handled by the /etc/bashrc_Apple_Terminal script.

Now that you know how it works, here are some possible causes for what you're seeing:

You may accidentially have removed the history yourself (history -c)
Your Mac could be infected with malware and/or hacked, and someone else is removing your .bash_history file
You have software installed that periodically empties/removes .bash_history

These reasons are not that likely, I would say.

Now there's one last possible cause:

There's a known race-condition in handling the bash histories. If you close down multiple bash sessions at once (for example closing down a terminal window with multiple tabs), you might loose part of or the whole history.

This happens if the computer is "slow" while reading/writing parts of the history. Basically how it works is that your currently history is read, the file is deleted/moved away, and a new file is created, where all the history lines are written to. If this process is running multiple times at the same time, you might see that one process removes the old history, the other process read an empty history, then the first process writes out the whole history again, and then the other process deletes that and writes out a very short history containing only few recent lines - as it didn't read anything in. This bug shows up as exactly what you have described.

The fix is simply to close one bash session at a time to let the system have time to write out everything correctly.


Java 8 appears to be installed but in fact is not (macOS) I downloaded  Java 8 from oracle.com, and  I installed it.
Nothing unusual.
But when I type java I get: No Java runtime present, requesting install.
And if I go to settings the java icon is there!

I recommend using jenv and Homebrew together to manage Java installations and environments, especially as you're working from the command line.

Install jenv

brew install jenv

Then install the java version you want, Java 8 is annoying bc it's not in Homebrew itself anymore, but this works

brew cask install adoptopenjdk/openjdk/adoptopenjdk8

Then add it to jenv

jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home

Then set it as the global java

jenv global 1.8

Now java -version is

openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

jenv has been very useful to me as a Java developer for managing and switching between all my different Java versions. It also conveniently lets you set versions specific to projects/directories with jenv local


Launch different apps based on file name (other than the extension)? I'd like to have different apps handle .jpg files based on a naming convention I'll use for the .jpg files. Specifically most will go to Xee, but ones containing thumb should instead cause VLC to be called with the same path and file name, but with .mp4 (or .mkv, etc.) extension.

Is there an existing script / app that does this? I'm guessing the way to do it would be to create a shim app (sort of like choosy) that handles the main file type based on extension, and then hands off to the apps you configure based on a ruleset.

Just create an Applescript Droplet to read the name and extension of dropped files and triage them with if statements. This script should get you started. Save it as an application, and then you can put it in your dock or some place convenient to drop files on it.

on open these_items
    repeat with i from 1 to the count of these_items
        set this_item to item i of these_items
        set the item_info to info for this_item without size
        set theName to name of item_info
        try
            set theExtension to the name extension of item_info
        on error
            set theExtension to ""
        end try

        if theName contains "thumb" then
            tell application "VLC"
                activate
                open this_item
            end tell
        else if theExtension contains "jpeg" then
            tell application "Preview"
                activate
                open this_item
            end tell
        else
            -- open with system default app
            tell application "Finder" to open this_item
        end if
    end repeat
end open


Mac at 100% CPU Usage when plugged into monitor I just got this Asus 1080p monitor and I've connected my Mid-2014 13-inch rMBP (2.8GHz Intel Core i5, 16 GB of memory, Intel Iris 1536 MB Graphics, running El Capitan 10.11.6) to it via HDMI. The Macbook is in a vertical dock in closed clamshell mode. It's plugged in with the screen off, and I've got a cheap Anker keyboard and Magic Trackpad 2 connected to it. When it's plugged in via HDMI to the monitor, whether the monitor is on or off, the CPU load is constantly at 100% with the fan spinning rather loudly.

Activity Monitor shows the CPU load is almost all from kernel_task, and ~3% user, ~97% system.

When I unplug the HDMI cable, the fan stops going and CPU usage drops immensely.

Is this behavior from my Macbook as unusual/harmful as I would think, and what can I do about it?

Edit: Google Chrome and Xcode are running significantly slower on the monitor than they do on my Macbook itself.

Edit 2: As soon as a posted this, my fan stopped whirring so rapidly (though CPU usage did not drop from 100), and Activity Monitor showed that CPU usage is about 15% each from 5 different Google Chrome Helpers (?) and only 1% from kernel_task. What on earth?

In the end, after I let Activity Monitor calculate things for a few minutes, it was Google Chrome Helpers causing the CPU load and not the connection to the monitor. I quit Google Chrome and killed its Helpers, then restarted Chrome about an hour later, and the problem fully subsided.

If the CPU load doesn't come from one of the apps, and really is only happening because of then monitor connection, see bmike's answer.


Can I manually put an external hard disk to sleep? Is it possible to manually put an external hard disk to sleep? Right now, I've already got "Put the hard disks to sleep when possible" checkmarked in the Energy Saver preference pane, and so they should sleep after 10 minutes of inactivity, but I'm wondering if it's also possible to do this manually whenever I want.

I just bought an external hard drive and it's already spinning constantly, compared to my current external which is completely quiet, so I'm wondering if I can put it to sleep when I need to to stop it from spinning all the time.

Not an exact answer to your question, but when using Terminal.app there is an option to even further reduce hard disk sleep time from 10 minutes to 1 minute, with this command:

$ sudo pmset -a disksleep 1


Mac OS "Go to desktop #" keyboard shortcourt I am looking for a shortcut to change desktop in Mac OS X (10.7.3)

I am used to awesome WM in which you can do + to go to desktop #

I am looking for a keyboard shortcut in MacOS X to do this. I tried to make one using jiTouch but I didn't succeed.

Note: I am not asking to show/display the current desktop, only moving between them directly by their ID.

I have 5 desktop and going from #1 to #5 can take some time especially with the sliding effects. this is a productivity killer.

Thanks for any help.

As defined in System Preferences > Keyboard > Keyboard Shortcuts, you can use ^N, where N is the number of the desktop, to move between desktops.


USB to Serial Adaptor works once for every reboot Update#2, After testing with different console applications, I think the conclusion is GNU screen coming with Mac OS X 10.11.4 has a defect causing this issue. Hope some dev can see this and help diagnose for a fix...

Update#1, Now I upgraded to the 10.11.4 and also upgraded cable driver... Issue still happens...help!!!

I have a USB to Serial Adaptor for connecting to CONSOLE port of switch/router and I use "screen" inside Terminal to connect. Recently I found the "screen /dev/cu.usbserial 9600" works only once for every system reboot. Here are the steps to replicate:

The output of "ls /dev/usb" shows the correct device.
Login to console of the device with "screen /dev/cu.usbserial 9600"
Press "Ctrl+A, Ctrl+K" to exit screen
(optional), disconnect/reconnect the usb to serial adaptor from laptop OR disconnect/reconnect the console cable from target device.
The output of "ls /dev/usb" still shows the correct device.
Try to connect to console again with "screen /dev/cu.usbserial 9600", the screen process will hang. Once that is happening, the screen process can not be killed via "sudo kill -9" and only be solved by complete power cycle. BTW, the laptop will also hang during reboot/shutdown, until I keep pressing on power button...
Once screen hang, The output of "ls /dev/usb" would show nothing.

Once laptop boots up again, I can connect with the same screen command and same scenario for step 2-3 above...

I have Mac OS 10.11.3 and adaptor is Micro Innovations branded (Prolific chip). I downloaded and installed/re-installed driver from Prolific site and no difference...

Any idea?

Firstly, does cu -l /dev/cu.usbserial -s 9600 work more than once? If not, how does it fail?

Because the second open blocks and does not die even with kill -9 it probably it is a driver issue with the call to open(2) getting the initial device handle blocking. The device open might block if the device is not in local mode and the CD input is low.

Some versions of those devices have hardware flow control bugs. You could try a hardware fix of looping RTS to CTS and connecting DTR, DSR and CD on the connector and just let the RX, TX and ground pins connect to the console port.

Another possibility is running stty clocal < /dev/cu.usbserial. This should make the device ignore control signals. This is worth trying from a different terminal while the second open is blocking.

Update:

You need to run cu with sudo so that it can write a lock file to /var/spool/uucp. If you have no contention for ports (unlikely on a single user Mac), you can change the lock directory path using a config file. Create an empty directory, then create a config file setting lockdir to that directory path. Something like:

lockdir /User/yourname/lockdir

Then run using a command line like this:

cu -I /path/to/conf/file -l /dev/cu.usbserial -s 9600


Export from Photo into Folders labeled by date shot First, just to get this off my chest, I used to have such a beautiful, simple, efficient system of cataloging my photos by date shot, whether from my professional Canon cameras or my iPhone. I did it all out of Lightroom. Then came the time when I could no longer import iPhone into Lightroom and this messed it all up. Then came the time when I could not import even into Photo and this created a nightmare that, if everything works as designed from here forward will take me months, if not years, if ever, to straighten out and at a tremendous loss of time. But Apple has trapped me and I am trying.

My last iPhone upgrade allowed me to finally be able to import from my phone into Photo (I always keep my phone updated) . This still requires a couple of extra, previously unnecessary, steps to go from there to put into folders I can catalog by day right along with my Canon shoots in Lightroom. When I export, the photos show up in folders with the name of the area where they were shot and there can be several such folders from one single day.

This just adds to the nightmare. Is there any way I can set it to export out of photo directly into folders labeled by date with no interference from folders labeled by location?

If I understand your problem correctly, have you tried importing the images from your phone using Image Capture rather than Photo?  You can then put them into whatever folder you like.


Restrict macOS from automatically enabling "Keep in Dock" after rearranging Dock icon I like to have many programs running and move around things as needed, but I hate keeping anything permanently in the Dock. As of now, I have to manually uncheck Keep in Dock every time I move an app icon and it's really annoying. I don't want to do that anymore. How do I disable that feature?

This has nothing to with "Most recent apps" as that's already turned off.

Also, this question has been asked before, but everything I've found is 3+ years old and no one has an actual solution. I'm really, really hoping that in the few years since then Apple added some basic customization.

This is the expected behaviour and has remained the same since the days of Mac OS X 10.10. There is no way to prevent it from happening.

It still stands true, as of this writing, with the current latest version being macOS Mojave 10.14.5.


Recovery: OS X Yosemite can not mount NTFS partition but windows can mount it in 10 minutes I have a Seagate GoFlex 2TB external HDD that stopped working one month ago. The head of this external disk seeks continuously and produces sounds even when it is not connected to the USB port.

On OS X Yosemite 10.10.5 it takes about 5 minutes to detect its hardware and show its icon in Disk Utility or in diskutil list. When my mac detects the hardware it shows Initialize/Ignore/Eject message and no more thing happens.

On Windows 7 it takes about 10 minuets (while the progress bar fills) to mount it. But it is very very slow on every operation. For example it takes 2 minutes to open a folder and so on.

If its partition is lost, why OS X cannot mount it? Is it a time out problem for OS X in mounting operation? How can i backup its contents with preserving folder structure faster?

If you can't back it up on OS X, then back it up on Windows. Then format it something else other than NTFS, as OS X doesn't officially support it. If you re-format it using Windows, you can choose the default FAT/exFAT option.


Find My iPhone shows device as 'Offline' My mom tried to track my iPhone 5 using Find My iPhone. My location services were turned on and everything was working properly. Then it said between a certain time that my iPhone was 'offline'. She thinks I manually went and turned it off, making me appear to be offline but I did not do this. It is the second time this has happened since I got the app last year. I need to know why this is happening so that I can explain to her I am not doing it.

Wow, Big Brother is watching! Contrary to popular belief, the iPhone's cell reception is not perfect, and from time to time you can and will "lose cell," and it will appear offline. This can happen when it enters its energy saving mode when asleep, though you should still receive calls. This can really happen any time you're not within a reasonable line of site to a cell tower, or even when switching between towers, and cell frequencies really don't go through wooded areas or mountains or hills all that well, and by that I mean "not at all." It is completely normal for iPhones and cell phones in general to lose cell connectivity when behind a hill from the nearest cell tower. Also, holding the phone wrong can cause it to lose cell, because just holding it will de-attenuate the antenna. And all cell phones have this feature.

Also, the A-GPS system iPhone uses is also not perfect. GPS itself is far from perfect, and really doesn't work all that well (read "not at all") unless you have a line of sight to 3 or more satellites. The 'A' part of A-GPS means "assisted" and you can read about what that means in the link above, and it mitigates some of the issues with GPS.

Using "Find My iPhone" to track family members is a little extreme. I think a more friendly way to have the same functionality is to use Apple's Find My Friends app. Try to talk Mom into using that instead, and then you can track her at the same time, too, quid pro quo.


How to edit sender information in Pages' letter template? When you create a letter in Pages it creates sender information in the upper right corner. How do you edit this information? If you click it, it just selects everything but doesn't give you a way to change the text.

You simply click the field you want to edit to select it, then type what you want.

For example, press ⌘N and choose Letters from the Choose a Template window and select Classic Letter.

Then in the upper right hand corner, click to select the name, and type in your name.

Repeat...


ImageIdentify.com in running processes Looking at ActivityMonitor, I saw a strange process with a URL for a name:

I went to that site, and yes it looks familiar I might have been there, once, a long time ago. Definitely not at the time that this process showed up, and even if I did - why would visiting a website trigger its own custom process?

Whenever safari loads a tab a new container is created with the name of URL showing in the process list that's the intended behaviour, and the container goes away when the last web worker belonging to that container terminates.

If the tab is gone what your likely experiencing first is a unintended side effect of a naive standard conform implementation of web workers API where a tread is essentially independent of the DOM tree inside the tab and will continue until it exits or the browser session is closed, unless the browser is aware of orphaned web workers and kills them.

OSX compounds this problem by not exiting sessions when the last safari window is closed, meaning that for most users the sessions last until reboot.


Stop switching windows when other app is loading Imagine that you open an app that takes several seconds to load like Photoshop and you don't want to just sit there so you move to your browser to check whatever. Now, as you interact with browser or other app OS X will move screen or switch active window to app several times during the start.

I understand that it is letting me know that app is turning on but I would like system to stop switching at any moment it likes while I am doing something else. Otherwise I have to just keep sitting around waiting until my initial app loads.

Is there way to stop this?

OS X already does this. If you open an app, then switch app before the window loads, the window of the second app will open behind the app you are currently working in.

Photoshop does not create standard OS X windows, instead using its own windowing system. This means that Photoshop windows and therefore the app itself does not abide by OS X windowing standards.


Quicker way to copy files to a set of different folders for classification purposes I think this is a pretty classic setup, hence I'm hoping for a solution here.

In the finder, I have a folder "pictures" containing 15,000 pictures.

For each of these pictures, I'd like to send it to a sub-folder of the folder "categories". For instance, if there is a picture of a boat, I want to copy (not move) this picture to "categories/boat".

Currently I have two finder windows open, one with "pictures" and one with "categories" and I drag&drop every single picture one by one, while holding the Option key (to copy instead of moving).

Doing this with a mouse or trackpad becomes tedious very quickly and is slow and error-prone. I am open to any suggestions, even indirect ones leading to an identical outcome.

The absolute ideal would be that I could assign keys 0..9 to each destination folder, then I select a picture in the Finder, hit "5" and it goes to the destination folder assigned to 5. But I must be dreaming, right?

For each of these pictures, I'd like to send it to a sub-folder of the folder "categories". For instance, if there is a picture of a boat, I want to copy (not move) this picture to "categories/boat".

I don't recommend this approach.

This just creates multiple, on multiple, on multiple duplicates of the same file.  Just doing a little bit of math, if each photo applied to just 3 categories, storing them in your method, the number of photos you would have goes up to 45,000.

What you need is Photo (or image) management software which is just a very specific content management system.  The way this software works is by embedding meta data into the photo (or in Lightroom's case, they create a library of meta data that gets associated with the file, never touching the file directly).  So, if you had a photo that fell into 5 different categories, you wouldn't have 5 identical copies of the photo, you'd have one with 5 different ways of finding it.  Several of these applications have "dupe finders" which is a feature designed to solve the problem of the same file in multiple places!

Here's a list of some popular Photo Management products.  I'm very familiar with Bridge and Lightroom as well as ACDSee from the 1990s and I recommend them wholeheartedly.  I have had some brief experience with the Open Source products (FOSS) and they look to be very promising but depending on your needs, YMMV.

Apple Photos (Included with macOS)
Adobe Lightroom
Adobe Bridge (Free with purchase of Photoshop or Illustrator)
Cyberlink PhotoDirector
Magix Photo Manager
ACDSee Photo Studio
Darktable (FOSS)
LightZone (FOSS)


Screwed up administrative name on sudo when trying to change usernames Disclaimer: I am NOT at all fluent in coding or its jargon, so bear with me.

I recently downloaded a software and wanted to remove it. I tried to do it via sudo on the MacBook terminal. I was trying to follow the advice from this website: http://osxdaily.com/2014/02/06/add-user-sudoers-file-mac/

Incidentally, I literally typed "username" instead of my actual username for my actual account. Now I can't even touch sudo or do anything with it.

I try to type visudo and it says "permission denied." I try to type sudoer and it doesn't give me the prompt to type the password like it did before and it doesn't respond to any input I place in, whether it is spam or a helpless help command.

I followed the advice here and it still doesn't work. Now I have two admin accounts. I am beyond lost now as to how to revert my sudo thing.

Edit: I ran the code ls -l /etc/sudoers and the results were -r--r-----  1 root  wheel  2306 May  7 02:21 /etc/sudoers

Inputed cat /etc/sudoers command. Embarrassing username from middle school inbound:

Reboot into Single User mode
Run /sbin/fsck -fy
Run /sbin/mount -uw /
Run vi /etc/sudoers (assuming you know vi, otherwise use nano)
In the "User privilege specification" part replace %awesomechris with %admin (the % is important)
Save and reboot

PS: The % identicates a user group, so creating a new user didn't help (even if you would have named it awesomechris instead of username)

PPS: Once everything is fixed, remove Admin rights from users who don't need it (make sure at least one is left). Then log in with an admin user, run sudo WHATEVER-IS-NEEDED-TO-REMOVE-YOUR-SOFTWARE and enter the password of the same admin user to confirm).


Is Snow Leopard Server a good candidate for everyday use as a main OS? Although similar questions have been asked before [1,2] non of them fully address whether OSX 10.6 Sever is a good candidate for everyday use on a top of the line computer. For the really lazy;

1 - Discusses on the importance of having a high spec computer in order for OSX Server to perform to its best.

2 - Discusses on the appropriateness of using OSX Sever in a software development environment.

Getting on to the nitty gritty, my question is more focused towards whether using the aforementioned OS is a good idea for an advanced used (not so much in network related subjects) that desires to do both Software Development, Image/Video editing, and setting up shared services such as; Calendars, Webservices (Wiki's + Websites) and email.

When I say top of the range, I refer to the recently released iMac configured to the following specs;

Quad-Core i7 3.4Ghz (Boost to 3.8Gz)
8 Gb of DDR3 RAM
2 Gb ATI Radeon HD 6970M
2 TB of storage. Partitioned 1:1 between Mac and Windows

In terms of internet connectivity I run a 50Mbps fibre-optic downlink with 5mbps uplink.

The reason why I believe OSX Server will be an option to consider for me is the fact I plan to work on a startup with a colleague (with no IT Background) but we live in different countries for now, so the ability of;

Having an easy to use wiki
The ability to create VPN for accessing NAS files
The option of remotely setting up business related software and beta releases on their PC
Facility for sync and collaboration (Mail, Calendar, and Document access editing)

seem to represent an added value between the two. I obviously understand that having the server setup in a computer that will be getting switched off and on will disable the services, but appart form that is there any other advantage or disadvantage I am unaware of?

If you are familiar with any software that possesses similar functionality to what am looking for, please feel free to put your suggestions forward.

To answer your question, you can work perfectly under Server (given the above machine) in fact, if you disable some of the services, the OS X will be very similar to the regular version. On the other hand, you can always rely on Google docs and calendars, Remote Desktop and even OpenVPN if you really need an internal network.

I mean, configuring the above (even on OS X Server) carries a lot of overhead, backup planning and maintenance.

Focus on your "startup" and leave the unrelated tasks to others. Will having a server at your place (with all the electricity costs associated) make your start up better? earn money faster?

Anyway, that's a topic for "startups". The answer is yes, that computer is more than capable to serve as a server for all those tasks and much more.


Weird OS X Terminal Bug: Cursor won't go back to end of line after backtracking I have an interesting problem: when I type something in the terminal as follows:

~ me$ hello<cursor>

and backtrack:

~ me$ he<cursor>llo

and then try to return to the end to continue typing, perhaps after fixing an error, I get stuck before the last character:

~ me$ hell<cursor stuck here>o

Anyone know how to fix this? I've tried looking around and changing the terminal to xterm instead of xterm-256-color, etc. but no luck. Any help is greatly appreciated!

Edit: I am using the arrow keys to move back and forth.

I know this is an old question, but I've been beating my head over this for a few days now and I've finally got it. It turns out the solution is simple: update bash to 4.3. The default bash on Macs (even Yosemite) is 3.2.

Install Homebrew with

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

then do

brew install bash

then change your default shell path (in Terminal Preferences) to

/usr/local/bin/bash

and that's it. Check your bash version with

bash --version

and as an added bonus, you can get mode indicators!

bind 'set show-mode-in-prompt on'

and it will show a + for Insert mode and : for Command mode.


Can't delete a greyed out app on iPhone 4S I can't delete a greyed out Google Translate application. It is there even if I try to delete it by holding on apps for longer time and click on the x button just above it, but it doesn't help me. I tried to delete it by closing my iPhone, not helpful. Then, I tried it to delete after resetting, not helpful. It is there. iOS 9.3.5 updated.

I think my experience will help somebody out there who has the similar problems. I finally managed to delete it by Settings -> General -> Storage & iCloud Usage -> Storage -> Manage Storage -> Click on the application, in my case it is Google Translate. Then press the "Delete App" written in red, there you go. I write it because I have tried many different ways none of them helped me. Thanks.


how to remove full my GMail "archive" for Apple Mail? After all the travails of Mail.app, I would leave it behind, not to let it touch my GMail messages again, and free up dozens of GBs disk space in the process.

However, simply unchecking "Mail" under System Preferences / Internet Accounts / GMail does not delete the local copies (and duplicates!) of previously downloaded messages.

I am a bit hesitant to try deleting messages manually, as a mistaken sync afterwards might instruct GMail to move all my mail to its Trash. What is a bulletproof way of removing my GMail history from Mail?

Thanks!

If you don't have other accounts in Mail.app, simply delete the entire contents of ~/Library/Mail/

If you do have other accounts and only want to remove your Gmail account, open the V2 folder inside the above path, and delete the folder relevant to the particular account that you want removed.


Memory test that fails with a different address each time I had problems (strange patterns on the display and reboots) with my Late 2011 Macbook Pro, so I ran Apple Hardware Test on my computer, and it found memory errors. The thing is that every time  I run the AHT, the error is slightly different. The first time, I got:

  4MEM/62/40000000: 0x83a65498

The second time:

  4MEM/62/40000000: 0x836dc298

I then swapped my two memory sticks and got this error:

  4MEM/62/40000000: 0x842e1198

I am assuming that the hex number is the address where the test fails…

It always takes about 13.5 minutes of tests for the error to appear. Rambler also found an error during one pass of tests out of two:

  FAILURE! Data mismatch at local BUFA address 0x000000012479b930, BUFB
  address 0x00000001c96da130 BUFA Data: 0xffffffff80000000, BUFB Data:
  0xffffdfff80000000

Memtest86 did not find any problem after 4 passes.

Because the error is different each time, I was wondering if I should suspect something else than a memory stick being bad, something like the memory controller.

UPDATE:

However, I am not getting any error message, if I run the AHT while there is only one memory stick in my MBP.

I haven't been able to find documentation of what these fields mean.

However, given that memory failures that I've seen and those posted by others all appear to be around "address" 0x842XXXXX, I suspect that this is not in fact the address. It may be the pattern being written to some address when the failure occurred.

The field where you have a value of 62 seems to be the only one that varies significantly. It may be that this value represents the address to some very course degree (eg. maybe 1-64 could represent one DIMM and 65-128 the other; or maybe odd numbers vs even numbers).

It would be nice if Apple would document these very basic and useful error code formats.


Replace HDD with Battery I had serval problems with the SATA cable for the hard disk on my MacBook Pro 13" mid 2009.

Buying a new cable from apple was too expensive for that old MacBook, so I kicked out the SuperDrive and put my disk in there.

Now there is quite a lot empty space in my MacBook and I wonder if it would be possible to put a bigger battery in there.

Considering that the old battery is 8 years old and there is more space now it should be possible almost double the battery capacity.

Now I wonder if there is any way to get such a battery?

Buying a new cable from apple was too expensive for that old MacBook,
  so I kicked out the SuperDrive and put my disk in there.

Doing a quick check, this is currently selling for $14 including shipping.  While I'm not against adding a second hard drive, this fix is very much economically feasible to keep your drive in it's default location.

  Considering that the old battery is 8 years old and there is more
  space now it should be possible almost double the battery capacity.

  Now I wonder if there is any way to get such a battery?

Unless you plan on building your own battery pack, this is simply not an option.  Your best bet is to replace the cable and battery and simply be done with it.


WD Passport External USB Drive - Really slow on Macbook I just got a Western Digital 2 TB "My Passport" USB drive and connected it to my macbook pro (it says it supports USB 3).  But when I tried to copy my photo library it said it would take 40 hours?

What could be going on?

Details: I'm on a Macbook pro 8,1.  With OSX 10.6.8.  I formatted the drive with Mac OS Extended Journaled.

That seems very slow. I have a MyPassport, which is a portable, self-powered drive. When I got it, I found the copies to be slow, but I found that WD has drivers for the drive that speed the copy up considerably. I'm not entirely comfortable having a third-party hard disk driver, but I haven't encountered any problems with it.


Macbook retina 2012: CPU temperature too high I'm using Macbook Pro Retina Mid 2012 with CPU core i7 2.7 Ghz. I see that my computer is too hot as I think for a mac. The keyboard is hot,too.

I'm using iStat software to get detail of my mac. Here is my detail:

As you see, four cores are in high temperature. But as I see in Activity Monitor, they're just work at about 5% and 95% is idle. I don't know why the heating is too high. are there any problems with my mac. If not, does this problem from software ? How can I fix this. I think 2000-2200rpm is slow for this temperature. Should I increase fan's speed. Thanks :)

Thanks :)

There are two likely issues afoot here:

Your System Management Controller has gotten some corruption.
You're seeing potential hardware-/sensor failures.

To reset your SMC, follow these instructions: http://support.apple.com/kb/HT3964

If that doesn't solve the problem, I'd run Apple Diagnostics and see whether it picks up on any hardware problems. If it does, the system should be taken to Apple or an Apple-authorized repair centre for further testing and repair.


I don't want to use iMessage on an iOS 11 phone. How do I turn it off? How do I turn it off?

When I sent to Settings, Messages and turned off iMessages.  But then I am unable to SMS people with iPhones.

Error dialog pops up:

iMessage needs to be enabled to send this message.

I don't want to fix iMessage.  I don't want to use it.  I have unlimited SMS so don't see the point.  Is this possible?

Turn off iMessage by going to Settings>Messages and switching off iMessage.

Then make sure "MMS Messagging" is turned on.

For more information check here:

  Deregister iMessage on your iPhone

  If you still have your iPhone, you can deregister iMessage with these steps:

  If you transferred your SIM card from your iPhone to a non-Apple phone, put it back in your iPhone.
  Make sure that you're connected to your cellular data network.
  Tap Settings > Messages and turn off iMessage.


keyboard shortcut to lock screen doesn't work if finder menu visible I have a keyboard shortcut set for lockscreen - ctrl-shift-F15 but if the finder menu bar is visible, the shortcut doesn't work.  This is in El-Capitan on a macbook pro 2015 and I am using an external microsoft natural keyboard 4000.

I followed these steps in setting up the lockscreen shortcut:

http://www.macyourself.com/2013/01/27/how-to-lock-your-mac-screen-with-a-keyboard-shortcut

Thank you !

Without knowing your exact model of Mac and version of macOS, I have a different way for you to achieve the exact same thing without having to create an Automator service and setting a keyboard shortcut.

Follow these steps:

Go to Apple > System Preferences
Click on Security & Privacy
Select the General tab
Tick the checkbox for requiring a password after sleep or screensaver begins (if you can't tick it, unlock the Padlock at bottom left of the window). Note: You may need to enter a password to make the change.
Now from the associated drop-down, select Immediately
Exit System Preferences

Now you can lock the screen with one of two built-in macOS keyboard shortcuts (depending on your Mac model):

Control+Shift+Eject
Control+Shift+Power Button

The above macOS shortcuts will put your display to sleep, and because of the change in your Security & Privacy preferences, this will activate the password prompt upon waking it up.

Touch Bar models

If you have a 2016 MacBook Pro with Touch Bar, the above keyboard shortcuts aren't available. Instead, you can:

Go to Apple > System Preferences
Click on Keyboard
Click on the Customize Control Strip button
From here you'll see options for either a Lock Screen button or a Display Sleep button
Select one of these
Exit System Preferences

You can now lock your screen by pressing a button on the Touch Bar.


Can you use Touch ID to bypass system password prompts? Touch ID on my new MacBook Pro is pretty great, but I only seem to be able to use it to unlock the machine, not bypass/replace my system password once I'm in.

Is there a way to enable this?

I have been able to use it for things like deleting an app from the Applications folder and occasionally installing software. It seems to be related to whether a developer has implemented it yet or not. In the past few months, I have had the option more frequently, but still only about 30-50% of the time.


iMessage on my MacBook Pro does not show current texts from my iPhone My iMessages on my MacBook Pro have stopped being current as of a month ago. It's now the end of June and it only shows texts from the middle of May.

I noticed my Apple ID was logged out just now (in iMessage on my Mac) so I logged back in, although I never logged out in the first place. So I don't know how long it's been logged out for. Now it's showing some current texts (only from today), but not all that should be an iMessage and texts that were also sent today.

iMessages and SMS messages from when you were not signed in will not be shown now that you have signed in. Messages does not retroactively obtain messages. Now that you have signed in, new messages will be delivered correctly.


Iphone 7 Blocking numbers mysteriously I’m having an issue with my iPhone 7 and I believe it’s been compromised. One of the phone numbers in my phone was mysteriously blocked and one happens to be the one phone number that shouldn’t be blocked under any circumstances. I only realized the number was blocked when the person informed me that she wasn’t able to get through to me. I’ve had the phone with me the entire time. Does any one know how that phone number could have become blocked?

There are few things to check before you can make sure numbers are automatically blocking on your device.

Go to Settings  > Phone > Call Blocking and Identification and
check if you find the same number which you think is blocked?
Also at the top you'll see apps that have access to call blocking.
See if there is any app that is automatically blocking numbers?

If your answer is NO to both questions then you should check with your phone carrier and see if there is any problem in your phone network.


How can I use Audio Midi Setup utility to create a multi-output device with multiple AirPlay speakers? Reposted from What is the difference between an "aggregate" and a "multi-output" device?

I am setting up a multi-output device using Audio Midi Setup utility, but I have an Apple TV and three different sets of speakers connected to different AirPort Express stations in different rooms of my house, instead of just the Mac and the Apple TV. How can I make all four (ATV + AEX + AEX + AEX) be part of a single device to receive audio together in sync?

The only way to do this without a third party app is directly from iTunes. In the top area of the iTunes windows you'll see the AirPlay icon. Click on that and then select Multiple to select multiple AirPlay targets to stream the audio (and/or video) to at the same time:

To stream to multiple AirPlay devices from outside iTunes you'll need to invest in some third party applications. The best approach I know of uses Airfoil for Mac from Rogue Amoeba. Airfoil allows you to send audio to many destinations from your Mac. From their page:

  Multiple Outputs At Once
  You can send audio to multiple outputs around your house, all in sync.

It's an excellent app from an excellent Mac-centric development company and for $25 you get an excellent solution to your problem.


How I fix the profile image not being displayed on start up screen? Every time macOS starts I am presented with a startup screen that doesn't display the profile image. How does one fix this?

Did you set an image at the settings > users and groups?

I'm posting this as an answer to add my example:

When I'm logged out, I see this image properly at MacOS.
You could try replacing the image with another image to test it.


Use Built-In Microphone as Input and EarPods as Output I am trying to record singing in Logic Pro X. I have a background track that I want the signer to be able to hear through EarPods or Beats. However, I don't want to use the microphone that comes with them; I want to use the internal microphone.

Here's System Preferences with the EarPods in:

As you can see, the only options are the microphone on the EarPods and the empty Line In port (I have an older MacBook Pro).

Without the EarPods, I get what I want:

How can I use the Internal microphone with EarPods in?

Have you already tried to use either Line In or BoomDevice for recording with your EarPods? That worked for me.


Microsoft SQL Server on Mac Has anybody successfully been able to run Microsoft SQL Server using Wine or another application like it (possibly Crossover) on macOS Sierra?

The best way to find out is look at the Crossover web site listing if each app is supported by Crossover which is the purchaseable version of Wine.

For SQL Server the answer is no - I think it won't even install.

So try running Windows in a Virtual Machine to run it or use another RDMS like Postgres or SQLite. An easy way to use a VM is to run Docker for macOS it includes (and hides a VM running Linux, Microsoft provide a Docker image for SQL Server with instructions for macOs


Why is it that I cannot open file in terminal when in root? I have a file in MacOS that I want to change that is protected by permission restrictions. I cannot access it with my normal account. I use terminal to log in to root, and try to open the file as such:

open -a "TextEdit.app" file

However, the terminal returns the following error:

LSOpenURLsWithRole() failed for the application /Applications/TextEdit.app with
error -10810 for the file ...

The open command works for my normal user account on files, but when terminal is logged into root, the command returns this error.

I have looked at many articles, but none seem to solve the problem.

Thanks for any help.

I believe you're using su or similar to login to the root account while in your normal account. While you are using Terminal, any action taken in the Terminal.app will have the same root user level access.

However, once you leave the Terminal.app, such as when you use the open command, that opened app does not inherit the special permissions from root. It sends you back to normal land where your user account is limited.

To workaround this, you can use a text editor available in root. A short list includes vi, vim, nano, emacs, pico. I'm a fan of nano as it shows most of its commands in the window. You can use the following command in your normal user to edit a file like so:

sudo nano /some/file.txt

The command to save (write out) is control+x (^O), and quit (exit) is control+x (^X). Good luck!