How to stop OS X from writing Spotlight and Trash files to memory cards and USB sticks? When plugging a USB stick into a Mac, OS X creates a number of hidden files on the stick, including a Spotlight index and Trash folder.

Example from the terminal for a USB stick "Untitled":

$ ls -a /Volumes/Untitled
.Spotlight-V100
.Trashes
._.Trashes
.disk
.fseventsd

It even does this on the xD memory card for my camera, so after having copied my pictures and deleted them from the card, the card is still full.

Is it possible to turn this off for USB and memory cards, so OS X either writes these files to the primary disk or doesn't write them at all?

For just a particular mounted volume - like a flash drive called yourUSBstick in this example - these commands will remove existing cruft, stop Spotlight indexing now and in the future, stop the related fsevents logging, and disable the Trash feature.

mdutil -i off /Volumes/yourUSBstick
cd /Volumes/yourUSBstick
rm -rf .{,_.}{fseventsd,Spotlight-V*,Trashes}
mkdir .fseventsd
touch .fseventsd/no_log .metadata_never_index .Trashes
cd -

Other unfamiliar stuff you may still see you probably want to keep, like Apple double "._*" files and other Apple DS cruft relating to icons and window placement.

I got this to work on Sierra 10.12.3 in Automator.

First, I made this version of the script:
It functions the same way as freefly42's, just a different way of writing the same thing.

To translate for non-native bash speakers, what it does is:

If run with a commandline argument, it tries to see if the argument is a directory, and if that directory contains a file named ".disable_osx_metadata".

If the special file is not there, then nothing happens. That drive is ignored.

If the special file is there, the script deletes all the osx metadata and creates a few small new items which prevents anything else. For instance, creating a file named .Trashes prevents the OS from creating a directory named .Trashes and then writing files in there.

If run with no arguments, it runs itself once for each directory in /Volumes.

So, if you run it manually or click on it, it checks all attached drives.
If you create a workflow in Automator, then Automator runs it whenever a drive is attached, just for that drive.

#!/bin/bash
x=.disable_osx_metadata
[[ "$1" ]] || exec find /Volumes -type d -maxdepth 1 -mindepth 1 -exec $0 {} \;
[[ -e "$1/$x" ]] || exit 0
mdutil -i off "$1"
rm -rf "$1"/.{,_.}{fseventsd,Spotlight-V*,Trashes}
mkdir "$1/.fseventsd"
touch "$1/.fseventsd/no_log" "$1/.Trashes" "$1/$x"

Save as "disable_osx_metadata", chmod 755, copy to /usr/local/bin .

$ cd Documents/disable_osx_metadata/
$ chmod 755 disable_osx_metadata
$ sudo cp disable_osx_metadata /usr/local/bin

Then open Automator, New, Folder Action

Then I found that even in Sierra 10.12.3 you CAN still add the /Volumes directory in Automator, by a non-obvious way.

Go to Finder, File, "Go To Folder...", manually write in "/Volumes" and hit Enter.

Now this shows you a window with your HD and usb drives, but no obvious "/Volumes" folder to click on.
But the title bar says "/Volumes", and it appears at the bottom too.

You can drag the folder icon next to "/Volumes", either from the title bar or from the bottom, over to the Automator, and drop it on "Folder action receives files and folders added to:[______]"

Close Finder.

Back in Automator: on the left, scroll down and drag "Get Folder Contents" to the right and drop it.

Then on the left again, scroll down and drag "Run Shell Script" to the right and drop it below "Get Folder Contents".

Change "Pass input:" to "as arguments".
Shell:[ /bin/bash ]     Pass input:[ as arguments ]

Then drag the script from /usr/local/bin onto the box under "Run Shell Script" so it says
"/usr/local/bin/disable_osx_metadata"

File, save, disable_osx_metadata.workflow

For reference, this gets saved in:
/Users/YOUR_NAME/Library/Workflows/Applications/Folder Actions
If you save something wrong, I think you have to manually navigate there in Finder to delete it.

Finally, for each new usb drive you want to protect, you have to create a file named ".disable_osx_metadata" in the root folder.

You can do it in Terminal:
    $ touch /Volumes/NO\ NAME/.disable_osx_metadata

Or just keep a small text file around with a visible name (no leading dot) and copy it to the root of any new usb drive and rename it .disable_osx_metadata after copying.

That drive now gets cleaned each time you attach it from now on.

Not as clean as I'd like. You have to pollute the drive a little, in order to tell the OS not to pollute it more. There seems to be no way make the OS simply leave it alone and not add any files that you didn't ask for.

TODO: Add enable/disable functions to create/remove the dot-file.

TODO: This does not prevent the .DS_Store files in every directory.

TODO: Is it possible to package up the script and the foo.workflow file so a user can skip most of these manual directions? I see there is an "export" option in Automator that creates some sort of package file.

TODO: Possibly obsolete this whole post. This applescript + automator workflow might be better:
https://superuser.com/questions/319553/does-anyone-have-a-mac-terminal-script-to-remove-hidden-files/814104#814104


iPad won't accept Verizon SIM I have an iPad 4 model #1459(wifi/cellular) tied into AT&T/T-Mobile
 my carrier is Verizon. Is there anyway to change my ipad to Verizon?
I dropped in a Verizon sim card but got an error message "Sim is not Valid". It states insert SIM card from a supported carrier or request that this iPad be unlocked by your carrier and to contact Apple for more info.

Why not work through this checklist from Apple before contacting either the Carrier support or Apple Support?

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

Since you have a specific error message, you might also jump to one of the last steps first. Back up the iPad and restore it to factory new settings and re-test the SIM card that you think should be active.

https://support.apple.com/kb/HT201252

I've needed to call Verizon to get a SIM card to be part of a shared pool of data, but any active Verizon SIM should work, so once you rule out the iOS software - re-verify that the SIM you have is truly active.

Try a settings reset  or set your carrier to custom  it may be a locked or un activated sim card.


Can I put Newsstand into a folder? In iOS5 (and later) my newsstand icon will not go into a folder on either my iPod touch, or my iPad2. Anyone have any suggestions on how to move this application?

Looks like there is a way after all (even if it's most probably a bug because it renders Newsstand useless):

From The Coding Massacre:

Take two apps and go to create a folder
The second the apps are in the folder and it’s doing the folder creation animation, drag Newsstand into the folder
As long as you’re quick enough Newsstand will go into the folder

If you open Newsstand while it’s in a folder your springboard will crash.

Just install the new iOS 7 (free from Apple via iTunes).

Jailbreaking and similar "hacking" procedures usually cause more problems than they promise to solve...


How can I bring a window to frontmost without focusing it using Applescript in OS X 10.8 I want to bring a window (QuickTime for example) to frontmost, without focusing it. I can do it in OS X 10.7 using the following code in Applescript.

tell application "System Events"
    set visible of process "QuickTime Player" to true
end tell

This is a Python equivalent.

from ScriptingBridge import *
process = SBApplication.applicationWithBundleIdentifier_('com.apple.systemevents').processes().objectWithName_('QuickTime Player')
process.setVisible_(True)

But it does not work after I upgraded to OS X 10.8. Is there any way to make it work?

If an application has open windows, this should raise them above windows from other applications, but keep them below ones from the current application.

tell application "System Events"
    perform action "AXRaise" of window 1 of process "QuickTime Player"
end tell

So, from what I gather from your post, you are trying to bring an application into view using Applescript? If so, the code for this in Mountain Lion is actually fairly simple! Here it is:

tell application "Quicktime Player"
activate
end tell

I hope this works! If it's not what you wanted, let me know and I'll update it for you. :)


Time separators blinks inconsistently If I have OS X display the time in the menu bar with blinking separators, the seem to blink inconsistently. I've taken a 32 second video of the effect. It's happening on two of my MacBook Airs, 13" Mid 2011 model. Running MacOSX 10.8.4. One is used at work and the other is my personal machine.

I know that this is a rather small issue but I'm still very curious on what might be causing this problem.

Update

Looks like it's fixed in Mavericks!

Some thoughts about how to track this down:

In System Preferences > Language & Text > Region, do you have any unusual settings?  (Some of these influence the formatting of the clock... from the video, you have the same settings as me, but I wonder if you have anything unusual here that perhaps Apple haven't tested too well?)
Is there any pattern to the absence / presence of the separators?  Eg, from your video, I see they are absent at 46, 47 and 48 seconds: is this true for every minute?  (In which case, perhaps the cause of this might be some logic bug in the code that determines whether the separators should be shown for a given number of seconds.)
I believe the SystemUIServer process controls many of the icons on the menu bar, including the clock.  If you use Activity Monitor to quit it, it will quickly relaunch, but you'll get some insight into what that process is doing.

Some thoughts:

Is SystemUIServer perhaps using a lot of CPU?
Try removing any non-Apple menu bar icons for the moment (by quitting the appropriate apps), and see if the issue goes away.  I suggest this because: even if SystemUIServer isn't using much CPU (and the system CPU load is low), I suspect that if one of the menu icons it controls blocks (that is: performs some system call which doesn't immediately return, perhaps because it is waiting for some data), then the updates of the clock might be paused.

After discussion below, seems that unfortunately none of this has helped to isolate the issue.  The only remaining possibility I can think of is that you've run into an Apple bug... in which case, you might consider reporting it at bugreport.apple.com.  (I have a paid developer account, but I believe that isn't required to report bugs there.)

Maybe your system is going unresponsive between times. According to this book,

  if the colon stops blinking, you’ll know your Mac is frozen and you can restart it.

So, normal blinking says that your mac is faster and if it is slowing down, you may be running some expensive operation running. I experience this whenever I run Photoshop.


uTorrent keeps crashing (after upgrade to Mavericks) I've been using uTorrent for more than a year. But since I've upgraded to OS X 10.9, uTorrent (now version 1.8.4) keeps crashing: sometimes it works for maybe couple of hours, sometimes for about 15 minutes — and then just disappears (without displaying crash reporter or anything).

Example search for "torrent" in Console.app:

11/29/13 5:12:33.569 PM uTorrent[29203]: XPC error messaging com.apple.IconServicesAgent: Connection interrupted
11/29/13 5:12:33.569 PM uTorrent[29203]: XPC error messaging com.apple.IconServicesAgent: Connection invalid
11/29/13 5:26:33.990 PM uTorrent[29203]: uTorrent(29203,0xa081c1a8) malloc: *** mach_vm_map(size=8388608) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug
11/29/13 5:26:47.186 PM com.apple.launchd.peruser.501[177]: (com.bittorrent.uTorrent.41744[29203]) Exited with code: 1
// crash @ 5:26, (manual) restart @ 5:50 PM and crash again @ 6:16 --G.M.
11/29/13 5:50:38.483 PM WindowServer[96]: disable_update_timeout: UI updates were forcibly disabled by application "µTorrent" for over 1.00 seconds. Server has re-enabled them.
11/29/13 5:50:38.797 PM uTorrent[29519]: *** WARNING: -[NSImage compositeToPoint:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
11/29/13 5:50:38.797 PM uTorrent[29519]: *** WARNING: -[NSImage compositeToPoint:fromRect:operation:] is deprecated in MacOSX 10.8 and later. Please use -[NSImage drawAtPoint:fromRect:operation:fraction:] instead.
11/29/13 5:50:40.450 PM WindowServer[96]: common_reenable_update: UI updates were finally reenabled by application "µTorrent" after 2.97 seconds (server forcibly re-enabled them after 1.00 seconds)
11/29/13 6:16:58.007 PM uTorrent[29519]: uTorrent(29519,0xa081c1a8) malloc: *** mach_vm_map(size=8388608) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug
11/29/13 6:16:59.226 PM com.apple.launchd.peruser.501[177]: (com.bittorrent.uTorrent.41744[29519]) Exited with code: 1

I've tried to google something either about uTorrent and Mavericks in general, or about uTorrent and errors from this log — to no avail.

Does anybody else have this problem? Any advice?

Upd. Following advice from answers I've tried upgrading to uTorrent beta 1.9.1. It seems to be slightly more stable but the problem persists:

11/30/13 11:15:53.540 PM uTorrent[3250]: uTorrent(3250,0xa081c1a8) malloc: *** mach_vm_map(size=8388608) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug
11/30/13 11:15:53.541 PM uTorrent[3250]: uTorrent(3250,0xa081c1a8) malloc: *** mach_vm_map(size=8388608) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug
11/30/13 11:15:54.434 PM com.apple.launchd.peruser.501[178]: (com.bittorrent.uTorrent.41744[3250]) Exited with code: 1

P.S. Warning: uTorrent beta 1.9.1 corrupted some of my files (instead of something.avi I now have something.avi and something.avi.1 — in different folders and neither of them is playable). I can't recommend this 'upgrade', to say the least.

It's time to try some other client, I guess.

The 1.8 version of uTorrent isn't updated for Mountain Lion notifications and the malloc errors you posted indicate a fairly severe memory management problem. Unless an update past 1.8.4 gets released, you might try running the 1.9 beta version as it has memory leak corrections listed in the release notes.

It contemplates newer OS explicitly and the fix for this error might arrive there first or exclusively.

http://www.utorrent.com/downloads/mac

You could add Vuze to the alternative list. It is also free and allows use of a proxy server.


Does the Apple Watch (new serie 1) couple with iPhone 5 iOS 9? I am running my iPhone 5 with iOS 9.  This setup is already slow and I don't want to update to iOS 10 to make it slower. I'm also considering buying the cheaper Apple Watch which needs tethering to my iPhone to access locations, etc.

Could there be any problem with an iPhone NOT running iOS 10 with an Apple Watch?

According to information I got from Apple watchOS3 requires iOS10.


Is there a way to unlock a password protected iPad? A friend's father died a couple of weeks ago. He usually used the same numeric password on all devices. But not on his iPad. I can't even reproduce the password via the fingerprints. The lock time is already at 60 minutes. Is there some kind of an exploit or process at Apple which can help us to retrieve the information from the iDevice or is a full reset the only way to use it?

PS
This isn't a question about morals or ethics. The friend has reasons to try to recover the data. The loss of her father left a million questions open and she thinks there might be answers in his personal data.
I appreciate any answer, but please, don't judge over a fate or a question, before you are sure what the reasons may be.

I'm not sure a general answer can be given with the lack of details in this specific case, but like any data recovery situation, it pays to stop and get some professional help to at least understand your options.

How valuable is the data? Give an order of magnitude guess. $10, $100, $1000, $10,000, or more? The solutions for each involve different timescales and tools.
STOP trying to guess the passcode - it could have a 10 guess and the iPad erases itself trigger set. The trigger could even be less than 10 incorrect guesses. Your next attempt to unlock it could be your last chance to save the contents.
What else is available? In almost all cases, a computer exists that will unlock each iOS device - so rather than trying to guess the passcode - see if you can locate that computer instead.

Here are support articles that should help anyone in this situation:

iOS: Understanding passcodes  - http://support.apple.com/kb/HT4113
iOS: Forgotten passcode or device disabled after entering wrong passcode  - http://support.apple.com/kb/HT1212
iCloud: Find My iPhone overview - http://support.apple.com/kb/PH2696

Once you realize that time is on your side and that the system is designed to not be compromised by someone that finds the device, your chance of success will increase with the added care you bring to the task. That design notwithstanding, there are often circumstances when a passcode gets forgotten or not handed to the device's current owner and you have a few avenues to get the passcode reset or bypassed without erasing the device's contents whether you try to crack the PIN with a tool or work around the security by locating the computer that can unlock the device for you.

you can probably be hopeless now... sorry for ya but if he updated it to IOS7 you are in really big trouble.
try doing this: hold down the close button until you see the slider, dont slide it. then close your smart cover. open and press cancel


Command + C does not always work on first try on MacOS Command + C does not always work on first try on any of my four Macs.  I often highlight text, press Command + C, head to another window, press Command + V only to find that the original text did not copy.

I recently installed a fresh copy of macOS High Sierra and I continue to run into this issue, particularly in RStudio.* The issue never occurs on my PCs.

Do others have this issue? How can I resolve this?

*I use bettersnaptool and enable three finger dragging, but the issue still appears when I disable them.

I think it's possible for Apple's Continuity Universal Clipboard feature to cause something like this, depending on the quality of the signal connection with any nearby iOS devices.

Perhaps try turning off "Allow Handoff between this Mac and your iCloud devices" in System Preferences > General and see if that helps.

This issue is real and I think every mac user experience it on a weekly basis, but likely people continue to doubt themselves over if they actually command c or not properly.
The fix. If you are using Karabiner like real hacker should:
Just add this to your karabiner complex configurations:
[
    {
        "from": {
            "key_code": "c",
            "modifiers": {
                "mandatory": [
                    "left_command"
                ]
            }
        },
        "to": [
            {
                "key_code": "c",
                "modifiers": [
                    "left_command"
                ]
            },
            {
                "key_code": "c",
                "modifiers": [
                    "left_command"
                ]
            },
            {
                "key_code": "c",
                "modifiers": [
                    "left_command"
                ]
            }
        ],
        "type": "basic"
    }
]

Now that should make the copy flash a few times in the menu.
You can increase or decrease as much as you want. Personally I have a few more.


"All" missing from favorites bar in mail on Mavericks I used to have a choice "All" on the favorites bar in Mail on Mavericks. (This is on an iMac). It has disappeared.  Is there a way to get it back?

You can try dragging all mail from the sidebar up to the favourites bar:

"All" appears when you search. When not searching, "Inbox" will display all of your received messages.


How to see compass accuracy and recalibrate the compass in iOS 10? My compass is often wrong, which leads to all directional modes of maps being wrong (very annoying for back country trail following).   In old versions of iOS I remember the 'figure 8' popping up sometimes, but you don't see that anymore, nor have I found a way to determine if my compass is calibrated or not, other than checking the width of the blue cone in the Apple Maps app when you are in compass mode (it seems to get narrower as the compass is more accurate).

Is there any way to force recalibration in iOS 10, and/or see further information about current accuracy?

In troubleshooting this, I learned a few important things:

While there is no way to manually force a recalibration of the compass aside from toggling location services on and off, generally the compass attempts to recalibrate itself when an app requests it if it has not been in use.
The 'blue cone' in maps seems to be the best way to easily tell how accurate the calibration things it is.
Arguably most importantly (and most embarrassingly), my issues were entirely caused by a case that I was using that had a small magnetic clasp in it.  Everything worked just great after getting rid of it.

Go to true north settings. Go to settings and change it will resolve


Prevent StandBy closing MacBook lid during no power connection but Display connected I have currently no power connection to my MacBook Air, but I have a Display connected. I want to close the lid and only work on my external display.

So I want to prevent my MacBook going to StandBy when I close the lid. When I have the power cable connected, it will just switch to the bigger screen. But when the connector isn't attached, it will go to sleep.

  How to prevent going to StandBy if no power connector is attached? Any
  app or terminal command?

I am running OS X Yosemite on a MacBook Air mid-2011.

NoSleep prevents sleep when lid is closed.

there's an app called insomniax which can disable lid sleep for you, i was looking for the same thing as you but this is all i found..


VPN Auto connect Notification I have implemented a VPN auto connect option via Applescript [see code]. It works like a charme there's only one problem. Every time when i open my MacBook I get this [see printscreen] notification. A few seconds later it reconnects as it should. How can I stop that notification from showing up? It's very annoying.

on idle
tell application "System Events"
    tell current location of network preferences
        set myConnection to the service "my vpn name"
        if myConnection is not null then
            if current configuration of myConnection is not connected then
                connect myConnection
            end if
        end if
    end tell
    return 120
end tell end idle

The problem comes because the VPN server is killing the connection sometime after the mac goes to sleep.

Try disconnecting the VPN before going to sleep, automatically, using sleepwatcher as described in this Q&A.

I created a script and launch agent to accomplish the same thing. This method avoids that message(tested on OS X 10.11.3). The agent calls a shell script every 30 seconds and tries to ping an IP address that is static on the vpn network. If it cannot ping that IP it enables your vpn connection.

If you did this through an Apple Script App, the app icon will always be in your dock. I prefer to have this running automatically in the background.

Clone the project below and follow the directions in the readme. The end result is an installer package that will place a launch agent plist file in /Library/LaunchAgents/ and a shell script in /Library/Application Support/melonsmasher/.

Be sure to edit the shell script(auto-vpn) with your VPN connection name and an IP address that is on the VPN network. You can change the run interval in the plist file(com.melonsmasher.autovpn.plist).

https://github.com/MelonSmasher/OSX-AutoVPN


Cannot turn Bluetooth off I cannot turn Bluetooth off on my MacBook Pro. I am running 10.7.4 and the option to turn it off is grayed out, both in the toolbar and in System Preferences. I used Onyx to reset permissions but to no avail. Help, please! I am not using any Bluetooth devices and I'm not sure when or how it got turned back on, but I've always made sure it was turned off. My battery is paying the price!

I would install a clean copy of OS X on to an external drive and test to see if your current OS is corrupt. If the hardware doesn't let you turn it on or off with a clean install, you have saved yourself having to back up and erase the internal drive and know to take it in for repair.

If you find it's corruption, you could then run Migration Assistant to take the data from the internal drive to the new clean OS and re-test before doing the erase and copy of a working OS with your personal data and settings.

Try to reset your SMC as per instructed  here

got some answers from here


Mavericks unusually high RAM usage I thought Mavericks was suppose to utilize RAM memory better, thus run smoother.

Running ML on Mac mini 2012, with 16GB RAM...always running smoothly even with over a dozen apps running.

Now, after installing Mavericks, my Mac is SLOW, eating up RAM like crazy! Looking over usage, of the 16GB of installed memory...on average it uses 10-14 GB RAM when barely running a few apps!!!

There is this kernel_task that is always running with over 1GB of RAM and most apps are not taking that much RAM, so what is using up all my RAM?! File cache? It shows very high in that new description, with about 1/3 of my total RAM

Who said that this memory use is bad in any way? At the very least, the OS will be using the memory so that it can spin down your hard drive at the first opportunity. Hard drive access is energetically expensive. RAM is already powered up, so letting it sit idle is truly wasteful.

The question is a yet another post in the style of "oh no my ram is all used up, bad [insert your bogeyman here]". Let's get it out of the way: RAM should be always fully utilized. You paid for it, you're paying to keep it powered up, it's really counterproductive for all this money to go to waste.

If your computer feels slow right after updating, it's true that the indexing service may be to blame. Let it stay on overnight, make sure you get a full Time Machine backup done, and see what transpires next. Don't get hung up over RAM consumption - without some rather technical understanding of what those numbers mean, you can't make any use of them. They are red herring. It's a curiously recurring pattern.


Tethering blocked with message about contacting provider Sometimes when I want to use tethering I get a message that I need to ask my provider.  How can I "unblock" the Personal Hotspot feature so it always works?
(In the phone, obviously)

Phone is not under contract and tethering on Android works with the same provider. There is no reason it should not work with my end provider.

The phone had separate APN settings for "MOBILE DATA" and "PERSONAL HOTSPOT".  Copying from the mobile data ones solved the problems.

(With this provider, the date settings are often not be set automatically when switching SIM, at least on Android.  Also I don't remember the two settings to be separate.)

You'll have to do as the message says and contact your provider.


iPhone 4s text messages still appear in iPhone search results after being deleted I have deleted a number of text messages on my iPhone. But, when I scroll to the right and to do an iPhone search, the deleted texts still appear in the search results.

How can I get rid of them?

The messages are still stored in a cache database, with a field "removed yes" or "removed no", speaking in easy terms.
You can get rid of these, if you really have to by syncing your phone with iTunes.

If that doesn't fix your issue you can create a back-up and restore that backup.
Restoring should clean the cache databases and making a back-up first makes sure you get exact the same version back as you had previously.

However, I don't know if you use spotlight often -> I just disabled many results from appearing in Spotlight.

Settings -> General -> Spotlight

Delete cookies and browser history after deleting the text.


In my google chrome for mac, CMD + Shift + r to reload the current webpage does not work? This Google Chrome keyboard shortcuts support page, in the Mac > Webpage shortcuts section, indicates:

  Reload your current page, ignoring cached content:    ⌘ + Shift + r

But that keyboard shortcut does not work for me, my mac only beeps when I press those buttons.

⌘ + r works as expected, but ⌘ + Shift + r only beeps.

I'm lost how to fix this. Any ideas?

In most cases, the reason is, that another application does already listening to the same shortcut.

  In my case it was another running application called Be Focused (Pro) which uses the same shortcut (CTRL+CMD+R) defined as a global shortcut per default.

1.) Try to close a bunch of running applications

Try closing all other running applications. Even the apps which has only an icon in the macOS tray area.
Try the problematic shortcut after a restart of Google Chrome (chrome://restart)
If the shortcut works now, you know that at least one of the closed applications listening to that shortcut and prevents it from working in Google Chrome.

2.) Try to open program for program and test the problematic shortcut in Google Chrome (after a restart) if it still works.

  When you found the responsible application, try to adjust their shortcut configuration.

In my case, I need to Turn On my Developer Mode.

To turn on Developer Mode on Google Chrome.

Open your Google Chrome.
Navigate to chrome://extensions/
Turn On Developer Mode on your Top right hand Corner.


Share links, notes, and pictures between iPhone and Mac? Just like the newly presented iMessage but instead of just between iOS devices, with the Mac too.

I've looked at Handoff. It can only send links to the iPhone from the Mac.

I've looked at Droplr. It requires public sharing on a Twitter account. Not what I want.

I've been using email and have been recommended Evernote. But these solutions require a document that I must create, wait to sync, and/or later delete to free up clutter. I just want to send a quick message.

I just want an app/application pair that can quickly share links, notes, and pictures between devices, like iMessage.

Does what I desire exist?

Apple OSX Mountain Lion has been announced, it includes a few of the iOS apps on the mac desktop such as Notes, Game Center, reminders, twitter and message.

http://www.apple.com/macosx/mountain-lion/

Currently, the best app for this is DeskConnect.


Applescript run code at specific time I tried different way to run a script on a specific schedule / time,
I found Lingon quite handy, I also try using calendar but the result was very bad.

I wrote this :

repeat
    set myDate to date string of (current date)

    set myTime to time string of (current date)

    set myDateTime to myDate & " - " & myTime

    if myTime > "11:30:00" and myTime < "11:30:10" then
        display notification "demo - This is the time"
    end if
end repeat

which seems to work fine but obviously, generate a few notification.
How can I run a script only once when this condition is found ?

I thought I can play with some delay but then I'm worried I would miss the time condition.

This is just a slightly more efficient re-hash of the existing answer...

set gIsThisTime to false

repeat until gIsThisTime is true
    delay 60
    set myTime to time string of (current date)
    if myTime > "1:15:00 pm" and myTime < "1:20:00 pm" then
        set gIsThisTime to true
    end if
end repeat

set myDate to date string of (current date)
set myDateTime to myDate & " - " & myTime
display notification "time = " & myDateTime

Notes:
leaving out am/pm means it will trigger on either am or pm, whichever it hits first
it doesn't work on 24-hour clock, so 13:15:00 will not trigger

Ok I think I found it :

set isThisTime to false
repeat
    set myDate to date string of (current date)

    set myTime to time string of (current date)

    set myDateTime to myDate & " - " & myTime

    if myTime > "11:30:00" and myTime < "11:47:26" then
        set isThisTime to true
        exit repeat
    end if
end repeat

if isThisTime is true then
    display notification "in the time"
end if


How do I take a screenshot on the iPad? How do I create an image, containing a copy of the current screen display, on the iPad?

Press both the sleep/wake and the home button simultaneously, and release quickly. The screenshot will be taken (in any app) and saved as an image, available within the Photos app.

Press both the home button and the power button at the same time. This will save the screenshot to Photos. You can then edit the screenshot as you would a normal photo. I've noticed the screenshot comes in handy whenever you want to copy a photo, but are blocked from downloading it. :)


How can I make allow users with older versions of iOS to download an older version of my app I've updated my app and due to some of the functions I'm releasing it has to be for iOS 10 and up.  I understand that there is a way for users that have not upgraded to iOS 10 to be able to get the older version of my app but I haven't been able to figure out how to enable that in the app store.  I just tested on a device and currently if you have iOS 9 it will tell you that you can't get the app because it is only supported on iOS 10.  No option to download the previous version.

According to the redit article below Apple enabled the behavior I want.  I just don't know how to turn it on for my app.

https://www.reddit.com/r/apple/comments/1mjw36/people_with_old_ios_devices_you_can_now_install/

The feature has been around for a number of years. It's enabled for every app by default and an opt-out for developers per app version. You can remove an older app version from download through iTunes Connect → My Apps → app → App Store → Pricing & Availability → Last-Compatible Version Settings → Available Versions.
The key information as to why you are seeing the feature not working is mentioned in this page:

Some of your customers may not have a device that's compatible with your latest app version. To allow them to continue using your app, we make the last-compatible version of your app available to them.
If one or more of your app versions have significant usability or legal issues, such as infringement, deselect it below. This isn't recommended for any other reason. Any version you deselect won't be available for redownload from iTunes in the Cloud. You can't deselect your current App Store version.

iTunes Connect Last-Compatible Version Settings, emphasis mine
Downloading a previous version of an app requires the app be downloaded from iTunes in the Cloud, i.e. the app must be in the user's purchase history. This means it does not apply to new downloads, but rather re-downloads.
For a user to download an app which requires a later version of iOS, they must first either:

purchase/get the app on a compatible device
purchase/get the app in iTunes

This adds the app to the user's purchase history and is now eligible for last-compatible version download through the feature popup as you mention.
sample:

Because you indicated in iTC that your app supports iOS 10 at a minimum, users will only be able to download that version from the App Store.

You will need to change your app to support earlier iOS versions in order for users to have access to the previous version.  By making the app decisions you did, users not on iOS 10 will not be able to use your latest update.

Users on earlier iOS versions must prevent your app from being updated from the current version on their iDevice in order to keep that version working.


How to remove a file that 'ls' finds it but 'rm' does not? I have a weird situation with a file that sticked into my file system and apparently there is nothing I can do to remove it. There is a file in the Trash folder of my external hard drive, and it can not be deleted. Trying with mac "Empty Trash" it says the file is in use:

"The operation can’t be completed because the item “Funny Film” is in use."

I tried to remove the file/folders from command line:

$ pwd
Volumes/My Book/.Trashes/501/Clip old/Funny Film

$ ls
000␀0000.␀P4

$ rm 000␀0000.␀P4
rm: 000␀0000.␀P4: No such file or directory

$ ls -i
ls: 000␀0000.␀P4: No such file or directory

$ ls -l
ls: 000␀0000.␀P4: No such file or directory

$ stat ./000␀0000.␀P4
stat: ./000␀0000.␀P4: stat: No such file or directory

I had this problem for some time now. I have tried several different things without success. The external hard drive have been used over ftp, with Windows, Ubuntu and Mac operation systems. How it is possible that 'ls' finds the file while 'ls -l' failed? More importantly, how I can fix the situation and delete the file?

Use ls -i On the entire directory. Then use the find command to pass the inode to rm.

https://apple.stackexchange.com/a/29618/5472

The easiest way is to use El Capitan Cache Cleaner (free), which has an option to "Force Empty Trash".
As for the rm command not deleting file it is most likely confused with the file name, which is very hard to enter properly escaped. There are at least three ways of dealing with it. First is by using quotes or backslashes to get around special characters in the file name, the other is to use an asterisk (*) to get all files, and the third is to use the -delete option in the find command to find and delete found files. Hope this helps.


Target Display Mode between a Dell XPS and 2013 iMac I have been searching for a long time for the answer to this question.

I have a Dell XPS laptop with minidisplay port out and a 2013 iMac.

Can I buy a mini-display port cable and connect it to the thunderbolt port on the mac and use Target Display Mode.

or

Can I buy a thunderbolt cable and connect that to minidisplay port on the Dell and use target display mode

I'm pretty sure it can't be done - but I can't find anywhere that categorically says so.

Two reasons in your particular case.

The iMac 2013 needs Thunderbolt to Thunderbolt, not mini Display Port.

Both machines need to be running macOS to enable the function.
Macs running Windows in Boot Camp cannot use Target Display Mode.

Background info from Apple KB - Use your iMac as a display with Target Display Mode

Also -
Using MacBook Pro as keyboard/mouse for Windows computer for alternative methods of displaying one machine on another.

Pretty sure Dell xps 13 9360 can be connected to an iMac. It has a thunderbolt connection.


Deleted my Photos.app accidentally I accidentally deleted my Photos.app from /Applications dir. I looked up the internet but couldn't find a way to get it back.

Where do I download it from?

Update

I held down Option key and clicked on the Photos.app and it asked me to create new Photos Library file. So my original question wasn't correct!

How did you delete Photos.app. It's an required macOS app. It's like if you try to delete System Preferences.

Maybe you didn't see the app. Try to search it with Spotlight.

Recover Deleted Apps on iPhone

Open the App Store

Tap on App Store on iPhone

Tap on “Updates” from the menu at the bottom → Tap on “Purchased”.

Tap on Purchased on iPhone

Now, tap on “Not on This iPhone” menu on top.

Tap on Not On This iPhone

Find the app that you deleted and want to re-install.

Tap on the cloud icon and the installation will begin.

Download Purchased Apps from iCloud

Alternatively, you can search for the purchased app on the App Store.

Search Purchased Apps on iPhone


Forgotten iOS Restrictions Password/Passcode My dad put restrictions on my phone. He put it for many things that he didn't even know about. For example, downloading and deleting apps and Safari. So now that I want to do different things on my phone, I can't because my dad forgot the password.

Is there a way that I could take off the restrictions without deleting all of my things? If that isn't possible, then how can I restore my phone so the restrictions could come off? I heard that you can use find my iPhone someway so I could take off the restrictions but I'm not sure and I don't want to do the wrong thing.

There's a tool that can recover the restrictions passcode from a device backup, called Pinfinder. Follow the macOS instructions and download the tool which is a command line binary and it will recover your pin.

Just go  to Restrictions or Accessibility..idk..either way, get to Clear Browser Data and restrictions will be off.


Force quit then restart, all apps still active iOS 9 I am running iOS version 9.0.1. This problem has been happening since iOS 9 came out. If I double click the home button, then swipe up on my open apps, it used to close them out for good. When I would restart, there were no open apps. However, now when I force quit every app and restart, they are all open again. Even if I close out of everything and maybe have Twitter open and a game, when I restart, I have a ton of apps open when I only had two before restarting. Does anyone know what is going on?

The list of apps shown after double clicking the home button is not only the list of open apps but also the list of apps most recently used. Or in other words: not all apps in the list are actually "open" (whatever this means on iOS anyway).

I've been struggling with this very big on both iPhone 6 Plus and iPhone 6s Plus after upgrading to iOS 9.

I finally figured out how to solve this problem without whiling the device and 'setting up as new.'

Solution: 'Reset All Settings'

That's it. Good as new. No content or media erased (differs from 'Erase All Content'), just retyping a few passwords for iCloud, wifi and recustomizing your ringtones and notification settings.

Was dreading having to wipe my device and Setup As New...


Will Mountain Lion run on an early 2008 MacBook White? I know it isn't in Apple's list of supported Macs, but I want to know if anyone has tried it.

Also, my Mac has 4GB of ram and plenty of disk space. It currently runs Lion.

As Steve Moser says there is no support for 32 bit drivers and Mountain Lion will refuse to install on the macs which had 32 bits drivers (someone seems to be too lazy to rewrite them?).

If this answer is not the one you want to hear, then you can install Mountain Lion the hard way. Because there is a way (which worked for the preview).

You will need another compatible mac (support) and you will have to do some hard drive switching.

The idea goes as follow:

Get Mountain Lion
On the target Mac remove the hard drive (target drive)
On the support Mac insert the hard drive (USB or internally)
Install Mountain Lion on the target drive
Put the target drive back in the target Mac
Boot on the target drive holding Cmd + V And write down the ID given in the error message "Incompatible Mac detected: ..."
Put the target drive back to the support Mac and on this drive in /System/Library/CoreServices edit PlatformSupport.plist

Add your board ID in the SupportedBoardIds section.
Add your model ID in the SupportedModelProperties section.

Put the target drive to the target Mac
Boot

You should be able to get to the desktop but without hardware graphics support.

To enable the graphics hardware support you will have to install the right kernel extentions. You could use kexthelper.

EDIT: To avoid all the hard drive switching and messing with internal components you can boot the target Mac in the so conveniently named "target mode" and connect it to the support Mac on which you could install the OS to the target drive and then boot on the target drive to edit the plist files.

Mountain lion will run on a early white MacBook. Below is a screenshot of my Mac for proof, also you can max the RAM out at 6GB


Where to place my pictures from a harddrive So I've used windows all my life and am giving osx a shot.
I have an external harddrive full with images stored in multiple levels of directories.
eg.
 -car
    -ferrari
    -audi
 -family
   -2020
 -house

Should I just copy everything to:
/users/myusername/Pictures

There is also a directory inside there called Photos Library.photoslibrary can that just be removed?

If you use the Photos app, do not remove the Photo Photo Library.photolibrary directory.
You can place the pictures you have on your drive in the Pictures folder. What I would do is create a new folder inside Pictures and place my image files in there.
You can use the Photos app to browse your library in the directories you placed in the new folder under Pictures. If you would like to not use the Photos dedicated library, you can remove that option in the Preferences of Photos under General > Importing > Copy items to the Photos library. Make sure iCloud Photos is deselected under the iCloud tab in Photos.

You can make a folder that contains several sub-folders. And let's just call this folder HDD-Photos. So we create a folder within ~/Pictures, otherwise everything is confusing.
Use the terminal and use it to create a subdirectory of ~/Pictures
mkdir ~/Pictures/HDD-Photos

Switch to the removable medium, the hard drive from which you want to transfer your data to the Mac afterwards.
cd /Volumes/HDD-Photos

Copy all files from the removable medium to the HDD-Photos folder
cp -R * ~/Pictures/HDD-Photos

Note: If you don't want to work with the terminal, that's no problem either. You can import the photos/ videos from the removable medium into the folder of your choice in the Finder using drag & drop

You can also import all of your photos & videos into the macOS photo library. To do this, simply open the directory with the ending ".photoslibrary" to open the Photos application. When you have this open you can press SHIFT + CMD + I. Now a Finder window opens where you can import your file.
Please note, however, that all of your videos and images are then stored in one directory. You can also select certain images from the photo library and save them in an album in the sidebar of the photo library. You can save multiple albums and store photos or videos on them.
If you prefer the variant above where everything is separated from each other, you can of course take the one above.


How do you force a 5 GHz wifi connection? Wifi networks are often set up in dual-band mode, with the same SSID served on both 2.4 GHz and 5 GHz bands. I'd like to always use the 5 GHz band (due to interference with Bluetooth and other devices that degrades performance). How do I force Mac OS X to use the 5 GHz base station? (I do not have admin access to the network, so I can't just assign the 5 GHz network a different SSID.)

Note that this question is not asking how to force a particular flavor of 802.11, rather it is asking how to force a particular frequency band.

In short: you can not force a frequency band in OS X 10.9 Mavericks. (On 10.5 you can...)

You want to connect to the device using Basic service set identification (BSSID) instead of regular Service set identification (SSID). Connecting to a BBSID will connect you to a specific device regardless of the connection strength. Connecting to SSID will connect you to a specific network name, if similar network names are available it will connect to the best signal/noise ratio. It must be noted that your OS X chooses the wlan, not your router, and OS X switches to the strongest signal available (2.4GHz or 5GHz).

To find a specific SSID and BSSID combination, you can run:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan

Before OSX 10.6 you could connect to a specific BSSID using:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --associate=XXX --bssid=YYY

Where XXX is the SSID/network name and YYY the MAC address of the base station you want to talk to.

On OS X 10.6 and beyond it is no longer possible to connect to BSSID directly. There is no known API for this and no third party Software exists that can do this. So you need to change your 5GHz SSID to a unique name or you need to go back to OS X 10.5, or you can change the 2.4GHz channel from within the router. I think these options are non-valid in your case.

UPDATE As maxim points out, you can force a frequency band and use that to fix to 5GHz.

On linux you can use iwconfig, but this tool is not available for OS X.

Lets say you want to use the same SSID on both radios (bands). This is important if you want your devices to communicate (say a printer is being shared on the 2.4 GHz via Bonjour). On the router management software, you may have the option to control how devices associate with the radios (bands). On DD-WRT for instance, you can enable MAC level filtering (allow/permit a MAC(s) or block/prevent MAC(s) from associating). In my setup, I have only allowed (Permit mode) one old legacy Apple airport to connect to my 2.4 GHz SSID. This forces the newer clients to connect to the 5 GHz radio even if the 2.4 looks tastier (better signal). Elegant enough for me.
Here's a nice link on how to only permit certain devices (note, you will see both interfaces on your router): https://snaz.com/adding-security-to-your-wifi-network-with-a-mac-white-list/


How do I filter videos by size to identify the largest in Photos app on OSX? I need to find the largest video files, because my videos takes a lot of space

but I dont know how to do this:

It seems to not to be there any option for filtering by size

As you surmised and @jstarek noted in their comment, the Photos app does not have a simple feature to sort by size. So there’s no easy way to answer your question, but here’s what I would do in your case.
The images are kept in a database with an underlying file structure that uses program generated unique names for the files. But, with a bit of work, it is possible to see the files in Finder, sort by size and correlate them to the photos app to delete them. The images are contained in a “package”  file usually named “Photos Library.photoslibrary” in your Pictures folder. To find it, open the Photos app and check under Photos->Preferences for the Library location and click “Show in Finder”. Now control-click on the file and select “Show Package Contents” from the pop-up menu. The package is really just a folder with subfolders as usual. Open the “originals” folder and you will see a list of subfolders with names like 0, 1, 2, etc. - these contain the image files. Set finder to view by columns, open one of the numbered subfolders and click the Size column heading to sort by file size. The files all have unique IDs for names, but you can still double-click these files to open them with their default viewer and play the video.

The Photos app keeps a thumbnail image for each of these with a link to the file in its database. Now you have two choices: go back to the Photos app and browse for the video that you found and delete it, or keep the Photos app closed and simply move the file to the trash. The first way is more work, but safe since you won’t be temporarily corrupting the library. If you do the latter, the Photos app will still have the thumbnail image, but the link to the original file will be broken when you select the thumbnail. You can then delete the thumbnail from Photos.
So, it’s a bit of work and might be a little scary, but maybe you’ll find it useful.

Here's another way:
plug in an external disk or storage.
Create a folder on it.
Open Photos and select all the videos.
Drag them to the new folder.
Wait a LONG time for the export to complete.
Sort the new folder by size.
OR, if you're happy with keeping them there, go back to Photos and delete them.  That will save more space than is in the new folder, because Photos creates a lot of supporting files for its contents.  (Actually the space is not reclaimed until you also clear out the "recently deleted" collection.)
If you don't get a notification when the export completes, you can compare the number of items selected in Photos to the number of items in the new folder.


How can I make my first generation iPad's battery last longer? What are some of the things I can do to make my iPad (Wi-Fi) battery last a long time once it is charged?

I have the first generation iPad and run iOS 3.

If you don't need to connect to a network turn off WiFi.  You will also want to go into the Settings:

turn down the brightness (Brightness & Wallpaper)
turn off Bluetooth (General)
turn off "Push" and set mail to fetch manually (Mail, Contact, Calendars) / (Fetch New Data)
turn off sounds (General)
turn off location services (General)
Turn off Notifications
and check any apps to see if any poll wifi (if you keep it on)

For additional help, I wrote up an article here with pictures:
http://www.squidoo.com/prolong-iphone-ipad-ipod-touch-battery

In the end, it really depends on how you use your iPad.  Good luck!--

If you're running the beta of iOS 4.2, killing multitasking apps can also impact battery life.


Safari can't verify the identity of the website error When I upgraded macOS to Sierra last month, I started getting this error on a few websites (Lifehacker, Xkcd, etc).  When I try to read anything on Lifehacker, I get a particularly odd version of this error which says "Safari can't verify the identity of the website Kinja.com"  ...but my link is for lifehacker.com

As I said, when I first upgraded to Sierra, I got the error...  but a restart seemed to clear it up and I didn't get the error again until today when I updated to 10.12.1 and a restart didn't fix it (which makes sense.  I don't know why a restart fixed it last time).

How do I fix this?

I had this issue as well. When you get the error, expand it and change the dropdowns to "Always Trust." That should fix it.


Display thunderbolt is working, thunderbolt bridge is not I have a MacBook Pro running 10.10.5 and a Thunderbolt Display. I access the internet using "Display Thunderbolt", my ethernet cable is plugged into the display and the display Thunderbolt cable is plugged into the MacBook Pro. Everything works fine.

However, I need to use my MacBook Pro on the ethernet network without going through the display. I have a brand-new Apple "Thunderbolt to Gigabit Ethernet Adaptor", but when I plug it into my MacBook Pro's thunderbolt port, the MacBook proclaims that "None of the member interfaces is connected."

What troubleshooting steps can I take to diagnose the problem and get my MacBook Pro on the ethernet network?

ETA: On the advice of emotality below, I have tried the following without success.

Plugging the ethernet cable into the Thunderbolt Ethernet Adaptor which I then plugged into the Thunderbolt port on the display.
Adding, by hand, a new Thunderbolt Bridge service.
Plugging the Thunderbolt Ethernet Adaptor into both ports on the MacBook Pro

I have also tried setting the "Configure IPv6:" drop down to Link-local only".

Also, to clarify, I need to do this as I need to use my MacBook Pro in another location which has an ethernet connection but no wifi and I can't take my monitor there. (And because it should work, should it not?)

This question may be a duplicate. Try some of the suggestions here: How to force Thunderbolt-ethernet connection when switching networks without restarting computer?

It sounds to me like an issue with connecting to your router.

Try the suggestion to renew your DHCP lease under System Preferences > Network Preferences > Advanced for the Thunderbolt Ethernet. Or if you have a static IP address, make sure the right IP address, Subnet Mask, and the correct DNS server are entered.

Is there a reason you are trying to go through the Thunderbolt Bridge setting and not Thunderbolt Ethernet?

Also click on the Apple icon in the Menu Bar and look at your Locations. If something other than Automatic is selected, those Location preferences could be stopping your MBP from connecting to the Router. You will also see this at the top of the Network Preferences for your connection.

UPDATE

  Is there a reason you are trying to go through the Thunderbolt Bridge setting and not Thunderbolt Ethernet?

I asked you this above. When I looked at my MBP connected with a Thunderbolt Ethernet Adapter, I checked under Thunderbolt Bridge and saw the exact message you have.

The thing is that I am Connected via Thunderbolt Ethernet and all of my configurations for my connection to the router are there.

Make sure the cable that you plugged in is not "mini display port cable".
Thunderbolt cable 2 is with "thunder icon" on cable ends.


'Mail can't connect to the account' keeps appearing So I've configured my mail using a profile. I have setup 3 mail accounts, but each time I launch Mail, it asks me for the passwords of all those accounts. The first time I thought: maybe that's a bug in Mail when mail accounts are configured using profiles. Unfortunately, that doesn't seem to be the case: it prompts me to enter the password for all 3 accounts, and it doesn't stop. When I enter it, it just asks me for the passwords of the other accounts, and then it asks for the first one again, etc., etc.

When I go to the Preferences, I can see that the passwords are indeed not entered. It can only connect to one(!) SMTP server (that's what Connection Doctor says).

What is causing this and how can it be solved?

The quickest way to run through the potential problems is to follow these steps:

Check the keychain to find any entries that match your email accounts, then delete all of them. Reboot.
Try to connect again, entering your passwords again.  Check email again and see if the error reoccurs.
If the error happens again, delete your email accounts using the system preferences, reboot, and then add them back. Check email again.

If the error continues to occur after doing all that, you might think about taking your Mac into the Apple genius bar.

Sign in  in your gmail account  from your browser.
Go to https://www.google.com/settings/security/lesssecureapps
"Turn On"


Terminal opens with "-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory" I tried to install OpenCV through Homebrew by following the steps given in http://www.pyimagesearch.com/2016/12/05/macos-install-opencv-3-and-python-3-5/ but after installing virtualenv and virtualenvwrapper I updated the path as given. When I source it I get the following

-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory

I have macOS Sierra 10.12.6, Xcode 8.3.3.

Then I closed the Terminal and reopened it. Since then whenever I open the Terminal I see the same line in the second line of the terminal. I made a small change and installed virtualenv using

pip --user install virtualenv virtualenvwrapper

This is a common stumbling block when editing shell files.

I would remove any .bashrc and .bash_profile entries you know you don't need and then get a package manager to help you with managing the bash requirements. There is step by step help and many questions here on how to get homebrew set up.

Where can I download OpenCV for macOS?
https://docs.brew.sh/Installation.html

The benefits of homebrew is it makes some decisions about where alternative versions of python and packages live and you can not have to manage those as the software changes.

i solved it by just emptying the bash_profile and save an empty bash_profile . then after you wont see that second line whenever you open the terminal .


Gmail message about safari When I try to access my gmail account the following message appears: "This version of Safari is no longer supported. Please upgrade to a supported browser."

I know my safari version is:  Version 5.1.10 but that's all I know as I am not very computer literate just a basic user. What can do about this?

Safari is a integral part of the Operating sytem.

Your version 5.1.10 is the last version available in Snow leopard (your operating system)

Now you have 2 choices:

1- Upgrade to next version of Operating system with new version of Safari (big job)

2- Switch to Google Chrome or Firefox browsers (very easy to do)

I personally prefer Firefox and use it to access my gmail.

Just click on one of the links in my answer and follow the instructions to Install.

Left click on the message.  Then select "block popup ad."  The move the slider which appears as directed. This gets rid of a meaningless nuisance.


Softlink /bin/bash to a brew-installed bash It is a question related to this other one, but I can't comment.

I've updated to use bash 4 from brew installation. But I don't know if changing all the header scripts from:

#!/bin/bash

To

#!/usr/local/bin/bash

Isn't a portable solution.

Moreover, some scripts check if the shell is a /bin/bash shell (docker-toolbox in example)

Before writing, I was recommended to read this: https://apple.stackexchange.com/a/119179/77314
But the path solution is neither portable nor can apply on docker case (no direct source).

So I still doubt: is really a bad idea to softlink the bash?

Obviously, targeting independent-version.

#!/usr/bin/env bash is the 'most portable' approach but #!/bin/bash is the standard convention on OS X and Linux. There are advantages to shebang with a stable system interpreter, and it's probably not worth using a newer Bash.

Create your own bash symbolic link. Then use that in your script. You can then change the symlink to point to whatever you want. That's the approach used with java-alternatives and other platforms (ruby, python, etc.). Thus, they change the symlinks, and you have a new version in your environment.


Automator Tasks - Safari Not Responding I have some daily Automator tasks on my calendar which open URLs in Safari.  (A "Get Specified URLs" task followed by a "Display Webpages" task.)  Ever since upgrading to Yosemite, however, there's been a bit of an issue.  Sometimes several tabs are opened, and it's no longer handling that very well.

Previously, even if Safari was slow, all of the tabs would open when it's available.  Since the Yosemite upgrade, however, only some of the tabs open and the rest pop up a message:

  You can't open the application "Safari" because it is not responding.

Is there a way to tell Automator to wait until Safari responds rather than just fail on some of the URLs?

If you replace the "Display Webpages" task with a "Run AppleScript" task you can control what it does (i.e. add a delay)... I've posted sample code here:

https://discussions.apple.com/message/27244343?ac_cid=op123456


iPhone 3G 4.2.1 Unlock Is there any way I can unlock an iPhone 3G with Firmware 4.2.1 and baseband 05.15.04?

I correctly installed Cydia and Ultrasn0w (under iOS 4.1.2 or something like that if I remember right) via JailbreakMe 2.0.

The Unlock seemed to work, but I accidentally updated to 4.2.1.

Is there any way I can fix this?

How about the legitimate way through AT&T:

https://www.att.com/deviceunlock/client/en_US/

You can find out how to jail break and unlock your 3G on mac here. You may need SHSH blobs, but I didn't see where in the tutorial. I think SHSH blobs are only for downgrading.


Font Book says multiple copies are installed I downloaded a free font that included four .ttf files for the Regular, Italic, Bold, and Bold Italic variants, all different. I dragged them into Font Book and they all appeared in a group, but the three variants other than Regular were flagged as duplicates:

  Multiple copies of this font are installed.

If I choose Resolve automatically all variants except Regular are shown as Off. If I right-click and enable these variants, ignoring the multiple-copies message, I'm still not able to use all the variants in TextEdit or Photoshop (the only apps I've checked in so far).

What's going on with this font? The previews in Font Book look exactly as I expect them to (rendering as the proper variants).

Have you, first of all, looked in /System/Library/Fonts, in /Library/Fonts, and in ~/Library/Fonts to see what actually exists ... as opposed to depending on software to tell you.

I expect that both Photoshop and TextEdit fonts behaving properly depends on the Mac default fonts - and fonts commonly used by those (and other) apps - being in the correct location.

Sounds like your Apple devices are impacted by the SIP.

  were flagged as duplicates

Our Macs, identical and eventually worse. All those verify and resolve automatically methods, useless. Our windows devices suffer the VSS, ugly (don't ask)! Your SIP situation unattended will worsen, in part reappearing across macOS reinstallation, as remembered system behaviors are. You can improve your macOS performance, remove the aberrant system behaviors. You need pencil, paper, and a few minutes to run some commands in sequence. Safe boot to Terminal, then...

    *csrutil disable*

then

    *sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local*

then

    *bash/bin/usr netboot add n.n.n.n*

n = whatever your local network uses (e.g., 10.0.0.1) ~ then use other commands to secure NetTools and Github as per Adding Another Layer with That HUGE Manatee.

Hope this helps. Btw !! App Store item to manage SIP, easily?

SIP's are great for baby-sitting. Hopeless for getting the job done. Not funny!


Connect to remote Server with macOS Sierra through sftp I recently moved from Ubuntu GNOME (16.04 LTS) to macOS Sierra and I wondered how I could mount a Folder, located on a remote Server, using the sftp protocol.
Ubuntu GNOME (16.04) comes with Nautilus as a File Manager by default, so I used that one for the purpose of having a gui for viewing remote folders.

[Setup with Ubuntu GNOME and Nautilus File-manager][3]

My workflow on Ubuntu was to open the Nautilus File manager

Click "Enter Server Adress"
Selecting the Connection (for example: sftp://user@example.com)
Click "Connect"

I like to have a similar or even simpler solution for these steps on Sierra. However, the Server shouldn't always be mounted. I just want a simple way to connect to certain remote Folders with different usernames when I need to, through a save Connection.

Any Ideas how to do this with Finder on macOS Sierra? I am kind a new to the whole Apple ecosystem, I don't even have a an idea where to look for recommended 3rd party software.

It seems that this is not possible with MacOS Sierra standard tools (sftp via Finder); Macfusion is also no more compatible with Sierra.

As costly alternative you could use Commander Pro, Panic Transmit 4 or Mountain Duck (35-40$).
As less costly alternative you could use Flow from the App Store (~5$).
As a free alternative you could use webdav with Finder (http://...).

What I did was installing winebottler (comes packed together with wine in one .dmg) and then install WinSCP via it. It was quick and worked, but is indeed rather a weird solution... ;-)

⌘+k will open a "connect to server" dialog when you have finder open. Sounds like what you're looking for.


How to display google calendar "reminders" on macOS calendar app? So google recently implemented reminders on both their web application and their mobile applications. This is a nifty little feature that instead of creating events on your calendar it creates these entries which, if not marked as done, will stay there until you complete them.

When you add reminders a new "Reminders" calendar now appear under "My Calendars" list, however, I noticed that the macOS calendar app does not display this calendar, hence, no reminders there.

Is there some way to also see reminders within the calendar app on macOS?

You can use Fluid to make a stand alone Google Calendar app using https://calendar.google.com as URL.


Enable URL rewriting (mod_rewrite) using .htaccess files in ~/Sites on Lion I cannot get mod_rewrite to work on Lion. I am developing a number of websites locally, in ~/Sites, using .htaccess files. I am on 10.7.3 and I have not touched any configuration files except for enabling PHP in httpd.conf (which works).

I know there are at least 2 questions about this here, but the solutions detailed there don't work. Nor do the other solutions that I have found on the web. I must be doing something stupid or overlooking something, or else I am probably going crazy, but it's not working.

I've tried all the usual stuff:

In /private/etc/apache2/users/<myusername>.conf, change AllowOverride None to AllowOverride All and restart the web server
Additionally, in /private/etc/apache2/httpd.conf, change any/all occurrence(s) of AllowOverride None to AllowOverride All -- I've tried it in all the various places where these directives are found
Try basically all possible combinations of values for the Options line above/below the AllowOverride line, including the values: Indexes MultiViews FollowSymLinks All

Always restarting the web server after such a change, of course. None of this works. All my clean urls simply do not work; I get a 404 - not found. Apache's error log just gives me "File does not exist:" errors. So it seems that the mod_rewrite module is not even working at all.

I made sure that mod_rewrite is loaded in the httpd.conf, which it is; it is so by default on a Lion install.

The crazy thing is that everything had been working perfectly -- until I migrated to a new machine running Lion. That is, I am ruling out an error in my .htaccess files because I know it worked before. Also, if it was an error in the .htaccess, I would get some kind of error message from the mod_rewrite module in Apache's error_log, at least telling me that the module itself is being called. But this is not happening.

Am I overlooking something? Do I have to change config settings someplace else? Do I have to change PHP's config? Why are the instructions (like How to activate mod_rewrite on MacOSX Lion and getting mod_rewrite to work on Mac OS X) working for other people but not for me? :)

I've wasted hours on this already. Any help would be VERY appreciated.

You should make sure that in your /etc/apache2/users/username.conf you have the following:

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews FollowSymlinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

The FollowSymlinks and AllowOverride are essential here. While you are hinting at both in your question, maybe you did not configure these correctly in tandem.

Make sure in httpd.conf /private/etc/apache2/extra/httpd-userdir.conf is included as well. It is by default.

After any modifications, restart the web server for the changes to take effect.

If you are still having problems, maybe there is a problem with your actual rewrite rules. Were you using them in a .htaccess context before as well? Note that in a .htaccess, the rewrite rule regex is matched against a request URI without the leading slash and always relative to the directory where the .htaccess resides, whereas in a global httpd.conf the URI must match with a leading slash and is relative to the web root. Because assumedly you have your .htaccess in a subdirectory of ~/Sites, your rewrite rules might behave different from when the .htaccess resides in the web root of a (virtual) host.

To debug mod_rewrite you can enable rewrite logging. You should enable that in /etc/apache2/httpd.conf:

RewriteLogLevel 3
RewriteLog /path/to/rewrite.log

When you type:
/Users/username/app_name

The / refers to the root of the webserver:

"localhost/"

If you use /~username/app_name in your rewrite it should work.


How to add a timestamp in log files on launchd? In launchd, you can change the path of the log files using StandardOutPath and StandardErrorPath in .plist file, but when I used it to output a log returned by the process, the resultant log files didn't add a timestamp and hence I cannot tell when each line is written nor when the process is run to begin with.

So is it feasible to add the timestamp information to the log files? The minimum requirement is month, day, hour, minute, and second.

The keys you mention don't redirect log files, they redirect the standard output/error streams. It is the responsibility of the program writing to those streams to add timestamp information.

You could include the date command in ProgramArguments before your program path in your launchd .plist:

<key>ProgramArguments</key>
<array>
    <string>/bin/bash</string>
    <string>-c</string>
    <string>date; program-path-here</string>
</array>

It's the equivalent of running /bin/bash -c "date; program-path-here"


iMac wiped clean, no install disc I just bought two iMac's at an auction, they were both wiped clean before the sale. The problem is when I turn them on I'm getting a screen with an icon of a folder with a question mark. So the guy wiped them but didn't reinstall it, or so I believe.

I did not get any of the disc's for the computer because it was a school sale, so I have no idea how I can installed the system so I can use them. I do have a Macbook Pro running Mac OS X version 10.6.8, however the disc that came with it didn't work on the large iMac's, which I figured it wouldn't.

My question is what do I do at this point? Is there a way to start them, Do I need to buy a disc?

Unless your MacBook Pro lacks a FireWire port, you can use Target Disk Mode to have the iMac reboot and act as a FireWire drive.

From there, you could use Disk Utility (or Carbon Copy Cloner or SuperDuper or other tools) to make a bootable copy of the MBP's OS onto the iMac's drive.

Alternatively, you might buy Mountain Lion or use a past Lion purchase from the app store to download an installer and run it from the MBP. You could choose to install the OS onto the "external drive" that is the iMac. Then you could chain the second iMac (or repeat this activity).

It really depends what OS you want and can run on the iMacs.

Your first step is to run the serial number of the iMacs to this page and see what Apple's service name for each Mac. From there, you will know what OS shipped and if the Mac can run Lion or Mountain Lion.

http://support.apple.com/manuals/#

Just enter the serial number in the address bar past the # or enter it into the form on the web page. You can always order replacement media from Apple, but there will be a charge for that. The other suggestions to buy a retail packaging DVD to install will likely be an inexpensive way to acquire an install OS once you have determined what OS can run and which OS you want to run.

I had almost the same problem I think the best idea is to go to apple store.
( I did not go to the store for 7 years ,I still has to go to the store :) .


iMac with 8GB RAM -- memory always almost full I have a 27'' iMac (Late 2012, OS X 10.9.2) with 8GB RAM. The usage of memory is always above 7GB, even though I don't think I am running that much stuff. This leads to the occasional hanging of a program and occasional feeling of the computer being lagged.

The heaviest thing I am running is a Parallels virtualization of a defunct Windows laptop (for my Windows-only programs; work-related). Then I mostly surf with Chrome (10-20 tabs, some with youtube videos). Of course I have other things opened, like Mail, Evernote and a few more. But I don't think a 8GB RAM computer should be overwhelmed by that. I could be wrong.

I am willing to provide an export of processes from the Activity Monitor. I tried looking into it, of course, and I am running A LOT of small processes (unknown to me) -- system stuff I presume. I am a long-time PC user and I know my way around process management in PCs, but not on Mac.

What do you think? Do I just need more RAM or it doesn't feel like it?

Regards,

Because OSX manages memory (as does Windows) it is often difficult to tell if performance issues are caused by memory limits. Technically, you really want the OS to capture all the available memory and allocate as needed, in which case, you would see all of the memory being 'used', even though there may be memory available but not allocated by the OS.

This is somewhat analogous to what is happening in OSX and Win7+. However, Apple has made it confusing in the past with many memory classifications, like Wired, Swap, Real, etc.

Luckily, you are running Mavericks, and a new feature of Mavericks is the Memory Pressure graph, described in the Apple support document here: http://support.apple.com/kb/HT5890

Basically, if the memory graph shows Red, you need more RAM, if its Green, you are good. I suggest reading the article for more details, but the Red, Yellow, Green is a great visual tool to help guide where you might be seeing problems.

Depending on your model, I have personally found Macs suffer more from hard drive access speed than memory limits, so an SSD, if your iMac does not have one, has a huge impact (and unfortunately quite a bit of work to put into your iMac)

People recommending RAM upgrade - wasting your time and money. Monitored the issue for a while now on brand new 30" desktop Mac, had 8Gb to start with. RAM use just climbs up and up over days and apps are not releasing any, after 3 days Firefox seats with 4GB RAM, other apps holding on to plenty leaving nothing to the system and it's absolutely crazy slow and unusable.

Upgraded to add another 8GB to total of 16. And what do you know? 3 days later all 16GB exosted, Firefox at 5GB, Atom text editor at 4GB, other apps similar, mail holding onto 3GB.

This numbers are insane, they are not normal, this doesn't happen on real PC's ie Windows or Linux. This is entirely Apple OS fault and poor RAM management.

So don't buy more RAM, save the money. I am still looking for hopefully a programmatic solution to force it release the ram from the apps.

Update: turns out curtain apps are smart enough to have their own RAM management, editing Firefox about:config:

browser.cache.memory.enable - true
browser.cache.memory.capacity - something sensible
config.trim_on_minimize - true
browser.sessionhistory.max_entries - 10
nglayout.initialpaint.delay - 0


No AirDrop option on iPhone 4s I have an iPhone 4s running iOS 8.3. I am trying to send a file from a Mac to the iPhone through AirDrop. Mac notifies that

  if I want to share a file with someone using iOS, he/she must open Control Center and enable AirDrop.

However, I tried to follow these steps, but there is no AirDrop option on my iPhone.

iPhone 4s doesn't support AirDrop. You need an iPhone 5 or newer.

iPhone 4s
iOS 8.3

Jailbreak
Install Cydia
Install Repo
Search & Instal Airdrop
Thank me later!


How do I send imessages to non-iphone users on my macbook os x, if I don't have an iphone? How do I send imessages to non-iphone users on my macbook os x, if I don't have an iphone?

I have macosx so i can send imessages without an iphone currently and this works fine. But i also want to send messages to my family members, who don't have iphones.

Create contacts for your non-iPhone users in Contacts.app, then iMessage should use SMS to connect. If you use iCloud Contacts, then they become available on all devices on which you use iCloud:

Below, an SMS conversation with a friend who has an Android phone, viewed on my Mac:


Is Soundflower 1.6.6 compatible with Mavericks 10.9? Is Soundflower 1.6.6 compatible with Mavericks 10.9?

I just fixed the latest code from cycling74's github (1.6.7) to build it and run it on Mavericks.

You can get it at https://github.com/crmne/Soundflower/releases

Just wanted to chime in. I use SimCap with Soundflower a lot to make demo videos of apps and I haven't been able to get audio to work at all since upgrading to Mavericks. When I've tried SoundFlower with other apps I get similar results. I have both input and output selected for Soundflower in the "Sound" section of System Preferences and both are set to about mid-volume.


sync mail folders between desktop and iphone I access two different gmail accounts using IMAP in Mail.  I organize those accounts into folders on my Mac (both gmail accounts go into the same folders).  As soon as I put an email into a folder, I can no longer access it on my iPhone.  Is there anyway to sync my folders with my iPhone as well?

The problem you are having is because the folders are on your Mac rather than in one of your Google accounts.

If you want to be able to read the emails on your iPhone they will have to be on the Google IMAP server.

Can I suggest you get one of the two Google accounts to forward its email to the other account. Then you could put the folders in that account and they would be on the Google servers and accessible from anywhere you want.

You can even set it up so that you can choose which of the two accounts is sending any email you send, even from the one account.

What you need to do is open your Hotmail, Gmail, or what ever mail account you have through Safari browser or MSN and all your folders will appear in them as usual. They do not appear in the regular app icon for mail on your iphone or ipad


Is there a good automatic time tracking tool for Mac OS X I'm searching for an automatic time tracking tool for Mac OS X. I regularly mess up manual time tracking with timers etc., so I want something more automatic:

The application should run in background and track more or less everything I do - which applications are active, which sites I browse, how long I'm idle etc.

It would then list all the things I do in a timeline and let me specify filters like "Xcode in foreground", "browsing developer.apple.com", etc.
Using these filters, I could check how long I worked on what after I left work.

Is there an application which does this? I'm aware of a website and a client for it, but I'm absolutely NOT comfortable with putting all the things I do on some random website.

Not sure it'll do everything you've asked for, but Time Sink is pretty powerful and can generate a variety of reports. Its almost free at $5 and you can try it for 14-days. It can also run in a menu bar only mode so its out of the way.

Check out TimeXchange. www.timexchange.net


I Pay for iTunes Match So Why Does iTunes Radio Now Have Ads (iTunes 12.0.1.26) I pay for iTunes Match, account is in good standing, auto-renew is turned on.

I just update to iTunes 12.0.1.26 now I have ads when using iTunes radio.  How do I get rid of them?  I've already tried these recommendations.

UPDATE: I went to Store -> Update iTunes Match, after it updated I skipped through the max (6 songs) on 4 different stations (24 total songs) and have not seen an ad yet.  Maybe that did the trick.  I was skipping through them though, not listening to them.

I have the same problem, and found something that worked. I skipped around 30 songs, listen to 3 on the same station (as I am writing this post) and no ads.

Devices
iPhone 5s - No commercials there
2 PCs: one with Windows 7 (64-bit) and the other Windows 8.1 (64-bit);

Problem:
I have iTunes Match and still here ads

Solution:
Enter iTunes → Store → Deauthorize this computer

After
Store → Authorize this computer
Store → Turn on iTunes match

I don't think they have anything to do with one another. iTunes match gives you the high-quality version of any song in your library. You can then have access to these songs from any of your devices.

iTunes radio is just listening to music, online, like a radio.


Display weather information in the Mavericks notification center? The weather display in the notification center is a great feature in iOS, and I would love to have it on my mac as well. Is there a technique or app that allows this?

Googling for the answer to this question has not turned up much, although there are suggestions that one might be able to kludge something together using Growl.

OS X Yosemite's Notification Center comes with a Weather widget preinstalled.

Additional locations can be added to the widget:

As far as i know you can only get it on mavericks by jailbreaking it my be different for mavericks by now but last time i checked there was no way so i assume you would need to jailbreak. But on yosemite it comes pre-installed. (not the jailbreak) Hope this helps


Connect iPhone to multiple output devices to play music How can I output music from an iPhone to a Bluetooth speaker and at the same time output to another sound appliance where the iPhone is jacked into? Like a Bose stereo device.

I don't know about how a Bluetooth device would work in this context, but you can achieve what you want using WiFi and cabled connections.

1) Use an Apple Airport Express with WiFi. Streaming music and audio to a stereo system is what it is designed for.

Go to an Apple Store or other authorized Apple dealer and explain what you want to do and they can show you how it works.

2) Alternately, wire the headphone output from the iPhone into a semi-professional mixer board which was then connected to more than one amplifier and speaker device. This is equipment used by musicians for recording, and it would require some expertise to learn to use.

Here is a link to a list of small, inexpensive mixers on sale at Guitar Center.

Go to a local music store and tell them what you want to do and they can explain how to do it.

If you are trying to share to iOS devices check out:

Audibly

https://itunes.apple.com/us/app/audibly-make-your-music-heard./id882170258?mt=8


How do I succeed setting sublime text 3 as a default text editor on Yosemite? It's a matter of principle for me as I'm struggling with it for a long time. I had this issue back on Mavericks and now on Yosemite 10.10.5.
What I'm trying to do is to set Sublime text 3 as a default text editor for all plain text files (my target were files with . and without extension, e.g .bashrc).

Here is an extract of ~/Library/Preferences/com.apple.LaunchServices.plist after I used this Replace Text Edit as the default text editor advice:

{
    LSHandlers =     (
                {
            LSHandlerContentType = "public.plain-text";
            LSHandlerRoleAll = "com.sublimetext.3";
        }
    );
}

In Finder when I press CommandO on e.g .gitconfig file it still opens with TextEdit.
 Any help would be appreciated.

The best results with setting default applications I have achieved with a little tool called RCDefaultApp.

It installs as a preference pane in System Preferences. Open System Preferences > Default Apps and change all the applicable extensions and/or UTIs to Sublime Text.


iMac 27" Screen goes black screen My iMac 27" screen went black on start up after logo, but I could still see my mouse pointer. I've restarted my computer and it is still not helping at all.

I'm running Mavericks 10.9.2 with an i5 processor and 4GB RAM.

Couple things that I've done:

I did a PRAM reset with ⌘, ⌥, P & R at start up and still no luck.
Launched Disk Utilities by holding command & R keys at start up, ran disk diagnostics and got a good message. I also click all repair related buttons and still green message appeared OK.
I booted up into Safe mode and still no luck.
I ran Apple Hardware Testing and the result is good.
I've reinstalled OS X Mavericks and still the same problem.

I'm wondering what would be the possible culprit with this kind of issue?

I've ran into this issue a couple of times now, this is what has resolved the issue each time. Step 5 sometimes returns a "file not found" error and step 6 doesn't always seem to be necessary but has been in some cases.  Regardless, having in their doesn't seem to have an negative effects.

Boot to single user mode (hold ⌘ S while powering on the Mac)
Type and hit return: /sbin/fsck -fy
Type and hit return: /sbin/mount -uw /
Type and hit return: rm /Library/Preferences/com.apple.loginwindow.plist
Type and hit return: rm /Library/Preferences/loginwindow.plist
Type and hit return: rm /private/var/db/.AppleUpgrade
Type and hit return: reboot

Assuming all instructions were followed the Mac should reboot and reach the login screen with no trouble.  The instructions above should be followed VERY carefully, with attention paid to spelling and spacing, as there aren't many safeguards in single user mode to prevent you from deleting otherwise necessary files.

If you have access to another Mac and a Firewire/Thunderbolt cable you could boot this Mac in Target Disk Mode ( T while powering on) and connect it to the spare Mac to remove the files from the GUI.  You would need to open the iMac's system volume (default is Macintosh HD) and remove or rename the two files mentioned above in Library/Preferences.

Hopefully that helps!

So as I understand you have reinstalled Mavericks. As you have been able to use the installer (Recovery HD) the hardware should be fine. Please note though that usually when you reinstall Mac OS X it will keep all your settings and programs. This might mean that the thing causing your troubles is also kept intact.

To resolve this, I would suggest the following:

Boot from recovery HD
Make a backup using disk utility to external drive (if neccesary)
Erase Macintosh HD
Install Mavericks

This should resolve your problems, provided that there is really no hardware failure. If this doesn't help, you can rule out software failure and your best bet is to go to an Apple Store.


Run a program/script when the screen is locked or unlocked Is there a way to run a specified script or program when the screen is locked or unlocked? Ideally a bash function or an AppleScript.

Is there an event that I could subscribe to that would allow me to do that? Or an existing app that supports this?

After some searching, I found SleepWatcher, a free tool that allows to run a script when the screen goes to sleep or wakes up.

After installing it, you can link a shell script that is run on one of the available events (which include dim screen, wake up screen, computer sleep, wake up computer and some more). From the shell script, I can run a command, or call an AppleScript that I want to run on these events.

Since my screen goes to sleep when I lock my computer, this is exactly what I was looking for.

You can see it in action here: https://github.com/nwinkler/sleepwatcher-lync-status

You can set it up like this:

sudo defaults write com.apple.loginwindow LoginHook /path/to/script


How do I quit multiple versions of Firefox with Apple Script? I have two versions of firefox. One has an application name "Firefox" and the other is called "Firefox 2".

I'd like to tell AppleScript to close both instances of Firefox. Here's my code

tell application "Firefox" to quit
tell application "Firefox 2" to quit

It's weird because I can type this into Script Editor, but when I press save it always turns into this.

tell application "Firefox" to quit
tell application "Firefox" to quit

I ran this code and I'll put the output below.

tell application "System Events"
    set theVisibleApps to (name of application processes where visible is true)
end tell

{"Finder", "Terminal", "Script Editor", "firefox", "firefox"}

And here's the error code: error "Firefox got an error: Connection is invalid." number -609

How do I make sure they both close?

I'm assuming that you made a physical. on-disk copy of Firefox.app, and renamed it in the Finder to "Firefox 2.app". Is that correct? If so, that is going to cause you headaches. The visible name in the Finder isn't really used by the system much. The system uses the app's bundle identifier — for Firefox, I believe that's something like 'org.mozilla.firefox' — which is found in the info.plist file within the app bundle, and draws display names and such from that plist also. Unix, on the other hand, tends to use the name of the executable, which is in the MacOS folder inside the app bundle. Since your physical copy will have the same bundle ID as the original, the system will get confused if you try to distinguish between the apps that way.

The normal way to run two instances of an application is to use the unix open command with the -n option, e.g., one of these:

open -n '/Applications/FireFox.app/Contents/MacOS/firefox'

open -n -g org.mozilla.firefox

Each opened instance will have the same name and bundle id, but they will have different process identifiers (pid), and you can distinguish between them using those. There are a few different ways of doing that, depending on how you've set things up, but for a quick hack in AppleScript you can use something like:

tell application "System Events"
    set unixIDs to unix id of (every process whose name is "Firefox")
end tell

Whichever unix ID is lower should generally be the instance that was launched first.

If you do a 'ps' from the command line you'll get the PID for each version of Firefox. You can then kill a process by typing kill -9 PID. There should be a way to grep out the PID for each process and then kill each one.  Maybe use awk which i know little about.


MacBook keeps switching between my 2.4Ghz and 5Ghz wifi networks for no reason I have my router setup with 2 frequencies:

When I'm near the router, I'm connected to the 5Ghz wifi network.

But when I go into my bedroom, I am switching to the 2.4Ghz network because the 5Ghz signal is too weak at that distance (barely getting any speed).

So I manually switch to the 2.4Ghz, but my MacBook automatically changes back to the 5Ghz network. I switch back to 2.4Ghz, it stays connected for 2-3min and then goes 5Ghz for no freaking reason.

I already placed the 2.4Ghz network at the top of the preference list in the advanced network settings, but it didn't help.

Running OS 10.11.5. Any ideas?

Try this...

System Preferences > Network > Wi-Fi > Advanced

Drag the various wifi logins to the order you want.  In your case, the 2.4GHz above the 5GHz.


How to properly ground a MacBook Pro I have a MacBook Pro 4.1. In the past - from time to time - you could feel a bit of electricity close to the aluminium case when working in AC mode, but now things are getting worse. I can feel the electricity all the time, especially close to the opening button and to the corners. Talking with other MBP users, I have been told that the whole MBP 1.4 series has got this problem and that it is due to the presence of the aluminium case. Is it a known issue? Is there any workaround to properly ground the laptop?

tl;dr

Use the extension cord! It is grounded.

Apple's grounding madness

You need your device to be grounded. The charger can be grounded because the metal pin that holds the adapter is (subtly) also the ground:

You need the plug to be grounded too. Obviously a 2 pin/prong plug is not grounded, you'll need one with 3 of them, but even in this case you have to check if the adapter's socket/shoe has metal in it (AKA is connected to the ground), because you can't take that granted at Apple! Just check out this picture from this article:

This is a 3 prong UK plug that has a grounding prong, but they haven't connected it! Fortunately at the extension cord there is a connection. You have to carry that extra 1.8 meter of cable tho...

So at Apple, the rule of thumb is that if it is an extension cord, then the socket is connected to the ground pin so it is probably grounded, if it is the small adapter, then there is no connection in the socket so no grounding for you:

The left picture from this answer shows the difference. The metal is more visible in the magnified picture on the right.

Hacky solution

Technically you could hack the not grounded 3 prong UK (Type G) adapter (that I mentioned before) to connect the ground prong to the grounding pin as shown in this tutorial. Of course, unless you want to use it with a Type G socket instead of the many other types, you will need to use another (grounded!) adapter to convert it to your desired (grounded!) wall socket.

There is no protective plastic On the end of the 10mm stud with any of the 2013 models. So what you are saying, Paul Churchill, is incorrect. The problem with electrical current flowing through all the MacBooks can not be fixed. Only Apple can fix it, but they don't want to fix it.

Of course it is unhealthy & unnatural when an external electrical current flows through your body, no matter how small. It messes up your whole electrical system in your body. All nerve signals, all organ and all functions in general in your body function through the bodies own electrical current system.

I have noticed it too, and will return all my Apple products that conduct electrical current. So please watch out if you care about your health and don't want to get seriously sick in the long run.


Internet Sharing to iPhone over USB not working I'm unable to share my macOS Ethernet connection with my iPhone over USB. I tried both the 'Internet Sharing' and the 'Content Caching' methods. I can see the iPhone in Finder but the iPhone does not connect to the internet. I can also see and select 'iPhone USB' inside 'Internet Sharing' when the iPhone is connected.
macOS: 10.15.7 - iOS: 14.1
I'm testing in an iMac 2020 with a built-in Ethernet adapter and the iPhone is directly connected to a USB port on the Mac. There is only one Ethernet port in System Preferences > Network
Should it suppose to appear as Ethernet on the iPhone?

Try this tutorial.  It will share your ethernet over Bluetooth instead of USB.

I'm not entirely sure on my answer, but I'd go try the following route: open up the network options and

either create a Wi-Fi hotspot from you iMac and connect to it from your iPhone

or click the Plus (+) icon and setup a VLAN with the interfaces you'd like Ethernet to travel thru.

Check back with me if you need further instructions I'll write a script or come up with something.


How do I install Mavericks now that Yosemite has been released? I have a late 2009 iMac running Mountain Lion, I also have a Macbook Pro running Mavericks. I have been planning on installing Mavericks on the iMac, but now that Yosemite has been released, Mavericks is no longer available on the Mac App store.

How can I install Mavericks on the iMac? As you can guess, I'm not an early-adoptor, so not interested in installing Yosemite for now.

Even though I have a Macbook Pro with Mavericks, it came installed with Mavericks, so it is not in my Mac App store 'Purchases', but 'Mountain Lion' is.

Take it to the Genius Bar. They have installers for every OS.

It looks like you can still get Mountain Lion here: http://store.apple.com/us/product/D6377Z/A/os-x-mountain-lion