Delete a currently-open file directly in the application? OS X's ability to rename or move a currently-open file right inside the application is really handy:

To take it one step further, is there a trick to actually delete the current file  inside the app also? (Obviously 'closing' the file would need to be the second half of the process.)

It would save a lot of time to not have to close the file, manually locate it in Finder, then move it to Trash - but but just delete it right there and then.

I have tried dragging the 'file' (with the file icon to the left of the file name in window title) to the Trash icon on the Dock, but that doesn't actually move it to Trash.

The best I can think of is to add ~/.Trash directory as an item in Finder Favorites, then change the 'Where' in the above screenshot to the created 'Trash' Favorite shortcut, followed by a Cmd+W to close it.

It's a little clunky, but it's not bad.

So is there a nifty Automator workflow / AppleScript (which can then be easily assigned to a hotkey), to make the above process quicker? A single AppleScript that could perform both the step to move current file to 'Trash' directory and then the subsequent Cmd+W keypress after a 200ms gap e.g., would be ideal.

I use this AppleScript:

tell application (path to frontmost application as text)
    set f to POSIX file (path of document 1) as text
    close document 1
end tell
tell application "Finder" to move f to trash

A hackier version that works with a few more applications:

try
    tell document 1 of application (path to frontmost application as text)
        set f to path
        close
    end tell
on error
    tell application "System Events" to tell (process 1 whose frontmost is true)
        value of attribute "AXDocument" of window 1
        set f to do shell script "x=" & quoted form of result & ";x=${x/#file:\\/\\/};x=${x/#localhost/};printf ${x//%/\\\\x}"
        keystroke "w" using command down
    end tell
end try
POSIX file f
tell application "Finder" to move result to trash


How can I log the IP addresses of SMB login attempts? I want to automatically ban IP address which attempt to login to my file server unauthorized.

I can log SSH login attempts including IP address in macOS to a syslog format file for further processing with fail2ban like so:

log stream --predicate '(process == "sshd")' --style syslog --level info --type=log >> /opt/local/var/log/logstreams/sshd.log

However, the smbd process doesn't seem to log IP by default. How can I achieve the above for smbd?

You could fire up and configure the BSD packetfilter - create a rule that will match incoming 'rogue' SMB requests, and in that rule use the log keyword which will cause all packets matching that rule to be, er, logged.

Walkthough here: https://blog.neilsabol.site/post/quickly-easily-adding-pf-packet-filter-firewall-rules-macos-osx/

In-depth explanation here: http://marckerr.com/a-simple-guild-to-the-mac-pf-firewall/

Explanation of the pf logging function here:https://www.openbsd.org/faq/pf/logging.html

Setting up pfctl anchors for a protocol:
https://ikawnoclast.com/systems/firewall/mac-os-x-pf-firewall/


Can I combine the address bar and the Google search bar in Safari? The only reason I am using Chrome over Safari is the cool feature Chrome has namely the address bar acts as the search bar as well. Is there a way I can enable this feature in safari as well?

Unless you want the Google-suggestions to appear, too, I think you might be looking for the free (SIMBL) plug-in Keywurl.


computer boots up and fades to blue repeatedly I have a MacBook Pro running 10.4.11 from 2006 or 2007 with a problem during start-up.  The computer will boot and then after showing the desktop, menu bar, and dock (but before icons appear on the desktop), the screen will fade to blue.  After a few seconds the desktop will reappear and then fade to blue again.  This cycle continues repeatedly.  Does anyone have any ideas?  Thanks.

Had a similar issue recently.  Try zapping the PRAM, it worked for me.  http://support.apple.com/kb/ht1379


Find My Mac doesnt work if you use an ethernet cable for? i just read this in an article http://www.pcworld.com/article/2034650/find-my-mac-both-useful-and-frustrating-for-law-enforcement.html

and sure enough, on the apple website it says "offline" can occur if your Mac is not connected to wifi? Is this true?

That wouldn't make any sense at all. So Find My Mac is basically useless if someone has an ethernet cable..

Find My Mac needs two things to work:

An working internet connection, so that the Mac can contact Apple's servers and register its location.
A means of determining the Mac's location.

For the first condition, either a wired ethernet or Wi-Fi connection will suffice. For the second condition, only Wi-Fi will work, because the Wi-Fi radio is used to triangulate a position, based on Apple's database of Wi-Fi networks around the world. Essentially, you can take the names of Wi-Fi networks around you and their relative signal strengths, and Apple's database (and others like it) can determine where you are, within a relatively small radius.

While you can get a rough geolocation based on an IP address, it's not nearly precise enough to be useful for locating a Mac, hence why an ethernet connection alone is not enough (it could probably determine the city the Mac is in, but nothing more concrete).

A few useful things to keep in mind based on this:

A Mac can be located if the Wi-Fi adapter is turned on, but not connected to any networks and the ethernet connection has an internet connection. You can test this easily enough yourself.
If your Wi-Fi is on, but not connected (nor is the ethernet) to the internet, Find My Mac still won't work.
Turning off Wi-Fi will disable Find My Mac, regardless of whether there's any ethernet connection. However the Find My Mac service does cache recent locations (although I'm not sure for how long).

So, for the best chance at recovering a lost Mac, make sure that the Wi-Fi adapter hasn't been turned off. If you need to do so (i.e. getting on a plane, etc.), be sure to turn it back on when possible.


Installing a linux application in OS X - source or via package mechanism? I'm looking at installing an application whose installation is supported on a few Linux distros via yum, rpm etc and from source. What I would like to know is given these possibilities, what would be the best way to install it on OS X? I'm only vaguely aware of Brew, Fink & pkgsrc. I only have beginner experience with package managers too. What I don't understand is once you install some variety of package manager, does the application have to have been "packaged" with one of those for it to be installable or, does it just use the package framework and (maybe) existing system libraries to produce what it needs on OS X with whatever package sources are available from the vendor?

It seems even with a source installation some form of package manager is needed given they list various library requirements as being met via issuing:

yum install cmake gcc gcc-c++ libaio libaio-devel automake autoconf bison libtool ncurses-devel libgcrypt-devel libev-devel

(There is also an apt-get equivalent provided as well).
Also - is it best to have a solution that leverages the installed system base libraries or provides its own copies? Would darwinup be a possibility for a source installation?

To answer some of your questions (there are a lot!)
Not all programs written for Linux will install on OSX nor will they necessarily even compile from source.
What"genre" of programs are you looking for? Things with a GUI, or command line programs or scientific?
In general I would recommend usingbrew first, and seeing if you can find the program you want there. Fink and MacPorts, etc, have become far more problematic.


Will generic earphones allow basic inline remote / mic capability on my iPhone 6? I'm interested in buying the Sony XBAA1AP earphones, and am curious if earphones that aren't specifically designed for iPhones, but which have an inline remote control / mic, will provide basic remote control / mic features on iPhone devices.

Yes, generic earphones/headphones/earpods will work fine with an iPhone.  I have several non-Apple headphones and earphones from various manufacturers and they've all worked, including the play/pause, ff/rw, volume buttons.

As long as you purchase from a reputable company and manufacturer, like you've indicated in your question, you'll be ok.


Sparsebundle is reported to be 16mb but actually empty I have a sparsebundle which I made for some documents, and Finder reports its size at 16mb. The capacity I created it with is 41mb, at least that is its reported capacity.

It is encrypted; when I mount it the folder is empty.

Output of du:

How can this be? I'd rather not have lost all these files.

Sparse disk images grow and shrink and your 16 MB is about the size of a totally empty container.

sudo ls -laR /path/to/mount_point

If there are no files, you will need to restore a backup copy of the sparse disk image or see if a commercial data recovery solution is possible on the storage where you stored the image.

By design, that "image" grows and shrinks in a destructive manner - so you can't expect to perform the "undelete" option that exists for moments of time when you delete a file from traditional spinning hard drive storage media or simple flash based USB drives/SD card type storage.

A sparse image is more like an SSD in that data recovery is not an option and backups are far more important.


Reset PRAM in MacMini 3,1 (Early 2009) and now it won't boot at all, but powers on and chimes I was having problems booting to Apple Hardware Test and decided to reset the PRAM. Big mistake; now it won't boot at all. It's a Mac Mini 3,1 (Early 2009) running El Capitan. PRAM reset chimed twice. Now it chimes after power button hit but then just stays at a gray screen forever. Using a wired keyboard plugged directly to USB port.

I have tried everything I can think of: Reset PRAM again; SMC reset; Safe Mode (Shift key, pre-boot); Verbose mode (Cmd+V); tried to boot to install disk #2 (10.5 DVD, with utilities, currently loaded in drive) for Recovery mode using Cmd+R; replaced PRAM battery; AHT from disk (D key); Choose boot drive (Option key); reseated RAM chip in a different slot; unplugged everything overnight then tried again this morning.

All fail. Light comes on, I get dong chime, drive spins for a bit, but then just a gray screen. Any ideas? Thanks a lot. Kind of desperate here.

[I am aware I should probably buy a new Mac but I'd like to make this one work.]

I fixed it. Hail Mary solution was to unscrew and take the cover off the SuperDrive, manually remove Leopard install disk #2, lay install Leopard disk #1 in there (much easier than expected), then power on with C key. (I think it was the second try, I believe I hit and held C before hitting power.) Then I got the Apple logo and was asked if I wanted to install Leopard. I erased the drive and installed Leopard. Booted perfectly after install. Now I'm installing Snow Leopard (from upgrade DVD, which I still had), and afterward I'll install El Capitan by download (the OS I had before).

If that didn't work, I was going to buy a new Mini tomorrow morning. It was the last thing I could think of.

So apparently the PRAM reset screwed up my HD real bad. Before the PRAM reset I had very recently run disk repair from DVD and from the boot HD and repaired permissions in Terminal (like within 12 hours before).

If anyone cares to advise, what's the best way to install a Time Machine backup from my external HD after I install El Capitan? Migration Asst? Recovery Mode? Thanks.


Double Mahjong Game Icons This is a very specific question, but I hope that maybe a member of the Mac community may be able to offer a clue.

Years ago there was a free Mahjong game called Double, or Double X. It no longer runs on current hardware or software, but I am interested in the icons which it used. Here is a screen shot:

Does anybody know where the icons come from? The developers at PCV, who created the game, are no longer able to tell me.

Thanks

According to this resource, the game picture shown uses various icons downloaded from http://xicons.macnn.com. However, this address does not exist anymore. The only reminder there about icons is on the forum and leads to an old http://www.xicons.com, which does not exist either and redirects to https://interfacelift.com now. However, there are no similarly looking icons there (amongst freely available), probably due to long time passed.


Sending SMS from iPhone I have an iPhone but my friend does not. When I send a message, my phone sends it as an iMessage and he doesn't receive it. How do I sort this out?

Go to Settings > Messages. Check that the type of message that you're trying to send is turned on (iMessage, SMS, MMS, or Group messaging).


Is it possible to list running processes that are not signed or notarized? This would be interesting in general but also helpful in diagnosing the frequent appearance of MacOS error: -67062 in the Console.
Edit: in response to comments, the question is more specifically about trying to find out which processes are running that are NOT signed (or notarized).
Finding all running processes is trivial, but finding out whether their signed status seems to be tricky.

You will need to write a short script to gather this information.
Obtaining a list of processes is possible with ps and code signatures of processes can be checked with codesign.
codesign
The codesign command can be passed process identifiers, pid. To verify the signatures of two running processes call:
/usr/bin/codesign -d -vvvv 279 422

The flags are:

-d for validation
-vvvv to increased verbosity
279 the first process identifier to check
422 the second process identifier to check


MacBook Pro 2012 hangs on startup My 2012 MacBook Pro with Sierra recently started hanging at boot. It seems to start normally; the Apple logo and progress bar appear, but it hangs at about 3/4 of the way through.

Right before I first had the issue I was using the machine normally then very suddenly (I'm not sure what triggered it) there were display issues where vertical lines appeared on the screen and the computer became unresponsive. I restarted it and it never came back up.

The same problem occurred when I tried to boot into the recovery partition and Windows 7.  I thought this was a hardware problem so I started the Apple Hardware Test with option-D and ran a diagnostic. It came up empty, no issues.

I remembered that I had an old Time Machine backup sitting around. I tried to boot from that but after a few seconds the screen went blue with small black vertical stripes.

Does anyone know what the issue could be and how or if I can fix it?

Black stripes on blue screen and booting problems is very alike a GPU problem just like MacBooks 2011 had.
Though, to surely check it is not software you may try backing up data to another computer (requires removing Mac's HD and putting it into external case), format it and install a fresh MacOS from a flash drive.


Can i make my iPad stop autocapitalizing the word "i"? If you look at my profile, you can see that i ask people not to capitalize the word "i" in the middle of a sentence. Now, ignoring whether or not this is a good idea, can i make my iPad not autocorrect a lowercase i to a capital one?

It turns out that by writing "i" enough times, the iPad eventually caught on and lets me write the way i want to. I just have to tap the "i" in the keyboard suggestions for a few times, and it seemed to add it to the dictionary.

In fact, while writing this post, i accidentally hit j instead of i and it autocorrected to "i" for me.


macOS terminal: quick way to edit command options after bash/zsh autocomplete The issue
I use autocomplete from history a lot whether that's with up-arrow or typing the first few letters and completing the whole command including all arguments (options and others) with right-arrow.
Quite often I have to run the same command multiple times on the same file but with different options. However, by pressing up-arrow or right-arrow, I complete to the end of the command and it's quicker to type the whole thing manually than bring the cursor back to the options, edit and then re-enter.
Basically, I'd like to know if there's any way to use autocompletion to re-enter a command from history but bring the cursor back to the first option/argument. Alternatively, a keyboard shortcut to fill in the remaining arguments as previously after typing a different one.
e.g.
Option 1
I type and enter:
$ command -opt1 reallyverylongindeedarg1
Pressing up-arrow produces $ command -opt1 reallyverylongindeedarg1 with my cursor at the end of the line.
I'd like to have a different keyboard shortcut that results in me having the cursor somewhere around -opt1 so I can change that to -differntopt2 and re-run the command which would now read:
$ command -differntopt2 really.verylong.indeed.arg1
Or, having previously typed and run:
$ command -opt1 really.verylong.indeed.arg1
Typing comman and then hitting right-arrow completes the full command $ command -opt1 reallyverylongindeedarg1 (again with my cursor at the end of the line). I've love to know whether there's a keyboard shortcut to jump to the first argument/option when autocompleting.
Option 2
Another method would be for my to type in $ command -differntopt2 then press right arrow to fill in the argument really.verylong.indeed.arg1 as previously when I last ran this command. Resulting in:
$ command -differntopt2 really.verylong.indeed.arg1
What about just navigating with the keyboard and jump back by word?
Well, firstly, that's far from ideal as the arguments have lots of punctuation in so each one takes several (and different numbers of) keypresses and it's slow to go back the right number of words each time to reach the option I want to edit.
Secondly, I can't find a way to set up normal keyboard shortcuts for navigating forwards and backwards by word.
In iTerm2 I have tried:
Escape sequences such as [1;5D, [1;5C, \033b, \033f, etc.
Manually typing Esc, F and Esc, B does work but is very slow.  Ctrl + A for go to start of line selects all. Ctrl + <- and Ctrl + -> just produce [D and [C.
tl;dr

How can I autocomplete and end up with my cursor at the first
argument instead of the end of the line?, or,
How do I set up
keyboard shortcuts for jumping forwards and backwards by argument in
iTerm2?

For ZSH another option is to put the cursor at the beginning and not the end of the line (this makes it more like mksh or others). The default:

% PS1='%% ' zsh -f
% bindkey | grep up-line-or
"^[OA" up-line-or-history
"^[[A" up-line-or-history

I use set -o vi so you may need to translate the bindkey keys into whatever suits your needs:

bindkey -M vicmd "j" vi-down-line-or-history
bindkey -M vicmd "k" vi-up-line-or-history

no really I want to jump to the first argument

This requires a custom widget, which might run something like

function up-line-first-arg {
    local first offset
    zle vi-up-line-or-history
    first=${BUFFER%% *}
    CURSOR+=$(( 1 + ${#first} ))
}
zle -N up-line-first-arg
autoload -U up-line-first-arg
autoload -U compinit
compinit
set -o vi
bindkey -M vicmd "k" up-line-first-arg

This version will put the cursor on the first argument or the end of the command name (unless there are multiple spaces between the first argument and subsequent, which is not common). Docs in zshexpn(1) and zshzle(1) may help explain the particulars, but the gist is to move up like ZSH does, get the first word (if any), and move the cursor over that length, plus one to get past the space. ZSH is clever will not move the cursor past the end of the BUFFER for the case where there is no space in the command.

but wait there's more

The following version handles (perhaps uncommon) cases such as ls               -al and on failure will put the cursor at the beginning of the line.

function up-line-first-arg {
    zle vi-up-line-or-history
    [[ $BUFFER =~ "^[^ ]+[ ]+" ]] && CURSOR+=${#MATCH}
}

Basically a regular expression "from the beginning of the BUFFER match one or more things that are not space followed by one or more things that are spaces" and then moving the CURSOR by that much on match.


No retina (best) display option I have 2015 early macbook pro 13", but I can't seem to find the 2560x1600 resolution. The highest resolution I can set it on is 1680x1050. Default for display is only 1280x800.
What's the problem here? I'm using the newest Yosemite OS.

Here's the screenshot:

Apple will not show you the real panel resolution, only the scaled resolutions.

http://www.everymac.com/systems/apple/macbook_pro/macbook-pro-retina-display-faq/macbook-pro-retina-display-hack-to-run-native-resolution.html

Try this.


moving iMovie project to new Mac results in some sounds from same source missing I have two Macs, the first running iMovie 10.1.2 and the second running iMovie 10.1.8.  I completely copied the iMovie Library folder from the first machine to the second.  When I opened iMovie on the new machine it showed some progress in recognizing the new library, and then opened my project.  At first, everything looked fine, but then I noticed that some of the sound clips had no sound in them.  I see the green rectangle for the correct duration, but there is no waveform displayed in it, and when I play it there is no sound. When I reveal the source the original clip there is no sound there either.

It seems like roughly half of the sound is missing.  But the thing is, it's all from the same source file.  I compared the imported media file and it's identical to the original.   Furthermore, the sound is present in the actual media file.  I tried deleting the extra directories in the event directory (Analysis Files, CurrentVersion.imovieevent, and Render Files) and it was able to "repair" the event, but the sound is still missing.

How can I get my sound back?!

Edit: I enabled viewing the waveform in the event viewer, and it appears that the sound abruptly ends at 54.7 minutes.

Updating to iMovie version 10.1.11 (on the second machine, to which the project was transferred) fixed the issue for me.


Can't add a new ID to Volume Purchase Program Customers I have an app that I sell using Apple B2B / VPP. When logging into iTunes connect to add a new Apple ID (for a new customer) I am finding that clicking "Add Apple Id" is doing nothing (e.g. the page reloads, but I can't add a new Id).

Presumably this is just a short term issue with the iTunes connect website? (I've been having the problem since yesterday).

I've tried using Firefox, Safari, and Chrome; and connected on a few different networks to rule out my router.

Is anyone else seeing the same issue?

Apple website is broken and has been since 3/13.  I opened case#769729461 for this.  They are working on it, no ETA on a fix.


Why do I get this message every time I open the terminal? Every time I open the terminal I see the following message:
/etc/zshrc:7: command not found: locale

This is the first 7 lines in the file /etc/zshrc:
# System-wide profile for interactive zsh(1) shells.

# Setup user specific overrides for this in ~/.zshrc. See zshbuiltins(1)
# and zshoptions(1) for more details.

# Correctly display UTF-8 with combining characters.
if [[ "$(locale LC_CTYPE)" == "UTF-8" ]]; then
    setopt COMBINING_CHARS
fi

What should I do to this file to fix the problem?

Your zsh environment isn't finding locale in its PATH.
Either call locale by its full path:
if [[ "$(/usr/bin/locale LC_CTYPE)" == "UTF-8" ]]; then

..or update your $PATH to make sure that /usr/bin is included.


Screen starts flickering when in streaming I have this problem that now I am really getting bothered from it. It always starts when I am streaming something on the web like YouTube videos and open other programs which I have to work with like Matlab or some others. Then my screen goes crazy , but it not constantly, it looks like cracking a mirror , attached some screenshots.

Kindly help me cause I am really getting annoyed about this.

P.S. I have MacBook Pro retina early 2015 with Mojave 10.14 , but it used to be like this even with High Sierra.
Any help is really appreciated,

Example:

Your problem

If the problem appears on screenshots, then that would mean it's most likely a software problem. There can be a lot of reasons for this to occur and it's not possible to deduce from your story what causes it in this case.

Possible solution

I would advice you to reinstall macOS and see if that solves your problem.
Instructions


MacBook charger not working when laptop is on I am using original charger on MacBook Air. Of late my charger works if the computer turned off but not when it is on? Also when it is fully charged, it continue to charge. Why ?

Try the following steps:

Try resetting the SMC which stands for System Management Controller, sometimes it can cause this type of problems. Here is a link to a good article from Apple on how to do it: Link
If possible, try an another charger and see if it charge properly with that one.
Take contact with Apple Support via phone or in your local Apple Store.

Hopefully any of these steps helped you in slowing your issue.


Will iTunes recognize existing apps when it "overwrites" the apps on my iPhone? I recently reinstalled Windows 7 and I just didn't bother about iTunes (anymore).
Now I luckily found a way to transfer all my apps "back" to iTunes (see here), but now when I don't want to keep downloading the updates with my phone, but instead in iTunes, the sync activation leads to one being forced to overwrite the iPhone data. Three questions:

a). Will iTunes be so smart to recognize that the apps are basically identical, or will it just takes ages to stupidly overwrite all the existing apps?

b). Will this have an effect on the app settings (or e.g. favorites in my dropbox app)?

c). As I (now) only sync the apps, I assume this won't affect any data or music?!

Thanks for your help in advance!

Kind regards

When using the standard iTunes/iPhone sync mechanism:

a) iTunes won't copy over an app to the iphone unless the app in iTunes is newer
b) It won't have an affect on app settings
c) If you only sync apps then it won't touch data/music


Can I stop music on MacBook Pro with TouchBar directly? I bought a MacBook Pro with TouchBar and found out that I could not stop the music directly. I have to first tap on the left-pointing arrow on the Touch Bar, and after expanding the menu I finally could tap the stop button.

However, this is quite a lot of work since I stop and start them again at least 10 times a day, which happen every day.

Is there any way to stop the music just one button, much like it is in non-TouchBar MacBook?

You can choose to always show your media keys on the Touch Bar as follows:

Go to Apple > System Preferences...
Click on the Keyboard preference pane
Select the Keyboard tab
From the “Touch Bar shows” drop-down menu choose the option “F1, F2, etc. keys”
From the “Press Fn key to” drop-down menu choose the option “Show Control Strip”
Untick the box “Use F1, F2, etc. keys as standard function keys on external keyboards”

Now your Touch Bar should always show your media control keys. When you want to see the F1 - F12 keys just hold down the fn key.


How to change pop up speed of "Press and Hold" When pressing and holding a keyboard button, i.e. an a, a character pops up.

I recall that I was somehow able to change how long I need to hold a key until the Picker pops up on Yosemite.
I cannot find a place to change the popup speed on Mavericks though.

defaults read -g | grep -i press does not return anything.

Apparently, this works for both Mavericks & Yosemite...

You can do it right from the prefs

System Preferences > Keyboard > Keyboard

Set Delay until repeat

It works for the accent pop-up just the same as it does for 'regular' key repeat


GPS Exif from iPhone photo upload in Safari? Safari strips the GPS metadata from uploaded photos. Is there any way to stop this?

Visitors to my photo sharing website use a simple HTML form to select a photo from their phone:

<input accept="image/jpeg" type="file">

When iPhone & iPad users select a file it is uploaded without location EXIF. When Android, BlackBerry, and Windows Phone users do the same action in their browser, the EXIF data are passed correctly.

Is there any way for iPhone users to upload photos to a website using Safari and keep location metadata?

This is a privacy feature. iOS will always strip EXIF from uploaded photos.

  It is correct that [iOS] strips exif data. This is also not a bug on [iOS] but actually a feature.

Image upload from iphone strips exif data - Stack Overflow

To access photo metadata, one needs to access the photo using an app installed on the device. To interact with Safari, this app can provide an app extension made available in Safari's share menu: Extending your App with Safari App Extensions - WWDC 2016.


Time machine is not including new directories in its backup My Time Machine is going for a year quite strong, but I recently noticed it is not including new directories in its backup. Basically new directories are being excluded by rule or error and I'd like some help figuring out which.

It still does its normal backup. The system log files says:

Dec 21 19:35:59 leosbook com.apple.backupd[2218]: Starting standard backup
Dec 21 19:35:59 leosbook com.apple.backupd[2218]: Backing up to: /Volumes/Wisdom/Backups.backupdb
Dec 21 19:36:02 leosbook com.apple.backupd[2218]: 2.28 GB required (including padding), 319.50 GB available
Dec 21 19:36:04 leosbook com.apple.backupd[2218]: [...]
Dec 21 19:36:07 leosbook com.apple.backupd[2218]: Backup completed successfully.

The newly created directory is not excluded. Checking via tmutil reveals in Terminal:

> tmutil isexcluded "/Users/bongu/Pictures/Import/Eye-Fi/NewDir"
+    /Users/bongu/Pictures/Import/Eye-Fi/NewDir

However the new directory NewDir never gets backed up. The directory is not part of the latest backup:

> ls /Volumes/Wisdom/Backups.backupdb/leosbook/latest/book/Users/bongu/Pictures/Import/Eye-Fi/NewDir
ls: /Volumes/[...]: no such file or directory

How does this possibly happen? And any idea how can I resolve it?

In your System Preferences << Time Machine you can tell Time Machine which files to skip. Maybe you listed the directory in this list?


Is there a way to get Finder to remember all my tabs and reopen them after restarting? Just like with Terminal, I tend to have many Finder tabs open most of the time. Sometimes, I need to restart Finder and OneDrive (e.g., see https://superuser.com/questions/1546441/very-high-cpu-usage-for-distnoted-on-mac#:~:text=Distnoted%20is%20a%20system%20message,and%20is%20tied%20to%20finder.), and it is troublesome to reopen each Finder tab one by one. Terminal has a nice feature to remember all my tabs and even re-run the commands that were last run in each of them. Is there any way to do something similar with Finder?

From comments - The method in the linked question requires Finder to be killed. This will prevent its remembering currently-open windows.
It appears in the particular circumstance that Relaunching Finder is sufficient - Opt/right click in Dock - which also preserves its current structure.


See the number of open windows for an app in the macOS Dock I have multiple Google Chrome windows open at a tune. How can I see the number of open windows in the Dock?

I'd like to add something like a second indicator under the app's Dock icon.

Also, I'd like to be able to choose the window when I click the icon and not use a long click to be able to chose the window to open.

The Dock settings doesn't provide any way to configure this.

Apple doesn’t inject code into a running app to provide this count (basically it’s up to the app to manage badges, not the OS). One solution would be to choose apps that have code added to display their window count as a badge (like they do in the window menu and other parts of the app). This is trivial to program as a sample app, but making changes to a large program like Chrome is typically far from trivial. If this feature is important, I think the browser team could make the effort to do it.

Like the mail app counts messages unread and read, it can display arbitrary information in a badge.

Have you seen if this is a feature hidden or made a request to the chrome development team?

https://www.google.com/chrome/dev/

Although since chrome was created to remove chrome like that, they might see this as more clutter. Hard to guess without engaging them, perhaps.


How to reset to default permissions on El Capitan During development and debugging I have changed permissions of various files and folders using chown and chmod on my local system (I didnt maintain the list of changes). Now that I have fixed the issue, i fear of security consequences.
Any way I could restore the default permissions and/or find vulnerabilities in terms of network security or other potential loop holes that might create due to my changes.

For system installed packages you can run the following command in Terminal.app to find permissions that differ from the default:

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

If you want to just apply those permissions to your system as a whole, run the following command:

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

Or you could individually fix the permissions that you have changed yourself using chmod/chown.

For everything else, you need to have used either a package manager that can verify permissions, or have a backup you can use for comparing permissions before and after the event.

For others: Please note that the repair_packages command no longer exists in Sierra and newer macOS versions, as they now automatically handle repairing permissions. If you have manually messed up permissions so much that they cannot be fixed automatically, I would recommend restoring permissions from a Time Machine backup or similar.


Mac Mini not booting issue I'm looking for some troubleshooting ideas on my mac mini failing to boot. The machine had been working fine until 3 days ago. I purchased the mini second hand from a friend ~ 4 months ago.

The machine: Mac mini 1.83/2x512/80/SD/AP/BT   OSX - Snow Leopard   The attached peripherals to the mini are: USB mouse, USB non-Apple keyboard, ethernet, and display.

Here are the symptoms:

Power on
Boot Chime continuously repeats ~ every second or so
The indicator LED is continuously lit
The keyboard indicator LED is NOT lit
Monitor is a blank gray screen

I am not finding info on this set of symptoms in searches. What should I be considering with this set of symptoms?

Thank you.

Sounds like a hardware issue. Insert your OS X CD and follow the instructions below from the Apple support pages to test your hardware

Locate your 'Applications Install Disk 2' disk which came with your computer
Insert the disk into the computer
Boot/reboot the computer, holding the D down on your keyboard.  You should get an image like this once the test software has started to inspect your computer

When the process is complete, select your language and click the right arrow. If you aren't using a mouse, you can use the up and down arrows to select a language and then press the Return key.

The Apple Hardware Test console appears. You can choose which sort of test or tests to perform:

To perform all of the basic tests, click the Test button or press the "T" key or the Return key.
To perform a more thorough diagnostic test, select the "Perform extended testing" checkbox under the Test button before you click the Test button.
Your test results will appear in the window in the bottom-right of the console.

The Hardware Profile tab of AHT provides specific information about your computer. To see this information, click the tab, then select a subject area on the left.

To exit AHT, click Restart or Shut Down at the bottom of the window. Remember that clicking Shut Down will not automatically eject the disc.

Normally these are caused by hard disk failure, or at least a failure to boot from the hard disk.  If it turns out that it is the hard disk, you will need a new one.  But you may still be able to salvage data from the old one after you've replaced it.  If you get a USB hard drive caddy you can plug the old disk into your Mac after you've reinstalled the OS and if it is readable, you might be able to recover your data.  You may even be able to use migration assistant to recover everything if it turns out that it's just your boot sector that's corrupted.


iPod touch activation lock 3 years after So, 3 years ago I found an iPod touch.  I did everything in my power (calling schools, taking a photo of my contact info with the iPod in case photos were streamed, craig's list ad, checking to see if the serial number was registered, etc.,etc.) to find the owner.  After months, a co-worker "wiped" the iPod and it became mine.  Suddenly, last night, the activation lock appears.

Could the original owner have just done this 3 years after it was lost and after it was "wiped" and reset?  I am having zero success at remembering my Apple ID (although I definitely know my password).  Any suggestions for me?  Thanks.

If it was somehow still registered to their Apple ID, yes. Without knowing specifically how they handed over the iPod, it's impossible to tell. Always follow the official Apple guide when trading equipment, especially turning off Find My iPhone.

Unfortunately, there's probably nothing you can do. Apple will remove activation lock only under the following conditions, which you don't meet:

  Officially Remove Activation Lock steps are documented by Apple at
  https://www.icloud.com/activationlock/

  In a nutshell, the various ways to remove iCloud Activation Lock
  include:

  Apple will remove the lock if they can verify the original purchaser is requesting the action.
  Self-service removal if you can authenticate as the iCloud account that placed the lock on that device.
  Business using DEP can often use their MDM to remove the lock as a self-service action without needing Apple to be involved.

  For consumers, you will likely need to make an appointment at an Apple
  Store and provide the Genius on-hand proof of purchase (to show you're
  the authorized owner) along with proof of identity and they will reset
  Activation Lock, giving you access to the device.

  For businesses, it depends if you are enrolled in DEP - Apple's
  Device Enrollment Program or just want to provide copies of the
  original purchase listing serial numbers to verify ownership.

  If you bought the device second hand, stole it, found it or came to
  possess the device by some means other than buying it from Apple
  directly, then you will probably need the original owner to show proof
  of purchase, etc. They will then transfer the device to your account
  or simply disable Activation Lock.

  The only self-service way to remove the lock if you can't type your
  password into the device itself is to authenticate at
  https://icloud.com and remove the activation lock when the device is
  not connected to the internet.


I think I lost everything after boot camp I tried to install Windows 10 into my Boot Camp partition.  I exited the setup and, normally, my computer restarts and I log into the Mac.

Now it's just a black screen flashing a folder icon with a ? on it.  I think I've lost everything and I'm very confused and scared. Please can anyone help me?

You have three options, they go from best to worst:

Reboot into your recovery partition by holding down Command+r, and open disk utility, and attempt to repair your drive.
Still in the recovery partition, restore from backup, which most people do these days.
Reinstall OS X, and begin taking backups so #2 will work.

Hope this helps.


Get rid of "The Wi-Fi network ... could not be joined." message How can I get rid of this message?

I've tried clicking both: "Cancel" and "Run Diagnostics" buttons. I've also tried to turn off and back on the Wi-fi. I don't want to restart my mac as there are some important processes running.

I'm using a MacBook Pro (Retina) - macOS High Sierra 10.13.1

Go to Spotlight (magnifying glass in top corner) / Finder > Activity Monitor
Search for SystemUIServer in CPU tab using the search bar located at top right corner
Force quit it


Can I delete any of the default apps the come with OS X? Is it possible to delete any of the default apps in OS X? I suppose it is possible, but will anything break if I do?

There's some, such as Stickies, iChat, Dictionary, etc. that I either have no use for, or have replaced with my own apps that provide similar functions.

Thanks guys!

Instead of Uninstalling these apps, you could just hide them.

Doing this in Terminal:
sudo chflags hidden /Applications/Chess.app
Will hide the application from sight, but will still be there.

Here is the link for the source:
http://hints.macworld.com/article.php?story=20091229093051878


How can I get Unix (brew/xcode/vim) acting like Unix under Lion? I "upgraded" from Snow Leopard with Homebrew and vim both chugging along happily, to Lion. Now vim hangs/segfaults, and when I invoke brew, it complains xcode is missing, and continues to do so after downloading Xcode from the app store. I wanted to install vim from source, but that requires Mercurial, which I may be able to use to create a tarball from a Linux virtual machine, but overall Unix-like functionality is broken on Lion.

How can I get Unix acting like Unix under Lion?

You may already know this, but downloading/installing Xcode from the app store doesn't actually install it. It just leaves an installer in your Applications folder, which you have to run to actually install Xcode.

Don't know if this is contributing to your problem, but it tripped me up.


Why are some SMS-recipients reachable through iOS but not macOS? I can launch the Messages app on Catalina and send an SMS to anyone on my iCloud or Gmail contact lists, which gives me the convenience of touch typing replies, as well as seeing attachments on a large screen—except for one contact.
This one contact, with whom I communicate often, uses an Android mobile phone. I had understood that so long as I am using a recent enough iOS version (it's 14.1) and a recent enough macOS (10.15.7), and am logged into both using the same Apple ID, I should be able to message anyone on my contacts list using the Mac's keyboard, regardless of the mobile OS of the person on the other side, indeed even if the other person uses only a very basic phone device.
When I enter this recipient's name in Messages, I only get a few older messages. When I receive messages from this one individual, I can only see them on iOS, not through macOS.
Why are some message-recipients reachable through iOS but not macOS?
In case it matters, this one contact used to use an iPhone, but moved to Android. Yet even when using iOS, I was receiving "green", not "blue", message bubbles, signaling that the messages are sent/received through the phone company's networks, not through iCloud.

On your computer, open the person’s contact card in Contacts/Address Book
Verify that the phone number you are attempting to use is classified as something other than “iPhone” (e.g. “Work” or “Mobile”)
Ensure you don’t have multiple contact cards for the same person, and create one for them if one doesn’t currently exist

If that doesn’t work, it might be worth trying to sign-out and back in to iCloud on both your computer and your iPhone, after re-booting both devices first.
(As for the messages when they were previously using an iPhone, the may have had “send all messages as SMS” enabled, or they didn’t a reliable mobile data connection while messaging you.)


Mac App Store, reuse apps after changing country The answer of this question explains that it is to install apps bought on the Mac App Store on multiple computers.

My problem is a little bit different. I moved to another country and I had to change the country also in my iTunes profile, due to my new credit card. As a result my iTunes store, App Store and Mac App Store are now associated to the new country.

How can I access and download my purchased Apps on my new MacBook Pro?

Probably one solution would be to change again the country, but it wouldn't be optimal.

For App Store, see this answer for "Do I need to repurchase apps if I moved countries?":

  All the apps you bought in country A are permanently assigned to your AppleID. Once you move to country B and you updated your details (billing address) you:

  still can use them
  you cannot re-download them
  you cannot update them
  you cannot convert your music to iTunes Plus (but still can listen, obviously)

  There are two solutions to this:

  Switch Store's country and update your billing details each time you want to get your apps up to date (or re-download them). But this is a rather painful process, so a better solution is to...
  Create a new AppleID with the billing details for the country B. Switching between AppleIDs is much easier and quicker than switching Store's country and updating your billing address.

  Let me quote why it has to be this way:

    [...] this how iTunes has been designed.

For MAS - recover purchased apps on Mac App Store (formatted better and corrected typos):

  Dah•veed
  Re: recover purchased apps on Mac App Store.
  Sep 14, 2013 10:16 AM (in response to Mariokart)

  When you switch regional/country stores your Purchases list does disappear and the MAS will no longer alert you to an update that may be available for an app.

  However, all is not lost. But the one caveat is that is an app that you bought in a particular store is not sold in the new store then you cannot update it. Apps that are available from both stores can be updated, it's just that you basically need to hear through the grapevine that there is an update for the app. Then you go through the steps of buying the app and in the final steps the MAS recognizes that you have previously bought the app and downloads it for free. Once you have done this with an app it again appears in your purchases list for the new store and you are alerted to any further updates as before. You have to go through this process with each app.

Also see iOS: Changing the signed-in iTunes Store Apple ID account


How to diff Photos Library backup against original (to check for corruption) It seems the official way to backup your Photos Library is to literally drag it from your OSX desktop onto your external storage. So I did that.

Now, I want to know how to do a diff between the new Photos Library  created on external disk and the original Photos Library on the OSX, before I delete it from my OSX forever.

How to do this using official Apple methods/utils or Linux CLI?

One note of caution, dragging photos to the desktop does a lossy export and you’ll lose all sorts of metadata and photo quality if you bypass the export functionality.

That being said, there is a tool that lets you merge / duplicate / check that two different libraries have the same or different photos (as well as the super useful deduplication features for which I pay gladly alone for this software).

https://fatcatsoftware.com/powerphotos/

There is a demo version you can try - so if there’s not another method, you can do far worse than starting with this app. It’s fast, reliable, updated and supported by the author and been around for quite many years.


Is it possible to use a 2009 imac as a display for a 2017 macbook pro? Is it possible to use a 2009 imac as a display for a 2017 macbook pro? If so, what cable would I need to make this work? Ideally with a mini display port to usb-c cable it would just work but I have my doubts.

It appears you are describing the setup above. This is possible to do.
You will need a Mini DisplayPort to Mini DisplayPort cable and a Mini DisplayPort or Thunderbolt port on your MacBook Pro.
To start using your iMac as a display you need to enter Target Display Mode.

Follow these steps to start using your iMac as a display:
Make sure that your iMac is turned on,  and the other Mac is logged in
to a  macOS user account.
Connect the Mini DisplayPort or  Thunderbolt cable between the two
computers.     Press Command-F2 on the  keyboard of the iMac that you
want to  use as a display.

(Source)
To exit Target Display Mode:

To leave Target Display Mode, press Command-F2 on the iMac keyboard again. Your iMac also exits Target Display Mode if you disconnect the cable that connects the two computers, or if you shut down or sleep either computer.
If the connected Mac goes into sleep mode, the iMac screen turns off until you wake the other computer, or until you take your iMac out of Target Display Mode.

Using Apps

Any apps that are open on your iMac remain open and active while your iMac is in Target Display Mode.
For example, if you begin playing music in iTunes on your iMac and then activate Target Display Mode, iTunes doesn't pause on your iMac.
If you've set your iMac to automatically log out, apps are paused or closed when this happens but your iMac remains in Target Display Mode.

Connecting devices to your ports

A Mac that's connected to an iMac in Target Display Mode can't use the iMac computer's built-in camera, its USB, ThunderBolt, or FireWire ports, or devices connected to those ports. To use external devices with your Mac, connect these devices directly to the Mac that you want to use them with.


Mix n match RAM memory in iMac with (potentially) an empty slot remaining I'm experienced with Windows, not so much with Mac. I've just been given a 27" iMac (it's a mid 2011 model) by someone who no longer needs it. It has 4 memory slots and presently two are occupied with 2Gb modules each (4Gb total RAM).

Another friend has offered me a 4Gb module and a 2Gb module. I've checked the specs and they are compatible with this model iMac.

Is it an option to put each of these in the 2 remaining slots, so that 3 slots have 2GB and 1 slot has 4Gb?

While this question: Is using mid 2012 MacBook Pro RAM in mid 2011 iMac 27" an option? is similar, it does not address the following question I have:

And if one of these is bad memory, can I only use one? By this I mean 2 slots have the original 2Gb modules, one slot has either the 2 or 4Gb module, and the last slot is empty.

There are multiple iMac models, but in general, look in the apple menu
and select 'About this Mac', then (in the window that opens) click on
the 'Memory' selection.  This will show your memory arrangement
and offer "Memory upgrade instructions" if the computer is internet connected.

If the memory arrangement recognizes all the memory you have installed, it's
working (though matched pairs are often preferred).


Macbook | Mouse and Trackpad Options Is there a way to set the options for scrolling in the following way :

Use this option when the trackpad is used for scrolling and navigation | Keep this option checked.
"Move Content in the direction of finger moment when scrolling or navigating"

And when the mouse is being used, I want the above option to be unchecked.

I'm guessing that you are talking about the setting that, for me (British English) shows in Settings > Trackpad > Scroll & Zoom > "Scroll direction: natural".

This discussion talks about this issue, and several people mention Scroll Reverser.  It has separate options for "Reverse Trackpad" and "Reverse Mouse".  (I haven't tested your scenario, but I have used this software for other reasons.)


How do I install MacVim? How do I install MacVim on Mountain Lion?  I want to get the MacVim application, as well as the new command-line vim.

I see there are several ways to do it (a snapshot from Google Code, via Homebrew), and if I use Homebrew, I see multiple options.  What way will work best both for using the native application as well as using vim on the command line?

Here is the procedure I recommend, for those who are comfortable with the command-line and with Homebrew:

Install Homebrew.

Run the following on the command line (in Terminal):

brew install macvim --with-override-system-vim
brew linkapps

Edit your shell startup files to ensure that /usr/local/bin comes first in your $PATH.

If you use vim as $VISUAL or $EDITOR, add `export VISUAL='mvim -f' to your environment (details).

Check that you installed everything correctly by running

brew doctor

Now, you can run the graphical MacVim on a file by running mvim foo.txt from the command-line.  Or, you can run the text-based editor by running vim foo.txt.  Also, if other programs (e.g., git) fork off a separate editor, they'll run the graphical MacVim.

See also How to run mvim (MacVim) from Terminal? and Set macvim as default application after homebrew installation.


ZSH paste from the clipboard a command takes a few second to be write in the terminal When I copy from the clipboard a long string command in my iTerm, the terminal freeze for seconds.

for example, if I copy the following test and I paste in my iTerm console:

echo 'test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test'

take a couple of seconds to be written in the terminal.

If the command is longer can take 15 seconds.

ZSH version '5.3'

The final problem is related to zsh.

oh-my-zsh is executing bracketed-paste-magic, so I ended up removing it.
Because oh-my-szh doesn't have a plugin manager for this. You have to override the file: $ZSH/lib/misc.zsh

The overrides will be in this folder $ZSH_CUSTOM.

Because I don't have any override I had to create the folder first:
mkdir $ZSH_CUSTOM/lib/

And create a copy of the original
cp $ZSH/lib/misc.zsh $ZSH_CUSTOM/lib/.

and edit the file (use your favorite editor):

vi $ZSH_CUSTOM/lib/misc.zsh

I commented the following lines, but you can remove it or change the if condition.

#if [[ $ZSH_VERSION != 5.1.1 ]]; then
#  for d in $fpath; do
#       if [[ -e "$d/url-quote-magic" ]]; then
#               if is-at-least 5.1; then
#                       autoload -Uz bracketed-paste-magic
#                       zle -N bracketed-paste bracketed-paste-magic
#               fi
#               autoload -Uz url-quote-magic
#               zle -N self-insert url-quote-magic
#      break
#       fi
#  done
#fi

Thanks and sorry for the question description, without the knowledge that I was using zsh this made the task to help me impossible to accomplish.

More info:

https://github.com/robbyrussell/oh-my-zsh/issues/5569
https://github.com/robbyrussell/oh-my-zsh/issues/6338


How to find more Game Center games on Mountain Lion? I could only find 7 Game Center games on Mountain Lion. Are there more places where Game Center games can be found, or is it just that more will be added along the way?

If you open the Game Center app, at the bottom of the Games tab there is a "Find Game Center Games" button:

Which goes to this page which has a list of Game Center games (there are currently only 8).

Also, some apps on the App Store will mention in their description that they have Game Center support. And you can see some games are featured with text saying they've been updated to support Game Center:


Spam from NY Times & WSJ top stories notifications on iPhone A while ago, my wife and I started seeing news story alerts on our iPhones on the lock screen. We didn't think much about it.

But now these notifications are spaming us daily with garbage news stories about the election. I'd like to modify the settings that control what, if any, stories we get alerts for.

Ideally, I'd like to control which news sources can send alerts and what type of alerts, e.g. business stories from WSJ.  Neither of us has the NY Times app installed. The alerts may be coming from the News app, but the only settings are "Allow Notifications", "Show in Notification Center", "Badge App Icon", "Show on Lock Screen" and "Alert Style When Unlocked".

Does anyone know where the settings are which control these alerts?

The below instructions apply to iOS 10. There will be similar settings on previous versions of iOS, though the steps may differ somewhat.

Open the News app and tap on the Favorites tab at the bottom.
Tap on the bell icon in the top-left corner.
Toggle off any channels that you don't want to receive notifications from. You can also toggle on any channels from which you do want to receive them.
Tap Done in the top-right corner to save.

If the channels (i.e. NYT and WSJ) you're getting notifications from aren't there, or you want to get notifications from channels that aren't present, you may have to temporarily add them as favorites to cause them to appear.

Tap on the Search tab at the bottom. Search for "New York Times" or "Wall Street Journal".
Tap on the channel's name.
Tap the + icon in the top-right corner.
Go back to the Favorites tab and follow the above instructions to turn notifications on or off, as applicable.
Once you tap Done on the notifications screen, you can remove the channels you just added as favorites if you want to do so. To do this, tap Edit in the top-right corner, and tap the X in the upper-left corner of each channel you want to remove.

The type of notifications you can get from a channel appears to be all or nothing for a channel, so unless the channel is split into specific sections, you can't opt just for Business stories, for example. There are also generalized "News Editors' Picks" and "News Top Stories" options. From my (admittedly limited) testing, you can't get notifications for topics (such as Business) that combine many channels into one categorized feed.

If the notifications aren't turned on in the News app, I have no idea where they're coming from. In that case, the next time it happens, take a screenshot (Home + Sleep) and post it in your question to help determine the source.


How can I open port 8080 of Mac OS X Lion? How can I open access to port 8080 from the outside world (private lan) on my Mac OS X Lion? I'd like to access a webpage that's running on my lamp stack on my mac (zend server ce) from within the lan. I can access port 80 just fine.  Port 8080 is blocked on the other hand.  I've also disabled the firewall.

When you say that you disabled the firewall, do you mean the one in:
System Preferences > Security > Firewall, or the ipfwIP Firewall that you can access from the command line? Or perhaps both?

To check to see if you have ipfw rules, you can always go to the terminal and type in:

sudo ipfw list

You might also use nmap to check if the port is open from different places on your internal network. Of course, OS X doesn't comes with nmap by default, so you would have to try that from a Linux machine or use something like Fink or Macports to install it.

nmap -p 8080 host.domain.com

I hope this helps.


Logic Pro updates from 9.1.8 I have Logic Pro 9.1.8.  Can I update or upgrade this to Logic Pro X?

If so, how, and is there any cost?

Logic Pro X is available on the Mac App Store for $200/£150.
There is no upgrade pricing for having purchased Logic Pro 9—everyone pays full price.


MacBook Pro 15-inch booting halts and its screen becomes green The scenario is:

I cannot log in Mac OSX if booting normally as the booting halts and the screen becomes green with nothing else on it.
In Recovery mode, reinstall Sierra and previous EI Capitan, but the problem still exists. ( Actually, this problem happened at EI Capitan first more than one year ago, and later I upgraded it to Sierra and tried to fix it, but it did not.)
Erase the Mac OSX partition, and reinstall Sierra, but the problem still exists.
I can log in Safe mode ( Shift ).
I can log in Recovery mode ( Command + R ).
I can log in Windows in Bootcamp.

My laptop details are below.

MacBook Pro 15-inch, Early 2011
Graphics: (1)AMD Radeon HD 6750M 1024 MB (2) Intel HD Graphics 3000 512 MB
Processor: 2.2 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Hard drive: Samsung SSD 750G
System: Sierra, 10.12.5

This problem has blocked me more than one year, and I have tried many ways, but none of them worked.

Is there anyone can help me fix it?

Normally when a problem is not occurring when booted into Safe Mode, but occurs when booting normally, it's time to investigate login items, fonts, and kernel extensions.

Based on what you've already tried, your scenario seems a little different to this, so I'd try creating a new additional Admin account to see if you can log into this normally.

Create an additional Admin account

You can do this by tricking your MBP into thinking it's being set up as new:

Boot into Single User Mode by restarting your Mac and pressing and holding ⌘ + S as soon as you hear the startup chime
Keep these keys down until you see a black screen with white text
Mount your drive by typing in /sbin/mount -uw / and then pressing the enter key
Remove the Apple Setup Done file by typing in
rm /var/db/.AppleSetupDone and then pressing the enter key
Now reboot your MBP by typing in reboot and then pressing the enter key
Follow the prompts to complete the setup process and create a new admin account

Once you've done the above, try starting up and logging in as the new admin user and let me know what happens.

Reset the NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). It may be worth you also resetting this. Here’s how to do this on your particular MacBook Pro model:

Shut down your machine. Yes, a full shut down, not just logging out.
Press the power button and then press the commandoptionpr keys. You have to make sure you press these keys before the gray screen appears or it won’t work.
Hold those keys down until your Mac reboots again (i.e. a 2nd time) and you here the startup chime.
Let go of the keys and let your Mac reboot normally.

Let me know what happens.


Airport extreme base station won't turn on I did something stupid, and I think it broke my airport extreme base station...

My airport extreme base station was working just fine. I was using a cheap USB hub to share a few external hard drives on my network. I was doing some changes so I unplugged the power to the external hard drive and the power to the USB hub. While reconnecting, I accidentally swapped the power cables and plugged the external hard drive's power cable into the USB hub while it was still connected via USB to the AEBS. I think it was too much power and it overloaded the AEBS. Now it won't turn on (no lights, can't find it with software).

Is there a way to fix this? In case it matters, the model number of the airport extreme base station is A1354.

Try disconnecting all power supplies from the outlet/power source and the device. After 3 minutes hold the reset button down on the AEBS and then connect the power. Continue to hold the reset button down until the light on the front starts flashing amber fast or 5 seconds has elapsed (which ever happens first). If after the factory restore [not hard reset] that if the device doesn't turn on in a minute it's AppleCare time. The AEBS should be covered under the AppleCare Protection Plan of an Apple computer or AppleTV purchased within two years of the AEBS. If they won't swap it out for you, ask for an exception :)


How do I rename an Apple Music station When I create a new radio station in Apple Music by selecting an existing song and then choosing "Create Station" from the right-click menu, it creates the station and gives it the name of the song I selected with the word "Radio" appended. How do I rename the station?

It's not possible... hoping Apple allows this in a future release.


Playing WhatsApp audio messages after locking the screen I just switched from an android phone to an iPhone. In android I was able to (continue to) play WhatsApp audio messages after locking the screen or even when switching between apps.

This doesn't seem to be possible in iOS, am I wrong?

Even I've been searching this for a long time. It seems not possible (atleast as of now).

You can use whatsapp web via safari. It continues playback even if the screen is locked or if you've switched app. You can control playback via the control centre.

Cheers!


macOS Mission Control strange behavior on Sierra I have noticed a bug in Mission Control on macOS Sierra (10.12.2).

Here's a GIF to reproduce the bug:

It happens when I try to open an app from the Dock, while I'm showing the Desktop: the app doesn't open, windows come back in place, then if I toggle Mission Control, the app I clicked before opens (or get in front if already opened).

Step by step, as shown in GIF:

Show Desktop
Click on any app in the Dock
App won't open, windows come back in place instead
Open Mission control
Exit Mission control: previously clicked app opens

Is anyone experiencing the same?

I was able to replicate the bug with your instructions. (mid-2014 rMBP, macOS 10.12.2) I would recommend that you report it to Apple to alert them of the bug.


Delete an app from the Launchpad I was looking on my Mac's Launchpad today and saw a few apps that I'd like to clean out.

I can't find some of them in the Applications directory, and the standard method of clicking and holding down, then clicking the X button isn't working – meaning that the X simply isn't showing up.

Is there a directory in Finder where I can find the items stored in the Launchpad and delete it from there?

Launchpad data is stored in a SQLite 3 database located at:

$HOME/Library/Application Support/Dock/UUID_Type_Filename.db

Example: 3BF614D8-048E-344B-9775-AA8ED64B3564.db

Whether or not you'll be able to successfully edit it depends on your SQL skills.

You could always just delete the file, probably best from Recovery HD, and it will rebuild itself when logging back in and opening Launchpad.  You could also just try deleting it and then in Terminal run the killall Dock command, then open Launchpad.  It should rebuild with only the currently installed apps.

Another thing to consider is maybe rebuilding the Launch Services Database may help. Note: Rebuilding the Launch Services Database may remove some customizations you've made and would need to set them once again.

In a Terminal:

/S*/L*/F*/C*/F*/L*/S*/lsregister -kill -r -domain local -domain system -domain user

Hint: Copy and paste the command above in the Terminal to avoid typos.

The full pathname is:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister

Although you can use the wildcard version, you don't need the fully qualified pathname version for it to execute.


How to use a kext that has just the info.plist changed without codesign or SIP disabled? Similar to How do I edit an info.plist file inside of a kext file?

There is a need to change how a kext works.

(Specifically /System/Library/Extensions/AMD6000Controller.kext/Contents/Info.plist needs a change in IOKitPersonalities > Controller > aty_config > CFG_FB_LIMIT from 0 to 3)

This can be achieved by manipulating the info.plist file inside the kext.

However, in newer versions of macOS, this requires either a certificate to re-codesign the kext or disabling SIP (at least partially with csrutil enable --without kext).

I am looking for alternative methods.

Loading the kext manually apparently doesn't offer the option to pass parameters.
Is there an nvram command to force this on boot?
Is using Clover the easiest way?

How to use a kext that has just the info.plist changed without codesign or SIP disabled?

If you have no problem in keeping SIP half-enabled like you mentioned, then you can proceed, but with caution. Unless you are really sure that this Info.plist change will work as expected, do the following:

Copy the modified kext into System/Library/Extensions after authenticating
Execute sudo chown -R root:wheel /sample_path_to_kext
Execute sudo chmod 644 /sample_path_to_kext
Execute sudo kextcache -i /
Restart

Alternatively you may use an app like Kext Wizard or Kext Drop and just perform sudo kextcache -i / at the end of their operation.

Lastly, I cannot stress enough how dangerous this is to your Mac. Please proceed only if you really know (or don't care) if something unexpected happens.


How do I work with (minimize/resize/un-float) a captive portal? Captive portals are those screen that float over everything while you're being logged into some network with terms of service (like a coffee shop or airport).

The one I encounter regularly takes almost a minute to connect after I "agree."

These "captive-portals" feel like they were built for a dystopian future...

How can I make these windows minimizable or move them out of my field of vision so I can use my screen for other things while I await a viable network connection?

Because of System Integrity Protection (SIP), a feature introduced in El Capitan to protect system files from modification by malware, you can’t just move the file if you have that feature enabled (it’s on by default).

So, first, you have to disable SIP on this case

Follow these steps to disable SIP:

Restart your Mac.
Before OS X starts up, hold down Command-R and keep it held down until you see an Apple icon and a progress bar. Release. This boots you into Recovery.
From the Utilities menu, select Terminal.
At the prompt type exactly the following and then press Return: csrutil disable
The terminal should display a message that SIP was disabled.
From the Apple menu, select Restart.

After this,

In the Finder, select Go > Go To Folder.
Enter /System/Library/CoreServices and hit return.
Find Captive Network Assistant, click it, and rename it with an extra word, like Captive Network Assistant Do Not Launch and press return.
Enter your password when prompted to make the change.

After this again, enable SIP, following the first process shared on this comment just by typing csrutil enanble


I can't seem to open this .jar file. Can someone make sense out of my error message? I'm trying to set up a modded minecraft server on my Mac.
I am on Mojave 10.14.6 and I have Java SE Oracle JDK 15.0.1 installed.
Each time I attempt to open the file forge-1.12.2-14.23.5.2854-universal.jar I get prompted  with a warning "The Java JAR file "forge-1.12.2-14.23.5.2854-universal.jar" could not be launched."
I also tried opening it with Terminal, relocating the directory and inputting java -jar forge-1.12.2-14.23.5.2854-universal.jar but here, i got the error back.
Unfortunately, I am unable to read code. I've done my researched and found multiple others with the same problem but they all had to do with their MANIFEST.MF file, I don't believe that is my case here, from the minimal info I could make out of the error message, I was wondering if anyone can help me find out what is the problem and how I can fix it. Thanks!

It works, I just have to update my java. sigh.


How do I restart the iTunes matching process? My main iTunes library was in the process of uploading to iTunes Match when I enabled iTunes Match on iTunes on another computer. I got a message saying that only one computer at a time could upload to iTunes Match, and because there were only a handful of items in my library on my secondary computer, I decided to interrupt the upload on the primary computer and quickly do the match on the secondary computer.

Unfortunately, once I did that, the "iTunes Match" sidebar item disappeared from the primary computer, and going into "iTunes Match in the "iTunes Store" just shows a page describing what I can do with iTunes Match.

How do I get my primary computer to resume the upload process?

In the menu bar, select "Store" -> "Update iTunes Match":

The match and upload process will restart.


iOS8 how can I reduce the amount of system alert dialogs that I'm being asked? Since upgrading to iOS8 I'm growing increasingly frustrated with the number of system dialogs that iOS randomly asks me.

location in background
set up family sharing
another email address added to another device
etc, etc, etc.

I find it really frustrating when I reach for my phone to take a picture and there's an alert dialogue sitting on top of the screen, it feels like I'm interacting with Windows 95.

Is there a way to reduce amount of popups and alert dialogues that iOS8 asks the user?

These popups are the base of the privacy features of iOS.
Also they are only displayed once if you allow the app to access the given service.

I should not bother much than that.


Cannot view Outlook invitations in Gmail web on my iPhone I have email through Google Apps that I access from my iPhone via the web.  I can view all emails and do everything I need to do except view invites sent from others using Outlook.  I see the message and who it was sent to, but none of the details about the actual time and place.  I can't accept or reject the invite so it never gets added to my web calendar.  Even if I look at my email using the "Desktop" link, it doesn't show the details of the invite.  If I look at it from my laptop, I see the details and can accept the invite and have it show on my calendar.

I do not want to add this account as a mail account on my iPhone, so web access is the best.  Other then not seeing the invite details, I have no other problems.  Is there a way to see those details?

Wallace, to get the full functionality, you should add your google apps as exchange account. Google has provided details for this at the following link:

http://support.google.com/mobile/bin/answer.py?hl=en&topic=14252&answer=138740


Is there any way to upgrade brew cask Is there any way to upgrade all brew casks? Something like brew cask upgrade?

As of December, 2017, brew cask upgrade is a thing.

https://github.com/Homebrew/brew/pull/3396


Is it possible to change the date of a photo in the camera roll? Can I change the date of photos that's in the camera roll?

Yes, you can accomplish this by downloading third-party apps from the App Store.

Pixelgarde

One I've found very popular from my web searches is Pixelgarde. This app not only lets you edit the date and time of when your photo was taken, but also change or delete the location where it was taken in, the person who took it, and much more.

Again, this is the one I've found most popular in my web searches, but please feel free to pick up the one you most prefer!

Hope this helped you out, let me know !


Restore data in iPhone I accidentally went into my phone and deleted my phone from Find My iPhone, I was surprised to see that all my photos and contacts and app were deleted, I want to restore my old data back, how can I do that?

You can do it from a previous backup saved in your computer (where is located iTunes) or from an iCloud backup.
Both the procedures can be done if and only if you previously completed a backup.

Restore from an iCloud backup

On your iOS device, go to Settings > General > Software Update. If a newer version of iOS is available, follow the onscreen instructions to download and install it.
Make sure you have a recent backup to restore from.
On your device: Go to Settings > iCloud > Storage > Manage Storage, then tap a device listed under Backups to see the date and size of its latest backup.
In the Setup Assistant, proceed to “Set up your device,” tap Restore from a Backup, then sign in to iCloud.
Proceed to “Choose backup,” then choose from a list of available backups in iCloud.


How do I export photos from my iPhone 6 to my Western Digital external hard drive for backup copies? How do I export photos from my iPhone 6 to my Western Digital external hard drive using my Mac? I need to clear up space on my phone already and can't believe how frustrating it is trying to figure this out.

Open /Applications/Image Capture.app, select your iPhone, then select your WD as the destination.

Then use Image Capture's delete button to erase all the photos from your phone.


Printing from the New York Times iPad App I have recently installed Printopia app on my MacBook so that I can print from my iPad to the various printers in my business. I have noticed that I can print from something like the Notes app just fine so I think Printopia is working as expected. However, some apps, especially like the NYTimes app, do not seem to have the print button anywhere in the interface, even within Share and More.

Any thoughts on how can I print the article that I am reading in the New York Times app?

The New York Times iOS app doesn't include print functionality.

If you wish to print the article, what you can do instead is to print it via Safari.

Tap on the Share button within the app and either tap on Copy or the Message icon to reveal the article URL.

Once you have the article URL, copy and paste it to open in Safari on your iPad.
Tap on the Share icon in Safari and you can use Safari's print command to print the article.


Does the OS X log notifications from the Notification Center? The helpful companion to the OSX notifications center Growl per default logs all received notifications. You can define how big the log may get or disable logging in the application.

Since the latest update Growl offers to forward all notifications to the OS X Notification Center.

Does OS X log Notifications Center messages as well? If yes, where can I find them?

Why I am asking this:

OS X logs all your downloads in a SQLite 3.x database. I want to know if something similar happens with notifications as well. This could be a privacy issue when thinking of private messages or e-mails if too much information is stored.

This is an old question, but just in case someone stumbles on it and is specifically worried about the privacy implications of Notification Center, the answer is YES, OS X does keep a log of notifications on disk.

The format is an sqlite database, and it can be found inside this folder:

~/Library/Application Support/NotificationCenter

Inside you'll find at least one .db file for your account, i've seen some that OS X apparently considered corrupt at one point, so they're called .db.corrupt.

Running the strings command on this file will show you a load of binary data, quite a few "NSSomething" class names, and yes, your iMessages, file paths, twitter and facebook notifications and anything else that was sent to Notification Center by an app or the system.

If you want to get rid of that file at a specific point in time, you can kill usernoted temporarily (it'll restart itself) and delete the file in one shot (run this as your user account, not with sudo):

killall usernoted && rm ~/Library/Application\ Support/NotificationCenter/*.db

This will, 99% of the time, catch usernoted while it's temporarily not running, successfully delete the old database, and usernoted will make a new empty one when it starts again.

This isn't a good solution if you're really worried about privacy, but aside from encrypting your system or using a ramdisk for that folder, there really isn't a solution.


Will maintaining lot of files in trash affect Mac OS X performance? I maintain more than 20 million files in my trash without cleaning.

Can it slow down my Mac OS X?

I was thinking about whether or not the Trash is just like any other folder from a file system's point of view. Let's assume that it is for a second, then another way to look at this would be "what's the worse that can happen to the performance of my Mac if I keep thousands of files in any folder? Mac OS X probably does some sort of memory swapping using the hard drive, so that would be the first problem of an increase in used hard drive space. But this may be the case of any folder, not only the Trash.

That reminded me of my Windows days and how running utilities to defragment a hard drive made my system feel faster after frequent defragmentation. However, unlike Windows, Apple claims that due to its design, their OS does not need defragmenting. Take a look at this interesting article. On it, Apple claims that it can handle thousands of files. However, Apple here is talking only about the file system itself.

John Siracusa, on his Ars Technica review of Lion mentions that performance does in fact decrease with thousands of files. However, the way I read his article is that the performance decrease is on the Finder UI itself rather than on the file system as a whole (i.e., the Finder is not the file system). It makes sense that if there is more information to prepare graphically and your computer was running multiple apps to the point of your system being very taxed for RAM; then the Finder will probably have a harder time rendering a simple Finder window to show thousands of files in the Trash.

Coming back to your original question, it seems to me that a user who never empties the Trash and only accesses its contents occasionally would not seen any noticeable performance decrease on the rest of his system--other than perhaps the Finder struggling to render the contents of the Trash every now and then. I would consider any performance hits on the system the same as with any other growing folder. Hope this helps.


How to fix curl: (60) SSL certificate: Invalid certificate chain when using sudo So since the Mavericks upgrade curl has more issues with certificates.

When trying to curl a file from my web server with it's self-signed certificate it was getting the error "SSL Certificate: Invalid certificate chain".

This was corrected by adding the certificate to my system keychain and setting it to always allow SSL, information I found here and here.

This works fine and when I curl a file it downloads properly.

However if I run curl with sudo before (e.g I have a script which needs to be run with sudo and does a curl in it) then I'm back to the same error message.

I'm guessing that root doesn't read from the system keychain perhaps?

Does anyone know a way to fix this?

f you store your CA certificates on the filesystem (in PEM format) you can tell curl to use them with

sudo curl --cacert /path/to/cacert.pem ...

You can also turn off the certificate verification with

sudo curl --insecure ...

Edit: Updated with regard to feedback

If you want to set this permanently, you should create a .curlrc files and place in your home directory. sudo commands may need this file in /var/root The file takes the same options as the command line but without the dashes. One option per line:

cacert=/path/to/my/certs.pem


Desktop files showing in command line shell but not in Finder I'm using iCloud drive. I have some HEIC files on my Desktop that I converted to jpg using a simple automator script. After the conversion, the jpgs are nowhere to be found in Finder or on the Desktop. In Finder, I see the .HEIC files still sitting there in the Desktop folder in the iCloud drive.

However, when I go to ~/Desktop, there are no HEIC files. I do see the converted JPGs, however.

From the command line, if I do touch test.txt the file does not show up in Finder but it does in the shell. However, if I create a new folder using Finder, the new folder does show up in the shell's directory as well as on the Desktop.

What is going on? This is maddening.

UPDATE: If I close out the Finder window and then reopen, the jpg files appear. The HEIC files are still there even though they don't show in the shell. Adding to the weirdness, I cannot open the HEIC files in Preview; nothing happens when I try. I can open the jpg files.

UPDATE 2: And actually, only 3 of 5 expected jpg images were visible in the Finder window. The other 2 only popped in after I deleted an unneeded folder on the desktop. It was then the HEIC photos finally got removed from the listing.

Moving ~/Library/Preferences/com.apple.finder.plist file fixed things up for me, at least for now.


What information does iPhone 4S Log-Aggregated 2012-12-12 contain? On the iPhone under the Settings > General > About > Diagnostics & Usage Data > log aggregated, what does this mean?

<key>appActivationCount.com.apple.MobileSMS</key> <integer>9</integer>

Does it mean the number of text sent or received or both?

It means that that program (the SMS application) was started 9 times on that day.

Whether that corresponds to someone checking the app in response to a message or simply entering the app isn't logged in that file. I don't know offhand if you can reconstruct that level of detail from any of the standard logs on iOS so you may need a forensic analysis of either the database the SMS app uses or the network / server side of things to track down delivery times or even something as detailed as a daily count of SMS messages.


Stickies and Notifications center hybrid The notifications center is always just a swipe away, but I never use it.

Stickies on the contrary I use them a lot, but I cannot easily have them on all desktops, hidden when I don't need them.

It would be perfect to be able to open stickies with the same gesture used for the notifications center, does anybody know if an app like this is available?

One option is to use the lighter version of Stickies available in the Dashboard.

Then use System Preferences to set a trackpad gesture to activate it. Then stickies are easily accessible while also out of sight when you don't need them.


Using a Gamepad To Control Any iOS Device? Gaming has taken on a whole new dimension since the introduction of the iPhone & definitely the iPad. Whilst these two Apple devices are great gaming devices, alot of games still try to emulate gamepads with onscreen buttons that are not so great.

Is there an App that will turn a gamepad eg an XBox 360 or Playstation gamepad into a controller for any game with touchscreen buttons & How to configure it ?

It's definitely possible to use a PS3 controller on a jailbroken iPhone. You need the $7 app Blutrol and the SixpairTool for MacOS X. Before I rewrite the instructions, please simply refer to http://lifehacker.com/5991266/how-to-use-a-gamepad-for-any-ios-game-not-just-emulators.

EDIT: In a nutshell

GETTING READY:

First, you need an jailbreak your iOS device. Then, download the App Blutrol (http://apt.thebigboss.org/mobileweb/onepackage.php?bundleid=ch.ringwald.blutrol&db=), which currently costs $6.99. In order to use the PS3 controller, you will need an additional app for MacOS: SixPairMac (ringwald.ch/cydia/blutrol/SixPairMac-v1.0.zip)

SETUP for PS3 controllers:
Connect the PS3 controller via USB Cable, and the iOS device (via lightning cable or 30-pin cable) to your Mac. Click the button "Pair Controller to iPad" in SixPairMac. Now, open Blutrol on your iOS device and select the PS3 controller.


What is the difference between `IO` and `Data` in the Activity Monitor? In the Activity monitor, under the tab Disk,

at the bottom center, there is a small graph which can be set to either IO or DATA

The two graphs look somewhat similar. I understand that I/O very likely stands for Input / Output.

What is the difference between IO and DATA?

I am on macOS 10.11.3 (El Capitan)

Apple provides an explanation on their Support site:

  The Disk pane shows the amount of data that each process has read from
  your disk and written to your disk. It also shows "reads in" and
  "writes out" (IO), which is the number of times that your Mac accesses
  the disk to read and write data.

Disk I/O is the number of reads/writes that are done (how many)
Data is the aggregate amount of data transfered (how much)


Will everything be erased? And will I get caught? Ok so I updated and I restored my iPod so everything about cydia on my ipod will be erased? If I go to an airport will they be able to tell that my iPod was jailbroken?

Nobody cares about jailbroken iOS devices.

Even Apple only care if you take it for a warranty repair (as handing a jailbroken device to them and saying "this doesn't work" will probably get a response of "well, you jailbroke it").

I would say relax and don't panic.

To answer the first part of the question, doing a system Restore will remove all traces of the jailbreak. It's MUCH harder to jailbreak an iOS device than it is to remove a jailbreak :)


Define Archive Folder in different account Following the question, How to change the Mail “Archive” folder for email accounts in El Capitan:

I have several mail accounts in macOS Sierra and would like to archive all mail in one folder in one specific account. It seems that I am only able to archive them in an Archive folder in the respective account.

Is this true? Can I set one Archive account (Gmail / All Mail folder) for all accounts?

This is not possible. Mail won't move messages between entire accounts for these kinds of automated actions.

However, multiple accounts can choose the On My Mac location, which removes the messages from the account into a single location. This isn't synchronised though.

You can provide feedback to Apple here:

http://www.apple.com/feedback/mail.html


If I'm using Gmail, can I clean out the space that "Mail Messages" are taking up on my hard drive? In looking to make some room on my MacBook Pro's Hard drive, I ran the excellent Disk Inventory X

As I expected, movies, my Aperture Archive and other media-intensive files took up a ton of my space. But I was surprised to find that files that Disk Inventory X categorized as "Mail Message" took up a whopping 22 GB.

I mostly use Apple Mail as my email client, although I've been giving Sparrow another try lately.  But in either case, other than a legacy MobileMe account that I never use, Gmail is my mail provider (and storage facility).

What the heck is stored locally in that size, and can I safely delete it somehow?

(I can't fathom it matters, but I'm running Lion.)

Mail is caching your Gmail contents and this is normal for IMAP. See this SuperUser question and answers for possible solutions and implications regarding SpotLight search through emails:

Disable all message caching
Disable attachment caching


How to enter password automatically in .command So my .command file looks like this

ssh someuser@someip.com

When I run just this it prompts me for the password, how do I make terminal enter the password instead of me having to type it in?  I have tried this:

ssh someuser@someip.com
password

But that does not work.

You could store ssh keys or store your password in the ~/.ssh/config file (see man ssh_config for details) but that would be kind of cheating since it's not really in your .command file.

You could of course script the addition (and optionally removal) of the entries needed to modify ssh keys or config file changes.

I would make a simple expect script - to wait for the password prompt and then enter your password.

#!/usr/bin/expect -f
set bad_idea cleartext_passwords_are_insecure
set timeout -1
# now connect using ssh
spawn ssh user@example.com
expect "*?assword:*"
send -- "$bad_idea\r"
send -- "\r"
expect elf

You don't have use a $bad_idea variable and could just send the password before the \r


How to verify if an extended attribute exist? When running

 xattr -d com.apple.quarantine /Applications/XXX.app

sometimes I get

 xattr: /Applications/XXX.app: No such xattr: com.apple.quarantine

How does one verify if any named attribute exist for a given XXX.app?

The following xttar command causes both the attribute names and corresponding values to be displayed, if any exist.

xattr -l file

You can also use the ls command:

ls -@ file

That said, the ... No such xattr: com.apple.quarantine message is a non-fatal message, meaning there no real need to make it conditional, and if your goal is to remove the com.apple.quarantine extended attribute from a lot of files at once in a given directory, then cd to the target directory and use the following command:

for f in *; do xattr -dr com.apple.quarantine "$f" 2>/dev/null; done

The above one-liner will delete the com.apple.quarantine extended attribute off every file that has it and act as if the entire contents of the directory recursively were also specified (so that every file in the directory tree is acted upon), thats the -r option, while not showing errors for files that don't have the target extended attribute. (That's what the 2>/dev/null does.)


"whatis" returns 0 for missing commands On macOS 10.14, using whatis on a command that is not installed prints 'command': nothing appropriate as is expected.  But returns 0 instead of an error code, which I believe is expected behavior.  It is also not consistent with man, which returns 1 after no results.  Additionally, whatis prints to stdout, while man prints to stderr.

This is different than Linux, which returns an error code, and prints to stderr.

macOS:

$ whatis abc; echo $?
abc: nothing appropriate
0

$ man abc; echo $?
No manual entry for abc
1

$ whatis abc 2>/dev/null
abc: nothing appropriate

$ man abc 2>/dev/null

Linux (Ubuntu):

$ whatis abc; echo $?
abc: nothing appropriate.
16

$ man abc; echo $?
No manual entry for abc
16

$ whatis abc 2>/dev/null

$ man abc 2>/dev/null

I believe whatis should not return 0 when it fails to find a description of the command, and should have behavior consistent with man

Note: I noticed this because I'm writing a program that relies on this functionality

Edit: apropos has the same behavior as whatis

On macOS whatis is just a shell script.

$ type whatis
whatis is hashed (/usr/bin/whatis)
$ file /usr/bin/whatis
/usr/bin/whatis: POSIX shell script text executable, ASCII text

If you look inside, the relevant part reads

while [ "$1" != "" ]
do
    found=0
    for d in /var/cache/man $manpath /usr/lib
    do
        if [ -f $d/whatis ]
        then
            if grep -"$grepopt1" "$grepopt2""$1" $d/whatis
            then
                found=1
            fi
        fi
    done

    if [ $found = 0 ]
    then
        echo "$1: nothing appropriate"
    fi

    shift
done | eval ${PAGER:-more -E}

So if no entries are found (the if [ $found = 0 ] part), the message is displayed without setting any exit code. Actually the script only exits with status 1 if wrong arguments have been passed.

The most recent update notice relates to 2003-08-01 as the date of update, so it seems to be rather old anyway. Whether the behaviour is a feature or a bug is open for discussion.

In case you are wondering about apropos showing the same behaviour: apropos and whatis are basically the same script.

$ ll /usr/bin/{apropos,whatis}
-r-xr-xr-x  1 root  wheel  1808 Aug 18 00:18 /usr/bin/apropos*
-r-xr-xr-x  1 root  wheel  1806 Aug 18 00:18 /usr/bin/whatis*
$ diff /usr/bin/{apropos,whatis}
26,27c26,27
< grepopt1=$aproposgrepopt1
< grepopt2=$aproposgrepopt2
---
> grepopt1=$whatisgrepopt1
> grepopt2=$whatisgrepopt2


2013 MacBookPro with Nvidia GPU and recent macOS I own an early 2013 15'' MacBook Pro (MacBookPro10,1), and I've been running every macOS update till Mojave, included. The mac has two GPUs, which get selected automatically depending on the running apps:

Intel HD Graphics 4000 (integrated)
NVIDIA GeForce GT 650M (discrete)

Recently I've been reading about the fact that macOS Mojave has dropped any support for Nvidia GPUs, and digging further I've found out that users have been reporting issues with my model specifically. Apparently, since High Sierra there have been issues with the GeForce GT 650M and macOS, with GUI slow downs and crashes. I've found plenty of posts of people complaining about the lack of support and drivers from Apple.

Personally I have not observed any of these issues, but now I wonder. I know for sure that I've been using the discrete GPU often (I track my energy usage), but maybe I've just not noticed the slowdowns.

I've inspected the version of the Nvidia drivers (system report > software > extensions), and it says:

GeForce:

  Version:          12.0.24
  Last Modified:    12/10/2018, 05:10
  Bundle ID:        com.apple.GeForce
  Notarised:        Yes
  Loaded:           Yes
  Get Info String:  GeForce 12.0.24 355.11.10.50.10.103
  Obtained from:    Apple
  Kind:             Intel
  Architectures:    x86_64
  64-Bit (Intel):   Yes
  Location:         /System/Library/Extensions/GeForce.kext
  Kext Version:     12.0.0
  Load Address:     18446743521870100000
  Loadable:         Yes
  Dependencies:     Satisfied
  Signed by:        Software Signing, Apple Code Signing Certification Authority, Apple Root CA

They seem to have been updated one year ago (with Mojave?), but that doesn't fit with what I've been reading about the total lack of support.

Does anyone know what's the current state of the game for my MacBook Pro model?

What you've been reading about are the third party nVidia Web Drivers, which nVidia created (primarily) for Mac Pro users installing new graphics cards in their towers. The nVidia Web Drivers do not work in Mojave or newer, leaving users of those GPUs stuck on High Sierra.

Your nVidia GPU is natively supported by Mac OS, and will continue to work in Mojave / Catalina.