How to always use macbook microphone with Bose QuietComfort 35? I have noise canceling headphones (Bose QC 35), that also have microphone built-in. If the microphone is active, noise canceling doesn't work, they just pass through ambient sounds (this is by design. I suppose, they did it so you wouldn't feel that you're in "vacuum" when you are talking).

Anyway, the problem is that whenever I connect my headphones to macOS, the system switches from internal microphone to headphones' one. Therefore, noise canceling doesn't work, unless I go to system settings and switch microphone back to the internal one.

This is very annoying, especially considering that I have to do that every time I connect headphones.

Is there any way to force macOS to always use internal microphone, or not to use the specific headphones' one?

Update from 10/2017:

So I found out that "headphones' microphone is being used" only happens when Skype is running. But ever since I stopped using Skype (or having it running all the time), the problem was gone!

This is not the solution for the original question, I'm just leaving it here for the future reference.

I still really like @aaplmath's suggestion (and that may be the best one going forward), but I also just stumbled on this solution that requires no coding (AppleScript/Swift/ObjC/Other) in High Sierra, and it's super easy to configure.
Please note that the answer was in the comment section of the article and it seems to work on High Sierra (I'm on 10.13.6), but I don't know if this works on Mojave and beyond.

Open the standard "Audio MIDI Setup.app" utility, and click the + at the bottom to create an Aggregate Device. Then select the Internal Microphone as the only component in this aggregate device and select it as the default input. For some reason this prevents Mac OS X from selecting the Bluetooth Microphone from now on and it will stay on the internal one when you reconnect.
After creating that aggregate input, go to your usual System Preferences -> Sound -> Input (tab)

Source: http://ssrubin.com/posts/fixing-macos-bluetooth-headphone-audio-quality-issues-with-hammerspoon.html#comment-4018174387


Bootcamp - Lost 200GB as Bootcamp froze on "while partitioned" for 5~ hours I was installing Windows 10 via Bootcamp on my iMac (27-inch, Late 2013) running OS X El Capitan - Version 10.11.4.

What happen was yesterday Bootcamp froze on "while partitioned" for around 5 hours. This slowed my computer considerably down and upon research online I found this amount of time was not normal and as I knew little about Bootcamp I force quit it (I realise that was really stupid, but it happened). I then found that I lost 200GB of hard drive space not being shown in disk utility or anything, currently when using Bootcamp the error which comes up is "The disk could not be partitioned".

I tried multiple fixes online such as looking through disk utility and going into some sort of white and black text mode and typing stuff in.

EDIT: Command I wrote in when holding Command + S during startup was sbin/fsck -fy

Here is the partition map of disk0:

    start       size  index  contents
        0          1         PMBR
        1          1         Pri GPT header
        2         32         Pri GPT table
       34          6
       40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640  236306352      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
236715992     262144      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
236978136          7
236978143         32         Sec GPT table
236978175          1         Sec GPT header

partition map of disk1:

     start        size  index  contents
         0           1         PMBR
         1           1         Pri GPT header
         2          32         Pri GPT table
        34           6
        40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
    409640  5858853728      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
5859263368     1269760      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
5860533128           7
5860533135          32         Sec GPT table
5860533167           1         Sec GPT header`

diskutil cs list output:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 11B03F1B-D92D-4B61-BCC9-F134E39E6C5B
    =========================================================
    Name:         Macintosh HD
    Status:       Online
    Size:         3120721960960 B (3.1 TB)
    Free Space:   201535127552 B (201.5 GB)
    |
    +-< Physical Volume 3F02FF76-C5DF-4DBA-8F1F-86FE1A350A01
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume C6C852A4-FC2B-4C57-9A28-72B833CF80F0
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     2999733108736 B (3.0 TB)
    |
    +-> Logical Volume Family 7EA46506-2092-46DE-9D8C-67CCD88D1A8A
        ----------------------------------------------------------
        Encryption Type:         None
        |
        +-> Logical Volume F121E76E-FDD4-405A-8566-1122FD35BC5F
            ---------------------------------------------------
            Disk:                  disk2
            Status:                Online
            Size (Total):          2912999964672 B (2.9 TB)
            Revertible:            No
            LV Name:               Macintosh HD
            Volume Name:           Macintosh HD
            Content Hint:          Apple_HFS
            LVG Type:              Fusion, Sparse

The 200 GB of your hard drive spaces were partially formatted with NTFS and went unrecognized due to a failed installation. There are couple of options which may work out. First: A fresh install of the OS X after you have backed up the Macintosh HDD. Second, a third party software that can reformat the 200 GB of HDD space to OS X Extended Journaled.


I want Show my own App icon in the lower-left corner of iPhone Lock screen? can please give me some Suggestions? Like this

You can't control what app appears in the bottom-left corner of the lock screen.  Neither can you add code to your app to make your app appear there whenever you want.  These are called Suggested Apps and it's a feature of iOS.

iOS controls what app appears there based on several factors, including your location, the apps on your device, and your history of where & when you use those apps.  Together, iOS trys to present you with the app you would most-likely use at a given time, location, and history.

If you don't like this feature, it can be turned off in Settings -> General -> Handoff & Suggested Apps.


How to fix FDISK_partition scheme after repartitioning a larger space for bootcamp I have a Mac that is running Mojave, and yesterday I was trying to repartition the disk so I could get more space on my Windows partition for bootcamp.
In the process, the Windows folder only appeared for me to boot up. So I decided to install gdisk. In the process, I specified h for hybrid recovery command and used 2, 3, 4 for GPT partition numbers. When it asked to specify a hex code, I used ac for partition 2, 07 for partition 3, and 07 for partition 4. I then told it to set the bootable flag for partition 3. It then asked me if I wanted to change partition 4 to EE so I said yes. I have data on partition 2 I would like to recover, if that is still possible.
Now, I cannot boot into either Mac or Windows. And the ability to use gdisk has disappeared. Thanks for your help.

First off, having Mojave and a BIOS booting Windows is an uncommon, but possible combination. So I have to ask: Are you sure your Mac is setup this way?

The first partition should be type EE. When the gdisk command asks something like "good for grub?" The answer should be Yes. This will set the first partition to type EE. The second partition usually is where macOS resides. If you have Mojave installed, then this will be an APFS container. There is no hex code for a APFS type of partition. Feel free to make one up. How about FF? If the Mac is using a APFS container, then the third partition will be for Windows. This should be type 07 and should be marked as bootable. You can use the P command in gdisk to see what is in the GPT. This should confirm what I have posted so far. The 4th partition can be left empty.

  Of course, if Windows is UEFI booting, then all of the above can be ignored. In this case, you want a fully protected MBR table.

You do not include much information on how exactly you managed to repartition a larger space for Boot Camp. I doubt this can be accomplished by using gdisk alone.

I see from your post, that you can boot to macOS Recovery. Try to capture the output from the following commands and post to your question. Note: With the current state of the partition tables, the gpt command may produce an error message..

fdisk /dev/disk0
gpt -r show /dev/disk0

Next, type typing the following commands.

fdisk -e /dev/disk0
set 4
07
quit

If asked about writing out, confirm you want to.

Hopefully, you will be able to boot macOS.


How do I replace a symlink with the actual file? I want to remove the symlink and instead insert the file it links to, if possible all with one command so I can have it as an "External Tool" in phpStorm.

cp --remove-destination "$(readlink <symlink>)" <symlink>

Source: https://unix.stackexchange.com/a/35027


How to automate right clicking Finder's dock icon and choosing action? I'd want to set a global shortcut key for the "Go to Folder..." action available from Finder's dock icon.

Right now I figured out how to trigger the same action from Finder's menu bar via AppleScript:

tell application "Finder" to activate

tell application "System Events"
    keystroke "g" using {shift down, command down}
end tell

however I don't like this solution because if there's a space with Finder windows open, and I'm in another space without Finder windows open, that causes to switch spaces.

Instead, right clicking Finder's dock icon and selecting "Go to Folder..." keeps me in the space I'm in.

How to automate this action and set it as a global keyboard shortcut?

First a word about global keyboard shortcuts... It should stand to reason that any user assigned global keyboard shortcut has to be unique to both the OS and any application that has focus when the keys are pressed, otherwise it will not function as desired. While one would like to have to press as few keys as possible, nonetheless using a four key sequence is probably going to be the best bet to avoid stepping on a default keyboard shortcut that is already assigned to the OS and or any app that has focus when the keys are pressed. Also making the fourth key something other then the typical alpha keys may be more beneficial in avoiding something already assigned.

Keep in mind though that the default, developer assigned, keyboard shortcuts of most any given application can be modified in order to free up a particular combination that one may want to use. Personally I try to avoid doing this, however to make changes, the target menu command can be added to: System Preferences > Keyboard > Shortcuts > App Shortcuts

As an example, Go to Folder…  of the Go menu in Finder can be added and its default ⇧⌘G can be modified to e.g. ⌃⇧⌘G so the default keyboard shortcut can be used in this case to trigger the example AppleScript code used in this answer with e.g. FastScripts.

Apple has made it increasingly more difficult to use an Automator Service in particular cases and as such, this particular use case, I personally use and recommend FastScripts. Note that I have no affiliation with the developer of FastScripts and am just a satisfied user of the product.

The following example AppleScript code used in conjunction with FastScripts will do as you asked under the expressed conditions in your OP and you will only need to add FastScripts to System Preferences > Security & Privacy > Privacy > Accessibility in order to have this script function. In other words, if FastScripts is the only app in Accessibility for Security & Privacy this script will function as intended.

That said, if you want to test the example AppleScript code before saving it, you do need to add Script Editor, but it's not required for the actual functioning under FastScripts. I mention this because when going the Automator Service route it can require adding two or more apps to get this same script just to run, however it will still not function as desired as an Automator Service and why FastScripts is being recommended.

Example AppleScript code:

tell application "System Events"
    tell UI element "Finder" of list 1 of application process "Dock"
        perform action "AXShowMenu"
        click menu item "Go to Folder…" of menu 1
    end
end tell

Using Script Editor, I saved the code above as Go to Folder.scpt in ~/Library/Scripts and in FastScripts assigned it the keyboard shortcut ⌃⇧⌘G until such time I find it conflicts with any other app I use.

Noted that this was tested and works as stated on my system running macOS High Sierra 10.13.4 regardless of what app had focus when the keys were pressed.

I also did not need to use a delay command between perform action ... and click menu item ... however note that the value of any delay command will need to be adjusted for your system, and or additional delay commands may or may not be needed. Adjust the value(s) of and or add/remove the delay command(s) as appropriate.

Note: The example AppleScript code is just that and does not employ any error handling and is meant only to show one of many ways to accomplish a task. The onus is always upon the User to add/use appropriate error handling as needed/wanted.


10.7 Preview app on 10.13 I'd like to get the Preview app from 10.7 to work on 10.13. I've done it with the calculator by editing a file in contents folder. I guess the same can be done with Preview app. Unfortunately I dont remember what I did, or which file that should be edited.
Anyone who can help with this?

If you've tried copying it over and it doesn't work, then realistically there's little you can do.
Applications are (crudely) just a series of instructions to the OS. The available instructions change from one OS to the next.  If the app is sending instructions that are no longer valid, then it just won't run.
Your best option is to identify what features you want from Preview in 10.7 that are not in Preview from 10.13, and find a third-party app that provides them.


iMessage sync with computer after deleting If you send a text on your iphone and then immediately delete it while the synced Mac computer and ipad is off/not connected to Wifi, will the messages still appear in chat on the Mac when you connect it?

When the iMessage is send, then its sent.

So when you activate iMessage again on this other "Computer" (Mac, iPad, iPhone), then it appears. It could be that after a certain amount of days, the message is deleted from Apples Server.


bzip2 compression library not found error I get bzip2 compression library… no error when trying to install some software on a mac running osx 10.12. Some googling revealed that the headers for bzip2 should be there for the installer to recognize bzip2 and this could be achieved by installing the dev package. However, couldn't find one for osx. For example for Fedora this is bzip2-devel.

By default header files aren't installed to /usr/include.

If you run xcode-select install in a Terminal window this will install the Xcode command line tools and also populate the /usr/include folder with a bunch of header files including bzlib.h.

This might be what you're looking for.


Apps not opening "Verifying" Some of the apps on my MacBook Air (OS El Capitan) specifically my Grand Theft Auto are not opening because a prompt appears "Verifying (Name Of The App)". I've tried countless times to fix this but nothing has worked. Any suggestions on how might I fix this?

If you are sure that you downloaded the app installer from the official/verified source and that it has not been tempered with, you can skip the verification process altogether by removing the extended file attribute that causes FileVault to attempt to verify the application. Do this by executing the following command from terminal:

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

The app_name.app is the name of the application you are changing the extended attributes on. In this case, GTA5.app.

The xattr command allows you to view and change extended file attributes. The -d flag indicates you are deleting the com.apple.quarantine attribute which is set on the application package. Any file with the extended attribute of com.apple.quarantine is verified by FileVault. This attribute is typically automatically set on downloaded files and files extracted from a tar or zip archive.


Is there a keyboard shortcut to show/open the Trash? Is there a keyboard shortcut for the Trash? I know how to create one, but I want to know if there's a built-in shortcut. To clarify, this is to show the Trash, not to empty it.

If you are using a Spotlight or a program such as Quicksilver that allows you configure keyboard shortcuts to perform actions. Here is a solution, create an AppleScript run only Application that will open the trash can for you. Its not a built in command but is should fit the bill nicely and you can do it all with built it tools.

Open AppleScript Editor
Open a new script editor window if one did not already open.
Enter the follow in to the blank editor window

tell application "Finder"
    open trash
end tell

Test the script, press Run, trash should open.
Save the Script with the name "OpenTrash" make sure to select "File Format:" Application and check the "Run Only" option.
Open the newly saved OpenTrash Application, trash can contents should open in the Finder.

Introduce it to your favorite program launcher, and set up keyboard shortcuts etc. Also note that spotlight should index it as well and you can use that to open the Trash can now too.

⌘ + space  and then search for "Tr"... Then press enter  once "OpenTrash" is highlighted.


Loopback traffic from Time Machine process When i switch on Time Machine the mtmfs process generates a lot of traffic on lo0 from localhost to localhost. What is this traffic and does it affect the performance of my Mac?

Time Machine makes a local snapshot during its normal operation - Mobile Time Machine File System (MTMFS) is the process responsible and that is most likely what you're seeing.  You can check Activity Monitor during this time to see the CPU usage from this process (mtmfs).  So yes, it can affect your machine's performance if it's using a lot of your CPU.  (For example, an unrestricted find command on the root will churn through these hidden snapshots causing the process to go nuts.)

You can check for local snapshots with the tmutil command (which has a lot of other uses as well)

tmutil listlocalsnapshots /


iPhone 4 earpiece stops working My wife's iPhone 4 (Verizon) earpiece stops working every now and then.  She has to switch to speaker mode during calls.

To fix this, she plugs in the headphone and unplugs it.  Not a bad workaround IMO, but very annoying to her.  She's debating selling it on ebay and getting a different phone.

I'm not sure if this is hardware or software related.  Any advice?  Upgrade the software?  Not sure if it will fix it, but we probably will anyway.

This can happen when the contact spring inside the headset jack is loose, cracked or broken, or maybe the plug or jack is just dirty and shorted out.  Perhaps try cleaning/degreasing the plug and then blowing out the jack with compressed air.  If that doesn't work, a visit to the Apple store is in order.

This same problem can happen on different models of other phones as well, any phone that has a headset jack.


Directly send Screenshot without saving We are using Skype for Business in our company, sometimes there failures or errors we need to send to another employee.

Is there a simple way to directly send a screenshot after creating it without saving it on the SSD of the Mac?

You can also copy to clipboard with

command+control+shift+3 for the whole screen
command+control+shift+4 for a part of the screen
command+control+shift+4 followed by space for a single window

and then paste the screenshot in a messaging application. As far as I see Skype for Business does not allow images in the chat. So you will have to use email or some other alternatives.


With OS X , is there a way to create a 640 x 640 image out of a 500 x 640 image? Some website requires the user to "crop" the photo, but sometimes you'd like to keep it original.

Using OS X alone, can a a 500 x 640 photo be enlarged to 640 x 640 (with white or black bars at the left and right), without installing additional apps?  (this can be viewed as, creating a 640 x 640 black image, and the pasting the 500 x 640 photo onto it).

You can use the sips command to pad any JPEG or BMP image to a specified size, with a specified colour. In your case, the command would look something like:

sips photo-500x640.jpg --padToHeightWidth 640 640 --padColor 000000 --out photo-640x640.jpg

obviously with the input and output filenames of your choice. For white instead of black borders, change 000000 to FFFFFF.


Will my device's location be shown in Find My iPhone if it is connected to iTunes? Two days ago I lost my iPhone 5s. It could have been stolen.
I've reported it to my carrier and police yesterday as stolen.

I got Find My iPhone enabled, but when I login to iCloud there is no information (the device is shown as offline). I hope someone will start my phone, therefore…

If the person who stole/found my iPhone will try to connect it to iTunes and try to restore the iPhone, will Find My iPhone show me the location of the phone? I'm a little scared because I found a way to disable activation called iCloud Bypass.

If it possible I will not find my phone, but if my iPhone sends me its location during the bypass process or even if someone will try to restore the device in iTunes, I will find a thief. Does anybody know anything about that Find My iPhone functionality?

Set it to Lost Mode on https://www.icloud.com/#find

If anyone ever tries to reset the phone it will have to go online to activate.
At that point, Lost Mode will kick in [possibly with a location]

The phone is a brick to anyone else, without your login details.

Don't erase it remotely, send a message to it, perhaps informing the current "holder" that it's locked & how to contact you or the police to report they "found" it.

Thieves are finally getting the message that stealing an iPhone is pointless. Thefts are down 40% from last year.


Folder Action for automatic file name cleanup I want to build a folder action that cleans up the filenames of my downloaded files.

For example Youtube_MyVideofile_(1080p_30fps_H264-128kbit_AAC).mp4 should be stripped by "Youtube" "30fps" "128kbit" "AAC" "(" ")" and "_" should be replaced to a "space". So the result would be MyVideofile 1080p H264.mp4

I know I could do this with Automator but then I have to set up a "search/replace" element for every word. I'd rather use a single list of words which would be easier to maintain, because I have a lot of different sources where I get files from on regular bases, so the actual list of words to be removed will be very long and may be updated from time to time.

I found this Automator or AppleScript to Remove Multiple Strings from File Names?
which is similar, but it only worked with selected folders. Instead I want to set it up so it works automatically as a folder action.

I guess therefore I also need a whitelist of file extensions that the script wont touch, such as ".download" for safari-downloads that are still in progress.

Using Automator, in macOS Sierra 10.12.5, I created a Folder Action with a single Run AppleScript action, using the AppleScript code below, and set it to run on my Downloads folder. (It has also been tested and works on OS X 10.8.5 and OSX 10.11.6.)

Open Automator and select File > New, then Folder Action.
Add a Run AppleScript action, replacing the default code with the code below.
Modify the set theBlackWhiteList to POSIX path of ... line of code, accordingly as necessary.
Set the Folder Action receives files and folders added to Choose folder list box to your Downloads folder.
Before saving the Folder Action, create the plain text data file that will be used by this Folder Action.

It's not absolutely necessary to do it before, however, if you are going to save it in Downloads, I would create the file first.

Save the Automator Folder Action workflow.

Read the comments, included with the code, for what's necessary to use this code in the Folder Action.

To test the Folder Action, open Terminal and cd Downloads, then create  the test file with, touch 'Youtube_MyVideofile_(1080p_30fps_H264-128kbit_AAC).mp4', which will create a zero length file that will be processed by the Folder Action and be renamed to MyVideofile 1080p H264.mp4 as shown in Downloads in Finder or Terminal with: ls -l My*.mp4

AppleScript code:

--  #
--  #   The AppleScript code of this Folder Action requires a data file, which is laid out as follows:
--  #
--  #   Lines 1 and 3 state what are on lines 2 and 4 respectively. (These lines are just reminders.)
--  #
--  #   Line 2 must start with a single space character ' ', followed by the comma delimiter ','!
--  #   Line 2 must also not contain an underscore character '_' as it's used as a 'text item delimiter',
--  #   and all of them will be removed and replaced with a single space, as appropriate, in the last
--  #   part of the processing to form the final filename.
--  #
--  #       This is used as part of the overall logic applied to creating the finished filename, so as to
--  #       only have a single space character between words of the filename, while ensuring the finished
--  #       filename does not start with nor have directly before the filename extension, a space character.
--  #
--  #   Line 2 is a list of strings that will be removed from the filename. (The Black List.)
--  #   Line 4 is a list of filename extensions of the file types that will be processed. (The White List.)
--  #
--  #   Modify lines 2 and 4 as appropriate, while leaving the single space character at the start of line 2,
--  #   and do not include an underscore character in Line 2.
--  #
--  #   Example contents of the plain text data file:
--  #

--  #   # Do Not Remove This Line!: The next line contains a comma-delimited list of strings to be removed:
--  #    ,Youtube,30fps,128kbit,-,AAC,(,)
--  #   # Do Not Remove This Line!: The next line contains a comma-delimited list of file extensions to process:
--  #   mp4,mkv,avi,flv,flac

--  #   For the purposes of testing this script, the name of the data file used is
--  #   "FileNameExtensionBlackWhiteCleanupList.txt", and is in the User's Downloads folder.
--  #   Obviously you can name it whatever you want and place it where appropriate access exists.
--  #   Modify the 'set theBlackWhiteList to POSIX path of ...' line of code, accordingly as necessary.

on run {input, parameters}
    try
        set theBlackWhiteList to POSIX path of (path to downloads folder) & "FileNameExtensionBlackWhiteCleanupList.txt"

        --  #   Make sure the data file exists and set its contents to the target variables.

        tell application "System Events"
            if (exists file theBlackWhiteList) then
                tell current application
                    set theBlackWhiteList to (read theBlackWhiteList)
                    set AppleScript's text item delimiters to {","}
                    set theStringsToRemoveList to text items of paragraph 2 of theBlackWhiteList as list
                    set theFileExtensionsList to text items of paragraph 4 of theBlackWhiteList as list
                    set AppleScript's text item delimiters to {}
                end tell
            else
                tell current application
                    activate
                    display dialog "The required file, " & quoted form of theBlackWhiteList & ", is missing!" & ¬
                        linefeed & linefeed & "Replace the missing file from backup." buttons {"OK"} ¬
                        default button 1 with title "File Not Found" with icon 0 -- (icon stop)
                    return
                end tell
            end if
        end tell

        --  # Process the target file(s) added to the target folder, that have the target filename extensions.

        tell application "Finder"
            set theFileList to input
            repeat with thisFile in theFileList
                set theFileName to name of thisFile
                set theOriginalFileName to theFileName
                --  #   Get the filename extension of thisfile.
                set AppleScript's text item delimiters to {"."}
                set thisFileExtension to last text item of theFileName as string
                --  #   Only process if thisFileExtension is in theFileExtensionsList.
                if theFileExtensionsList contains thisFileExtension then
                    repeat with i from 1 to count of theStringsToRemoveList
                        set AppleScript's text item delimiters to item i of theStringsToRemoveList
                        set theTextItems to text items of theFileName
                        set AppleScript's text item delimiters to {"_"}
                        set theFileName to theTextItems as string
                        set AppleScript's text item delimiters to {}
                    end repeat
                    --  #
                    --  #   Using the example filename in the OP, 'Youtube_MyVideofile_(1080p_30fps_H264-128kbit_AAC).mp4',
                    --  #   at this point in the processing it would be, '__MyVideofile__1080p___H264_____.mp4', and while one
                    --  #   probably could continue to use AppleScript 'text items' and 'text item delimiters', nonetheless I can do
                    --  #   it easier using 'sed' to finish getting the final filename. This is also part of the reason I started the
                    --  #   'theStringsToRemoveList' with a single space character and do not allow an underscore character in Line 2.
                    --  #
                    tell current application
                        set theFileName to (do shell script "printf " & quoted form of theFileName & " | sed -E -e 's/[_]{2,}/_/g' -e 's/^_//' -e 's/_\\./\\./g' -e 's/_/ /g'")
                    end tell
                    --  #   Only change the filename if it has actually changed by the processing above.
                    --  #   There's no sense in telling Finder to name a file the same name it already is.
                    if theFileName is not equal to theOriginalFileName then
                        try
                            set the name of thisFile to theFileName
                        end try
                    end if
                    --  #   At this point the final filename, using the example filename, would be 'MyVideofile 1080p H264.mp4'.
                    --  #   This assumes this filename didn't already exist and why the 'do shell script' command is within a 'try'
                    --  #   statement. Additional coding and logic could be applied to increment the filename if it already existed.
                end if
            end repeat
            set AppleScript's text item delimiters to {}
        end tell

    on error eStr number eNum
        set AppleScript's text item delimiters to {}
        display dialog eStr & " number " & eNum buttons {"OK"} default button 1 with icon caution
        return
    end try
end run

Example contents of the plain text data file used by the Folder Action:

# Do Not Remove This Line!: The next line contains a comma-delimited list of strings to be removed:
 ,Youtube,30fps,128kbit,-,AAC,(,)
# Do Not Remove This Line!: The next line contains a comma-delimited list of file extensions to process:
mp4,mkv,avi,flv,flac

The logic behind the renaming process:

Using the variable theStringsToRemoveList, which starts with a single space character followed by the comma-delimiter, in conjunction with the underscore character as the text item delimiter, turns all spaces along with all other strings to be removed, into underscores during the AppleScript's text items and text items delimiters portion  of the code.

This is done so sed can be used to replace all concurrent underscore characters with a single underscore character, then remove the leading  underscore, if it exists, followed by an underscore preceding the dot before the filename extension, if it exists, and finally all remaining single underscore characters are replaced with a single space character.

set theFileName to (do shell script "printf " & quoted form of theFileName & " | sed -E -e 's/[_]{2,}/_/g' -e 's/^_//' -e 's/_\\./\\./g' -e 's/_/ /g'")

set theFileName to - The variable theFileName will contain the output of the do shell script command.
do shell script "_command_" - Runs the command in a shell.
printf " & quoted form of theFileName & " | - Prints the value of the variable theFileName, and pipes | it to the sed command.
sed -E -e 's/[_]{2,}/_/g' -e 's/^_//' -e 's/_\\./\\./g' -e 's/_/ /g'
sed - Stream EDitor.
-E - Interpret regular expressions as extended (modern) regular expressions rather than basic regular expressions (BRE’s). The re_format(7) manual page fully describes both formats.
-e command - Append the editing commands specified by the command argument to the list of commands.
s/[_]{2,}/_/g

s - Substitute pattern flag.
[_]{2,} - Match a single character present in the list, matches the character _ literally (case sensitive).
{2,} - Quantifier — Matches between 2 and unlimited times, as many times as possible, giving back as needed (greedy).
/_/ - Replaces matched pattern with a single character _ literally (case sensitive).
g - Global pattern flag g modifier, matches all occurrences of the pattern, (doesn't return after first match).

s/^_//

^ - Asserts position at start of the string.
_ - Matches the character _ literally (case sensitive).
// - Replaces the matched pattern with literally nothing.

s/_\\./\\./g

_ - Matches the character _ literally (case sensitive).
\\. - Matches the character . literally (case sensitive).
/\\./ - Replaces the matched pattern with the character . literally (case sensitive).

Note: The double back-slash \\ is necessary when use in a do shell script command, however, from the command line a single back-slash \ would be used to make the character that follows a literal . character, in this case.

s/_/ /g

Replaces the character _ literally, with a character  literally (case sensitive).

Note that the info above is abbreviated in places, however, it should provide a bit of an understanding of what's happening.

On a added note, if you want to also ensure capitalization of each word in the filename, then replace the existing do shell script command with the do shell script command below, which has an added awk command that receives the output from sed to preform the capitalization. Note that I found this awk command on the Internet and tested it that it works, however, will not be adding an explanation of how it functions for lack of time.

set theFileName to (do shell script "printf " & quoted form of theFileName & " | sed -E -e 's/[_]{2,}/_/g' -e 's/^_//' -e 's/_\\./\\./g' -e 's/_/ /g' | awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1'")

Update to address .'s in the filename, per the comments.

In the plain text data file, on Line 2, add a ., after the leading space and its comma-delimiter. In other words, the first item in the list on Line 2 is a blank space followed by a comma-delimiter followed by . followed by a comma-delimiter and so on.

Add the following lines of code after the repeat loop that directly before the comment starting with --  #   Using the example filename in the OP. ... which is above the tell current application ... do shell script block of code.

            set AppleScript's text item delimiters to {"_" & thisFileExtension}
            set theTextItems to text items of theFileName
            set AppleScript's text item delimiters to {"_"}
            set theFileName to (theTextItems as string) & "." & thisFileExtension
            set AppleScript's text item delimiters to {}

By adding the ., to line 2 in the plain text data file, all . in the filename are replaced with _ in the original code. Then with the extra lines of code above, it replaces e.g. _mp4 with .mp4, or . and whatever the actual filename extension is.

Now when it gets to the do shell script command there is only the . for the filename extension and all the underscores are process out of the name as they should.

Obviously the way the original code is coded, underscores cannot be a part of the final filename, and this modification to the original code doesn't change that.


Automatically move files to a parent folder + delete subfolder I'm trying to figure out how to automatically move files from a folder to its parent folder and delete the original folder. To illustrate, here's my structure:

Parent Folder
    – Subfolder
            – File.avi
            - File2.avi
            - Otherfile.trash

I want to move my all my .avi files to the Parent Folder and get rid of Subfolder altogether (Subfolder still won't be empty after moving these files, but I want to delete it and its leftover contents).

I've been playing around with Hazel but I guess my logic isn't the best and I can't figure it out. Is it possible with either Hazel or Automator or both?

Thanks in advance!

The following solution will move all (and only) ".avi" files within subfolders (one level deep) to the parent folder and delete the subfolders. It may not be the most optimal solution since there are many different ways in which shell scripts can be written to solve a problem.

Assumptions and restrictions:

Only ".avi" files will be moved. Other files will be ignored and deleted without warning.
The (updated) script works only three levels below the parent folder. If there are subfolders within the subfolders containing ".avi" files, they will be deleted like any other file (including those ".avi" files).
This script can handle ".avi" files that have spaces in the filename.

Caution:
This uses a shell script that moves files and deletes directories/files completely. Have a backup before attempting to use it (even minor changes in the script can cause serious and irrecoverable issues). There is no way to recover from any issues except for restoring from a backup.

Solution:

In Hazel, setup a watch for the parent folder in the Folders pane on the left.
Add a rule by clicking the "+" button and name it as you wish.
Set the conditions criteria as follows

If <any> of the following conditions are met for <any of its sub-files or folders>

<Any File>

Set the Do the following to the matched file or folder: as follows

<Run shell script> <embedded script>

Click on the Edit script button next to the  dropdown.
Leave the Shell: option to the default ('/bin/sh).
In the textbox below, copy and paste this shell script (I have included comments starting with # - they're just to make it easy to understand or modify)

# Get the directory name and go into it - this should be the parent directory
dir=`dirname $1`
cd $dir

# Find all directories one level below
# For each subdirectory, move all ".avi" files to its parent directory,
# then remove the subdirectory and its contents (change avi to any other extension if necessary)
find . ! -path . -type d -maxdepth 1 -exec sh -c '
dir="$0"
mv $dir/*/*/*.avi $dir/..
rm -rf $dir
' {} ';'


Keyboard Shortcut For Replacing File Within Finder? Lets say that I just captured a screenshot called "screenshot.jpg" and I have a folder of screenshots called "screenshots".

Screenshots
 └ Work.jpg
 └ School.jpg
 └ Misc.jpg

I want to take this recently captured screenshot and replace the "misc.jpg" file within the screenshot folder. What is the best way to do this? I know that I can rename the file to the name of the file currently within the folder, copy+paste it into the folder, and then choose "replace file" option when prompted, but this isn't ideal. Is there a keyboard shortcut or other quick way to perform this action?

Note: This is just an example use case. It would be ideal if I could use a quick method regardless of filename or filetype.

This little AppleScript will take a screen shot and overwrite whatever file you currently have selected in Finder.

    # Check that precisely one file is selected
    set F to the selection of application "Finder" as list
    if (count F) ≠ 1 then return beep

    set F to F's first item as alias

    # Perform a screengrab straight to the clipboard
    # then overwrite the file above with the image
    # data from the clipboard

    do shell script "screencapture -c"
    set screenshot to the clipboard as JPEG picture

    write screenshot to (F as alias)

It doesn't move, copy, or delete; simply overwrites it.  So, bear in mind, this means the created date will remain the same, which potentially could see you generating a new screen shot writing it to an image file created two years ago.  (The modified date gets updated as you would expect.)

As someone suggested, this sort of thing would work well as a service in Finder, to which you could assign a shortcut.

I went about creating one:

The script is very similar to one above (and appended to the bottom of this answer in a code block for you to copy/paste).  It has some error handling and notifications thrown in, given that this is going to be a service and it's good to make it a robust one.  It also doesn't take any screen shot of its own accord, as a screen shot taken when the service is activated would necessarily have Finder in focus, which might not be the screen shot you want.

Therefore, this service assumes that you have taken the screenshot yourself already, and its lying in wait on the clipboard.  Finder already has shortcuts that allow screenshots to be sent straight to the clipboard, so there's no need to do anything extra.

I saved the service as one called Replace Image File, as you'll notice the input is specifically image files in Finder.  Therefore, the service won't be accidentally triggered if, say, an application file were selected.

It now turns up in the pop-up context menu whenever I right-click on an image in Finder:

Next, I went into System Preferences to assign a keyboard shortcut:

This shortcut shows up in the Finder menu under Services:

I chose ⌃⇧⌘R because it's reasonably difficult to press accidentally, but it's pretty adjacent to the default shortcuts for sending a screenshot straight to clipboard, namely ⌃⇧⌘3 and ⌃⇧⌘4, meaning the physical manoeuvre between taking a screenshot and triggering the service a convenient one to make.

Happy to say that, in testing, it worked splendidly, so I may just keep it for myself as I can see it being fairly useful.

Finally, here's the code block for the Automator service workflow:

    on run {input, parameters}

        # Make sure precisely one file is passed to the service
        # Otherwise terminate with a beep
        if (count input) is not 1 then return beep

        # Error catching in the event that the clipboard
        # does not contain image data
        try
            set ImageData to the clipboard as JPEG picture
        on error errMsg number errNo
            # Terminate script with a notification
            return display notification ¬
                "No image content found.  Unable to proceed." with title ¬
                "Replace Image File" subtitle ¬
                "Error: clipboard content is the wrong data type"
        end try

        # If the script reaches this point, all must be
        # well so we can try and overwrite the input file
        try
            write ImageData to input
        on error errMsg number errNo
            return display notification ¬
                "Unsuccessful overwriting." with title ¬
                "Replace Image File" subtitle ¬
                ("Error " & errNo as text) & ": " & errMsg
        end try

    end run


Selecting files for input Safari applescript I am trying to automate using Applescript uploading of files to a website. I have gotten to nearly the last step, but can't seem to get a Finder (file chooser) window to respond to scripts.

Here is what the site looks like (i can't give you the actual site, because it is a secure medical record).

The process to upload files is to hit "Add Images" which I can do in Apple/Javascript and it brings up a Finder (file chooser) window like this (again I can only show part because of privacy issues). There are standard "choose" and cancel" buttons on the bottom.

I can't find a way to get this Finder window to respond to Applescript. I have been trying things like:

tell application "System Events"
    keystroke tab
end tell

and numerous others using Finder etc.

Any ideas on how to pick a file out of this window? Or get to this window? Or even find the properties of this window?

Thanks.

It is not a "Finder" window. It is owned by  Safari

You have not made clear how you know which file to choose.
So I assume you will be partially hard coding it into the script.

This example assumes you are able to form a path string to the file.

This example is also written to click and add an image to an Answer on one of these Ask-different pages.

You already know how to click buttons with the Applescript/js

But you can use keystrokes to enter the command G+cmd+shift  which will open a 'Go to..'  sheet in the 'Choose' dialogue window.

You then keystroke your path to your file.

The next two buttons 'Go' and 'Choose' are the default ones so you can just keystroke Return to hit them.

(This image was uploaded using the script)

activate application "Safari"
tell application "Safari"
    tell document 1

        do JavaScript "document.getElementsByClassName('wmd-button')[5].click()"
        delay 1

        do JavaScript "document.getElementById('filename-input').click()"
    end tell

end tell
tell application "System Events"
    keystroke "G" using {command down, shift down}
    delay 1
    keystroke "~/Desktop/image/image.png"
    delay 1
    keystroke return

    delay 1
    keystroke return

    delay 1

end tell

tell application "Safari"
    tell document 1
        do JavaScript "document.getElementById('add-picture').click()"
    end tell
end tell


Does overcharging a MacBook degrade its life? I have an early 2011 13" MacBook Pro and I use it almost like a desktop. I leave the power cord connected all the time. Is this OK? Am I ruining the computer or diminishing its lifespan?

All Macs cease charging and let you know this by changing the "orange" LED in the charging cable to "green" when the battery is topped off and you are merely running the Mac - not charging it.

The question you ask would be more precisely worded - what harm is it in keeping the battery constantly and always topped off to full?

Your early 2011 13" MacBook Pro has a lithium ion battery. Luckily, lithium ion batteries have an internal circuit to prevent the battery from being charged over 100%. There is a very slight chance that something can go wrong with the charging mechanism in the laptop, which would cause the battery to overcharge, but I wouldn't be concerned with that.

Years back, laptop batteries were made from nickel-cadmium or nickel metal hydride. It was recommended that these batteries were regularly fully discharged then fully charged so they'd continue to hold a full charge, though even following these practices they would eventually lose capacity.

Apple still recommends that you fully discharge your battery monthly, and never store your laptop with a charge below 50% for an extended period of time. In short, it's perfectly acceptable to leave your laptop plugged in while it's in use but let it fully discharge once a month for optimal battery health.


Import Safari Bookmarks from XML Export Awhile back, I set up a cron job on my wife's MacBook to automatically backup her Safari bookmarks to Dropbox every morning using the following command that I found online (I forget where):

/usr/bin/plutil -convert xml1 $HOME/Library/Safari/Bookmarks.plist -o ~/Dropbox/Backup/Bookmarks/wife.xml

This worked swimmingly until all of her bookmarks were lost. When I try to import this file using File > Import Bookmarks in Safari, it says that it can't find any bookmarks in the file. I've opened the file up and looked at it and while I'm not terribly familiar with the XML plist format, it looks reasonably complete/intact.

I've tried renaming the file to wife.html and doing the same import process, but no dice. I was about to start writing my own little parser in Python but I figured I'd ask you nice folks before spending the time.

Is this something I can fix fairly easily? She has a buttload of bookmarks and I'd love it if this were easy :)

Thanks in advance - do let me know if you need any additional information to make providing an answer easier.

I've carried my bookmarks with me after the first import ever since Safari 1.0 by just dragging/dropping the file into the Safari folder in ~/Library. Why did you go through the hassle of conversion?

Just backup the plist and drop it in place of the old or newly made plist whenever required.


Is X11 installed by default on Mac OS X? I'm asking this because I'm considering distributing a commercial Windows application to mac users. The application would run in WINE, but WINE depends on X11.

I've read that X11 is installed by default on OS X 10.5 and later, and available as an optional install on the installation dvd for OS X 10.4

Can I reasonably expect X11 to be available on most of the users' computers? If not, how difficult it would be to install for the user? Can I just provide them a link to download and install it from apple's website?

The previous answer seems to be referring to Xcode, rather than X11. While Xcode is now downloadable from the App store, X11 is installed automatically when you install Lion.

If any of your users have problems, or find it not installed on their system, they can download the installer here:

http://xquartz.macosforge.org/trac/wiki/X112.6.3


Transferring PC files to MacBook Pro with Lion OS via flash drive I have a flash drive with all the files from my old PC.  How do I access / find this flash drive after it is installed, and can I save and use these files (Microsoft Word, Excel, PowerPoint, Outlook primarily)?

Accessing Flash Drive

Plug the flash drive into your Mac.
Open a Finder window. (Double click any folder on your desktop, or click the blue face in the Dock.)
Move your mouse over the sidebar on the left-hand side of the Finder window, then place two fingers on the trackpad, and scroll down until you see your flash drive.
Click on your flash drive.
Open a new Finder window by pressing Command-N.
Find the files you want to copy from your flash drive, and drag them to where you want them copied in the second window.

Using Files

You have a number of options here:

You can get Microsoft Office for Mac, which will enable you to open, edit and save Word, Excel and PowerPoint documents.
If you prefer something cheaper, there is free open source project called Libre Office, which will let you open, edit and save Word, Excel and PowerPoint documents. Unfortunately there are a few features of Word and PowerPoint that it can't handle, but for most basic documents it should suffice.
If you want a solution that is free, and 100% compatible, you can try Microsoft's new SkyDrive service. It gives you free access to an online version of Office, and you can export Documents to PDF if you want to print them.
If you just want to quickly preview documents, and don't mind the formatting being a bit dodgy, you can use QuickLook, by single-clicking on the file in Finder, then pressing Spacebar You can also double-click them, and open them in Preview.


iCloud Storage Config: Photos I'm having trouble figuring out if my iPhone/iCloud is configured correctly? It seems odd that Photos is there in the iCloud Storage config, but then Photo Library is there under Backups config (highlighted in the green boxes)?

It seems like that should be one or the other? Am I double-storing my photos?

As a footnote, if I flip the iCloud Photo Library to on I get an error that I don't have enough space (which is what prompted the research).

Because you're not using iCloud Photo Library, iOS will treat your Camera Roll photos and any saved photos as part of the standard backup process.

You are storing all of those backed-up photos in a separate backup in your iCloud Storage (the dark blue part of your storage bar). This means that you are correct in suggesting you are "double-storing" your photos.

If you were to delete your backup from iCloud (I recommend backing up the photos on your physical device to external storage before you do this) and then turn on iCloud Photo Library, your photos would be uploaded to iCloud and then would not need to be backed up by the device.

Here is my current storage as an example:

You can see that my photos and videos are taking the majority of my storage while my backups are only a small part.

In short: Delete your backup from iCloud (after backing up photos), turn on iCloud Photo Library, then after the photos have been uploaded, backup your device again.


Why won't my files import into garageband? I'm attempting to import an mp3 into garageband for some basic editing.

I used the media browser to locate the file and then I 'dragged and dropped' main area ('drag apple loops here!')- a quick message appears to say it's importing. However, when the message disappears there is a new track but no music.

I checked the whole track to make sure it wasn't sitting at either end and I couldn't see it but alas that shed no light as to where the 'imported' track had vanished to.

I've attached an image - although I'm not really sure how much use it's going to be.

Facts:
Running Mac OS X 10.7.2, Garageband '11 v 6.0

Usually, we can easily import MP3 files to GarageBand (especially GarageBand 11)

However, sometimes the import process will encounter difficulty in importing an MP3 into GarageBand in two situations:

Situation 1: GarageBand only imports MP3 files which have the extension in lower case: ".mp3". If you try to import MP3 files (like MP3 recorded from the Olympus LS-10) with the extension in upper case: ".MP3", GarageBand will refuse to import those kinds of MP3 audio.

In this case, change the MP3 file extension to lower case in order to import MP3 to GarageBand.

Situation 2: GarageBand only supports those MP3 audio files which have a sample rate of 44.1 kilohertz (kHz) and a bit depth of 16 bits.

In this case, it will be necessary to convert the MP3 file(s) to GarageBand's more compatible AIFF file format.

The following link provides instructions for two methods to convert an MP3 file to a AIFF file at: How to Convert and Import MP3 to GarageBand?


Click handler in Apple Script I created a standalone macOS app using Script Editor. Upon starting, the app executes a bash script and upon quitting, the app executes another bash script. The code looks like this

do shell script "complete path to start script"
on quit
     do shell script "complete path to quit script"
     continue quit
end quit

When I open the app it does what it is supposed to do and the app resides in the dock until it is closed. I would like the finder to open a specific folder when I click on the app symbol in the dock. Is there a way to do this?

Getting your application to respond specifically to a user clicking on its dock icon is difficult.  A simpler task is to get your application to respond to acquiring focus where it previously belonged to another application, i.e. whenever your application is brought into the foreground, which clicking on the dock icon will do.

I've heavily commented the script below to walk you through what's relevant.  Anything I've left uncommented or haven't specifically made reference to in the comments should be left alone and where it is, unless you're confident you know what you're doing.

Obviously, this won't do a lot if it's simply run from within Script Editor, so incorporate this into your application's AppleScript code (or, rather, incorporate your application's AppleScript code into this), save it, and run the applet.  If you don't make any edits to it whatsoever, then when saved as an applet, you'll see a notification appear every 10 seconds telling you the application is "idling..."; and a dialog box will pop-up whenever the application is brought into focus informing you that it "Acquired focus.".

-----------------------------------------------------------|
on run
    _init()

    # Your startup code goes here, which will
    # execute once when your application runs
    # e.g.
    #   do shell script "/path/to/start-script.sh"
end run

on idle
    # Any code you need to run repeatedly can
    # go here.  Otherwise, you can delete this
    # entire handler

    # The following line is test code:
    display notification "idling..."

    # The return value is how often (in seconds)
    # this handler will be called
    return 10
end idle

on activate
    # Insert code you want to execute whenever
    # your application receives focus, e.g.
    #
    #   tell application "System Events" to ¬
    #       open folder "~/Path/To/Folder/"

    # The following line is test code:
    display dialog "Focus acquired."
end activate

on quit
    global |@|
    |@|'s removeObserver:me

    # Any other clean-up code that needs to
    # execute just before your application
    # exits should go here, e.g.
    #   do shell script "/path/to/quit-script.sh"

    continue quit
end quit
-----------------------------------------------------------|
# PRIVATE HANDLERS:
use framework "Foundation"
use framework "AppKit"
use scripting additions

property |@| : a reference to my NSWorkspace's ¬
    sharedWorkspace's notificationCenter

on _init()
    "NSWorkspaceDidActivateApplicationNotification"
    |@|'s addObserver:me selector:("_notify:") ¬
        |name|:result object:(missing value)

    idle
end _init

to _notify:notification
    local notification
    if my id = the notification's userInfo()'s ¬
        NSWorkspaceApplicationKey's ¬
        bundleIdentifier() as text ¬
        then activate me
end _notify:
-----------------------------------------------------------|


Using AppleScript to toggle Internet Sharing not working I am using an applescript to activate internet sharing option from 'System Pref> Sharing'. I work on MacOs 10.9.4. I found this script on a forum and am using it. This works fine, when the System Preferences window is open. However,when the System Preferences window is closed, the script opens the System Prefs window and then displays this error message:

 System Events got an error: Can’t get menu item \"Sharing\" of menu \"View\" of menu bar 1 of process \"System Preferences\"." number -1728 from menu item "Sharing" of menu "View" of menu bar 1 of process "System Preferences"

This is the code for the script

tell application "System Preferences"
        activate
    end tell
    tell application "System Events"
        activate
        tell process "System Preferences"

            click menu item "Sharing" of menu "View" of menu bar 1
            delay 2
            tell window "Sharing"...
//code after this

I am not proficient in AppleScript ,but only need to use this one to get a keyboard shortcut for toggling internet sharing. Also, the forum I got it from says the other users are able to use the script. I wonder if it has something to do with MAcOs 10.9

You can use this code to activate sharing with settings which were already there:

tell application "System Preferences"
    activate
    set current pane to pane "com.apple.preferences.sharing"
end tell
tell application "System Events" to tell process "System Preferences"

    --find lock and click it if it is not unlocked
    repeat with x in buttons of window "Sharing"
        try
            if (value of attribute "AXTitle" of x) is equal to "Click the lock to make changes." then
                click x
            end if
        end try
    end repeat
    delay 5

    --find the checkbox for Internet Sharing and select the row so script can enable sharing through ethernet
    repeat with r in rows of table 1 of scroll area 1 of group 1 of window "Sharing"
        if (value of static text of r as text) starts with "Internet" then
            select r
        end if
    end repeat
    delay 2

    --enable Internet Sharing
    repeat with r in rows of table 1 of scroll area 1 of group 1 of window "Sharing"
        if (value of static text of r as text) starts with "Internet" then
            set sharingBool to value of checkbox of r as boolean
            select r
            if sharingBool is false then click checkbox of r
        end if
    end repeat
    delay 2

    if (exists sheet 1 of window "Sharing") then
        click button "Start" of sheet 1 of window "Sharing"
    end if
    delay 2

end tell
ignoring application responses
    tell application "System Preferences" to quit
end ignoring

Hope this helps!


Can't seem to install e2fsprogs properly I'm following a tutorial requiring me to use mke2fs. I found that I could install it by brew using brew install e2fsprogs

Tthis returned the following:

This formula is keg-only, which means it was not symlinked into /usr/local.

This brew installs several commands which override OS X-provided file system commands.

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/e2fsprogs/lib
    CPPFLAGS: -I/usr/local/opt/e2fsprogs/include

==> Summary
  /usr/local/Cellar/e2fsprogs/1.42.13: 135 files, 5.0M

So i tried using brew link e2fsprogs which then returned 119 symlinks created

But the command mke2fs is still not available. Anyone who can throw me a bone here?

Usually brew executables (except brew itself) are linked to /usr/local/bin/ which is in the PATH already.

Since e2fsprogs executables are also installed to a subsequent sbin folder, force linking them with brew ln --force e2fsprogs will create a new folder /usr/local/sbin which contains the links to the sbins.

This new folder is not in the PATH. Simply add or extend an already existing  line

export PATH=/usr/local/sbin:$PATH

in ~/.bash_profile.

To update PATH in your current Terminal session immediately, simply enter:

source ~/.bash_profile

Or close your Terminal window and open a new one.


How can I E-mail multiple photos ? How do I e-mail multiple Photos from MAC desktop with Yosemite? What is keyboard shortcut to select multiple images and e-mail them?

You can use 2 methods.

One is to hold the "shift" key that will select a continuous group from first to last click.

The other method is to selectively select them.

Click on the first one than HOLD the cmd key and click on next one and so on while holding the cmd key.

When done selecting release the cmd key, right click on the selection and use the share- email.

Be aware that emailing to large files might fail.

In email check the size and decide if to make it smaller.

Mail will tell you when to large so either select less or use the "Image size".


How to get Apples Human Interface Guidelines as pdf (latest version 2015)? I have been trying to download Apple HIG in PDF, only thing I found was Apple HIG documentation which just gives me an ePub file for iBooks.

Things I've (unsuccessfully) tried:

share/export from iBook as PDF (no luck)
looked in ~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books
(no PDF)
open ePub in iBooks Author (can't open)

So how can I either get the latest HIG as a PDF or convert the ePub into PDF?

iBooks has changed the download location to the "Desktop" for I don't know which reason. I found the iOS Human interface.epub file and loaded it with the iBooks Author app.

There I went "File" - "New from ePub file..." . After the app loaded the file I went for "File" and "Export" and finally as PDF.

I also tried downloading the .epub file onto iBooks on my iPad. There is no export option available and the mailing open only mails the link from the iTunes store and NOT the .epub file itself. Hopefully this helps someone...

Found the solution by accident , since I didn't expect the .epub file to be on my desktop...


Preview virtual spaces in menu bar (like ubuntu) Is it possible to have a preview of the virtual spaces in the menu bar, like this https://github.com/maho2nd/enhanced-ubuntu-workspace-indicator?

More generally, I'd like to know which spaces are clear and which are occupied.

NOTE: I'm already using WhichSpaces but it only gives the current space as an index.

Googling I was able to find this commercial app that looks like it does what you want. It's called TotalSpaces2 and looks to cost ~$12 US.

There a overview video that highlights all of its features. You can see an overview of all the apps on your various spaces as shown below:

From the look of the docs & features I think what you're looking for is the Overview Grid. That's shown above in a larger spread of spaces and below with a smaller spread.


Open Finder Tabs with Automator? I'd like to say that the problem I want to solve is pretty simple, but I can't seem to find any good resources to tackle it.

I'd like to have an Automator application that will open all of my SMB/network shares (these are constant, but are sometimes not mounted) in a single window in multiple tabs. I can't seem to find any way to do it because Automator doesn't seem to address Finder tabs at all.

Any thoughts?

This is what I ended up doing, with help from BritishColour. I ended up adjusting the delays because the Cmd + G was being a little quirky and not registering the key code 36 (enter) command. This also calls up Finder so it doesn't activate in whatever program I might be using in the moment.

on run

    tell application "Finder" to activate

    tell application "System Events"
        keystroke "n" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX2"
        delay 2
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX3"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX4"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX5"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX6"
        delay 1
        key code 36
        delay 1
        keystroke "t" using {command down}
        keystroke "g" using {command down, shift down}
        keystroke "/Volumes/XXXX7"
        delay 1
        key code 36
        delay 1
    end tell
end run


Disable iTunes 11 arrows Is there any way to remove these arrows from the songs list?
I know they only appear on hover but are still annoying. I always hit them accidentaly when trying to play a song.

This is no longer possible. There used to be a way to disable them (iTunes 10 and earlier), but the ability was removed in iTunes version 11.


iOS 14 how to use "Open Wallet" and "Open Apple Card card" in automation and script Does anyone have an example or some pointers on using iOS 14 automation, shortcuts and scripting to open the wallet app and retrieve data from Apple Card?

You cannot retrieve data directly using Shortcuts or Automation.
If you would like to retrieve data, you could use the "Open Apple Card card" process to open the card. Then, the user should export a statement and send it back to an Application or to be processed by a Shortcut.
The export options are CSV, OFX, QFX, and QBO - and they can be done on a month-by-month basis.


How to play music from my computer on iPhone (without iTunes)? How can I play music that resides my computer on my iPhone (plugged in to my stereo)? I am at home, they are on the same wifi network. The computer runs Windows 7.

I tried iTunes's sharing feature and my computer's "library" was listed on the phone, but  when I select it, the symbol spins for a minute then gives up. Once it did work, but it only listed about a hundred songs (of tens of thousands). I don't know why.

I'd like to choose the music from the iPhone.

Edit: I have much more music than disk space on my iPhone, so I can't copy it all.

You want a DNLA streaming app for your iPhone, which can play a music library via a DLNA server running on your PC.

For the PC side, google "windows DLNA server" will get you current choices, but at this time there are Plex, Tversity, and Twonky

On the iPhone side, look at apps like Media:connect. There are summaries of current choices online, like this one: http://blog.dreamcss.com/iphone/dlna-streaming-apps-for-iphone/


Mail Quits on Mavericks Mail program on my Mac Pro (early 2009) doesn't want to start, or rather just was quitting after I tried to start it multiple times.

I deleted it and tried to re-install old mail program from Snow Leopard disk, now I don't have mail at all. Can anyone help me to deal with the problem?

Important: I installed Mavericks two days before it happened.

If you still have the old backup of the Mail database prior to the 10.9, you can replace the mail folder in ~/Library/ by the old version, and restart the Mail in your Mavericks. The new Mail will convert it to the new version of the database structure.

I met the same issue a couple of days before, fortunately, I have the Time Machine backup, thus resolved by this way.


Is it possible to get the keyboard viewer to show a full keyboard when a bluetooth keyboard is connected? From time to time I want to simulate having a full keyboard even though my Mac uses the smaller Apple bluetooth keyboard. It is most important for the system events to get the actual key pressed as much as possible and not just find another shortcut that maps to the same action once it hits the OS.

I had hoped to use (or better trick) the supplied keyboard viewer, but the OS "cleverly" shows me the layout I have instead of the layout I want.

Can anyone help me trick my software into showing the larger keyboard like this without having one physically plugged in? It's nice to have fast access to the keys including/under F13-F15 and the key pad enter only key from time to time without plugging in more hardware. It's also nice to make tutorials that show the full key layout.

Apple has a pretty good record on accessibility features, one of which is the onscreen keyboard. I would be surprised if there is not a way to do enable the extended onscreen keyboard, but I'm still researching where this precise bit of how-to knowledge.

In the meantime, here is Apple's official page for accessibility features related to Physical and Motor Skills (which is the category for the Onscreen Keyboard): http://www.apple.com/accessibility/macosx/physical.html
It shows the extended version in their screenshot.

This is overkill (both in features and price), but I felt the need to add the application called "the best on-screen keyboard, not just for the Macintosh, but for any platform."
I'm too new to have lots of links. but look at atri.misericordia.edu for a review of KeyStrokes.

Here: have a layout editor, so if you can't see the keys you need in Keyboard Viewer, you can switch them in to replace some keys you don't really care about:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=ukelele

still doing research, will be adding what I find


How to get my iPhone readable I have hit various unknown thing
My iPhone is now very dark and unreadable.
How do I get it reset to normal
I suspect if I could change brightness that might work

If you can't see the screen, try asking Siri. Hold the side button and say ‘increase the brightness’.


Replace an iMac superdrive with one pulled from a Macbook Pro? I have an old Mid 2009 13" MacBook Pro (unibody) that I'm not using anymore. I've already pulled the superdrive out of it.

I also have a 2009 27" iMac that I am using. The superdrive on it is no longer working for various reasons, and needs to be replaced. I'm comfortable opening the iMac and replacing it, I've done it before.

Can I use the drive from my '09 Pro in my iMac?

This issue is likely form factor more than anything else, though Apple is famous for custom connectors...

I would look through the take-a-parts on fixit.com on those two units and see if they look the same.

Also a bit of googling for a replacement drive for both and seeing if the part numbers are the same.


App is not being found on IOS store I'm attempting to install the app 'Working Copy - Git client' on my iPad (app link : https://apps.apple.com/us/app/working-copy/id896694807#?platform=ipad) here is a screenshot of the app :

However when I search for the app on the iPad app store it's not being found :

I've tried setting the filter to "iPad Only" and "iPhone Only" but its still not being found. How to find the app 'Working Copy - Git client' in order to install it on my iPad ?

I resolved this by updating to latest version of IOS on iPad.


Problem in installing X11/XQuartz in Mac 10.8.5 I need to install XQuartz in Mac 10.8.5.But every time when I reach the destination folder selection in installation step,it freezes and doesn't move forward.I have admin account as well but as I looked through the net, seems that others also have the problem.How can I solve it?

You may be able to install the software using installer on the command line. You will need to make sure that you have the XQuartz disk image mounted before performing this command:

sudo installer -pkg /Volumes/XQuartz-2.7.4/XQuartz.pkg -target /

Edit

Apparently, the XQuartz installer is not allowing installation on the boot drive because it is failing some pre-installation checks. This is based on the following error message that occurred when attempting to use installer in Terminal:

installer: Cannot install on volume / because it is disabled.
 installer: This update requires you to first update your system to OS-X 10.6.3

The installer is not recognizing the system as the correct version. Although the contents of /System/Library/CoreServices/SystemVersion.plist shows that the value of ProductVersion is set to '10.8.5', the installer does not see it this way.

It may be possible to modify the package's Distribution file to allow it to install correctly:

Mount the XQuartz-2.7.4.dmg disk image (assuming that it's on the Desktop):

hdiutil mount ~/Desktop/XQuartz-2.7.4.dmg
Expand the package into a folder name XQuartz on the Desktop:

sudo pkgutil --expand /Volumes/XQuartz-2.7.4/XQuartz.pkg ~/Desktop/XQuartz
Modify the Distribution file inside of the expanded package, to allow installation to occur (regardless of the system version):

cat ~/Desktop/XQuartz/Distribution | sed s/false/true/g > ~/Desktop/Distribution
Move the new Distribution file into the expanded package

sudo mv ~/Desktop/Distribution ~/Desktop/XQuartz
Flatten the modified package:

sudo pkgutil --flatten ~/Desktop/XQuartz ~/Desktop/XQuartz.pkg
Cleanup the XQuartz folder that was expanded from the original package

sudo rm -rf ~/Desktop/XQuartz

After creating the modified package on the Desktop, you may be able to double-click on the file to get it to install normally. Alternately, installing using the Terminal may also work at this point.


Is there any known problem of using SIMBL? As the title, is there any known problem of installing SIMBL on my Mac? For example performance degradation, security problem, or anything else.

Your question is too generic if anything. SIMBL have been the cause of past problems, specially when Snow Leopard was out; the infamous “blue screen of death” that made Windows very famous, affected OS X for a little bit on some machines that had “hacks” like SIMBL (But it was usually caused by APE if I am not mistaken)

With that said, it’s possibly “impossible” to measure if there’s any performance degradation or “anything else”.

I’ve used SIMBL for a few years and I have no idea if I had run into issues that wouldn’t have been caused should I not have it, however, for the most part it performs ok. There are a lot of plugins already written, one of them being the excellent Total Finder by BinaryRage. I’d say that if there’s a problem with SIMBL, it would be most of the times, caused by a bad plugin that is doing “more than it should”.

With that said, I doubt Apple likes it when it’s time to diagnose a problem. ;)

When you create a Plug-in using SIMBL, there are a few recommendations that a lot of developers do not follow and that is what usually causes the problem. Most notably is the Version Checking. You are “entitled” to make sure that the version of the application you’re going to “hack”, is compatible with whatever you’re going to do. A lot of developers never did this in the past and the results were headaches for everybody.

Suppose you’re patching Safari 1.0. A software update comes and it’s now Safari 1.1 and your plug-in doesn’t work. You shouldn’t try to patch that version of Safari until you fix your plugin. Failure to perform that check caused innumerable failures and rage wars :)

You can try it and if you detect issues, removing SIMBL later is pretty simple.

But after a few long years of having it, I can tell you that it’s relatively safe; with that in mind, understand that SIMBL allows other applications to “inject” code into other Cocoa applications. A malicious user could attempt to cause damage though it.

You should keep an eye in the SIMBL Bug List to make sure you don’t come across something that affects you and -of course- use known plug-ins and not something that came from “p0rn.com”. ;)

Now if you’re super worried about all you install and do, then stay away from it. :)


El Capitan Downloads folder in dock doesn't expand When I click on my downloads folder in dock it opens the downloads folder in Finder, instead of showing the expanded file contents. How can I fix this?

One thing you can try is, remove it from the Dock and add it back.

Control-click the Downloads Dock Tile, select Options > Remove from Dock
Then in Finder, select your Downloads folder and control-click > Add to Dock


How to transfer voice memo with their titles? iTunes doesn't keep title of voice memo which make them quite useless. They look like DATE######.m4a.

I'm working with these memos, any solution would fit, even jailbreak I really need to find a way.

iTunes 12.2.1.16, Windows 7, iPhone 3Gs, iOS 6

I had over 700 voice memos in my iPhone, many of which I renamed to make it easier to find the ones I need in the records.

To solve the problem of moving records to my file system keeping file names, I found this workaround for myself. I describe it step by step.

Synchronize with iTunes and get a playlist with records.
Go to the playlist and go File → Library → Export playlist and save txt file.
Open the file in the Notepad++ and press Ctrl+A to select all text, press Tab once to get spaces in the beginning of each line.
Delete first line, containing column names.
Go to Edit → Columns Editor, in the opened window select the "numbers to insert" starting from 0 with increasing by 1 and the decimal system, press ok - it will include numbering of lines.
Press Ctrl+F and go to the replacement tab, then turn on the use of regular expressions
Change

^(\d*)\s*([^\t]*)\t([^\t]*\t){29}[^\t\n]*\\([^\t\n\\]*).*$

to

set memoNames[$1]="$2.m4a"\nset memoLocations[$1]="$4"

(maybe the regex to replace depends on the version of iTunes because it is made according to the columns in export file)

The result should be something like this

set memoNames[0]="my custom name.m4a"
set memoLocations[0]="20130327 172842.m4a"
set memoNames[1]="some other custom name.m4a"
set memoLocations[1]="20130327 172954.m4a"

and so on (total number of lines is count of your voice memos × 2)
Next, create a batch file (for example rename_records.bat) with content with this code

@echo off
setlocal EnableDelayedExpansion
#INSERT_HERE_YOUR_REPLACED_DATA#
set "x=0"
echo starting renaming loop
timeout 2
:RenameLoop
if defined memoNames[%x%] (
    set nameFrom=!memoLocations[%x%]!
    set nameTo=!memoNames[%x%]!
    call echo renaming #%x% %nameFrom% in %nameTo%
    REM ren %%memoLocations[%x%]%% %%memoNames[%x%]%%
    set /a "x+=1"
    GOTO :RenameLoop
)
echo Total length of files is %x%
pause

Replace #INSERT_HERE_YOUR_REPLACED_DATA# in your bat file with the result of 6 step
If you have cyrillic symbols add this line at the beginning of your bat file

chcp 1251 >nul

Note: Before running your bat file copy your records from iTunes library to some other folder to be sure that you won't lose your records.
Place your bat file in the folder that you made in 10 step and run it.


Blinking folder icon - safeboot, recovery hd does not work When I try to start my MBP early 2011 with Mavericks OS installed I get a blinking folder icon. SMC reset, PRAM reset did not resolve the issue. The MBP does not boot into the safe mode too. When I attempt to perform internet recovery, the hard drive does not show up in the list of hard drives. It looks like my hard drive has crashed. Is there some way that I could recover my data?

Did you do anything special before the problem showed up? Like performing an osx update? I'm asking because I experienced my SSD going completely dead after an osx update myself before.

It might be the disk is broken, especially indicated by the disk not showing up in internet recovery.

If you feel comfortable with it, I'd advise you to boot up a Linux live distribution of your choice and check if it is able to detect and mount the drive. If it's not detected, professional disk recovery services are likely your only chance. If Linux is able to mount or at least detect it, you should be able to repair it or at least rescue your data. There are tons of sources on how to repair/rescue hfs+ partitions from within Linux, such as this.

If you don't want to go this route, you can always head to your nearest Apple store and let them determine the issue. While they might not fix it (for free), you'll at least know whats going on and if data recovery is an option.


Can an app requiring ios 7+ be installed on a device that cannot update further than ios 6? Most instructions show that when there's an opportunity for a software update. However, this is a different case, as the device you want to install on (lets say a 1st gen Ipad and you want to install an app that requires ios 7+). Is that possible, as the device cannot update further? Or does it require special programs?

No, you wouldn't be able to install the app. Depending on what the app is, it might need specific functionality that is not offered in iOS 6, but is offered in iOS 7+.


How can I exclude the photos that are in iCloud Photo Library from my iPhone’s iTunes backup? When making a backup of my iPhone through iTunes, how can I exclude the photos that are already stored in my iCloud Photo Library from the backup?

I have the impression that an iTunes backup includes all of the iPhone’s data related to iCloud Photo Library. I made a few backups of my iPhone while it is still downloading my iCloud Photo Library (my MacBook is still uploading to it), and the size of the backup keeps increasing. I had also cleared out Photos on my iPhone and made a backup before enabling iCloud Photo Library on it; the size difference of the backups before and after is the same as the amount of storage used by the Photos app on the iPhone (which is several gigabytes).

Photos on my MacBook is set to “Download Originals to this Mac”, while on my iPhone it is set to “Optimize iPhone Storage”.

I don’t really need the iTunes backups of my iPhone to include another copy of my photos (except perhaps for any photos taken on my iPhone which have not yet been uploaded to my iCloud Photo Library); is there any way to exclude them?

I realize this question is very similar to the question on “Omitting photos when backing up an iphone to a macbook with itunes”, but that question doesn’t seem to involve the use of iCloud Photo Library.

After searching some more, I came across the Macworld article “How to exclude your iCloud Photo Library from an iTunes backup”. The article points out that iTunes backups are not supposed to include the iCloud Photo Library data in the first place, as documented by Apple Support:

  An iTunes backup doesn't include:

  Photos already stored in the cloud, like My Photo Stream, and iCloud Photo Library

The article reports that others have experienced the same problem where the backup does include the iCloud Photo Library data, and suggests disabling and re-enabling iCloud Photo Library on the iPhone.

I think I will wait for the upload from my MacBook to finish before trying this. Perhaps the problem will resolve itself after the initial upload is complete. I will edit my answer later.

Edit: The above tip may be helpful to others, though unfortunately I have to report it didn’t resolve the issue for me. Apart from disabling and re-enabling iCloud Photo Library on my iPhone, I have also tried deleting its backup in iTunes before making a new backup. But I find that the iTunes backups are still taking up a few gigabytes of additional space with iCloud Photo Library turned on compared to when it’s turned off. I’m not sure what else to try; other tips, or confirmation from others experiencing the same issue would be welcome.


iPhone Application for Email Address Shortcut Does anybody know of an iPhone application or shortcut that allows you to save your email address access it via a shortcut?  This would be super useful when filling in forms in Safari or in when your email address is required in an application.

An excellent application for shortcuts is Smile Software's TextExpander touch. Because of limitations in iOS, it doesn't work to expand shortcuts in every app (including, sadly, all of Apple's apps). From the manufacturer's site:

  Given the current feature set of the
  iPhone OS, TextExpander touch cannot
  work in the background (as it does in
  Mac OS X), expanding text snippets
  while you work in other apps, except
  for apps with TextExpander-integration
  built-in. You must first compose your
  text in the TextExpander touch Compose
  screen, and then transfer it to
  another app.


Where are the PNG files for the UI theme stored? I like using my Mac with the "graphite" theme, but I'd like to still keep the color "traffic light" graphics.  I remember from various theme modifiers in the past that these are simple PNG files, so I figured if I copied the color ones into the graphite directory it would use them.

I forget where in the System these files are.  Anyone know?

You might try

/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/UI.bundle/Contents/Resources


Stop sharing Macintosh HD and home folder with File Sharing? I've seen quite a few questions posted here and on Reddit about this topic, but I haven't been able to find the solution I am looking for, or a straight up answer like "no you cant change that".

I have File Sharing with smb setup on my macbook pro to access files from my windows pc. What I want is to have my public shared folder that I can put folders and files in to grab on my pc whenever, and stop my "Bloumbs" home folder and entire Macintosh HD volume from being shared.

Is it possible to do that? If so, how?

There is a folder called Public in your home folder that is shared by default with read only privileges. You don't need to tick the file sharing option to share it.


My terminal path in macOS SIerra is messed up Few months ago, I was trying to download pygame on mac.

It was very difficult but I finally did it through terminal using bash.

But after the download, I think there was some change on default path on my Mac's terminal.

I searched many solutions through this site, but I can't solve the problem and I think those solutions are not really fit to my problem.

When I open terminal,

Last login: Thu Jul 6 21:18:59 on ttys000 ojeonghuns-MacBook-Pro:~ hoon$

I can see this kind of message and i remember that i couldn't find the first line when i first use terminal.

and on that state, i cannot use command line like ls, cd .. etc

I can use only pwd as i know, and everytime when I want to use ls or cd, i have to export new path by entering this kind of command line,

export PATH=/usr/bin:/bin

This leads me to use every command line, but everytime when i close and re-open the terminal, i have to set path.

If I echo $PATH , my path is

/Library/Frameworks/Python.framework/Versions/3.6/bin:’/usr/local/bin:??

I think i download one or two additional Python versions on my Mac.

So is it possible to set default path ?

Oh, and when I try to figure out by typing  open ~/.bash_profile

I see the error message of

  Trace/BPT trap: 5

The system's standard path (configured in /etc/paths) is /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin. If you want to add an additional path like /Library/Frameworks/Python.framework/Versions/3.6/bin to your user's PATH permanently you have to include the old $PATH in the export PATH line - either at the end or at the beginning - in your .bash_profile file:

export PATH="new_path:$PATH"
export PATH="$PATH:new_path"

Additionally your PATH contains some unwanted characters like ’ or ? and doesn't have a closing quote ".

Open Terminal and enter:

/usr/bin/nano ~/.bash_profile

Change the line

export PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:’/usr/local/bin:??...

to

export PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:$PATH"

If the file contains another line with export PATH="..." squeeze the required parts into the above line.

Save the mod with ctrlO and quit nano with ctrlX

Quit and relaunch Terminal and enter echo $PATH which should reveal at least:

/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin


Cannot erase HD partition - Could not find partition to expand, first partition on the disk? My current HD status is

When I try to remove the "Free" partition, the log returns
"Could not find partition to expand, first partition on the disk?"

What can I do?

I would suggest to proceed as follows:

Stop Time Machine,
Migrate your backups from: Time Machine - … to Free. If required,
refer to this Apple technical note: http://support.apple.com/kb/HT5096
Suppress your now useless Tine Machine - … partition.

⇒ Free should now use your full disk
Rename your Free partition to something more practical.
Restart Time Machine and tell it to make the backup where you want.


Can I use Apple Pay in the US with an Australian AMEX? I'm travelling from Australia to the US. Apple Pay isn't available in Australia yet.

My question is: Can I use Apple Pay in the US with an Australian AMEX?

Short answer: No, you can't.

Long answer: Apple Pay is, officially, US-only right now. However, it is possible to use Apple Pay in Australia:

  To show the Apple Pay settings, simply open the Settings app on your iPhone (or iPad mini 3 or iPad Air 2), tap on General, Tap on Language & Region, and tap on ‘Region’. Change it to the United States.

However, there is a big caveat:

  While you can go through the setup process, your card must be issued by a participating bank before it can be used with Apple Pay. If you try to add a card from a bank that isn’t yet supported (i.e a card from, or issued in Australia), you’ll simply receive an error.

The Apple support article Apple Pay participating issuers lists the currently-supported banks.

So, while you could use it in Australia with a US-issued card, the reverse is not possible.


Does downgrading Lion to Snow Leopard also downgrade firmware? Ever since I installed Lion I've had problems with wifi. Connections would drop, and once wifi was turned off it wouldn't turn back on. Now, I can't use it at all - it says "No hardware installed."

The same problem also exists in Windows on my Boot Camp partition, so I think it's a firmware or hardware issue. I'd like to fix it by downgrading to Snow Leopard, but would this also downgrade the wifi firmware?

No. Firmware is outside the scope of traditional OS updates (e.g., 10.7.2). On Macs, there is actually no way to revert a firmware update (even if you download a prior revision).


Use Retina resolution in Microsoft Remote Desktop I've been trying to set up my new MacBook Pro [with Retina display 2015 edition]. I use a lot of university software via Remote Desktop connection, it worked very well on my Acer laptop and it's vital that this staff works as good as on Windows machines.

The problem is that when I open the connection on MacBoook the display is not great - I can see pixels, just like my grandmas' TV from the 1970s. I tried with different resolution settings, still the same.

Click the Pencil [edit] Icon at the top of the main RDC window & set a higher remote screen resolution.
'Native' might be as good as it will let you have.

Scale content might not be good on a Retina screen - but it might appear quite small without it checked.

I have a feeling, which I'm unable to test, that it may be related to the maximum resolution of the remote machine's graphics, not the local - as you can always set the local machine to scale the remote's resolution to fit the local screen - e.g. for dual monitor remote, single monitor local.


search for pictures of a set of people together in Photos If I have pictures in macOS Photos, and people's faces have been identified and named in the People section, how can I search for pictures where both person X and person Y appear, or where X, Y and Z appear?

Currently, after some googling and experimentation with operators, I've only been able to search for pictures by using the name of a single person.

You can achieve the same result by creating a Smart Album, specifying multiple Person criteria with matching set to all to include by name those who must feature together in the photos (and videos) that populate the album.

You're not limited by how many people against which you can specify criteria, meaning you can search for photos that feature a specific group of friends or colleagues who all appear together.

Changing a criterion from includes to does not include allows you to exclude photos in which a specific person appears.

Unfortunately, achieving more complex search patterns that comprise conditional inclusion/exclusion criteria nested within multiple matching blocks is not possible; that is to say, you can only match either any or all of your criteria collectively.  So, whilst you can find photos in which persons X, Y AND Z all appear together, you can't easily find photos which feature either persons ［X AND Y］ OR ［X AND Z］ using a single Smart Album (you would need to go through the trouble of multiple Smart Albums and—depending on how complex your search requirements become—using the Smart Album(s) to make regular albums that can be referenced by criteria of any subsequent Smart Album to narrow its search scope.  So, complex search criteria are achievable, but are inconvenient).

Let me know if you need anything clarified furhter and I'll get back to you.


Configure your mail with mail.app on Mountain Lion I have Macbook Air 2012 model (128 GB SSD) with Mountain Lion (10.8.2) and I am having difficulties trying to configure the mail.app. When I first tried to set-up my gmail account it started to sync my Macbook with my whole gmail account which is very huge (about 10 GB). Is there any way not to sync whole mailbox? Given the limited capacity of SSD I wanted to have something like we have on an iPhone where for instance only 1000 (or less) of emails messages would be stored locally.

I suppose that most of the space required by your mails is due to the attachments. In this case you can avoid to store tham.

Indeed, in Mail.app you can configure IMAP for keeping only the text for off-line viewing and not the attachments.

Go to Mail > Preferences
Go to the tab Accounts and select your account
Go to the sub-tab Advanced
In the first combo-box select "All messages, but omit attachments"


How to move movies already contained in library to external drive? My iTunes library is located on an external hard drive using the setting Settings > Advanced. Yesterday I bought a movie in the iTunes store without connecting the external hard drive to my computer. Consequently, the movie file is located on my internal hard drive. How can I move it to the external hard drive without any trouble (e.g., loosing rights to watch it "you are not allowed to watch this movie due to DRS" etc.)? For mp3 I locate it on my internal hard drive, copy it to the Desktop, delete it from the iTunes library and import it again. Can I do that for bought movies as well?

There's an easier solution to this than re-importing, and it works for both movies and songs (and probably everything else, but I haven't had reason to try it on any other media type).

In iTunes, go to the File menu, then select Library, and then Organize Library.  On the resulting dialog, check "Consolidate files".  When you hit OK, any files that have somehow gotten stored in the wrong place will move back to where they belong on your external drive.

After this has completed (it might take a couple of minutes, since I'm assuming that a movie file is big), you can test it out.  Command-click on your movie and select "get info", and then look at its file location on the General tab.  Its file location should show that it's on the external hard drive.  Then you can try to play it.  If it plays successfully, you can then delete it from your internal hard drive.