Why does this bash script not work as an automator service? I know very little about bash scripting or Terminal commands, this is all very new to me so please bear with me.

Original script

I would like to use a script I found on littlefield.info as an automator service. This is the original script:

for file in *.flv *.mov *.mp4
  do mediainfo "--Inform=Video;%Duration%" $file
done | awk '{total+=$0}END{total=total/1000}END{print strftime("%H:%M:%S",total,1)}'

Explained by the creator:

  Cycle through every video file in a folder,
  Passing it to the mediainfo program to extract the duration in milliseconds,
  Passing that result to the awk program to add up all the numbers to give us a total,
  Passing that to awk again to divide that number by 1000 to give the number of seconds,
  Passing that that to the strftime function to display the result in Hours:Minutes:Seconds format.

Modified script

I installed the mediainfo CLI and started experimenting. Apparently strftime is not available on mac, so I had to look up another way on how to convert the seconds to readable output. I cobbled together the following script (probably horribly inefficient, but hey.. it works):

# the cd is needed for automator
cd "$1"

i=$(for file in *.flv *.mov *.mp4
        do mediainfo "--Inform=Video;%Duration%" $file
    done | awk '{total+=$0}END{print total}')

((i/=1000, sec=i%60, i/=60, min=i%60, hrs=i/60))
timestamp=$(printf "%dh%02dm%02ds" $hrs $min $sec)
echo -e "Total duration of video files in this folder:\n\n$timestamp" > _total_duration.txt

It works perfectly fine in Terminal. But running it as a service from Finder gives the following output:

  Total duration of video files in this folder:

  0h00m00s

awk variable problem

The duration shouldn't be 0. I started troubleshooting, and reduced the script to the following:

for file in *.flv *.mov *.mp4
    do mediainfo "--Inform=Video;%Duration%" $file
done | awk '{total+=$0}END{print total}'  > "test_file_awk.txt"

There seems to be a problem with the variable total in AWK. It doesn't output anything when run from Finder but works correctly from Terminal.

Do you guys have any idea what I'm doing wrong?

Let's start with a small example.

Fire up Automator and create a service with a single "Run Shell Script" step.

Set it to take Folders as input from Finder

Pass input as arguments. Shell is /bin/bash

Bash code:

cd "$@"

for file in *.mov *.flk *.mp4
    do
    ls -1 "$file" >> ~/Desktop/test_file_awk.txt
done

What this does it takes the directory you pass in as "$@" and goes into it then runs the command on all the files in that directory.

"$@" is in quotes to protect against spaces, as is "$file"

So, you can replicate this to your setup:

cd "$@"
i=$(for file in {*.flv,*.mov,*.mp4,*.m4v}
    do
    /usr/local/bin/mediainfo "--Inform=Video;%Duration%" "$file"
done | awk '{total+=$0}END{print total}')

((i/=1000, sec=i%60, i/=60, min=i%60, hrs=i/60))
timestamp=$(printf "%dh%02dm%02ds" $hrs $min $sec)
echo -e "Total duration of video files in this folder:\n\n$timestamp" > _total_duration.txt

Personally, I would change the output to something like:

> ~/Desktop/"$@"_total_duration.txt

So that the data ends up on  your desktop in a file named for the folder, but I have a lot of media directories and I don't want txt files in them.


How do I password protect iPhoto '11? I have some albums in my iPhoto 11, that contain personal photos. I want to password protect  particular albums or the iPhoto application itself.

Is there any way to password protect iPhoto 11?

I solved this by creating a separate iPhoto Library and storing that Library within a password-protected encrypted sparse image. (You create sparse images using Disk Utility.) I've appended a step-by-step tutorial to the end of this answer.
I then created an alias to the private library and stored that alias in my Pictures folder alongside my regular libraries.
To open the private Library, double click on the alias icon. You will be prompted for a password so that the encrypted image can mount on the desktop.  When you're done, be sure to "eject" the disk image.
iPhoto defaults to opening the last Library opened, so if you want the program to open the "regular" file next time, go ahead and open that Library. (You can either double click its Library icon or open iPhoto while holding down the Option key.) I've just developed the habit of opening iPhoto using the appropriate Library icon from my Pictures folder.
The disadvantage of this method is that you can't mix "private" images into your iPhone sync and it's possible that leaving iPhoto with the wrong "default" library could interfere with an iOS sync. (I use Aperture for my main photo collection/iOS sync anyway, so I haven't fully explored this.)
Creating an encrypted, Password-Protected iPhoto Library — Step-by-Step
The reality is that many of us have pictures we want to keep but don't necessarily want to share with partners, children or grandparents. What happens at Burning Man stays at Burning Man. Right? To keep those pictures from prying eyes — and inadvertently displaying them on your big screen TV via Apple TV — I advocate using a separate iPhoto library for your private pictures and protecting that library by storing it inside an encrypted container.
I'm keying this tutorial to Mac OS X 10.7 Lion and iPhoto '11 (current at time of writing), but this system will work for previous versions of the software. (To a point — the encrypted disk image was added to the OS in 10.3.) You can use this method to safeguard Aperture libraries as well.
Open your existing iPhoto Library and select the images you want to put into the encrypted library. One way of doing this is to assign a unique keyword to those pictures. I used fmeo (short for for my eyes only). Next, create a smart album that includes the images you tagged.
Export or copy the tagged images into a folder on your desktop. Leave the images in your original iPhoto Library until you're sure you've successfully completed this entire process — but don't forget to go back and delete the images once you're satisfied with the results.
Next, you need to create a new iPhoto library for your private images. Quit iPhoto if it's open. Open iPhoto while holding the Option key down. Create a new library from the dialog box displayed. I named mine FMEO. I strongly suggest you not give it a name like Pictures I Don't Want My Spouse To See because the filename will be visible in the Finder if you follow my complete plan.
Import the images you want to protect into iPhoto (making sure you're using the FMEO library) and organize them as you see fit. When you're happy with the results, quit iPhoto. You can safely delete the Finder folder containing these images. Use Secure Empty Trash if you're concerned that someone will try to recover the deleted files.
So far, all you've done is created a separate library for your private photos. It isn't protected in any way. In fact, assuming the FMEO library was the last library used, iPhoto will display your private images the next time it's opened. The secret to keeping those images from prying eyes is to store the library inside an encrypted container. Fortunately, Apple provides everything you need to create this container free of charge in OS X (10.3+).
Open Disk Utility. (It's in your Utilities folder.) Create an encrypted sparse image:

Choose New > Blank Disk Image from the menu

Enter a name. Again, be discreet as this name will definitely be visible from the Finder.

Choose a size for your container. It must be big enough to contain the current library and, assuming you want the ability to add images in the future, should allow ample room for future growth. You can afford to be a little generous with this because you're going to use a sparse disk image format, meaning the container will initially only take up as much disk space as its contents plus a little overhead and will grow (but never shrink) as necessary up to its maximum formatted size. Don't worry too much about creating an image that you might outgrow someday as you can always create a new sparse image file and transfer the library into a bigger home if your library becomes too large.

For Format, just use the default Mac OS X Extended (Journaled) unless you have a compelling reason not to. Same for Partition settings, just leave them be unless you know better. Encryption:  I'd suggest 128-bit (more than adequate for most purposes) but you're free to use a higher level if you think it's necessary. Click Create button.

Enter a good password when prompted. Do not store the password in the Keychain because that would allow anyone browsing your computer to open your secret stash — rendering this entire exercise moot. Store your password securely through other means.

A brief interlude about organization. I've created a folder inside my ~/Pictures folder called iPhoto Libraries. Inside that folder, I've placed my non-sensitive iPhoto libraries and the encrypted image files containing my eyes only libraries. I have a shortcut to the iPhoto Libraries folder on my dock. This allows me to quickly open iPhoto by clicking on the library I want to use.
Once your encrypted sparse disk image is created and mounted on the desktop, copy your private iPhoto library into it. Leave the original copy of the library in place until you've tested the encrypted version to your satisfaction — you might want to rename the original at this point to avoid confusion.
Create an alias of the library file contained within the encrypted sparse image. Place that alias in a convenient place, I put it in ~/Pictures/iPhoto Libraries alongside my non-secure libraries.
Unmount (eject) the sparse disk image. Then open the private image library by double-clicking on the alias to the file. You should be prompted for the password to the encrypted sparse disk image. Once you've entered that password (again, do not save it in the Keychain), iPhoto should open and display your private photos. Once you're done working with those photos, close iPhoto and unmount (eject) the sparse disk image. It is critical that you unmount the encrypted image, otherwise anyone can come along and open your private library.
Once the sparse image is unmounted, if you try to open iPhoto you will again be prompted for the password. You can prevent this by opening your default iPhoto library after you've closed the private library. I do this by clicking on the appropriate library file from the shortcut in my dock.
Now that you've successfully created and tested your Eyes Only library, be sure to delete the version of that library that isn't inside the sparse image (again, using Secure Empty Trash if it makes you more comfortable) and open your original iPhoto Library and delete the private images still contained within.
That's how I do it. It's not as complicated as it seems. In fact, it took me more time to write this up than it did for me to create-do-test the first time (excluding selecting the pictures).


iTunes Podcast Rejected by Apple I am trying to submit a podcast to iTunes for the first time, and thought everything was going well, but I just got a rejection email:

  Dear podcast owner,

  The podcast located at the URL shown below has been blocked or removed from the iTunes directory as a result of technical problems with the feed.

  Name: In His Word
  Feed URL: http://joshburnett.org/podcast/rss_source.rss

  If you wish to reactivate your podcast in the iTunes directory, please troubleshoot your feed and check the functionality of each episode. To test your podcast, start iTunes, select Subscribe to Podcast from the Advanced menu, and enter your feed URL in the dialog box. If you can successfully subscribe to your podcast and listen to each of the episodes, you can reactivate your podcast by resubmitting the feed using the Submit a Podcast page, https://phobos.apple.com/WebObjects/MZFinance.woa/wa/publishPodcast.

  For more information on troubleshooting feed problems and controlling the appearance of your podcast on iTunes, please see the podcast FAQ at http://www.apple.com/itunes/podcasts/faq.html and technical specification at http://www.apple.com/itunes/podcasts/techspecs.html.

  Sincerely,

  The iTunes Store Team

I tried the test submission through Advanced>Subscribe to Podcast. It takes a few seconds to load and then it is subscribed on my iTunes. I click "GET" and the podcast downloads. But then it won't play. When I double click it, it just downloads again (and keeps doing that). I'm not sure what I'm doing wrong. I've looked at other podcasts RSS files, and tried to make sure mine has everything I need. Any thoughts?

Here is the feed url

My directory looks like this:

root/

podcast/

audio/

podcast1.mp3

index.php
podcast1400.mp3
rss_source.rss

Update: I finally narrowed it down (I think). Everything seemed correct, but I finally tried a couple different MP3 files and submitted the podcast and it worked. So, I'm wondering if the audio file my client gave me has issues. When I go to "Get Info" for other MP3 files, it shows things like "Audio Channels", "Total Bit Rate", and stuff like that. The MP3 file I am using doesn't really show anything. All I know is it says it's "Kind: MP3 audio" and "64865838 bytes". Any thoughts? I know pretty much nothing about audio, I'm a web developer. I can provide the audio file if anyone wants to download it and check it out.

Okay, after a long period of troubleshooting, I determined it was the MP3 file that was having issues. After importing it into GarageBand and exporting it from there, it finally worked! I received the MP3 file from the client. He is a preacher and they recorded it at the church. Then he uploaded it to Google Drive and I downloaded it from there. It sounds like it was not encoded correctly, but I am not an audio expert.


Troubleshooting the spinning wait cursor or spinning disc pointer I have a mid 2009 MBP with Mavericks and am increasingly seeing the spinning wait cursor or spinning disc pointer - how do I try to troubleshoot what might be happening?
Indeed, in what situations does this object appear - are the situations purely internal in the sense of lack of CPU power or RAM or motherboard characteristics, or can external factors also impact such as HDD or network characteristics?
I presume that the spinner appears in response to the current application not to some background event, so, in troubleshooting I'd also presume you would need to look at logs of some sort of the current application and possibly of a general nature, things with which I'm not familiar.

One would use the Activity monitor in your Utility folder to find out the Loads to the CPU, RAM or Disk.

On my MBA 10.9.4 it looks like this:


Airtunes is giving me dropouts I got an Airport Express to use to wirelessly extend my existing Airport Extreme (which is plugged into my cable modem). I'm also using the Airport Express to send music to the stereo. Unfortunately I'm getting audio dropouts.

How do I track these down? Could I save the Express some work by running an ethernet cable between the two units? Are there any other settings that specifically affect Airtunes?

I had this problem several months ago and was able to solve it by disabling the built-in iTunes equalizer.  Just uncheck the "On" box.

Not guaranteed to work for you since there are so many factors that could be affecting it, but it worked for me.  Hope it helps!

EDIT:  A couple more notes...  I have a pre-N Airport Express (circa 2008) wirelessly "attached" to a Time Capsule base station (essentially an Airport Extreme with a HDD built-in).  Before, when I was having this problem, I had my Express extending my wireless network.  During the course of correcting this problem, I changed it to simply join my network and NOT extend it.  I'm not sure if this contributed to the solution, but I just wanted to mention it in case it turns out to be significant.


Mac book pro 16 slows down completely when connected to an external monitor I have a Macbook Pro 16" and recently purchased a 24" (HD) Dell monitor via HDMI (via a USB-C to HDMI converter)
After about 20m of usage, my mac comes to a crawl and really slows down.
It becomes impossible to work on the machine.
Plugging out the monitor fixes the issue in no time and I can see the kernel_task process (in Activity monitor) hit 900% to 1500% of CPU.
Specs
I am running macOS Big Sur
It is a 2019 model with Intel Core i9, 16 Gigs of RAM and
the AMD Radeon Pro 5500M 4 GB graphics processor

After spending weeks of trying out various things: different HDMI cables, different USB-C to HDMI dongles, cleaning the fans and even leaving the air conditioner on to cool the room, the issue turned out to be:
Plugging the power cable on the left-hand side of the Macbook.
Solution:
Plugging the power cable to the right-hand side of the MacBook and the monitors to the left-hand side, solved the issue for me immediately.
Came across this Forbes article:
https://www.forbes.com/sites/barrycollins/2020/04/24/why-you-shouldnt-charge-your-macbook-pro-from-the-left-hand-side/?sh=6209dcda78ff
Which I can now say, works. So if you are experiencing something similar and if your power cable is on the left hand side, moving it to the right hand side may fix it for you.
The other thing I would try (which I did) was to clean out your fans if this still does not work for you.


Can I access a voice memo file that's attached to an email stuck in my iPhone's outbox? Is there a way to access a file that's attached to a message stuck in my iPhone's Outlook outbox, unsent?

I attempted to send two large voice memos to an email recipient as attachments, but the server rejected the email (I suspect due to the size of the attachments) and it remains unsent on my iPhone.

[The original voice memos in my voice memo utility have since been damaged (my fault, long story) and I'd really like to retrieve these two files if possible.]

Although it is a commercial product, iExplorer, can access your iPhone's file system and retrieve almost anything. I believe it has a free trial mode, too.

I'm a satisfied, licensed customer, and have user iExplorer to recover important files otherwise unobtainable. It can even restore data from iTunes backups!


What are the default sounds for iOS 7? I upgraded both my iOS devices to iOS 7, so I have my custom sound preferences that I took with me. However I would like to try the default sounds, preferably without restoring my my devices to factory defaults.

Can someone please tell me which sound goes with which alert type (new mail, etc.)?

They are listed beside each sound.

If we look at AirDrop for example, iOS will list: Pulse (Default).

All sounds will have this (Default) suffix attached to them.


Tracks that should be played as an ordered group The "Overture/Prologue" and "The Launching" from the musical Titanic is six tracks totaling 16 minutes.  I want to make them available for inclusion in a Smart Playlist, but they need to be played as a group, and in order.

Similarly, the Canadian Brass "All You Need Is Love" has four "Intro to ..." tracks, about a minute in length, that should be played together with the song they introduce.

Is there any way in iTunes to mark multiple tracks which a Smart Playlist could pick as an ordered group?

Example:

Track   Name
  1     Song of Jasmine
  2     Intro to Kittens
  3     Song of Kittens
  4     Song of Humor
  5     Intro to Geology
  6     Song of Geology Part 1
  7     Song of Geology Part 2

Jasmine, Kittens, Humor, and Geology are not especially related and can be played separately and in any order, but it is not pleasing to hear just the Intro, or just one of the parts of Geology.

How do?

This is what the “Grouping” field is for. For all tracks in a group, enter the same text in the “Grouping” field. Then choose Controls → Shuffle → By Groupings — note that this setting is only in the menu bar, not in the Preferences!

With that setting, any track whose Grouping field is not empty will be played together with other tracks with the same Grouping, presumably in track number order.


Macbook keyboard backlight doesn't work The keyboard of my Macbook Pro mid-2010 has stopped illuminating in low light.

I checked my System Preferences of my Mountain Lion and there is no "Automatically illuminate keyboard in low light" at all. Also F5 and F6 don't work either while F3 or something like that works perfectly.

I googled this question, and everywhere writes that there is a special point in system pref, which i dont have. screen Any suggestions on how to identify/fix the problem are greatly appreciated

For all kind of hardware-related issues, I will recommend that following,

Reset your SMC, NVRAM. You can find guides for SMC here, NVRAM here.

If that doesn't help, boot into Safe Mode, you can the guide here.

The last step, is of course, to Time Machine it and reinstall the OS. Reinstall, not upgrade.

The very last thing is Genius, or repair it.

Update: some other fixes

I forgot the following things to do before giving up.

a) Create a new user account and see if it works

b) Clear your cache with things like CleanMyMac or other free alternatives.


Does using a case with iPhone cause excess heat to linger around and does it have any significant impact on battery life? I bought an iPhone 11 around 3 weeks ago and I’ve been quite paranoid about using a case as I read somewhere that over the long term it can continuously cause excess heat to not be dissipated effectively and can degrade the battery much quicker. Does anyone know how true this actually is and if it will have a significant impact? Having quickly destroyed the battery on my old iPhone, I was wondering what I need to do differently this time around.

Whether or not the case can cause a thermal problem depends entirely on the case.

Is it possible for a case to impact battery life by not dissipating heat - yes.

Is that true for any case - no.

Imagine a well fitting case made of a metal - it would easily dissipate just as much heat from the phone as when not using a case.


Different contact db on one iPhone I've seen this question. I have the same problem, except that the incorrect contact list is on an iPhone. My iPad, and MBP are in sync.

How can I resend the iPhone so as 1. Not lose the correct contact list, and 2. Get the correct list onto my iPhone?

I've tried "turning it off and on again", thank you @Roy.
I've signed out and back in to iCloud on my iPhone.
I've turned off contacts on the phone, deleted the local set, and reconnected to iCloud, and turned on Contacts again.

I have over 500 contacts in iCloud, but only 50 on the device.

Thanks for any help.

In case this helps others:

Find a correct set of contacts on a Mac. I don't know Windows, this may work the same way.
Export them as a abbu file to save them. Contacts > File > Export > Contacts Archive.
If you don't have a good set of contacts, I suggest you log into iCloud.com. Go to Settings. At the bottom of the page, select "Restore Contacts". Cross fingers.
If you have a decent set of contacts on a Mac > Open Contacts.app. Highlight all contacts. Drag them to the iCloud tab.

Wait a bit until the list is uploaded to iCloud. Check this on iCloud.com > Contacts.
Your other devices should now sync properly.


Choosing processor for MacBook PRO Retina I'm buying a Macbook Pro Retina, and cant decide what processor to choose and what additional cabels to purchase.

First I was sure i5 2,4GHz was enough, but I will connect it to up to two external monitors:

One 24' regular HD, and
One 27' 2560x1440 Asus PB278Q

Maybe it's worth getting even an i7 when planning on connecting it to two external monitors?

And also, do I need any other cable than TB to VGA to receive maximum resolution on the Asus monitor? I saw some cable for around $100 with USB+TB to VGA, would that improve the picture?

Generally amount of monitors connected does not have that much influence on cpu performance. Also, i7 CPUs shine most where tasks are prepared to use multiple CPUs/cores (code compiling, audio, video, graphics editing, rendering). Thus I don't think you should consider CPU update because of amount of monitors you want to connect.

For normal usage andeven gaming I'd just choose the best i5 you can get and get better SSD or more ram instead.

As for the cables - you will have 2 TB ports and HDMI - if you want to leave one TB free maybe use those? So, if any of the mentionend monitors has Display Port (DP) you would need 1 mini DP/DP and one HDMIcable.

I think you can also get TB hub, that will allow you to use one TB to connect both screens, but I haven't tested it.


Storability / shelf life of a newly bought iPad in unopened original packaging Apple may release a new series of iPad soon in future. It may affect the prices for lower-tier devices or they may get discontinued.

I am planning to give an iPad 9.7 (2018) as a Christmas present. In case the product line should change soon, would it be viable to buy one of those quickly before they disappear from the stores? Will the battery be fine if the iPad remains in its un-opened original packaging for 2-3 more months?

will the battery be fine if the iPad remains in its unopened original packaging for 2-3 more months?

You should be fine.

The official advise from Apple when keeping an iPad device in long term storage without being used is:

Charge your iPad battery to about 50 percent.
Turn your iPad off to avoid additional battery use.

(Sharing the screenshot of the Apple support document webpage, as it is no longer accessible.)

New iPads come packaged in this state. So, you should be fine keeping the packaging unopened for 2-3 months.

When a product is discontinued by Apple, it typically doesn’t vanish overnight from store(s) and it should be easy to buy one (also from 3rd party resellers). You may also find discounted pricing from 3rd party sellers. So, general advise would be to hold on until any announcement is made by Apple.

I'd advise to wait till around Christmas (or delay the purchase as much as you can) to make the best decision regarding model to pick and pricing. It's likely you may end up picking a better option (newer model with upgraded specs, same model with more internal storage) for similar price. You may end up finding some holiday offers as well.

Keep watching for any release announcements from Apple. If you wish to receive an email instead, subscribe to the Apple product announcement newsletters as outlined here.


Using Hauppauge HD PVR and Mac Mini to Stream Game Video I recently acquired a Hauppauge HD PVR which my Xbox 360 is currently plugged into. I can record media from it using HD PVR Capture or use it as a TV Recorder via EyeTV. Unfortunately, I want to take the raw video stream, and hook it into something like a Justin.TV or LiveStream ProCaster for live streaming purposes, but I can't figure out how.

The PVR is not listed as a "video device" like a camera, so I cannot choose it as a video source. Since this is a MacMini, there are no registered video devices listed in any app on the Mini (say for example, iMovie's "Import From Camera" section).

How can I take the video feed going into my Mac Mini via USB, and re-use it immediately for any video-like purpose?

Argh, I wish I had seen this in time for the bounty.

I do broadcasts using Camtwist. Camtwist will become a video source and it does things like just broadcast the desktop. So if you have EyeTV maximized and Camtwist broadcasting the desktop and your flash broadcasted using camtwist as a source, you should be set! If you want audio, soundflower is good for that, but not quite as straightforward as Camtwist. Might have to play with it. But there are lots of good tutorials on this online, give it a google.


As a developer, do I need Mountain Lion? I'm a college student and aspiring Apple developer. As such, I am trying to find an intel Mac Mini for as cheep as possible. I've noticed that there is quite a price gap between the models that can support Mountain Lion (late 2009 and later), and those that can't. Since Lion supports the App Store, do I really need Mountain Lion?

Mountain Lion versus Lion is one thing, but it's worth considering that, with Apple's apparent intention of releasing a new major version of OS X every year, a machine that can only run Lion will rapidly fall far behind the baseline. This may make it hard to develop against new SDKs that require the latest version of Xcode.

Buying an older Mac mini may mean saving money now only to have to spend it sooner than you'd like to remain productive.


Unlock sim after passing opportunity to unlock on iPhone startup This must be some basic stuff but I'm unable to figure it out.
I've restarted my iPhone, inserted my security code and then when the numpad appeared to insert my SIM pin code, I pressed the home button and now I can't trigger that numpad again to insert my pin code.

The only thing I see is Locked SIM in the upper left corner and can't do anything about it.

The question: How can I trigger the panel to unlock my SIM card again?

On iOS 10, go to Settings > Phone > SIM PIN to unlock your SIM.


AppleScript to rename Safari Tab There is an option in Keyboard Maestro to rename any tab on safari with the name you want

I'm trying to do the same using AppleScript but is this even possible?

I have nothing so far, I'm guessing JavaScript would be the way to do it

tell application "Safari"
    tell front window to make new tab at after first tab with properties {URL:myLink}
    -- need to rename tab here
    tell front window to make new tab at after second tab with properties {URL:myLink}
    -- need to rename tab here
    tell front window to make new tab at after third tab with properties {URL:myLink}
    -- need to rename tab here
end tell

Found the solution using JavaScript:

tell application "Safari"
    do JavaScript "document.title = 'Hello!';" in tab 1 of window 1
end tell


Battery jumps from 25% to 2% to 36%. What's going on? I have a 2012 13" Macbook Air running 10.9.5. I seem to be losing battery life as of late. This, itself, isn't a huge deal, as I usually use the laptop near an outlet, but as of late the more annoying problem is that it doesn't know when it's about to be fully drained. Often it just goes into instant sleep around 20%. I go find the power cable, plug it in and then it shows it was actually at 0%. It's as if it just can't "see it coming" anymore.

Today, the oddest thing happened. I saw it jump from 25% directly to 2%. This triggered me to go find the power cable and I was able to plug it in at 0% before it went to sleep. As soon as I plugged in the cable, it jumped to 36%.

What is this a sign of? It seems more software related than hardware, but I really don't know.

Is this a hardware issue worthy of a trip into the Apple Store? Or is this something I can some how 'reset' myself?

The most annoying part is the battery just not knowing when it's about to force my machine to sleep. If I can fix that, even with shorter battery life, I'd be thrilled.

I have a 2012 MBA as well.

The battery is still doing it, at 510 cycles now.

In your case try the SMC reset to fix that problem.

If you hold the "alt" key then click on the battery, it will give you some information including what is consuming it.

If you open the Activity Monitor in your Utility folder, then click on the Energy tab, there will be a display of Battery performance for the last 12 hours:


How to add a file into zip? I have a quite large zip file with archived documents and I want to add a new file into it.

How to do it quick and easy? The archive is quite large, so extract+add+compress+delete is not preffered option.

AFAIK There's no (free) onboard app to achieve this.

The easiest way would be to do it via command line.

zip /path/to/zipfile.zip file1 file2

If you want to add all(!) files within a directory and subdirectories, run

zip -r /path/to/zipfile.zip /path/to/dir

It will also add .DS_Store files and that like, so be careful with the latter command.

However, if you're fine with spending some money, you could take a look at http://macitbetter.com. They provide an app called BetterZip 2 which is also capable of doing what you want.


Huawei mobile broadband E173 data card not working properly I am using Mac OS X SnowLeopard. My Huawei mobile broadband E173 data card is giving me problems. After inactivity for some time, it gets disconnected and when I connect again, it shows as connected but sites don't get loaded. Even the default startup page that's supposed to start on connection is not able to load.

I am using the default driver that came with the device. Are there any alternative drivers?

I had a similar device. I will just post some insights I got using that.

Mostly I remember it didn't work when it wasn't plugged in at boot time. But I remember also similar problems as you describe.

Could you check next time it occurs to you quickly reboot and see if the problem persits?

Actually after some trying I found out that I could not only connect through the Huawei software, but also through the built in modem program of Mac OS. In the Network settings the modem showed up and I could connect from there - even automatically. This turned out less prone to problems. (How do you connect?)

Also I remember it was not easy finding current drivers (my provider didn't have any for Mac). In the end I ended up downloading the most current from another network provider and manually inputing the correct settings.


MacBook Air shuts down on fully charged, healthy battery I have a MacBook Air 13" High Sierra, early 2015.  The computer is only a year old. Battery life is good, amperage good, holding a charge.  The problem is, the very instant I unplug the Magsafe adapter it shuts down. Goes black.  Dead.  I've reset the SMC to no avail.  I'm attaching images to show that the battery is indeed fine. Before I take this to the Apple store I thought I would check in with this bright, enlightened community.

I have a MacBook Pro 2009 with the exact same problem. I followed many internet threads. None of the advices worked, even after replacing the battery with a new one. Finally I changed the power setting to "better battery life" in the system preferences and the problem went away.  Previously I had it on "higher performance"


Where has my Podcast playlist on my iPhone Gone? Where have my podcasts gone from my playlists on my iPhone??? I used to be able to put my podcasts into a playlist in iTunes, but now they don't seem to go onto a playlist and can only be played via the Podcast app. This is terrible as you can't organize or loop  podcasts, and is dangerous whilst driving as you have to look at the phone after every episode is finished.

Is there a way to organize my podcasts?

Delete the Podcasts app, and you'll be able to play them through the Music app again. Some people have had to reboot their devices to get them to show in Music; turn the iPhone off then on again.


How do other Macs in the network see my Freenas 9.3 backup drive attached to iMac via Ethernet? I have a Time Machine back up setup on a Freenas 9.3 server. It works really slowly via WiFi attached to my broadband router. So, I attached it directly to my iMac via Ethernet instead - a full backup takes less than 2 hours now. Problem is how can other Macs on the network see the Freenas server through the IMac Ethernet connection via WIFI? I know the IP address of the Freenas server but can't figure out how I can Time Machine back up my Macbookair via Wifi?

Solution found:

On the iMac, we must first enable port forwarding by entering the following command in Terminal:

echo "rdr pass inet proto tcp from any to any port 12345 -> 192.168.2.x port 548" | sudo pfctl -ef -

replace 192.168.2.x with whatever your FreeNAS is reporting as its IP address. You will also have to enter your account password when prompted. Now, in the Finder on your laptop, connect to your iMac's IP address (192.168.1.x) by typing command + k and entering afp://192.168.1.x:12345/. replace 192.168.1.x with whatever your iMac's IP address is, but keep :12345 as it's needed to connect to your FreeNAS. You may have to select the correct disk from a list. You should now be able to add it as a Time Machine disk on your laptop.


PowerPC desktop Mac black screen fault? Since upgrading to Yosemite, the screen on our PowerPC desktop Mac is totally black and the light on the bottom right of the monitor flashes 'dot dash dot' repeatedly. We can't seem to find a solution having tried the obvious e.g switching off and on again. Please can anyone help?

PowerPC based Macs are old, too old to run Yosemite by a good number of years so I'm going to guess that you have a MacPro and an Apple Cinema Display in which case:

http://support.apple.com/en-us/ht2811

Should help.

Edit:
I should expand on my rather terse answer. I think that the timing of you upgrading to Yosemite is a bit of a red herring. The problem according to the KB article seems to be to do with the power supply. It may have been damaged in some way (or maybe just 'got old'). Check everything is plugged in snugly and that nothing is shorting (no hissy-poppy-crackeling sounds). Also check for excessive heat coming from the power adapter. It shouldn't be too hot to hold, if it is it implies some form of damage.

~W


assigning static IP with command line I plugged my raspberry pi to my OSX 10.10 and I want to give the pi some static IP. When I run

networksetup -setmanual "Built-in Ethernet" 192.168.1.40 255.255.255.0 192.168.1.1

I get :

Built-in Ethernet is not a valid IP address.
** Error: The parameters were not valid.

I followed the man doc. Someone could help ?

here's the output of ifconfig

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 ::1 prefixlen 128
    inet 127.0.0.1 netmask 0xff000000
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
    nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether a4:5e:60:d9:e4:51
    inet6 fe80::a65e:60ff:fed9:e451%en0 prefixlen 64 scopeid 0x4
    inet 192.168.1.32 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:00:1f:0c:50
    media: autoselect <full-duplex>
    status: inactive
en2: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=60<TSO4,TSO6>
    ether 6a:00:00:1f:0c:51
    media: autoselect <full-duplex>
    status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether a6:5e:60:9d:1f:00
    Configuration:
        id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
        maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
        root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
        ipfilter disabled flags 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 5 priority 0 path cost 0
    member: en2 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    nd6 options=1<PERFORMNUD>
    media: <unknown type>
    status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 06:5e:60:d9:e4:51
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1452
    ether d6:8c:e1:bd:55:69
    inet6 fe80::d48c:e1ff:febd:5569%awdl0 prefixlen 64 scopeid 0x9
    nd6 options=1<PERFORMNUD>
    media: autoselect
    status: active
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=4<VLAN_MTU>
    ether 20:c9:d0:2a:ee:68
    inet6 fe80::22c9:d0ff:fe2a:ee68%en5 prefixlen 64 scopeid 0xa
    inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255
    nd6 options=1<PERFORMNUD>
    media: autoselect (100baseTX <full-duplex,flow-control>)
    status: active

I'm going to side step things to get you something that will probably work just fine.

Open System Preferences and delete your WiFi and Ethernet configurations once you have saved all the work you need from the internet.

Add a WiFi connection and connect that to a WiFi Router with Internet Connection.
Then add an ethernet connection and make that a static IP

I would make two networks initially so you don't have issues with which interface gets the default route:

If your WiFi is something other than 192.168.1.1 - then you can use 192.168.1.1 for the Mac ethernet and the Mac default gateway. If the WiFi is on 192.168.1.1 then put the Mac and PI on 192.168.2.1 and 192.168.2.40 for example.

I don't have an ethernet port on their mac, so forgive the WiFi 2 name - you show have ethernet in that image.

At that point, your internet should work through WiFi and the Mac and the PI should be able to ping each other. The Pi won't see the internet through the Mac. If you want that, open Sharing preference pane and share the internet from the WiFi to the Ethernet port and turn off any firewalls to test things.

At that point, the Pi should use the Mac as it's router and everything should have access to the internet and each other.


What is the difference between .bash_profile and .bashrc? To make an alias for the Terminal in OS X, you can either put the aliases in .bash_profile or .bashrc. What is the difference between the two and why would I choose to put aliases in one and not the other?

.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.

When you login (type username and password) via console, either sitting at the machine, or remotely via ssh: .bash_profile is executed to configure your shell before the initial command prompt.

But, if you’ve already logged into your machine and open a new terminal window (xterm) then .bashrc is executed before the window command prompt. .bashrc is also run when you start a new bash instance by typing /bin/bash in a terminal.

On OS X, Terminal by default runs a login shell every time, so this is a little different to most other systems, but you can configure that in the preferences.


How to convert my iCloud Photo Library into H256/HEIC/HEVC I have iPhone 11 Pro and MacBook Pro 16", both are powerful enough to handle HEIC/HEVC. I just found that significant part of my iCloud Photo Library has an unoptimized MOV files recorded on previous iPhones:

Is there any way to convert library to modern format keeping all the metadata?

For images, you could use this iOS app to batch converting anything to HEIF:
I personally use this app for my own Photo Library!
Half - Cut Media Storage in ½
https://apps.apple.com/app/half-cut-media-storage-in/id1288721004
For videos, I haven't test anything solid yet. However, I found a blog post https://rienkjanschurer.nl/how-to-make-your-apple-photos-library-smaller-use-h265-hevc-for-your-videos/
and it uses Permute, which looks promising!
https://software.charliemonroe.net/permute/


Did they remove the number of emails in a folder from the toolbar in Yosemite's Mail.app? Before I upgraded to Yosemite, I used to see the number of unread and total emails in a folder in the title/header bar,  e.g.

Inbox (23) 64 messages

I no longer see this - is there any way of getting it back?

It appears to be a bug and has been reported to Apple.

A discussion on the Apple forums mentions this same problem, OS X Yosemite mail stopped showing total inbox message count:

  This appears to be a bug. It is triggered when you view a smart folder - once you do, the count in the title bar will disappear until you restart mail.

  I filed this as a bug with Apple, so they're aware of it. No ETA for a fix though.


Macbook Air 2017 7.1 Disk is crashed? I have been trying to reboot my MacBook air 2017 from the disk I've used for a while.
Couple of days ago my mac shutted down with a circular error sign. I've been able to boot it back with an external HDD and backed up all my data but when I wanted to erase my crashed disks I've got error that unable to erase disk now please proceed. When I try to redownload Mac OS Big Sur with recovery mode it says permission denied.
Then I started the device in recovery mode and tried to erase it there, it got me writable disk is required error.  I've tried to unmount disks, via terminal nothing changed. Tried to erase it from the terminal it says permission denied.
Finally I now opened single user mode, I can't even /sbin/mount -uw / or sbin/fsck -fy
It says permission denied error with 66
Guys I just wanted to erase my disks, what do I do now. I am no computer expert but soon I'll be. I am really frustrated.

Just to clarify: It sounds like you’ve booted into the Recovery partition. Can you confirm that you’ve run Disk Utility from there, selected your physical drive (first going into View -> Show All Devices and selecting the SSD media itself), and tried to erase that disk? If that fails, can you post a photo of the failure?


How to get an old iCloud password reset? My kids locked my old account by putting in the wrong password too many times. I can't remember my security questions and I don't remember my recovery account email address.
How can I reset my password and change it all over to my new account?

When you have two-step vertification enabled, apple could not reset your password. You will need to use the recovery code aplle provided.

Is two-step vertification is not enabled, you could call applecare. They can reset the password for you.

For a list with all applecare numbers you can visit this link


iPhone not registering bluetooth keyboard keystrokes I have an iphone 6 running ios 11.2.6 which I'm attempting to use with an apple bluetooth keyboard.  I can successfully pair the two devices, at which point the on-screen virtual keyboard disappears from text entry scenarios, so clearly the phone is expecting input from the keyboard.  However, when I type, no keystrokes are received by the phone.

If I turn off the phone and turn on again the keyboard works as expected.  Can anyone suggest a more elegant way of establishing the connection or maybe settings that might be interfering with the bluetooth functionality?  Wifi maybe?  This only seems to happen when I'm connected to a public (relatively slow) wifi.

Given that your iPhone and keyboard connect and work just fine when the iPhone is connected to non-public WiFi networks, most likely the public WiFi networks are using frequencies that interfere with the Bluetooth in the keyboard. I would guess that by powering cycling your iPhone, it renegotiates the Bluetooth frequencies with the keyboard which do not interfere. Other factors at work may be microwave ovens, wireless speakers, Dish satellite systems, power sources, badly shielded cables & wires, and a host of other causes. Apple has a great rundown of things that can cause interference.

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

We live in a world saturated with radio and microwave radiation. If the poor public Wi-Fi locations are in locations where there are other people with phones, Bluetooth devices, etc, I’m not surprised that things don’t work well sometimes.


How to make Siri available when I open my MacBook? When I open my laptop, I can click on Chrome exe and launch the browser.

I know I can ask Siri to open Chrome, but I have to click to the Siri icon (or the keyboard shortcut) and then ask her to, which - well - is more work than just clicking Chrome. It will open Chrome and terminate.

Can I make Siri be available at startup? Open Chrome when she asked to and then terminate.

I think you can't.
But, if what you want is just to open Chrome at login, just left-clic the Chrome icon in the dock, then Options > open at login


How to save video from my iphone 5 to Time Capsule? Is it possible to save video from my iphone 5 to Time Capsule? If yes, how to do this?

No, the Time Capsule can only backup through Time Machine. Since the iPhone doesn't run Time Machine, you can't backup the video directly.


Can I find just the apps which I have purchased in the App Store? I know I can go to the Purchased tab in the App Store on my iPad to see all the apps that I have downloaded, but I have been unable to find a way to see just the apps that I have bought.

Is there a way to sort the apps in the iOS App Store so that one can easily view all the paid apps that have been downloaded?

I don't know of any way to do this using the App Store.  I look through my email receipts for this information.


High Sierra: Can't merge BOOTCAMP partition with APFS container I feel like this is a known problem on High Sierra, but I can't delete my BOOTCAMP partition to gain "Free Space" and I also can't expand my APFS container that contains my MACINTOSH HD. It's like they've turned into seperate hard disks, and I can't move over the space from the old file system to the new one.
This is what I find when I type diskutil list into terminal:

I tried manually deleting the BOOTCAMP partition using terminal, and then expanding the container: I tried using the diskutil apfs resizeContainer. But I got an error saying that the target disk has no space (i.e. it doesn't detect the free space).
Any solutions?

First convert the former Boot Camp partition to free space:

sudo diskutil eraseVolume "Free Space" %noformat% /dev/disk0s3

Then expand your APFS container to the max (0 is a magic size here):

diskutil apfs resizeContainer disk0s2 0


If someone has access to my iCloud account, can they see all my text messages or just my iMessages? I gave my best friend my iCloud/Apple ID password because she forgot hers. Does that allow her to see all of my text messages that are incoming and outgoing, or only my iMessages?

Also, if my new conversations start off with my number, will she have access to them if the person I’m texting has an iPhone?

To start off, as of August 2017, there is no way to view or send iMessages from the web. So before she could view your conversations, your friend would need to register one of her Apple devices with iMessage using your Apple ID.

When that happens, you will get a notification on all of your devices, informing you that some new device is now registered to use your Apple ID and phone number for iMessage.

Your friend will then be able to see all iMessages you send and receive. It doesn’t matter if you initiate conversations from your phone number or from your Apple ID. Not only will she be able to see everything, she can also impersonate you (by sending iMessages on your behalf, from both your phone number and Apple ID).

Regular text messages (SMS/MMS) work a bit differently. They are sent and received through your cellphone carrier, then forwarded from your iPhone to your other devices. Even if your friend registered her Apple device with iMessage using your Apple ID, you would still need to go into Settings → Messages → Text Message Forwarding and allow forwarding to her Apple device.

Currently, registering a new device for iMessage only allows that device to view new messages that are sent and received. However starting in iOS 11, with iCloud Messages, registering a new device will allow it to view all conversations synced to iCloud, past and future.

Text conversations are absolutely the least of your worries, however. Much more importantly, with your Apple ID password, your friend can login to iCloud.com and read your email, impersonate you by sending email on your behalf, use your email to change your password on other websites (and essentially login to any of your accounts, anywhere), view your photos synced to iCloud Photo Library, access your contacts and view their private information, etc.

In essence you’ve given her full access to your account, much of your private life, and private data belonging to your friends and family. In many ways, you’ve given her your identity.

Remember that arguments and falling-outs do happen, even among best friends. If/when that happens, she could also change the password on your iCloud account and steal it from you.

I strongly recommend you visit id.apple.com, and change your password immediately. Then remove any devices she may have registered with your Apple ID.

I’m just not sure how giving her your account password solves the problem where she forgot hers. What she needs to do is recover her own Apple ID.


Versions support on a Samba share I have grown to really value Versions in Lion. However it only works on a locally mounted disk on my Mac.

The majority of my files are stored on Samba shares on Linux servers, for which Versions is not supported.

Is there any workaround such that I can use Versions when editing documents on these Samba shares?

The design of versions is very client Mac centric.

The local Lion OS detects an app is calling document based API and enabled the versioned store in a space that is local to the Mac and different than the actual document.

All version data is stored at /.DocumentRevisions-V100 and you can explore and test with simple documents in TextEdit to poke at the implementation artifacts.

I suppose you could mount that directory to the server and experiment, but I don't see any locking or merge functionality and expect a world of hurt if two clients tried to share the same document and version chain simultaneously.

Perhaps the engineering work will be done in the future to allow versions over Xsan storage, but it looks to me that the implementation is only for local versions.


Typing 'paral' into Spotlight suggests 'Pages' instead of 'Parallels Desktop' - how to fix? If I type any of these in Spotlight (Yosemite):
par
para
parall
parallel
etc

Parallels Desktop is suggested as the program to launch - which is what I want.

However - if I type 'paral' - what you would think was a good short bet to load the app - it suggests 'Pages.

I endup typing 'paral' a lot as it used to work.

I found nothing on Google.

This makes no sense. How can I fix this?

Rebuilding your index should fix this. You can do it typing this command at the terminal:

sudo mdutil -i on /Volumes/Macintosh_HD

Replace Macintosh_HD with your hard drive name.


Can imac G3 DV 400 be booted when PRAM battery is empty? We have an old imac G3 DV 400 MHz (at the moment I do not have access to the machine and want to prepare for my visit.)

My goal is to save the data from the hard disk to an external drive and reset the machine.

According to the user of the imac, it does not boot any more (screen stays black).
As it was not used for a long time, I assume that the PRAM battery is empty.

Do I necessarily need a working PRAM battery to boot the imac, or is there a way to save the data on the hard disk another way?
Could I access the internal hard disk in Firewire target disk mode? (maybe even with low battery)?

Based on the link below, you will need to replace the PRAM battery to boot the iMac. You could always extract the HD, but then would have to find the correct interface to hook it up to your current computer.

http://www.mercenary.ca/articles/fix_imac_g3_wont_start_problem.php

There are a few videos on youtube describing PRAM battery replacement. One source for a replacement battery is http://www.newertech.com/products/pram_3_6v.php


Alt+Enter Shortcut in MacOS For over 10 years I have been using Linux, where I always had Alt+Enter as a shortcut to open a new terminal. Recently due to employment change I have to use MacOS. About 100 times a day I hit Alt+Enter with nothing happening. I would like to set or hack my beloved shortcut into MacOS. Using Shortcuts in System Preferences/Keyboard does not seem to accept the Enter key.
You would earn my eternal gratitude by pointing me in the right direction!

You can try and follow the Automator action at the following related post.
https://apple.stackexchange.com/a/120300/316076
I do something like this to launch my work apps in the morning.


Mac location not found for opened .dmg I tried downloading android-studio-ide-181.5056338-mac.dmg to install it, but double clicking the .dmg does not nothing but put Android Studio 3.2.1 under the locations sidebar in the Finder. When I click that, I get the error message:

I tried doing the same for installing Amazon Photos and the exact same thing happened.

What's going on with my Mac being unable to open .dmg files?

Mac OS 10.14.1 (18B75)

Tell your Mac Gatekeeper, you are the Boss and responsible for your actions and decisions.

Open the Terminal app from the /Applications/Utilities/ folder and then enter the following command syntax:

sudo spctl --master-disable

Hit return and authenticate with an admin password

That should now allow you to download and install non Apple apps, by selecting it in the System Pref > Security


My Macbook Pro (2011) won't boot into single user mode I saw Possible reasons (other than Open Firmware Password Protection) for not being able to boot into single user mode?, but it didn't help any, since I'm using the laptop's keyboard.

Yes, my Mac can boot into other modes, like Recovery and Apple's Boot Manager, but it fails to boot into Single User.

Also, the command key works, so can anyone help with this?

Edit: I do not have FileVault enabled.

You may considering using these steps to start up your Mac in single-user mode or verbose mode:

Shut down your Mac.
Press the power button to start up your Mac.
Immediately hold down the following keys:

Hold down Command-S for single-user mode.
Hold down Command-V for verbose mode.

You've successfully entered single-user mode or verbose mode when you see white text appear on the screen.

Hope it works.


Having keystroke issues with macOS Sierra on two different Macs I'm having a series of problem with my macOS Sierra 10.12.1 every once in a while after a random period of normal operation. The series of problems include:

My 3rd-party Chinese input methods (Sogou & Rime) both start double-typing on every letter. English isn't affected, but cycling through the keyboards do not help with the problem.
Launchpad starts taking double keystroke and double touchpad swipes on arrow keys, basically skipping any odd-numbered pages
Any keystrokes plus the return key would launch an app whose name starts with those keystrokes (which is a Spotlight behavior) regardless of whether Spotlight is on. This problem is somewhat intermittent.
There are no apparent log traces (that I'm aware of) in the console.
All above problems begin together, and persist until restart.

I have cleared any keyboard-related config files in /Library and ~/Library, as well as purged all apps with access to accessibility function, but nothing would work. The problem has been observed on both the MacBook Pro 13" (2011) and MacBook Pro 15" 2016, with Touch Bar, which migrated the system from the former.

Anybody could give me a clue what could be happening?

A friend of mine, who works at an Apple Premium Reseller, told me that:

It's a known problem that has to do with MacOS Sierra;
Results in all different sorts of weird behaviour until reboot;
Only happens on factory installed Macs (running MacOS Sierra);
Is not harmful for your computer (hardware); and,
Advised to wait for a software update from Apple.


wrong version of gcc being used I've recently been having problems with compiling packages for R. I'm not sure of the causes but one possibility is that there are a couple of different versions of gcc on my MacBook Pro. When I type which gcc in a terminal window it returns /usr/bin/gcc. But when I type gcc --version I get back
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I may also have some issues with the path. It is currently set to
/usr/local/sbin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/usr/local/bin:/usr/bin:/bin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/git/bin

I added the Applications... path to PATH hoping it would help but it didn't. /usr/bin contains both a g++ and gcc file install May 18, so very recently. I've tried renaming those as a test of whether that would solve the problem but I'm unable to do that even as sudo.
Suggestions greatly appreciated!

For macOS Clang is a more preferred option (Apple stopped shipping gcc with Xcode and replaced it with Clang and the last version of GCC they supported was 4.2.1, it'll overall be more intuitive.). I'd remove GCC and do the following:
Installation of Clang

Run brew update and then brew upgrade in terminal
Run brew install llvm to install LLVM and Clang

To put Clang within your PATH variables:
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.bash_profile

I'm not too sure how different the two are when it comes to compiling (although they are probably very similar.) you can proceed with this link to catch up on the commands you'll need to use instead.


Cancelled wireless Migration Assistant... best way to start over? I was using the Migration Assistant utility to transfer data from my old MacBook Pro to my new Mac.  I didn't anticipate issues using Wi-Fi, but the transfer of 250 GB of data using wasn't going to end within a day of starting, so I interrupted it and I intend on starting over using a wired network (or target mode disk connection) to speed the transfer.

However, now it says my HD on the new one has 60 GB occupied and I dont know where this exists. My created account has no documents/apps/etc.  I want to delete this and start fresh if the software won't clean up an aborted transfer reliably.

What is the best way to start over?

If the destination MBP is brand new, save yourself some trouble, restore it from factory and run the Migration Assistant again.

However you can probably run it again and everything should be ok, it really depends what you have and what has been copied. Check /Library/ and ~/Library (use the Terminal), for example if you had GarageBand or Garage Band Jam Packs, those may have been partially copied.

I did that when I brought an MBAir. It was taking so much that I aborted, cloned my other Mac's drive and used a USB drive to do the migration.


Add USB-C ports to an old 2014 iMac All my Apple devices are fairly new and apart from Lightning cables, all my peripherals are now USB-C.

But for photo editing I still like to use my 2015 27" iMac that was heavily upgraded. Now this iMac only has two Thunderbolt 2 ports and, obviously, no USB-C ports. I would like to add a hub to my iMac that allows me to use USB-C devices, like hard drives that are mostly just USB 2 or USB 3 anyway. A single USB-C port would be enough. At the moment I keep a spare set of USB-A to whatever cables around but it's getting increasingly annoying.

Is there a Thunderbolt 2 dock that would have a USB-C port or a way for me to use something like Satechis USB-C hub on my Thunderbolt 2 iMac? It does not need to be a Thunderbolt 3 port or support PD, all of which would require an active component.

I am not sure if you have a 2014 or 2015 iMac, but this does not matter since the answer is the same. Both models have USB 3.0 which is 5 Gb/s. However, the jacks are Type A and you want Type C. The Type A and Type C plugs have different geometry, but electrically they are the same. See this answer for illustrations. Since Type C is reversible, there has to be a chip in the adaptor to properly transfer the signals.

For example, you can use this adaptor from Electop. You should look for adaptors where the tip is blue, otherwise you may end up limited to USB 2.0 speeds (480 Mb/s).

If you do not want the adaptor hanging on the back of your iMac, you could add an extension cable. They come as short as 6 inches.


iPad Air not connecting to iTunes (12.3.2), MacBook Air Mid-2011 Just bought an iPad Air, but when I connect it to the macbook air it doesn't show up on iTunes. I did press trust this computer, but the Ipad only charges. Could be because I am running developer beta versions all the time on my Mac.

iTunes (12.3.2),
El Capitan 10.11.3 Beta (15D9c)

Is your iPad recognized in the "Devices" section of "System Information"? Also check to see if Photos.app will recognize the iPad. It's possible that there is a problem with iTunes itself and not the iPad.


What changed in the Yosemite SmartCard handling? A few years ago, it was realized that using number generating RSA keyfobs for authentication into VPNs was not a completely secure mechanism. Some companies that previously relied on RSA for this have migrated to using SmartCards with PINs instead. Combining this with enterprise products such as Citrix Receiver have worked pretty well so far.

With the release of OS X Yosemite, Citrix no longer works with SmartCard authentication. Both Apple and Citrix have acknowledged this, but according to the forums on those sites, it doesn't seem like a heck of a lot is happening to resolve the situation. As a result, people who use Macs at home to remote desktop to their office are unable to upgrade to Yosemite since it means that they'd no longer be able to work from home.

I'm curious if anyone has any idea or insight as to what exactly changed with Yosemite and why would it be taking so long for either Apple or Citrix to come up with a fix? You would get the impression that either Apple has completely broken the support and just doesn't care or Citrix can't get an engineer to make some tweaks.

Any idea as to what exactly was the breaking change and perhaps why would this be such a difficult problem to fix?

Now I don't know the answer to your questions, honestly, it's something only Apple can address with proper justifications and references. But your impression is correct, they just don't care. Back in the day I used to use my government CAC to log in to my system (not for websites, that was my login method), it was hacky and took a lot of sudo commands to accomplish, but worked. That went away with Mountain Lion, and further more, sending an encrypted email with a smart card is torturous, something that should be a priority (personal security) above all else. Such a shame because I loved being able to do that as opposed to a traditional phrase passcode. However, I can still use my CAC for government computers, the same with Mavericks, with a 3rd party application. And this is not a sale, i don't know anyone from this company but it's just an example, just saying there are 3rd parties out there, but I ended up shuffling 30 bucks together just to get on my normal work websites. You can look into it pKard honestly though, you best solution and the more sane in the long run, install Windows with boot camp.

You can review their forums regarding your issue here but it seems like its a locally approved process for this particular software. I have not researched others.


mount list grows endlessly on automount / autofs setup I have configured macOS (Catalina 10.15.3) to automount 4 SMB network shares with autofs. It works, the shares are mounted whenever I need them, as they should.

The problem I find is that my mount list grows endlessly. It starts with one "map auto_myshare" line, and more are added over time. I've got to see over 2000 identical mounts:

$ mount
/dev/disk1s1 on / (apfs, local, read-only, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk1s2 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
/dev/disk1s5 on /private/var/vm (apfs, local, journaled, nobrowse)
map auto_home on /System/Volumes/Data/home (autofs, automounted, nobrowse)
/dev/disk2s2 on /Volumes/Storage (exfat, local, nodev, nosuid, noowners)
/dev/disk3 on /Volumes/Backup (hfs, local, nodev, nosuid, journaled)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)
map auto_myshares on /Users/me/mnt (autofs, automounted, nobrowse)

The problem is, at some point the system becomes unstable and I need to reboot it.

I've tried a number of things but nothing seems to prevent this list from growing:

Disabled the Active Directory integration (otherwise auto_home was going nuts) and Symantec antivirus
Played with large (3600) and small (30) values of AUTOMOUNT_TIMEOUT in /etc/autofs.conf
Doing automount -vc adds another line
Killing automount, autofsd

For reference, I've configured my /etc/auto_master with this line:

/System/Volumes/Data/Users/me/mnt auto_myshares

and /etc/auto_myshares with:

share1      -fstype=smbfs,soft,noowners ://user:passwd@SERVER/share
...

The solution is to use /etc/fstab with the net option.
1 - Uncomment this line in /etc/auto_master:
/Network/Servers        -fstab

2 - Fill in fstab as root. For example:
server:/path ignoredmountpoint url net,noowners,url==smb://user:passwd@server/path
...

3 - Run sudo automount -vc
This way, everything is mounted in /Network/Servers automatically on demand and I don't observe multiple mount points anymore.
I think the net option is what makes this work, because I had already tried using fstab before with the same result as an autofs map (i.e. multiple mounts per mountpoint).


Is there a fast way to change proxy setting? On my laptop I usually have a ssh connection open and use the remote machine as a proxy server just so that all my network traffic is over ssh. I know that it's hopeless and we're all doomed, but it makes me feel a little better.

Problem is sometimes I need to set and unset it for some reason and then I have to dig through millions of dialogs to get to here...

...so that I can uncheck that option.

Is there a faster way to do that or a way I can set up a script to turn "SOCKS Proxy" on and off? Probably something with Applescript, right?

Is there a way to do this without learning Applescript?

Set up two locations - one with proxy one - one off - you are an Apple menu item away from the switch.

Just select network, then edit the locations.


Is it safe to erase ~Library/Developer? In the user Library, there is a Developer folder with about 3.2 GB of space (2.8GB from DocSets and the rest mainly from Xcode/iOS DeviceSupport). I had Xcode installed, I presume these are from that? I no longer use Xcode, is there any downside to erasing these folders? If I install Xcode again wouldn't it restore what is needed?

No its not safe to delete everything in:

  ~/Library/Developer

Doing so could cause you to lose backup snapshots, any generated Archives for applications and other customizations set in the XCode IDE.

Specifically within the Developer folder there should be two additional folders.

"Shared" and "Xcode"

Shared contains documentation that you have downloaded using Xcode, depending on how you work and whether you have internet all the time you might not want to trash that, but worst case you can just re download it, so if you need space, and are not concerned about offline documentation, here is where you can grab back some space.

The Xcode folder contain a lot, and potentially some things you might not want to lose.

  Archives

If you use Xcodes Archives organizer feature, deleting this will wipe out any Archives you may have.

  DeveloperPortal 5.0.db

Contains information probably about using iTunes Connect in Xcode, I would guess its disposable, but you may have to reconfigure Xcode to talk to Apple for App Store distribution, etc.

  UserData

This generally contains any changes you made to Xcode color schemes and font themes as well as any changes you may make regarding Key Bindings in Xcode, again this stuff should be pretty small and is probably something you don't want to throw away if you spent any amount of time tweaking those kinds of Xcode settings, you probably just don't want to trash those changes made.

  iOS DeviceSupport

Probably some information relating to iOS devices that you have attached to and tried to use in Xcode, should be safe to delete.

  DerivedData

Stuff in the DerivedData folder is generally pretty safe to delete, it is all the stuff that gets generated every time you press the build button in a project. It includes the generated log and applications executables and libraries for all the products you build in a project.

  Snapshots

If you use Xcodes built in snapshot tools as a means of version control, wiping out your snapshots will wipeout the possibility of reverting to older snapshots.

  iOS Device Logs

Safe to delete, unless you need your logs, you would know if you need to keep them.

  Templates

Your custom project templates, like a UserData you probably just don't want to trash those changes made.


How can I prevent external monitors from slowing my Macbook? Until three months ago, I could use two external monitors with no problem. For 3 months I just used one, but now, trying two, I find that my MacBook Pro (15-inch, 2017, OS 10.15.5) gets slow--for example, my mouse pointer lags. In fact, even with one external monitor there is some lag.
How can I prevent this?
Full configuration is  shown below.

Is the laptop getting enough power?  This model of MacBook Pro has two graphics chips and will shutdown one of them if it sees a need to conserve power.  That could explain the video lag.  Are you using the original power supply?  Is there some device plugged in that could be drawing significant power from the laptop?


Set default Finder window size What's the recommended way to set the default size of a Finder window in macOS Mojave? I've tried following advice like that given in How to set default finder window size?, but no luck. It's annoying how hard Apple make this, but even if I could edit a plist file, that would be sufficient for now...

So, it seems a year later, nobody had been able to solve this one, (couldn't find any solutions posted any website) so I decided to give it a shot. After some extensive research, I've arrived at the following solution.
macOS Version: This was tested on macOS 11.0 Big Sur and on macOS 10.15 Catalina as well
Customizing the default dimensions of the Finder window

Open the Terminal application, enable the "Quit Finder" menu item
defaults write com.apple.finder QuitMenuItem -bool true; killall Finder

In Finder, open a new window and configure its size/dimensions to the exact way you like it

Quit the Finder application (⌘ Q)

Launch the Finder application

When you first open the Finder application, a window is not created, which is a bit unintuitive ¯\_(ツ)_/¯

In Finder, create a new window (⌘ N)

The position/dimensions of this window should be exactly the way you like it. Finder determined what the position/dimension ought to be using configurations stored in the ~/.DS_Store file. Every time a Finder window is moved or resized, the ~/.DS_Store file will be written to.

Any future windows should default to opening with this size/position on the screen.
Note: If you try to open a Finder window on a larger screen, don't expect the window to be centered. Finder doesn't store the relative offset of the window to the screen, it stores the X/Y pixel offset from the top-left corner
Note: Don't try and be clever by removing write access to ~/.DS_Store, it didn't work out for me. Finder's reaction to losing write access is to ignore the ~/.DS_Store file completely, causing every new window to open with the factory-default window configurations


Is there a way to purchase Cydia apps from a regular browser and not from inside Cydia? Is there a way to purchase Cydia apps from a regular browser and not from inside Cydia?


Why do my versions of Java differ? If I brew --config, I see

#...
Java: 1.8.0_60

which is what my my OS X Java Control Panel reported until I recently updated. Now the control panel reports the new version

  Java 8 Update 65

but brew --config continues to report the old one.

Why do these two versions of Java differ? I haven't explicitly installed a different Java with Homebrew, and had always thought that Homebrew was reporting the version of he one Java I'm aware of: the one I installed when Java notified be of an update.

Accoding to the Java 8 JRE documentation

  Installing a JRE from Oracle will not update java -version symlinks or add java to your path. To be able to do this, you need to install the JDK.

To solve this problem, you have to install the JDK.

One easy way to do it is with Homebrew-Cask :

brew cask install java

If you already installed a previous java version via Homebrew Cask :

brew cask reinstall java


Quickest way to launch Wallet when phone is unlocked? The quickest way I know of to launch the wallet app in "tap-to-pay" mode is to:

lock the phone,
double-tap the home button,
activate Touch ID

Is there a way to do this without locking the phone first, to make it quicker?

Double-tap when the phone is unlocked will bring up the app switcher.

Note: This question is for phones with Touch ID, e.g. iPhone 6, iPhone 7

Go to Settings -> Control Center and add Wallet to the active list. Then you can swipe from Control Center and select Wallet any time the phone is unlocked.


What applications do i need to make a Newsstand app? I am wondering how to make a newsstand app. What are the applications i need? I am currently in the process of enrolling in the Apple iOS program, so i will have access to the Newsstand Kit and Framework. But how should i make my content, i have read you can use iBooks Author, or InDesign and export them as PDF's, but in PDF's you loose video, and other widgets. Please help me.

Newstand content is simply an iOS Application that makes use of the Newsstandkit, so you might start with Xcode and a one year membership to the iOS Developer Program.

When you enroll in the latter, you will learn what things can be discussed and asked about publicly and which parts of the program are covered by an Non-Disclosure Agreement (NDA).

You don't need the paid membership to download Xcode and start learning and crafting your first Newsstand app, but you do get access to many training videos, a discussion area where you can speak to other developers and Apple on NDA topics. The ability to sign and install apps you develop on some test devices to work on development before they are ready for sale on the App Store is also critical for proper QA.

There are also many other paid options to developer Newsstand apps, but I would start with free and training like the dedicated page for developers to learn Newstand:

https://developer.apple.com/newsstand/


How to enable SSH via terminal without sudo? I want to play a prank with my friend in where I open a ssh connection with his Mac. I need SSH to be enabled on this Mac first, which requires admin rights.

Is there any other I can enable SSH without sudo or an AppleScript?

I would hope not since that would be a huge security vulnerability in the OS. Remote executable access without end user approval would be a highly exploitable vulnerability in the OS.

That being said, I wouldn't presume it's not possible but if it were possible, I would expect that to be a very closely guarded secret and not shared publicly.

A "white hat" might disclose this to Apple, the vendor to fix and then announce.

A "black hat" might develop the exploit and then sell it for millions of $$ or weaponize it for their nationality / social group of choice.

At this point, the definition of who is wearing the white/black hats is going to be highly controversial and subjective. About the only thing everyone can agree upon is all hat colors gain/lose social status having found and chosen how they disclose.


Fonts on external display (4k TV) look awful, sub pixel font smoothing gone haywire? I have an LG 42UB820V 4K IPS TV - 3840 x 2160 @ 60hz which I connected via an active mini display port to HDMI converter to use with my Mac Mini (HD4000) at 3840 x 2160 @ 30hz.

Everything works fine and dandy, using SwitchResX to make a custom resolution for 30hz.

The problem is I think OS X mistakenly takes the TV as a YCbCr device instead of RGB, or something along those lines. The fonts look awful, with some text having a kind of inverted halo around them!

Long story short, it actually showed the fonts perfectly at one time and it was beautiful, but after a restart it seems to have reverted to the 'awful' mode again.

How can I fix it now and forever?

I have/had a similar problem with my MacBook Pro and now my newer MBPr with an Asus 27" monitor. I ended up finding a discussion about it and a script in a forum for Dell Monitors.  The script took the monitors EDID information directly and created a display profile for it that overrode what OS X was trying to automatically configure.

Here is the script on github along with a link to the original topic. https://gist.github.com/ejdyksen/8302862

This worked for me to make my fonts readable again on my Asus VE27q.


Applescript (PDF to iTunes): How to extract and/or write metadata with special characters? Help please :-) INTRODUCTION

Hello there,

Like always, I want to put in front that I'm not a script expert. I'm not even a basic coder. I just try to learn, little by little about coding when I have these challenges. Please be through enough for a Dummy!

PRECEDENT

I need to transfer the metadata information of the author of a PDF book to the Author tag in my iTunes library.
(Yes! I got rid of iBooks and got back Books in iTunes)

Recently here in this site, with the help of one of the members I got a script problem solved. Or sort of.

THE PROBLEM

I say sort of, because even when the script will do the task flawlessly if no special character is in the name, the script has a huge limitation: It won't read, write or both, text containing special characters.

EXAMPLE:

Mercé Lamás del Jagüey Nuñez   becomes in iTunes  Merce\U0301 Lama\U0301s del Jagu\U0308ey Nun\U0303ez-

I appreciate your help to find a solution.
I need to automate this task to properly curate the +4000 PDF books in my iTunes library.

Thank you!

SCRIPT IN DEVELOPMENT

tell application "iTunes"

set sel to the selection

if sel is {} then display dialog "Please select something" buttons {"Cancel"}

repeat with i from 1 to count of sel

    set the_track to item i of sel

    set the_posix_path to POSIX path of (location of the_track as alias)

    set authorfield to paragraph 2 of (do shell script "mdls -name kMDItemAuthors " & quoted form of the_posix_path & "|  awk -F\\\" '{print $2'}")

    set artist of the_track to (authorfield & "-") as string
end repeat
end tell

GRAPHIC

You can use perl to convert escaped unicode character from ASCII text :

tell application "iTunes"
    set sel to the selection
    if sel is {} then display dialog "Please select something" buttons {"Cancel"}
    set tc to count sel
    repeat with i from 1 to tc
        tell (get item i of sel)
            set loc to location
            set authorfield to my getAuthors(loc)
            if authorfield is not "" then set artist to authorfield & "-"
        end tell
    end repeat
end tell

on getAuthors(f)
    do shell script "mdls -name kMDItemAuthors  " & (quoted form of POSIX path of f) & " | /usr/bin/perl -ne 'if (m/^ /) {s/^ +[\"]?|\"$//g;s/\\\\u([[:xdigit:]]{1,4})/chr(eval(\"0x$1\"))/egi;print}' "
end getAuthors

Or python :

do shell script "export PYTHONIOENCODING=UTF-8; /usr/bin/python -c 'import sys; print (sys.argv[1].replace(\"\\U\",\"\\u\").decode(\"unicode-escape\"))' \"$(mdls -name kMDItemAuthors  " & (quoted form of POSIX path of f) & " |  sed -nE 's/\"$//;s/^ +[\"]?//p')\""


Independent docks across displays Is there a way to break out or have independent docks across displays?

I have a MacBook Pro (circa 2009, 10.6.8), which is connected to a Dell UltraSharp display, and I keep going to the bottom of the Dell display to invoke the dock.

maybe Dock Spaces? http://nscoding.co.uk/


Mirror some displays but not others I have my Macbook Pro 13" (2017) connected to two external 27" monitors.

I'm going to be getting a new iPad Pro today and intend to use it with the new sidecar functionality. My goal is to get rid of my 27" monitors and roll with the Macbook screen + sidecar. But first, I want to make sure everything is working okay with my daily workflow.

So, what I am hoping to do is mirror my Mac's screen to one of the 27" monitors, and the extended sidecar screen to the other 27" monitor.

I found these instructions, but they reference using the Alt key to accomplish mirroring some displays but not others. The 2017 MacBook has no Alt key. Are these instructions out of date, or am I just missing something obvious?

The Alt key is a Windows term for the alternate function key, in this case macOS calls this the option key, with the symbol ⌥.

It sits on most keyboard layouts between the control and command keys to the left of the space bar, and between the arrow keys and the command key on the right of the space bar.

  Note: On a Windows keyboard connected to a Mac it is likely the Windows key will act as option as these two keys are swapped in most layouts.

I can confirm the steps mentioned do work for mixed mirroring and extending of displays, although I am unsure if this works with Sidecar.


I cannot get out of recovery mode (OS X Utilities) by resetting or reinstalling the OS I bought a used iMac and when I turn it on I am shown the OS X Utilities screen. I would like to install the operating system but I cannot do so.

I have tried everything suggested on other questions on this topic:

Factory reset

I.e. formatting the hard drive (as instructed by Apple) and restarting. According to the Apple website, this was supposed to bring up the country selection screen, but it didn't. It simply takes me back to OS X Utilities.

Resintall OS X

There is an option to reinstall OS X El Capitan. After signing into iCloud (with a new account I had to make for this - I did not have one before) I get the error message "This item is temporarily unavailable". I have Googled this and tried the many fixes to no avail. Apparently the original user's iCloud account should be used, but I do not have access to this, nor do I want them to be linked to this computer.

Other macOS Recovery modes

Apple gives key combinations for other recovery options. I have tried all three of them as instructed but I am always asked to enter the iCloud details.

Boot from CD

I do not have the original CD with the operating system on it, nor do I have access to a computer that can burn a bootable disk. (This is not an option I want to consider to be honest - resetting an Apple computer doesn't require this according to the many guides and videos on this issue.)

Screenshots of hard drive formatting:

Screenshot of iCloud error:

On an 08 iMac, your options will be limited if the previous owner didn't correctly run through the reset procedure, leaving you with a nice, simple sign-in to take over the Mac as your own.

Part of the procedure is for them to sign in on their own existing App Store account & reinstall a clean OS that they are already associated with, as 'purchaser'. if they exit the process after install but before sign-in, then it's ready to transfer ownership.
Without that, you're left with trying to sign in as a new user with no previous purchase history & no access to anything other than the very latest macOS - not good if your machine can't run that.

Additionally, an 08 is not capable of running Internet Recovery, so automatic access to the correct installer is not possible.

Theoretically, you could boot an 08 from USB, but in practise I've never managed to achieve that, earliest I've managed to do that on was an 09.
This may leave you with only an install CD as your working method, although it's always worth trying to get a USB key to work first.

You are going to have to access the installer from another computer & burn/flash your startup medium from there.


Open Directory network user last logon time I am looking for a bash command to query my LDAPv3 server from the client side in order to find the current user's last logon time.

Will this do the job for you?

ldapsearch -LLL -x -h <hostaddr> -Z -D cn=admin,o=local -W  "(&(objectclass=Person))" logintime


Spotlight shows web sugggestions despite disabling it I disabled spotlight suggestions like recommended on the web (e.g. here). My settings now look like this:

System Preferences:

Safari Preferences

However, I still get website suggestions for spotlight searches:

How to fix this?

This trick is working for me with yosemite .I did unload the SpotlightNetHelper service using the terminal with this command sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.metadata.SpotlightNetHelper.plist and then reboot


How to resize the widgets in the dashboard? I wish to enlarge the widgets in my dashboard, because I find it quite uncomfortable to see the contents of the dictionary widget in that small box.

Is it possible to do that?

It is currently not possible to resize Dashboard widgets yourself.

However, the developer of the widget can make their widget resizable. This Apple Developer Documentation page describes the process by which developers can make their widget resizable, however it is uncommon for a widget to be made resizable:

  Try to limit using live-resizing to cases where it is absolutely necessary. If your content can be shown in a fixed, simple user interface, do so.


macOS cpu/mem monitor in system tray (menu bar) I would like to monitor CPU and memory usage in realtime with charts on a macOS system tray (menu bar). Is there a utility that provides such functionality?

MenuMeters is popular among the Mac users I know.


ios Photo never finish upload after switching app At the bottom of 'Photos' in my photo app, there is some status text that says

35555 Photos, 2152 videos, 1 item
Uploading 244 Photos (12.1MB of 389.3MB)

The upload starts when the Photo is running in the foreground.

However if I switched to another app and back, the uploading line will become:

Uploading 244 Photos (0MB of 389.3MB)

and slowing climbing back to the previous high watermark.

I think these 244 photos are waiting for upload for at least a week now (since I last take note of the text)

How can I make the Photo app to continue even though it is running in the background?

I have to run the photo in the foreground, connect the iphone to power and let it run for the whole night. The message is finally gone in the morning.

However now the message has become "Uploading 38,160 items". It is attempting to re-upload everything from my iphone. My older photo are not accessible now (a exclamation icon is shown on the lower right corner on all my older photo)

There must be a more serious problem with icloud.


Can I use my PC to mirror an iPod Touch screen like Apple TV? I'm using an iPod Touch 3 and I saw in the AppStore that it is possible to use it as a controller via Apple TV to play games on it like Modern Combat and Real Racing. Because I don't have neither an Apple TV nor a TV, I was wondering if it could be possible to play these games on my computers monitor via bluetooth or wifi.

Is it is not possible by Apple, maybe there's something in Cydia (under jailbreak) to do this?

You could try Reflector for PC:

Your iPhone or iPad. On your Mac or PC.

AirPlay mirror your iPhone 4S, iPad 2 or the new iPad to any Mac or PC, wirelessly.


Does Apple tailor iOS software in any way for specific regions? If I buy an iPad or iPhone in Saudi Arabia, for instance, from a Saudi carrier, will the UI have been tailored in any way? I am thinking specifically of removing references to Israel, for example, in lists of countries, supported regional formats, etc.

To my knowledge so far the only differences in iOS that depend on the country are a) Facetime is omitted at governmental request in certain countries, and b) at present, 10-key/T9 screen keyboards are only available on devices bought in China and Korea.


System spiking CPU usage (causing 6000+ rpm on fans) Im running a mid-2012 macbook pro on 10.9.5.

I've been having massive lag spikes over the last few weeks which have gotten more consistent and prevalent the last day. I have been wearing this macbook out for a while but these lag spikes are like nothing I have seen before.

These are the spikes that have happened during the writing of this post. The system seems to take up to 80% of my cpu for differing lengths of time with no clear intervals.

Any tips on solving this or limiting the damage?
I have been thinking of updating this machine to 10.11.1 for a while to make it compatible with my Wacom pad, but now I'm questioning if my old friend could still handle this...

EDIT1:
The spikes have just started again and I have managed to capture the entire screen this time. Interesting to note is that as you can see I am running the steelseries engine for my mouse. During spikes my mouse completely ticks off as well and gets super sensitive until the end of the spike.

I hope this shines a bit more light onto the situation. Having trouble with my wifi TimeMachine backup at home so buying an external harddrive for backups soon after which i'll try to clean the insides to see if that helps any!

EDIT2:
Used the sudo syscallbypid.d command. These were the top results:
Try 1:

Try 2 (Noticed hamachi taking alot of space so deleted that anyways):

EDIT3:Tried it again, this time while not running chrome. Got another spike with these results:

EDIT4(Still going): I've closed spotify and decided to see what happens then, still kept spiking. Was working with only pages open on a paper, first time with syscallbypid.d showed only pages taking up some space, but second time and third with some spikes later other stuff started to show up. Any idea what this could be?

EDIT5: I've captured another screenshot of the entire screen from activity monitor to show what has been eating up most of the CPU, which is the Kernal_task. This spike happened with no other programs open, only stuff running in the background.

The chart representing the CPU usage in the Activity Monitor can be misleading.

The scale on the Y -axis is not 100% but changes according to the CPU usage.

You could see what it looks like spikes even if they are of extermly low magnitude.

See my example. It looks like spikes while the actual CPU consumption is low. In this case the User- CPU load is 0% to 5.93% and the chart Y-axis is set to 6% so it just looks like huge spikes.


OS X El Capitan & Android Studio 1.4 Has anyone else noticed the following with Android Studio 1.4 running on OS X El Capitan?

I can't remember the exact point when I lost the ability to build an Android app from the IDE due to the fact that the extensive set of custom pre build steps that I have failed to run. Those custom steps run a Python-script, and the main problem is that gradle doesn't seem to find the Python-binary due to the fact that the PATH environment variable is the extremely sparse list of /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.

Here are some random points related to finding this issue:

This problem does not affect building from the terminal.
This problem is specific to OS X, none of my Linux boxes suffer from this, nor my colleague's Windows machine suffer from this.
This is specifically about having PATH set properly.

What I've tried this far:

Editing /etc/paths: nope, no help.
Various ~/Library/LaunchAgent -tips found from the net. Y'know those launchctl setenv PATH ...? No help.

After further work on this, I found something that seems to work. I RTM'ed the man page of launchctl, and noticed the config-subcommand. So this is what I did:

sudo launchctl config user path "paths:I:want:GUI:apps:to:use"

Then reboot, as launchctl instructed me to do.

I had added a debug print statement to my gradle file:

println System.getenv("PATH")

After rebooting, build printed out the changed PATH including those parts that I added via config user path.


Text editor to search/replace newlines and tabs A time-saving feature I often used while editing large text files (the kind used for batch processes of data exchanges, aka, "flat files" for feeds  between multiple systems) was Notepad++'s extended Find/Change function where you can specify certain characters (such as tab, space, line feed, carriage return) in both the Find function and the Change function.

This is the detail on how it works:

  Open the find/replace dialog. At the bottom will be some Search mode
  options.  Select "Extended (\n \r \t \0 \x...)" In either the Find
  what or the Replace with field entries, you can use the following
  escapes:

  \n   new line (LF)
  \r   carriage return (CR)
  \s   space character
  \t   tab character

This would make it very easy to edit lists of information, changing files from comma to tab delimited, or files with spaces between into comma delimited, as well being easy to go from spaces to tabs (or visa versa).

Anyone happen to know which text editors running on Mac OS have this feature (or have plugins to add this functionality)?

Text Edit which is available out of the box supports searching for special characters:

Access "find" functionality with Cmd-F
Click the small magnifying glass at the beginning of the entry field and select "Insert Pattern" (last entry)
Pick your pattern (and repeat if necessary)

Move the cursor to the replacement field to select a pattern there (or just copy/paste from the search field)

If you do a lot of text-based file processing it might help to spend some time to learn about basic Unix tools like awk, sed and friends. This would make thinks a lot easier on the long run.