Toggle Bluetooth using wired keyboard on iMac Every so often my iMac looses the Bluetooth mouse connection. The only way to resolve this (other than a reboot) is to switch Bluetooth off, wait about 10 seconds then switch it back on.

This involves plugging-in a wired mouse, make the above happen, then unplug it.

I use a wired keyboard which continues working without Bluetooth. Is there a way I can set something up, or a keyboard shortcut, to switch off Bluetooth, wait, then switch it back on?

Nimesh’s answer is very clever and requires no extra tools, so that may be what you want.

However, there is a much easier way, if you are willing to spend a few minutes to download and install some apps/tools once in order to have a simpler way to turn Bluetooth off/on in the future.

First, download and install blueutil from http://www.frederikseiffert.de/blueutil/download/blueutil.zip

Unzip it, double-click the Install.command and enter your password, and it will be installed to /usr/local/bin/blueutil.

(If you use brew, ignore the above and just do: brew install blueutil)

After that, you just need a way to run it via the keyboard. For that, I highly recommend Alfred, although you could use LaunchBar instead.

Assuming you use Alfred, get this Bluetooth toggle workflow and you can enable/disable Bluetooth with a few keystrokes.


How to enable Huawei Health app options for iOS that exist for Android? I bought a Huawei Band 3 Pro some months back, and while using it with my Android phone, all the things I needed were working (using the Android Huawei Health app).

But lately, I switched to an iPhone 11 pro, and thus using the iOS version of that app. And it seems that the iOS app lacks in various aspects. But maybe I just didn't find the right place to configure it correctly.

What is missing for me:

With Android, I could enable "notifications" that go to the band per source. Meaning: I would first enable notifications in general, and then I could select "I want calendar events and phone calls, but I don't want facebook or WhatsApp". With iOS: I only found "notifications" that can be enabled. And now I get calendar events, phone calls, facebook, whatsapp ... just a lot of things I really don't want to be notified about. Question: is there a way to configure individual sources for notifications?
Beyond that, the band knows various forms of exercises. Like indoor cycling. Which ... the Huawei health app doesn't show me at all. With Android, I could see past trainings, for all the exercises that the band offers. With iOS, there is only steps, heartbeat, sleep ... and 3 outdoor (GPS based) activities. Question: is there a way to access these "missing" activities, like training data for indoor cycling?

I can't say if I just overlooked that, or if a newer version of the health app improved things: I can now see the my indoor cycling activities, too. They show up in the overview of outdoor cycling. Unfortunately, that overview only sums up distances, so the time spent on the indoor device don't count.  But at least, they all show up.
I also noticed that the user guide for another new huawei device, the Gt2 watch, explicitly mentions that certain features (such as installing watch faces from the huawei servers) only works with the android app.
But I can confirm that it is straight forward to switch the device between different phones, as I used my old android phone to install other watch faces, before connecting it with my iPhone.
EDIT: things are further improving for iOS users. In 2021, the only thing feature that I see on Android, but not on iOS: the ability to manage tracks, and those manually.


Where's the Edit Toolbar Button in Preview Application I can't find the Edit Button to toggle the Edit Toolbar in the Preview Application

Here's a screencap of a file that's open in editor:

On the support page Mac Basics: Preview app views and edits images and PDFs, there's an edit button like in the following picture:

However, I don't see that option anywhere.

It seems that was just an outdated version of preview.  In the new version the button is called Markup and is in the same location.


Change iTunes Store country and keep Apple Music library? Is there a way to change the iTunes Store country and still keep the Apple Music library? Preferably in an automated way.

The reason for asking is that the Apple support article on changing the iTunes Store country or region says that your Apple Music library will be lost if changing the country and does not offer any workarounds:

  You won’t see the items from your iCloud Music Library that you matched,
  uploaded, or added from the previous country’s store

I have spent considerable time on building up my music library (adding from Apple Music) and would not like to lose it just because I'm moving to another country.

In my case it is not an option to use multiple Apple IDs or keep using the old iTunes Store country. Device versions are iOS 10 and macOS Sierra.

In theory if you have a friend who has an iphone and apple music and you both upgrade to iOS 11 then you can follow each other’s apple music playlists then get your friend to save and add your songs and playlists to their device, then on your device switch over app store countries, re subscribe to apple music in the new country and then do the reverse and follow your friends playlists and re add them back to your apple music library.


iMac loading bar gets stuck halfway then reboots OSX 10.11.5 iMac turns on fine but loading bar gets to just over 50% and then a horizontal bar across the screen shows, then the screen goes black then to white. It stays at white then iMac turns itself off and restarts. This happens every time I try turning it on, booting into the backup, booting into recovery mode, and even rebooting from single user mode: the iMac will still be showing the terminal doing its thing the the line appears and mac goes to a white screen then reboots.
Booting in safe mode and resetting PRAM and SMC have done nothing.
Any ideas? or tips on how to backup any data and reinstall OSX from single user mode?

Have you recently changed anything in the hardware?

I had this happen once trying to swap drives between two Macbook Pros. They were different hardware versions (a couple of years apart), and the hard drive from the older Macbook did exactly this when trying to boot in the newer Macbook - the old version of the O/S didn't understand the newer hardware, and would get to a certain point, and then reboot.

After I put the drive back in the original (older) Macbook, I upgraded to the latest version of OS X, and was then able to put the drive into the newer Macbook without issue.

This doesn't sound like what you're doing (you didn't mentioned swapping any hardware), it does sound like you're having an issue with hardware that can't be properly started. So I'd be assuming hardware issue at this point, which hopefully someone can assist you in how to diagnose that.


Skype way too quiet. How to get louder Skype audio output on my MacBook Pro? My girlfriend and I are getting really irritated with how quiet Skype is on my new MacBook Pro.  Even with the volume turned up to the max, I can still barely hear her even with my air conditioning and fan off.

At first, I thought about buying a pair of speakers, but even the small USB ones would be irritating to have to have around all the time.  Then I thought of buying a new sound card, but then I realized that iTunes with the preamp in the equalizer set to 12 is actually more than loud enough.

Is there a way that I could connect to that and make Skype that loud?  Or is there any other way to make it louder?

On a smaller note, I've been having the same issue with movies played in Google Chrome.

Did you check the settings in the app "Audio MIDI Setup"?
It's in /Applications/Utilities.
Sometimes the settings there can get out of whack.


Issues putting a hard drive in the optical bay of my early 2011 MacBook Pro I'm asking for help for my brother! I recently switched over to a dual hard-drive setup, and it worked perfectly. However, my brother is having issues.

First off, here is the hard drive we are trying to put in.

He has an early 2011 15" MacBook Pro. We read up online, and people said that the optical bay for his model only has SATA II, while the main bay has SATA III, which means he should put his HDD in the optical bay, and the SSD in the main bay. He wants to put the HDD in the optical drive area, and then transfer everything over to the new HDD, before putting the SSD into the main bay.

The issue is that when we put the HDD in the optical bay, the computer can basically not recognize or use it. If plug the HDD in via a usb cord, he can initialize it and erase it to Mac OSX Extended (Journaled) perfectly fine. It only takes a few seconds, and as far as I can tell, it works. However, when he actually puts the hard drive in the optical bay, it either doesn't show up in disk utility, or it shows up, but can't be accessed or changed.

We left it in, and it showed up after 30 minutes or so. When he tried to initialize it, however, the computer said it'd take 5 hours to do. The progress bar ended up getting half way done, and then stopping, so that didn't even work.

We thought that maybe it could be a firmware issue after searching on the internet some, but we looked and definitely have the newest firmware version (2.7, I believe). Also, I don't think that issue applies to us, since I think it's only relevant to getting the proper speeds out of a SSD.

We also tried just initializing it before putting it into the computer, but the computer doesn't seem to recognize it correctly. The name is changed from "New HDD" to "disk1s1", and we can't actually access it. That's when we tried initializing it again, just for the progress bar to get stuck.

Looking online, this setup should work. Tons of people have done it, even using the hard drive we are using. We aren't even trying to put a SSD in yet, which is where most people have problems with the 2011 model. This is just a regular hard drive! I don't understand what could be wrong, and could use some help!

If there's anywhere else you think I should post this, just let me know!

Thank you!

Firstly, it does not seem to really matter whether you use the Sata II or III port. For most usages you won't see the difference, cf this post for details: http://www.tomshardware.com/forum/280002-32-sata-sata-practical-difference.

Given that the disk shows up fine via a USB interface it means that it's not at fault so it could actually be due to the connector in the optical bay which is a bit worn out or that the drive is not correctly plugged.

Try putting the HD in the original HD bay and the SSD in the optical bay and see if the SSD has the same issue. If it has then the issue lies with the optical bay itself.

You could also put the optical disk back into the bay and see if it works normally or has issues as well.

If the issue seems to stem from the optical bay then you should bring the computer to a shop which can diagnose exactly what hardware issue is causing this.


Time Machine question Is it possible to use Time Machine such that I can restore the machine to a specific date in time? By "restore" I mean fully restoring the exact same files system wide.

For instance, today I'm sure that my machine is clean and has only the must-have programs which cause no problem to the machine. Let's say that I'll be doing some system customization and install some unstable applications, which will cause problems to the system down the road. Will I be able to fully restore my machine using TimeMachine to a specific date which I know for sure worked perfectly?

Apple's support page for Time Machine indicates in multiple places that you can restore individual files as well as perform a full system restoration.  The site specifically states that Time Machine "...remembers how your system looked on any given day—so you can revisit your Mac as it appeared in the past."  Additionally, the support page also mentions being able to restore your entire machine by first booting to the recovery partition.  All of this would seem to indicate that, yes, you will be able to restore your machine to a specific date when your machine worked perfectly.

That said on older machines for which Time Machine was not available, I have had success using Carbon Copy Cloner to make an exact clone of my system drive at specific dates and times.  This would provide myself with a fully bootable backup drive that I could immediately swap into a machine for a minimum of downtime should I experience a drive failure.  This method, however, is more for the advanced user who has a Mac that is more easily serviced than many of the currently available Macs.


Can I use my F1, F2, etc. keys as standard function keys only for specific apps? I constantly use the brightness, mission control, volume, and iTunes playback shortcuts on my keyboard's function row. However, a handful of apps I use make heavy use of F1, F2, etc. for keyboard shortcuts, and it's annoying having to use something like Fn+F7 all the time for something that was intended to be a single keystroke away.

I can think of a few ways to get around this problem:

Manually reassign any and all keyboard shortcuts that make use of function keys to something else. Ugh.
Enable the "Use all F1, F2, etc. keys as standard function keys" option in System Preferences, and re-train myself to use Fn whenever I want to use the system shortcuts. Ugh.

Find a way to enable this option only for certain applications.

Is this possible to do? Are there any third-party apps that can take care of this for me?

Try Palua, I think this is exactly what you're looking for. Costs $0.99 / £0.69 in the Mac App Store.

In MacStories: Control OS X Function Keys with Palua


Can't write to Fat32 MicroSD disk I have a disk, it is MicroSD and I have a macbook. I enter said disk into said Macbook and when I try to copy I get...

/Volumes/SDCARD/file.img: Read-only file system

I tried the ole......

sudo chmod - R 777 /Volumes/SDCARD

But not luck any ideas?

I also made sure the read-only switch on the adapter wasn't set

FDisk

Disk: /dev/disk2    geometry: 964/64/63 [3887104 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*1: 0B 1023 254  63 - 1023 254  63 [      2048 -    3885056] Win95 FAT-32
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

The SD Card is failing. Oddly enough, you can mount it as RW using a SDXC > USB adapter (don't ask my why, but it works) such as this. Once mounted, you can copy data off the card. It's not a question of a corrupted filesystem, but a physical failure of the device - for example, although you will be able to reformat the card when connected via this adapter, it will nevertheless revert back to read only if connected directly again; it will eventually fail completely. If citations are desired, I don't have any off-hand. My source is personal experience, multiple times over. Best of luck.

Update (Found an old card):

Here is one of my old, dead 8GB SD cards that is read only when connected via my SDXC port:

...And R/W when connected via my USB.

...And finally, immediately after I took these screenshots:


Are CPU and GPU embedded on the logic board? I'm thinking about whether I should get my MacBook Pro 6,2 repaired. The repair would include replacing the logic board, so I'm wondering if the CPU and GPU are replaced as well?

As you can see on the image below, the CPU (red border) and the GPU (orange and yellow border) are wave soldiered onto the logic board and they will be replaced together.

BUT, you should know this kind of replacements are extremely expensive. Prices goes up to $1,000 so in most cases it's better to buy a new Mac. It's not uncommon to find "older" refurbished Macs at similar prices to logic board replacements.

You Mac is almost 3 years old and if I were you, I wouldn't do the repair and just go for a new Mac.


Any partition software just to partition unused space? Currently I have one portable external hard drive which I use for Windows. It's 1TB and over 300GB is used space. I would like to partition it so I can access the unused space from my Mac. Can you all recommend any partition software which does the job? I am afraid that it would wipe out my current data that's why.

You can use Partition Magic in Windows and divide hard on two virtual hard disks. And then use one for Mac and one for Win.

And for Mac and Win can work at one hard drive, just reformat a hard drive to FAT32.

If you don't want format your hard drive:

Open Partition Magic
Create a second virtual hard drive on free space. Recommended percent: 50% on 50%
Reformat second virtual hard drive to FAT32


how to turn off rotating cube animation upon user switch? How to turn off rotating cube animation upon user switch?

I apparently need to pad out this qwuestion, so i will add
that it makes me dizzy

thank you!

Running the following inside a terminal window (shell) worked for me.

defaults write -g userMenuExtraStyle 0


How to open PDF files stored in iBooks on iPad in Adobe Reader I have downloaded PDF files and saved them in iBooks on my iPad. I want to open some PDF files in Adobe Reader but there is no option to do so.

I looked up on internet and it asks for a PC (which I don't have). Is there any way to do so?

I am using iPad Air 2.

Unfortunately iBooks on iOS doesn't have the ability to show a share sheet for a document, and therefore can't share to Adobe Reader directly. A workaround is to tap Share → Email, email the PDF to yourself, then use Mail to open the attachment with Adobe Reader.


Is there some way to keep the mail.app always opened? Is there some way to the make mail.app open on boot, and maintain always opened? Like a service in linux. It would be perfect if it continues to run even when not showing on Dock or on "command+tab", but still showing notifications.

As the other answers mentioned, you can just add it to login items:

There is a bug (?) where Mail is not hidden at login even if the hide checkbox is checked though. And it doesn't prevent you from quitting Mail manually.

You could also add this to the crontab (EDITOR=nano crontab -e):

* * * * * open -jga mail

Or using launchd, save this as ~/Library/LaunchAgents/keep_mail_open.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>keep_mail_open</string>
    <key>ProgramArguments</key>
    <array>
        <string>open</string>
        <string>-jga</string>
        <string>mail</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>60</integer>
</dict>
</plist>

You can load the plist with launchctl load ~/Library/LaunchAgents/keep_mail_open.plist or by logging out and back in.

This would disable ⌘Q:

defaults write -app mail NSUserKeyEquivalents -dict-add 'Quit Mail' '\0' && killall Mail

Adding <key>LSUIElement</key><true/> to an Info.plist normally hides an application from the Dock, but it also removes the menu bar. Since 10.8 some applications (apparently including Mail) crash on launch if the Info.plist is modified though.


Hide full screen button on all Mac OS windows? Is it possible, natively via Preferences or otherwise, to hide the green Full Screen button that appears next to the Minimise and Close actions on a window?

I always click it by accident and never use the feature, so would like to remove it if possible.

It is not possible to remove the green, full screen button from an app window's title bar.

To stop an app from going full-screen you can tap and hold the Option key, and the window will be maximized normally. (However, you won't remember to hold the Option key when hitting the button accidentally).


Is S/MIME in iOS 7 buggy? I recently imported my S/MIME certificate into iOS 7. I am able to read signed/encrypted message sent from my mac to the iPhone.

BUT

I am UNABLE to send signed / encrypted mails from the iPhone.

This is strange:

First I open the Mail app and start composing a mail. Immediately I see that the messages will be send encrypted (according hint in the app). But how can the app know, that it will send encrypted mail BEFORE I entered a recipient?
Also, as soon as I tap into one of the fields (CC, BCC, etc) the hint "encrypted" disappears
I am not able to encrypt / sign mails

Pretty complicated to describe. Any similar experiences? Buggy?

You need to have, installed on your iPhone, the public key of the person you intend to send an encrypted message to.

Mail.app on OS X imports the certificates of people who send you mail, automatically. On iOS, you have to do it manually, unless your iPhone is part of a corporate deployment.

It's easy! Simply find an email the recipient has sent to you, tap the checkmark icon next to their name, tap "view certificate", and tap "install".


Why is my camera not working? I don't know why my camera is not working, I am sure it is a software problem, it just shows a black page. All features are working but it doesn't show an image. It is not working on other apps, like Instagram, as well.
The front camera is not working. I have tried to "Reset All Aetting" option but it is not working neither.
I upload a photo which is the screenshot when I run camera
How can I solve this problem?

From another user's experience on the Apple Support Community Forum:

Try this:

Go to Settings > General Reset
Tap Reset All Settings

Although this won't erase content on your device, you'll have to reset WiFi settings and sign in to iCloud again along with other custom settings.

Quote:

  I was able to get the camera to work again!
  go to Settings, General, Reset and tap Reset All Settings.
  This won't erase everything but you'll have to set up your WiFi and sign in to iCloud again.

EDIT If the above suggestions along with resetting the phone etc. doesn't help, one would be advised to take the phone back to Apple or an Authorized Apple Service center for testing.  Depending on the age of the device, they may cover repairs under warranty.


Genius external keyboard working improperly on Macbook Pro I want to use this Genius keyboard with my 2014 MacBook Pro 15".

When connecting the keyboard, the Keyboard Setup Assistant opens, saying that keyboard could not be identified. Then, it asks to press the key on the left of right shift. When I press 'Z' key three times, it says that the keyboard still could not be identified and asks to chose the type of keyboard manually.

Despite of the answer, keyboard starts working improperly. When I press 'q' it types 'x', 'w' -> '4', 'e' ->'l', 'r' -> 'y', 't' -> '1', 'y' - '6' and so on. When I chose different type of keyboard (ISO/ANSI) nothing changes and the same wrong buttons mapping preserves.

The keyboard itself is working fine on other PC.

Would really appreciate your help to make it work.

The behavior sounds like a Num Lock or Fn key is stuck on. Does the keyboard behave this way on a PC without the Genius keyboard driver installed?

I don't know how much effort you want to put into this, but Karabiner is a general-purpose tool for remapping just about anything about a keyboard attached to a Mac. You can make rules which only affect a single device. How much do you like this keyboard?


Booting internally from a harddrive that was used on a different Mac I just bought a new Mac Mini 2012 and have just replaced the drive in it with an SSD from my old MBP. Now the Mac Mini won't boot anymore, showing a stop sign when I try (after holding alt to begin with) from either the bootable main volume or recovery partition. I.e. it sees the drive, so I'm hoping it isn't a hardware problem. Isn't this supposed to work? I seem to recall having changed bootable drives between machines before and it being able to adapt to the new hardware, but maybe I'm confusing it with booting from an external drive. At any rate, the goal is to restore the exact system I had, but on this new machine.

I have a CCC backup on my network of the drive in question. Do I need to first install OSX fresh, boot into the fresh install and then restore the old backup? Though I don't see how that's any different?

What operating system(s) are we talking about here?  If you installed say, a retail copy of Snow Leopard on one machine, then transferred the HD to another machine, that might work.

But if you installed your OS using the disks that came with the machine, those disks are specific to the machine itself: they're streamlined with various drivers and whatnot, is my understanding, and will not work in another machine.

I'd have to read up again in the CCC documentation but I believe there are also instances where files that are hard-coded with UUID's or MAC addresses or something that need to be properly re- created when moving a drive to another machine.


Yahoo is taking over my Google search from my Safari on my Mac In Safari Preferences, Google is my Default Search Engine; New Windows and New Tabs are set to Homepage.

However, recently whenever I Google something, I click on my choice and I end up on Yahoo Search.  Sometimes I get search.epolife.com.

This is very frustrating, I do not want to go to a new search of Yahoo, I like my Google. How can I regain control of Safari?

I found my answer in this YouTube video: how to get rid of searchbar redirect in safari.

In Safari's Preferences, select Extensions.  There was the epolife. I deleted the epolife extension, quit and relaunched Safari and came back in. After that I no longer have this problem.


Return status of SleepDisabled in Applescript I'm trying to do an Applescript to enable or not SleepDisabled (using pmset) depending on the state of SleepDisabled.

Something like :

set SuperSleep to do shell script "return status of SleepDisabled"
if SuperSleep is equal to "0" then
do shell script "sudo pmset -a disablesleep 1" user name "Myname" password "Mypassword" with administrator privileges
else
do shell script "sudo pmset -a disablesleep 0" user name "Myname" password "Mypassword" with administrator privileges

I tried looking into man psmet or using defaults read but no success.

The only thing I'm thinking of is using pmset -g to shows up this :

System-wide power settings:
 SleepDisabled      0
Currently in use:
 lidwake              1
 autopoweroff         1
 standbydelayhigh     86400
 autopoweroffdelay    28800
 standbydelaylow      10800
 standby              1
 proximitywake        0
 ttyskeepawake        1
 hibernatemode        3
 powernap             0
 gpuswitch            2
 hibernatefile        /var/vm/sleepimage
 highstandbythreshold 50
 displaysleep         2
 sleep                2 (sleep prevented by coreaudiod, coreaudiod)
 tcpkeepalive         1
 halfdim              1
 acwake               0
 disksleep            10

And then look up the status of SleepDisabled on the list, but I don't know how to return the "0" or "1" of SleepDisabled...

The following works for me:

set SuperSleep to (do shell script "pmset -g | awk '/SleepDisabled/{print $2}'")

if SuperSleep is equal to "0" then
    do shell script "pmset -a disablesleep 1" with administrator privileges
else
    do shell script "pmset -a disablesleep 0" with administrator privileges
end if

NOTE: Do not use sudo in a do shell script command, Just use with administrator privileges as it's all that's needed when you'd normally do sudo in Terminal or a bash script. Additionally I would not include the user name "Myname" and password "Mypassword" as it is not encrypted in the file. Just type it into the dialog box brought up by the administrator privileges option.

Also note that SleepDisabled was not present in the output of pmset -g when I first tried in Terminal, and was not present until I used the sudp pmset -a disablesleep 0 command from Terminal. If this is the case on your system you'd need to adjust the code to handle that situation. You could use an if (compound) control statement.

Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.


How do I use Lightning EarPods with MacBook Pro 2015? The EarPods which come with iPhone 7 are Lightning EarPods, there isn't a Female Lightning to Male 3.5mm connector in the market AFAIK. The cable which Apple gives along with iPhone 7 is Male Lightning to Female 3.5mm connector.

Is there any way I can use the Lightning EarPods with my MacBook Pro?

You can't.

Yes, it is a design flaw. You will need to buy regular earbuds that use the 3.5mm connector. If you want to use these headphones with your iphone, you will need to use the 3.5mm to lightning adapted that was on the back of your earpod case.


Bluetooth peripherals randomly disconnecting under Mavericks I've scoured the internet to try to find a solution to this bizarre problem (similar problems here and here and here), but have unfortunately failed so far. I'm running OS X 10.9.1 on an early-2013 retina MBP, and my Magic Mouse and Bluetooth Keyboard disconnect every 1–3 hours, causing the following kernel errors:

1/26/14 12:09:23.000 AM kernel[0]: [BNBMouseDevice][waitForData][7c-6d-62-f4-b0-ee] Timeout waiting for data
1/26/14 12:09:23.000 AM kernel[0]: [BNBMouseDevice::getExtendedReport][80.14] ERROR: [BNBMouseDevice] getReport returned error e00002d6 for reportID 0x0030
1/26/14 12:09:23.000 AM kernel[0]: [BNBMouseDevice][getBatteryState] Couldn't get battery state from device
1/26/14 12:09:26.000 AM kernel[0]: [IOBluetoothHCIController][handleACLPacketTimeout] -- Disconnecting due to device not responding (ACL Packet timed out) for connection handle 0xd
1/26/14 12:09:26.308 AM loginwindow[59]: Preferred Localizations total: 1 contents (en)
1/26/14 12:09:29.000 AM kernel[0]: [IOBluetoothHCIController][handleACLPacketTimeout] -- Disconnecting due to device not responding (ACL Packet timed out) for connection handle 0xc
1/26/14 12:09:29.000 AM kernel[0]: [BNBMouseDevice][waitForData][7c-6d-62-f4-b0-ee] Became inactive waiting for data
1/26/14 12:09:29.000 AM kernel[0]: [BNBMouseDevice::getExtendedReport][80.14] ERROR: [BNBMouseDevice] getReport returned error e00002d7 for reportID 0x0060
1/26/14 12:09:29.000 AM kernel[0]: [BNBMouseDevice::createUsedVoltagesDict][80.14] ERROR: Unable to get calibrated battery thresholds report for product ID 781
1/26/14 12:09:29.000 AM kernel[0]: [BNBMouseDevice] notice: _outstandingIO > 0 but isInactive() returned TRUE...
1/26/14 12:09:29.000 AM kernel[0]: [AppleMultitouchDevice::willTerminate] entered
1/26/14 12:09:29.000 AM kernel[0]: [AppleMultitouchDevice::stop] entered

Additionally, the Bluetooth panel in System Preferences freezes up completely and shows glitchy information:

The only way to get the mouse and keyboard to reconnect (and the only way to get the Bluetooth panel to work again) is to:

Turn all the peripherals off
Put the computer to sleep (without closing the lid)
Wait for 60–90 seconds for the computer to magically wake itself back up
Turn on the peripherals. All is well.

If I put the computer to sleep with Bluetooth working, it will stay asleep. If I put it to sleep after the peripherals disconnect, it will wake up automatically after a while.

I have no idea what is triggering these disconnects. They don't happen at the same intervals (sometimes it happens after an hour, sometimes four), but they always happen. Since upgrading to Mavericks I've had to do this whole put-the-computer-to-sleep thing several times a day. This did not happen under Mountain Lion.

I've tried the following things, without success:

Reset SMC
Reset PRAM
Deleted ~/Library/Preferences/com.apple.bluetooth.* and /Library/Preferences/com.apple.bluethooth and anything else related to Bluetooth
Reinstalled Mavericks
Had the physical Bluetooth controller replaced by Apple (just got the computer back yesterday)

Despite all this, the problem persists. I still have to put the computer to sleep 4–5 times a day to get the mouse and keyboard working again. Seemingly nobody knows how to fix it—it has even stumped Apple.

Does anyone know what's going on?

I was able to overcome the problem with this quick fix. So whenever you loose bluetooth connectivity just run the following commands in the terminal

$ sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
$ sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport

You will regain connectivity.


How to create solid blocks of colored background in Apple Pages? In Pages 5, some templates have blocks of background color, like in the For Rent Flyer where it has gray blocks of color at the top and the bottom.

I can delete the text in front, but I can't figure out what the color blocks are. Can someone please tell me what these are, and how I can create/modify them in my own documents?

These blocks are simply Shapes that are in the background.  In the template you reference, they are locked.  Click on the "Block" and you will notice little 'x' in the corners.  To unlock so you can move them, select Unlock on the Arrange tab in the inspector.

To create your own shapes, select the insert shape icon on the toolbar.  In the Style tab on the inspector you can change its color, position and other attributes.  See the screenshot below.

Just know that Pages, like many other apps, uses layers.  So move your shapes to the back in order to display text or pictures on top.  You may have several layers as desired for effect.


How can I get ^C to show up when I do Control-C on a Mac terminal? If I type a command, and halfway through I decide not to run that command, I do a Control-C to cancel it without having to backspace the whole thing, e.g. mv foo.txt bar.txt. On Ubuntu it'll show up as mv foo.txt bar.txt^C to remind me I cancelled it, but on Mac it shows up as just mv foo.txt bar.txt. Any way to get that ^C behaviour on Mac?

I'm not entirely sure of this, but for a different reason I upgrade the Bash on my machine (brew install bash) and this behaviour started to show up. This post is what I followed to update Bash. It would be good practice not to overwrite your old Bash but instead just use the new one. Brew puts the new Bash at /local/usr/bin/bash anyway.


Transfer Lion with my MacBook Pro sold to 3rd party I had a old MacBook Pro with Snow Leopard (OS X 10.6), then I bought the update to Lion (OS X 10.7).

Then I bought a new MacBook Pro that already comes with Lion and sold the old MacBook Pro. So, technically, I have two Lion licenses.

From the license contract on the App Store, I read that it (or Mountain Lion at least) is not transferable. I guess that means I can't transfer my license away from my Apple ID.

But I think it makes no sense I have two licenses and the person who bought my old MacBook Pro would have to buy a new (3rd) one to install it and maintain it. Is there any fairer solution? Would that be illegal?

Of course I could just install it using my account or whatever, but I already did that and now he wants to re-install it for whatever reason, and that's basically where all problems started.

The licenses you bought on the Mac App Store are non-transferable, as you already found out. The license for the preinstalled copy CAN be transfered, but only as part of a transfer with the original hardware it was installed on.

Therefor the only thing you can do when selling your old computer is delivering it with the original software it came with. Anything else would be a violation of the license agreement, and can be considered as software piracy.


Performance hit of installing a new hard drive in a MacBook Pro I have a MacBook Pro 5,3 with a 7200 rpm 500 GB hard drive. I am running out of space and I have been considering upgrading with Western Digital's 1 TB laptop hard drive. I am just curious if I am going to get a big hit to my performance.

This is the hard drive I am looking at:
http://www.newegg.com/Product/Product.aspx?Item=N82E16822136545

ATTENTION

You do not specify a MacBook pro, but mine (pre-unibody) it ca not take those drives as you can read it has 12.5mm height and the maximum of a MBP Drive is 9.5mm

That is why several 500Gb drives did not fit MBP's and the one you are mentioning will never fit your laptop.

added

Currently, the max capacity on a 9.5mm Hard Drive is 750Gb (WD Scorpio Blue 5400rpm), and SSD is 480Gb (OWC SSD Extreme Pro) --> I bought mine here but 240Gb, it's superb!

to learn how to swap them (unibody, late 2008 models), see this OWC video and if you want to check the performance from an SSD and a HHD, please check this video.

my own SSD:


iPad mini - change ID for App Store I have 2 email addresses. The App store uses email address 2 and I can't remember the password for that. Anyway I'd rather it used email address 1. I have checked through Settings>iCloud, Settings>iTunes & App Store and both are logged into email address 1. Settings>Messages was logged into email address 2 but I've signed out of that. Even so I still can't get the App Store to let me login with email address 1.

The easiest thing to for you to do is to go to the Apple ID management page and reset your password for your Apple ID associated with email address 1.


How to loan my iPad while preserving personal data? I would like to loan my iPad Air (iOS 8.3) to a friend and give him a clean device (without my apps and any personal data). After getting my iPad back, I would like to restore the whole configuration and have all my data again. What is the preferred procedure to do it?

Probably here's what I should do at the beginning:

Backup the device to a PC computer using iTunes
Erase the device according to the guide here: https://support.apple.com/kb/HT201351 (sign out of iCloud and erase all content).

But what then? My friend should create his own iCloud account and use it to configure the device? And if I want the iPad back, then I should erase it again and restore the backup from my computer? Will it work?

Yes, when you're friend is done using it, have him sign out of iCloud and then erase the iPad again. You will be asked if you want to restore from a backup while your are setting the iPad up again after the erase.


Loopback in Yosemite not working I'm on Yosemite (10.10.2). Since upgrading I got some DNS issues, it seems my loopback isn't working any more. When I'm talking to my app locally via http://localhost:port, localhost in some cases (sorry for being vague here) gets resolved to my current local IP. (observed with rails and openstack)

some analysis:

mac:~ me$ scutil -r localhost
Reachable,Local Address,Directly Reachable Address
mac:~ me$ scutil -r loopback
Not Reachable

etc/hosts:

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

etc/networks:

loopback        127             loopback-net

And a maybe related issue: DNS sometimes stops working completely. The only thing that helps, is a force quit of the discoveryd process.

I appreciate any help guiding me in the right direction to solve this issue.
Thanks in advance.

This might possibly be not the best long-term solution - I can't fully test as I don't actually have active IPv6 from my ISP yet, only on my local network.

I simply set my hosts file to

127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             127.0.0.1
fe80::1%lo0     127.0.0.1

which has so far given no noticeable issues.


Unable to turn of screen while making WhatsApp or skype call on loudspeaker ios 10 update Usually, when I make a Skype or WhatsApp call, while talking, I will switch off the display to conserve the battery as well as my eyes without the need to stare at the screen. This would allow the call to continue without any interruptions. However, since updating to iOS 10, turning off the display disconnects the Skype or WhatsApp call. Please help. Thanks in advance.

welcome to Stack Exchange.

This doesn't happen to me on my phone, so it must be a bug or something ...
I wonder if this is similar to this issue: Unable to turn of screen while making WhatsApp call on loudspeaker io10 update
have you tried closing the apps and restarting the phone?  You can quit the apps by double-tapping the home button, swiping the app UP (I would do this with WhatsApp and Skype), and then holding the power button until the option to turn the phone off comes up - swiping on that, and then starting the phone back up?
try a forced restart of the phone.  Hold the home and power buttons until the phone just seems to shut off; continue holding until the Apple comes up.
I would backup the phone, wipe it, and restore from the backup.


Label the different accounts on iPhone mail I've just finished setting up a mail address for my father. He has a custom domain name, and the he's able to receive/send email with this custom address via Gmail.

On his iPhone and iPad, he's using the default mail client, and it's linked to his Gmail account.

Since he receives emails from 2-3 different accounts already, it's confusing to know which mail was sent to which address.

In Gmail, you have the option to label the incoming messages, so you can quickly scan your emails and see exactly which were received from which address.

Is this option or any alternative available on the iPhone default mail client?

The labels are working if he uses the Gmail app, but he would rather keep using the default mail client.

Thank you for the help!

It's not evident in your question if you set up the different email accounts independently on his iOS devices or if they are linked in some other way –automatic forwarding for instance.

If you set them up independently, you can check each inbox separately if navigating through the shared inbox is confusing.

On top of the "All inboxes" view you can tap on "< Mailboxes"

and then choose which account inbox (or folder) you'd like to browse.


Jailbroken iPhone 5S stuck on Recovery screen I have a Jailbroken iPhone5s Or well I had one. I couldn't install any apps or update any apps so I reset my Phone with reset all in settings It was stuck in the Recovery Screen just stuck. I then plugged it in with iTunes and done Update and Restore but then it was just stuck in that screen. I left it in there for about 6 hours and I can't seem to fix at all. Is there any way to fix this?

You need to restore your phone to the latest iOS version being signed, currently iOS 10.2.1.

You should never click Reset All Content and Settings on a jailbroken phone, because it will throw you into an irreversible boot loop and you'll be forced to restore.


Using a dropdown menu with arrow keys in Photoshop This may be a tad specific but it's one thing that irks me with OS X.

In Photoshop, if I want to change a layer style from 'Normal' to say 'Overlay', I need to click the dropdown list and select 'Overlay'. If I then wanted to change this again, I can't just use the keyboard buttons to scroll up or down the list - I need to go in using the mouse again and it's a bit of a pain.

Scrolling with the arrow keys works fine on other drop down lists like fonts etc.

Any ideas?

I am not sure if you can do this with the arrow keys but there are shortcut keys for navigating the layers box

Changing layer styles

  (with layer selected) hold down ⌥ + ⇧ (option & shift) and use the + or - keys to cycle through the various layer dropdown

Navigation of layers

  UP  ⌥ + ]

  DOWN ⌥ + [

Repositioning a selected layer

  (with layer selected) Move up a layer
  with ⌘ + ]

  (with layer selected) Move down a
  layer with  ⌘ + [

these work for me with the CS5 version of photoshop


Running Java / Jython process in the background I am trying to run a Jython script in the background. This is what the script looks like,

a_jython_script.py

for i in range(10000):
    print i

When I try to run it in the background, it is stopped before it prints anything.

 $ jython a_jython_script.py &
[1] 12325
 $

[1]+  Stopped                 jython a_jython_script.py

Sending it to the foreground allows it to continue normally. jython was installed via brew. Taking a look at what the jython startup script is doing, I can just run the Java program and get the same results.

 $ /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/bin/java -Xmx512m -Xss2560k -classpath ../../../../../../usr/local/Cellar/jython/2.7.1/libexec/jython.jar:. -Dpython.home=../../../../../../usr/local/Cellar/jython/2.7.1/libexec -Dpython.executable=../../../../../../usr/local/Cellar/jython/2.7.1/libexec/bin/jython -Dpython.launcher.uname=darwin -Dpython.launcher.tty=true -Dfile.encoding=UTF-8 org.python.util.jython a_jython_script.py &
[1] 12623
 $

[1]+  Stopped                 /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/bin/java -Xmx512m -Xss2560k -classpath ../../../../../../usr/local/Cellar/jython/2.7.1/libexec/jython.jar:. -Dpython.home=../../../../../../usr/local/Cellar/jython/2.7.1/libexec -Dpython.executable=../../../../../../usr/local/Cellar/jython/2.7.1/libexec/bin/jython -Dpython.launcher.uname=darwin -Dpython.launcher.tty=true -Dfile.encoding=UTF-8 org.python.util.jython a_jython_script.py
 $

Adding nohup does not make a difference.

Java was installed with the Oracle installer. I see the same behavior in Terminal as well as iTerm2. I do not see the same issue under Linux.

I got the answer on github: https://github.com/jythontools/jython/issues/148

Solution is summarized below.

when running with jython,

export JAVA_OPTS="-Dpython.launcher.tty=false"
jython a_jython_script.py &

Invoking with java add -Dpython.launcher.tty=false

/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/bin/java -Xmx512m -Xss2560k -classpath ../../../../../../usr/local/Cellar/jython/2.7.1/libexec/jython.jar:. -Dpython.home=../../../../../../usr/local/Cellar/jython/2.7.1/libexec -Dpython.executable=../../../../../../usr/local/Cellar/jython/2.7.1/libexec/bin/jython -Dpython.launcher.uname=darwin -Dpython.launcher.tty=true -Dfile.encoding=UTF-8 -Dpython.launcher.tty=false org.python.util.jython a_jython_script.py &


How my iMac turned off I was working, then I received a phone call and left my iMac for a while. macOS Sierra is actually running.

I came back about 30 minutes later and found my Mac was turned off.

Since there are no phantoms at home, I thought I forgot I turned it off, maybe absentmindedly (I'm quite sure I didn't, anyway).

The question is: is there any way to check HOW the iMac turned off? (crash, eletricity grid issue, manual, etc.)

I read the console data but I don't know exactly what to search for (apparently there's no crash).

Update: The last thing I see in system.log:

Jan  4 10:33:53 M-iMac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.2237): Path not allowed in target domain: type = pid, path = /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/XPCServices/RootDebuggingXPCService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /Applications/Xcode.app/Contents/PlugIns/IDECacheDeleteAppExtension.appex
Jan  4 10:33:54 M-iMac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.2237): Path not allowed in target domain: type = pid, path = /Applications/Xcode.app/Contents/Frameworks/DFRSupportKit.framework/Versions/A/XPCServices/IDETouchBarSimulatorService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /Applications/Xcode.app/Contents/PlugIns/IDECacheDeleteAppExtension.appex
Jan  4 10:33:54 M-iMac com.apple.xpc.launchd[1] (com.apple.nowplayingtouchui): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Here I'm restarting (I suppose):

Jan  4 11:03:51 localhost bootlog[0]: BOOT_TIME 1483524231 0

There are other Questions on Ask Different regarding what the shutdown codes mean - e.g. Where to find shutdown causes errors list? [which links to a list maintained by one of the Ask Different senior members], but I went for the simplest, GUI-based way of finding the data, rather than using terminal.

[I need to know if this still work on Sierra, as comments suggest the data location may now be different]
This is from El Capitan.

Launch Console from Applications/Utilities
On the left, select 'All Messages' then top right in the search box, type 'shutdown'

Note that a Restart does not appear to generate any shutdown message.


Keyboard shortcut to select the address bar for the current page in Safari? When I want to navigate to a new page using the address bar in Safari without taking my hands off the keyboard, I use the keyboard shortcut Command + T, which opens a new tab and places the cursor in its address bar.

This is fine when I want to keep the original page open in another tab. But sometimes I want to replace it with the new page. Sometimes I can get back to the address bar by pressing Tab or Shift + Tab several times, but the number of times depends on the amount of tab-selectable fields on the page.

Is there a keyboard shortcut to select the address bar for the current page in Safari?

Command + L is the keyboard shortcut you are looking for.

This shortcut is corresponding to Open Location... command which can be found under File → Open Location... in Safari Menu bar.


WinOnX how to install DirectX I want to play a cool game called Just Cause 2. I have a copy, but there is a problem because it needs DirectX 11. Anybody knows how I can install that DirectX? Because I think it's only for Windows, but I don't know WinOnX is emulating Windows 7.

WinOnX is a repackaging of the Wine framework. Wine does not emulate Windows (strictly speaking), it just provides adapter libraries to allow Windows programs to run. According to this page, Just Cause 2's compatibility with Wine is rated "garbage" and it doesn't run. There is also a link to this page that shows the progress of re-creating the DirectX DLLs for Wine. As of early June 2012, they seem to be about 37% complete with DirectX versions 8-10, and there's no indication of work on DirectX 11 yet.

tl;dr: It won't work. You need to virtualize a real copy of Windows using VMware or Parallels or run Windows in Boot Camp to play a DirectX game like that on your Mac.


Using bitmapped Monaco in Textmate When I use TextWrangler, I can use the beautiful, crisp bitmapped 10 point Monaco font:

In TextMate, when I select Monaco 10 as my font, I get a much fuzzier rendered vector graphic from the TrueType version of Monaco:

I do like the lack of chrome in a TextMate window, but find the lack of bitmapped Monaco 10 to be off-putting. Is there a way to get TextMate to use the bitmapped version of the Monaco font, or do I need to stick with TextWrangler for that?

For TextMate 2 you can do the following.

In a Terminal window run:

defaults write com.macromates.TextMate.preview disableAntiAlias -bool YES

To disable it, run:

defaults write com.macromates.TextMate.preview disableAntiAlias -bool NO


How do I find out if my MacBook Pro supports virtual extensions? I am curious to know if it's possible to use my MacBook Pro as virtual host to test application in different OS environments. I guess it would improve performance of applications running on virtual OS .

Yes, All recent Macs support virtualization.

Apple released native hypervisor functionality with their OS X Yosemite release, their Hypervisor.framework.

What this does is it allows you to run a VM natively on OS X, without the need for client hypervisor (such as VMware Fusion or VirtualBox).

Source


Escape single quote in command in alias Terminal I am working with SVN for version control, and whenever I'm ready to commit some changes, I have to stage them all with the following command:

svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add

As you can see, it's quite complicated and I therefore went looking into making an alias for this command.

When opening ~/.bash_profile, I added the following line:

alias svn grab='svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add'

However, there are some single and double quotes in the original command, so the alias fails to be created (ok, it gets created partially, and I can't use it).

How do I escape the single quotes in the command, so the alias will work?

Double quotes and escaping all " and $ correctly should work:

 alias svngrab="'svn status | grep -v \"^.[ \t]*\..*\" | grep \"^?\" | awk '{print \$2}' | xargs svn add'"

I also would avoid "svn grab" so maybe svngrab or svn_grab instead.


Storing iBooks in iCloud Can iBooks be saved to iCloud then deleted on my iPad but still be available on iCloud? The reason for asking this is that my iPad is running out of space, so I want to store my iBooks elsewhere.

With the release of iOS 9.3 iBooks now supports storing PDF and ePub files in iCloud. You should be prompted to enable it when you launch iBooks after performing the update. If not then you can enable it via the Settings App under iCloud > iCloud Drive > iBooks.


Which applications on Mac AppStore build HTML5 (drag and drop)? Which applications on Mac AppStore build HTML5 (drag and drop)?

Depending on what you are looking for with HTML5, one app that helps with creation is Hype, which is available in the Mac App Store. This looks mostly like it would help with animations (like you may have previously with Flash), but other HTML features are there too.


Smart quotes in Google Chrome We can enable/disable smart quotes for many apps by going to Edit → Substitutions. However, In Google Chrome, “Substitutions” does not exist. When searching online, though, it seems that it might’ve existed at some point, as I find multiple posts on how to disable the feature.

Is it no longer available (and if so why) or is it something on my side?

As claimed by this issue, text substitution appears to have been disabled due to a bug:

  Text replacement was originally disabled due to http://crbug.com/173405 but Apple has since fixed the root cause of the issue.

Another issue is open to track progress on the feature.


Recovering lost notes on iPhone 4s Some of my notes have disappeared from my iPhone 4s. I haven't made any backup and contents of those notes are very important to me.

How can I restore or at least access some of my lost notes?

(My iPhone 4s isn't jail broken and I don't install any games or any apps on it)

If you backup with iTunes and you restored from the backup and the notes were gone, then there is no where to retrieve them from unless you have another backup that contains those notes.

Launch iTunes on the computer and go to iTunes>Preferences>Devices. You will see a window with all of your backups listed in it.

If you see a recent backup that you are certain contains the notes that you need, recover deleted notes from iPhone backup.

If your note is gone from iCloud.com there is only a few ways to possibly recover it.

The first things I would check is a iCloud Backup, a iTunes Backup, or a 3rd party email that may have contained the note. To restore from a iCloud or iTunes backup follow this link. This article explains how to restore a device from either back up.

Note if you have backed up since the note went missing, you will not have the note on the backup. Make sure you do not back up if trying to restore from a back up as this will back up the content without the note.

To get to the "Set up assistant" on an iOS device, you must go to Settings>General>Reset>Erase All Content and Settings. Once the phone restarts, you will be at the "Set up Assistant"

Gmail emails are very commmon sources for notes and you may have been adding them to the gmail notes without even knowing it.


Is it possible to add attachments to iCloud reminders? I can add links to the Notes field of Reminders - but I don't seem to be able to drag files into there. Is there a way to link to a PDF on iCloud Drive perhaps?

As of today, it's not possible to add attachments to a Reminder in either macOS or iOS.

I've read that some people have used 3rd-party apps (like Fantastical) to manage their reminders.  Doing that gives them additional features not found in Apple Reminders app.  I can't speak to that because I haven't tried those apps but you might want to look into that if this an important feature to you.


Lost Safari on my iPhone 5 My Safari is no longer showing on my iPhone 5. Where can I find it?

Search for it with Spotlight — does it show up or not?

Reboot and check again. If it is still not showing up you can check if Safari is allowed in Settings → General → Restrictions → Safari.

In Spotlight, on the right of the icon and app name the Folder Name is displayed so you can find the location of the Safari icon.


Disable volume control noise on mac book pro? When I hit F11 or F12 (volume up and volume down) I get the volume control overlay; the volume increases or decreases; and the machine makes an "SQUICK SQUICK SQUICK" noise.

How do I keep the functionality of the keys but stop them making that noise?

(Mac Book Pro with Snow Leopard)

You can change this in System Preferences.

Go to the Sound pane, and uncheck the Play feedback when volume is changed checkbox.

Also, if you want to not play the sound for a given change (a one-off thing), hold down shift and change the volume.
This will also play the sound if it's turned off.


Do the Apple Earphones with Remote and Mic work with an iPhone 3G? On the Apple product site it says the Apple Earphones with Remote and Mic aren't compatible with an iPhone 3G. I would assume, though, that the headphones and the mic will work, but the remote control buttons might not. However, the more basic version works with a 3G; these feature just one button to answer or end a call. So the main button of the more advanced earphones might work as well?

Has anybody ever used the combination of an iPhone 3G and the Apple Earphones with Remote and Mic and can report on their compatibility?

I just checked; the "play/pause" button works, but not the "up/down volume" buttons.


Shortcut used by another action/reboot breaks shortcut I think this is a bug, but perhaps it is a unique problem to me for some reason.  I really like independent display switching in Mavericks, and I set it up in what I guess is a unique way.  I have two monitors with 4 displays each.  Displays 1&5 are activated by the same keyboard shortcut ctrl-1.  All the other displays are activated individually with ctrl-2 through ctrl-7.  This worked really well and I liked it until I rebooted.  Then, it broke.

After rebooting, ctrl-1 still activates display 1, but not display 5.  I figured this was not an intended usage, and so I fixed the keyboard shortcut so that display 5 was activated by a different shortcut.  However, the shortcut for display 5 is completely broken until another reboot, regardless of what key is is set to.

What I want is for this to work the way I want - to support one shortcut key for multiple displays.  I do not expect to get that, unless someone knows of a good utility or plug in that will create that behavior.

As I thought about it this morning, I realized I could get this functionality pretty simply - with a macro.  An automator script, as a service, was bound to the ctrl-1.  The spaces were moved to option-1.  The service takes no input, and here is the script:

on run
    tell application "System Events"
        key code 18 using {option down}
        key code 23 using {option down}
    end tell
    return "success"
end run

A list of key codes can be found here: How do I automate a key press in AppleScript?


when the GPS is enabled, does it drain battery? if the GPS is enabled, but the app doesn't use it, does it drain battery? (I understand that GPS drains battery because it requires a different component to be charged up.) Or the fact that the GPS is enabled only means that the App can use it?

If GPS is enabled at an app level it doesn't use more battery unless an app uses GPS. And even if an app uses GPS it can do so in a way that minimizes it's usage and battery drain. For example if Foursquare were to use GPS efficiently it would only fetch your location when you are checking in or looking up places to check in then turn off it's access to the GPS.

Now at a system level enabling GPS might drain the battery a little but that depends on what you have enabled, i.e. Find my iPhone.


Dual boot Mac/Win crashes in Windows I have plenty of experience with dual boot, but never anything like this. State of the art iMac Retina 4K, 21.5-inch, Late 2015, running El Capitan 10.11.3, dual booting to very recent Windows 10. (Don't want to boot it to determine exact release.) So far no crashes on Apple side. On Windows side, twice now: screen goes black, pause, buzzing sound, then many rounds of Windows saying it will fix itself, then crashes again. In these many times it says it will fix itself there has been no buzzing. Today it ran Windows for 20 minutes or so, and then I again got the buzzing. For now, I'm just going to leave it in Apple and see if that crashes, which would suggest hardware.

Late model macs such as yours have good support for EFI boot for windows and OS/X. I assume you have installed both via EFI on a disk partitioned using GPT partition scheme.

I am very familiar with the windows 8.1/10 cycle of trying to fix itself, it never will fix itself, this is something you need to help it with.

I spent more than a couple of days last week playing with EFI dual boot for Windows and Mac but my Mac isn't up to it. It's an early model 2011 MBP.

I had fun but no sound in windows. I could not fix the sound issues, not the constant (in Windows):

crash, trying to repair
restart, trying to repair
crash, trying to repair

Your issue is almost certainly related to the way in which you prepared your machine. including the windows drivers you installed.

Have a look at this post from Jamie Osborne. I know Jamie and have worked with him. His guide is for 8.1 but should equally be suitable for 10.

http://jmeosbn.github.io/blog/windows-8.1-efi-install/

What might be more suitable for your situation is the following link. This is real bare bones stuff and requires knowledge. Not for the faint hearted:

https://www.reddit.com/r/mac/comments/2fy3be/by_popular_demand_my_better_than_bootcamp_guide/

have fun!

In my case, and for the sake of my sanity, I reverted to BIOS boot for windows. That's ok in my case as I also have Ubuntu and GRUB on there as well. The extra button click on startup is tolerable for me.


Managing GameCenter Contacts Is there a way to manage GameCenter contacts without having to be on the iPad?

I often come across people who I want to add to my GameCenter contacts while browsing various forums. I do this browsing from my Windows PC. Is there any way I can manage who is a GameCenter Friend while not having physical access to the iPad at the time? Is there maybe a section on the Apple website that allows this, or within iTunes?

There is a Mac Game Center app that was added in Mountain Lion, but besides that there is currently no way to access Game Center outside of the iOS app.

A place to keep an eye on would be iCloud.com. If Apple added a web interface to Game Center it would most likely be added there (/speculation)


This PDF displays with question marks instead of letters Something is wrong with the rendering of this PDF in Preview (or Quick Look). This is how it looks:

I can see it in Adobe Reader on Windows. I'm not sure what font it is using, and I have Office 2011 installed, so I have all of those fonts. Why is it displaying question marks on everything (except the text in the bottom left)?

I'm using Lion 10.7.1 on a 2010 17" MacBook Pro.

It looks like all the previous answers to this question are completely uninformed. I suggest that you completely disregard all of them. It is unlikely, for instance, that telling the document creator that what they did was faulty will really get you anywhere.

First, it's likely that they did not embed fonts, yes, but there are many fonts that carry flags telling apps NOT to embed them. This is an especially favorite trick of Microsoft products. Presumably they do not want people to be successful using non-Microsoft products (at least, that's what the documents in their antitrust case indicated), so they make it as painful as possible to transfer documents from Windows to Mac. Other companies know about this, and they may try to compensate. For instance, Adobe may license fonts to make the process more transparent to the end user but Apple may not have the same license for Preview. There is a lot going on behind the scenes. "Correctly" embedding the font won't get to the root of the problem either.

Second, you say that this document was created by someone "already not very good with computers." It would be ridiculous to tell such a person to correctly embed fonts. It's not even fair to consider the lack of font embedding as an error since you could quite possibly install the fonts, depending on the license, in a place where Preview can see them.

Third, it is naive to claim that Preview is at fault because it can't find a font when you have not told it where to find the font.

You can compensate for this. I can think of at least three ways.

First, if the creator wants to embed fonts, they may be able to and they may be able to choose similar fonts with different licenses if that is the source of the problem. In the displayed example, there is a correctly rendered font in the lower left hand corner. The creator could possibly use that font throughout.

Second, if you don't want to go to the document creator, you can apply one of several software solutions. I prefer open source software so, when I receive a file like this, I use the free, open source ps / pdf tools you can get with Xpdf. The problem with this solution is that many people don't want to use open source or feel uncomfortable with it. There are projects to make it easier on Mac. I use a package installer called macports to make it easier for me. Having done that, I would solve this problem by typing the following two lines in the terminal:

pdftops badfile.pdf intermediatefile.ps
pstopdf -o goodfile.pdf intermediatefile.ps

This will effectively replace the non-embedded fonts in badfile.pdf with their nearest Postscript core font equivalents. For me this is usually adequate. If the image in the above picture is going to be part of a book, you may need the fonts to match. In this case, you must either learn more about fonts or purchase non-free software. Depending on the circumstances, the options to the commands mentioned above may be modified to match fonts precisely.

Third, if this is a book project and you are uncomfortable with free software, you should try using a combination of Adobe Acrobat (not the free Adobe Reader) and Adobe Distiller to convert the document from pdf to ps, put the desired fonts in place, and convert the document back to pdf. I just googled and saw that there are a number of hits for tutorials for doing this process.

By the way, as a former professor, I feel that students who don't "try and get them to change their ways" are not doing me or the other students a favor.

Sometimes there are legitimate reasons why professors resist change. I don't know about your cases. If the professor is "already not very good with computers" you might want to use psychology. Since you are in a college or university, there are probably some experts around who could help you. Maybe the prof feels threatened or confused in an area outside his expertise. Maybe he's afraid students will think he's generally stupid. Who knows? ... But you might be able to figure it out and help everyone in the class. Good luck!


How to restart an iPhone with a broken Hold Button? I have an iPhone 4S (iOS 7) and my Hold Button is broken. Consensus on the Internet seems to be that if this is the case, one can maximize phone capability by activating Assistive Touch (Settings > General > Accessibility > Assistive Touch > On).

I've done this. And I can now turn off my phone by holding "Lock Screen" under "Device" in the Assistive Touch menu.

But how will I turn my phone back on once it's off?

Is there any way to simply restart from Assistive Touch?

Phones that are off turn on when you plug them in. I just tried it, might be the easiest (or even only) way to turn it on again.


Suspicious new and plastic wrap sealed iPhone SE came with iOS 12.1 After openening a new and sealed iPhone SE (bought personally from the store of a major UK chain retailer) and setting it up I was worried to find it had iOS 12.1 installed.

I thought surely this can’t be possible.

Surely it shipped with an older iOS in the first place. iOS 10 or iOS 11.

Especially since the serial number claims the device was manufactured in late May 2018. With iOS 12 being launched in September and iOS 12.1 being launched in late October - does this suggest the phone (which was sealed in plastic shrink wrap and sold as “new”), from a reputable UK wide chain retailer, has been pre-owned or tampered with in some way?

How else could it come to have iOS 12.1 on it?

Should I be worried.

It is not uncommon for sellers and manufacturers to open "sealed" products, update them, charge the battery, etc. and reseal them to sell as new.

In the US, it's perfectly legal to resell a previously opened product (and not as refurbished) provided that the process is conspicuous and documented.  It's likely the UK has a similar law.

There are steps you can take even if you have questions about the legitimacy of the product you purchase.  However, my best advice is that if you feel that packaging is suspicious, trust your instincts.  Return the product for replacement or refund.  That type of concern with always linger regardless of whether or not it's unfounded.


How to disable screensaver in Yosemite I'm running Yosemite on a Mac mini (Mid 2011) and I use Synergy in client mode on this machine.  The screensaver setting is disabled ("Start after" is set to "Never") and display is set to sleep after 1 hour.  However, after 10-15 minutes of inactivity, the screensaver comes on.  Is there some other way of disabling it?

From Synergy Configuration File Format

screenSaverSync = {true|false}

If set to false then synergy won't synchronize screen savers.

Client screen savers will start according to their individual configurations.

The server screen saver won't start if there is input, even if that input is directed toward a client screen.


Sync iOS7 device to PPC OSX 10.5.8? Can an iOS 7 device (iPad 2 for instance) be synchronized with a PPC Mac with OSX 10.5.8 and the latest iTunes for it, which I believe is iTunes 10.6.3?

No, because iOS 7 requires iTunes version 11 for syncing media (and firmware updates).


Shortcut to rename multiple files in the Finder In the Finder, it is possible to rename the selected file by pressing the "Enter" key.

When multiple files are selected, it is possible to batch rename them using some simple rules by right clicking on the files and then clicking "Rename X files...".

Is there a shortcut to rename the files which are selected, so that one does not need to move the mouse, right click, select the rename button, etc.?

Although one might expect that pressing enter when multiple files are selected would do this, pressing enter then does not seem to have this effect (it appears to do nothing).

As I don't need so many files renamed simultaneously I simply added this few shortcuts for different numbers

To do this open Preferences > Keyboard > App Shortcuts > + and add Finder with exact Rename 2 Items... menu title and so on)

There is more complex solution via automator, which I don't like it as it resets Rename Menu state each time you open it.


ipod touch 5th generation crashed My ipod doesn't start anymore. I didn't drop it or anything like that... It just went black screen while I wasn't looking. I can't start it and charging doesn't do anything. What can I do?

try pressing the home and off button at the same time for about a minute, or longer, and usually that will work. If not the battery may be dead. if it does not work try taking it to a tech shop. usually the first works with mine, still not sure why that happens though.


construct POSIX file with variables I can construct a file with variables:
set filePath to "Macintosh HD:tmp:test.txt"
tell application "Finder"
    delete file filePath
end tell

However, same thing doesn’t work for POSIX file:
set filePath to "/tmp/test.txt"
tell application "Finder"
    delete POSIX file filePath
end tell

It says “can’t get POSIX file "/tmp/test.txt"” (-1728). The syntax looks correct, because it works when I use string literal instead of variable:
tell application "Finder"
    delete POSIX file "/tmp/test.txt"
end tell

I’m running scripts with osascript foobar.applescript in case that matters.

This AppleScript code works for me using the latest version of macOS Big Sur.
set filePath to "/tmp/test.txt"
tell application "Finder"
    delete filePath as POSIX file
end tell

This also works for me…
set filePath to POSIX file "/tmp/test.txt"
tell application "Finder"
    delete filePath
end tell


Trouble With Partitions I'm trying to download an update for a program I use frequently. The program can only run on a non-case sensitive file system, so it can't run on my main partition. I partitioned a second drive that isn't case sensitive so I could download it. That partition is now completely full. I tried partitioning more space but disk utility says "This partition cannot be modified.". Below is a screen shot of disk utility. What can I do to get more space for my second partition? I tried making a third partition, that was non-case sensitive as well to try and merge them together, but disk utility says "This partition cannot be modified." Please help?

Thankfully I just copied everything on my second partition to my main and deleted the second partition and resized it. Thanks a lot guys.


What change does the OS need to make, given this message? "iCloud Preferences wants to make changes to your account" This message appears when I log on to my machine. It doesn't tell me what change it wants to make, so I deny it access to my system.

Does anyone know what change it is trying to make?

It's trying to set up the iCloud account as a trusted authentication platform for your local user account. This is usually for a feature such as the Apple Watch unlock, whereby the Apple Watch can unlock your local account through iCloud.


How exclude a specific folder from spotlight search but not from search window? I'm trying to set up my Mac so that it will exclude files in a folder called 'XYZ' from the search results in spotlight only. The reason is because these files are mostly private, and I don't want them to pop up in a spotlight search.

However, I still want to be able to search them in a finder window, where I have a little more control than in spotlight. (To be clear, search normally with alt+command+space, exclude folder from command+space). Any idea how something like this could be done?

From my experience excluding a folder from Spotlight indexing will exclude the files/folders from showing up when you do a search in Spotlight (command+space) but will still allow you to open that folder in finder and use the search bar in the top right of finder to search within that folder only. I imagine that the search of an un-indexed folder means the OSX will search in real time, or temporarily index the folder to allow you to do a folder search that has been excluded from the main Spotlight index and then erase it when you close the Finder window.

Just make sure once you've typed in your search word(s) in the search bar that you click the name of your folder/drive in the "Search" criteria in the grey bar that appears (as shown below).

To exclude a folder from appearing in the Spotlight search, and therefore from being indexed go to: System Preferences > Spotlight > Privacy tab, then click the + and select the folder you want to exclude:


Set inherited permissions on iLifeAssetManagement? I have a second user account on my machine that is only used for iCloud syncing for my wife's apple id. In order to consolidate photostream photos I'm going to set up a process to pull new photos out of her photostream folder and import them into my iPhoto library.

But first, I have to alter permissions so I can see her photos from my user account. I've managed to set the permissions for the "everyone" user to see the photos from my user account, and that works for existing photos. But when new photos come in, they are set where only her account can see them.

Here is what I'm using. Hopefully someone can tell me what I'm missing. :-)

sudo chmod -R +a "everyone allow read,write,execute,append,readattr,readextattr,readsecurity,writesecurity,file_inherit,directory_inherit" '/Users/Wife/Library/Application Support/iLifeAssetManagement/assets/sub'

Thanks.

I would try to avoid ACL's: they are tricky and often behave unexpectedly.

If I were you, I would try stick to standard UNIX permission, following these guidelines:

Create a user group (say, MeAndWife)
Make sure users Me and Wife are the ones and only members of MeAndWife
Change group ownership of sub directory to MeAndWife by something like chgrp -hR MeAndWife '/Users/Wife/Library/Application Support/iLifeAssetManagement/assets/sub'
Grant the owning group members the same permissions which are granted to the owning user: this may be obtained in several ways, but one that I like is by running find '/Users/Wife/Library/Application Support/iLifeAssetManagement/assets/sub' -group MeAndWife -and -perm -u=r -and -not -perm -g=r -exec chmod -h g+r {} \; [this basically states: Find files/folders with owning group MeAndWife, for which owning user does have read permission, but owning group members do not; and give owning group members read permissions]. Of course you should repeat this step for write and execute permissions (just replace -u=r and -g=r with, respectively, -u=w and -g=w for write, -u=x and -g=x for execute).
Finally, I think that if you want to be able to navigate to the sub directory from your account, then you need to make the full path to your sub directory searchable by everyone. That means, run through chmod o+x '/Users/Wife/Library', chmod o+x '/Users/Wife/Library/Application Support', chmod '/Users/Wife/Library/Application Support/iLifeAssetManagement' and chmod o+x '/Users/Wife/Library/Application Support/iLifeAssetManagement/assets'

That should do the job: new files in sub should inherit group ownership (MeAndWife) and permissions (same as owning user). If you find that that is not the case, you could use launchd in conjuction with a very simple script to fix file permissions periodically (say, hourly).


Common shell / editor shortcuts for Mac OS X is there a way to add universal shortcuts for input / text fields in OS X and/or chrome itself such as Control + U to delete everything to the left of a line, Control + W to delete the left word etc. or cursor positioning like Control + a to move to beginning of a line?

This is definitely possible, see https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html for a good discussion of text system key bindings.

To accomplish what you're after save the following to ~/Library/KeyBindings/DefaultKeyBinding.dict:

{
    "^u" = "deleteToBeginningOfLine:";
    "^w" = "deleteWordBackward:";
}


How best to view the current time while gaming on iPad? On iOS, in my case the iPad Air 2, games typically run in fullscreen, i.e. the status bar at the top is hidden. If I want to view the time, I have to pull down the Notification Center, which requires two swipes near the center of the upper edge of the screen, which in turn typically requires changing the grip on the device.

Is there any more convenient way to view the time during gameplay? Maybe even continously displaying the clock?

Most fullscreen apps, (majority of games and video player/streaming apps), are programmed to hide the Status Bar. So, it is not possible by any means to have the clock continuously displayed while playing the game/video.

Since you are concerned about losing the grip of the device and do not want to move your hand much (to perform the swipe down gesture), there's an alternate approach you can take. Without moving your hands and pausing the game, simply press the power button of the device to put it in sleep mode. The game/video will be paused automatically.

Now, quickly press the Home button (without unlocking the device) to show the lock screen which will also display the time. Now, use Touch ID to unlock the iPad and un-pause to resume playing the game/video. (This approach is assuming that you have enabled Touch ID to unlock your iPad. The goal here is to wake the device without unlocking it. Act accordingly if you do not use Touch ID to unlock your iPad.)

The aforementioned can be performed (in most cases) without losing the grip of the device. Works best in landscape orientation (and with large hands ). I too take this approach when playing games on iPad.


After iOS 5.1.1 my ipod doesn't list artists/albums in the correct order Over the weekend I upgraded my iPod 3 to iOS 5.1.1 and jailbroke it.
Today I noticed that artists and albums are not properly sorted and it doesn't display everything. However, all the tracks are on the iPod and in iTunes I can see all the tracks/albums/artists in the correct order.

This is what it looks like:

As you can see "Everlast" is listed under "H", "Exciter" is listed under "I" and "J", etc etc.
I would rather not completely wipe it since re-encoding/uploading all the tracks will take a very long time.
It seems like I need to somehow delete/rebuild artist and album database on the ipod itself..

This is a well known issue. There is a very long discussion going on on the Apple Support pages. As far as I can see, there are two solutions which proved to fix this issue.

Switching the iPhone languages seems to work in some cases. Switch to Japanese and back to English (or your own language) and this should do the trick according to some users.
However, I would advise you to memorize the navigation very well, since it's very hard to find your way back in Japanese :)
Another thing which seems to fix this is to this "new feature". When navigating to Settings > Music, there should be an option to toggle Group by Album Artist. Toggle it off and after a resync, the problem should be fixed.
And while you're in the menu, make sure you've turned off Shuffle as well.

I can't confirm neither of these solutions since I cannot reproduce this error. So I hope it helps you out.


(How) Can a web site determine if Safari Private Browsing is turned on? In Safari on Mavericks, I sometimes get a dialog from web sites indicating that some site functions will be blocked or degraded unless I turn off Private Browsing mode. Most users probably expect their choice of whether to use Private Browsing to be private. My impression is that other major browsers do not leak Private Browsing state to web sites.

I have noticed that while in private Browsing mode, Safari will not request favicons, so in theory a site could block caching of the favicon and make a pretty good guess that Private Browsing is on.

In contrast, on iOS, Safari doesn't request favicons at all. But it will, even in Private Browsing mode, request any "apple-touch-icon" if you access the Sharing panel (the apple-touch-icon is used as the Home Screen icon if you subsequently "Add to Home Screen" for that URL).

Other than favicon, are there other known ways that a web site could determine (or guess with reasonable accuracy) that you are using Private Browsing mode in desktop Safari?

On iOS, HTML5's local storage is not available in private browsing mode, which means you can detect it by attempting to save something to local storage and catching the exception with the following JavaScript:

try { localStorage.test = 2; } catch (e) {
  alert('You are in Private Browsing mode');
}

Modified from https://stackoverflow.com/a/17741714/

On OS X, there's not really a canonical method, but this should provide some useful information:

Can web sites detect whether you are using private browsing mode? –Security.SE

If you're looking for implementation guidance, you should probably try Stack Overflow instead


"Last backup could not be completed" when "Last backup: Never" I have deleted all major iCloud backups and removed Camera Roll etc. from the impending backup so it should be less than 5 GB. Even still, when I re-enable iCloud Backup and go to sync for the first time, I'm told that the "Last backup could not be completed". Tried power cycling and still no change. What gives?

From the date of your post, you were using iOS 9 at the time. I experienced this issue myself with backups in iOS 9. Forcing another iCloud backup would eventually allow it to complete, but over time I had to deal with runaway backup sizes (growing up to upwards of 5 GiBs after a few days).

As far as I can tell, this appears to be resolved at last in iOS 10. I would recommend performing a backup in iTunes, then upgrading before trying another iCloud backup.


How do I fullscreen browser content in Google Chrome? I realize that one can run apps in a macOS full screen mode, but sometimes I really want the webpage itself to take up the full screen real estate. And ideally, that would not require me to open such a page in a different browser.

View → Enter Full Screen (⌃⌘F), then View → Always show toolbar in full screen (⇧⌘F).


Screenshot reader for Mac Is there a screenshot reader similar to ABBYY Screenshot Reader (you are just selecting area on the screen and getting text into the buffer, something like that)?

how about using FreeOCR? It works for PDF files, TIFF images and can turn image to word file.


Export frame to Pictures...where? In Photos app, while playing a movie, if you select the gear in player controller appear a menu list.

Selecting "Export frame to Pictures" (or something like that) Photos should save the frame... but I can't understand where!

It's not in pictures folder and not in Photo's moments so...where is it saved?

You can find the frame in your Picture folder under the name Frame_something.tiff. Then you can import that frame in the Photos app like a normal picture.


Automator service not showing in services menu I know next to nothing about the OS X, but I've been asked to make a few different scripts for actions in Apple Mail.  One is to bind a hotkey that will create a reminder with a followup time of two business days.

I followed a guide on how to build the script and insert it into Automator found here.  The script works when running in the AppleScript application, and compiles and runs in Automator.  The service/workflow generated by Automator is saved to ~/Library/Services/ but does not show in the services menu in Apple Mail.  This article says that services for Apple Mail should be in the /System/Library/Automator folder.  I am unable to move the service to that folder as the folder is locked.  The service is set to have no input, and be in the mail application.

How can I get this workflow/service to show in the mac mail services menu?

Depending on how your script is configured, by default, any Service requires to have an item selected / highlighted (in your case, an email) as they are context sensitive.
You can disable this behaviour by changing the drop down field "Service receives" and selecting "no input". This obviously only applies if your script fetches input itself or doesn't need it.

Unfortunately there do seem to be weird issues when services have spaces and/or numbers in their name.
As stated by @gerlos, renaming them should solve the problem, but a reboot might be required (Which was the case for me).

As an extra;
If you're now finding that you don't like the name of the new service, you can change it!
Just right click the .workflow file and select 'show package contents'.
Inside you'll find a configurable info.plist file.
Open it up with your favourite text or plist editor (Or just plain old TextEdit) and look for the xml key 'NSMenuItem', it should contain a key entry 'default' associated with a string, the string in question is the service's display name.

More information on everything that's configurable (e.g. a service description) can be found in the apple documentation here: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/SysServices/Articles/properties.html

Tested on OS X High Sierra


Applescript - bookmark all tabs in ALL WINDOWS in Safari Safari, have the Bookmark all tabs, function in the menu Bookmarks -> Add Bookmarks for these N tabs. I looking for a way how to do this automatically with applescript in all opened Safari windows.

With other words, want

choose some bookmark folder, let says "Favorites -> Sessions"
cycle over all Safari windows
if the window has only one TAB simply bookmark it into the above folder
otherwise

call the Bookmarks -> Add Bookmarks for these N tabs menu item
fill the popup window automatically (e.g. Saved Tabs window1, Saved Tabs window2 ... etc.)

repeat from 2

Here https://gist.github.com/kshiteesh/b72e93d31d65008fcd11 is a nice applescript, (also similarly this which could be an good starting point for the development, but asking first here - maybe someone already has done this. :)

Any help, please?

Ps - motivation - The Apple's new policy, (blocking support for legacy Safari extensions), unfortunately caused that one of "must to have" Safari extension - Sessions - stops working in the Safari 12. So, looking for some home-grown functionality.

As I told in the above comment, now me using an self-developed automator workflow-app.

I'm an perl language developer, so in the workflow me using an custom-installed perl interpreter and many perl modules too - definitely NOT a solution for an average (common) mac user.

But posting it, mainly for reference and maybe someone could hack it to some better solution. How it works - how to use it:

unfortunately it must be run manually - i'm unable figure out how to run some automator workflow (service or app) when the Safari receives the quit event. :(
The automator (service) script has two actions:

run javascript (I don't know applescript nor Javascript, but the javascript is more understandable for me) - it simply gathers all URL's from all tabs and windows and create a JSON structure, which is passed to the next
run a shell script - which runs my perl script with custom installed perl interpreter.

when the app is executed, it saves an HTML file into the folder Sessions in my Desktop.
The name of the file is like s20190107-164908.html e.g. the current date-time string.
it is easy to use the Finder's quick-look feature (spacebar) to quicky check the content of the file.

It is far-far beyond of the original Sessions addon, but it is usable for me.

The full content of the above actions are:

1.) the Javascript

function run(input, parameters) {
    var tablist = [];
    var Safari = Application('Safari');
    Safari.includeStandardAdditions = true;
    Safari.activate();
    var windows = Safari.windows();
    for(let iw=0, wsize=windows.length; iw<wsize; iw++) {
        var wintabs = [];
        var tabs = windows[iw].tabs();
        if (!tabs) continue;
        for(let it=0, tsize=tabs.length; it<tsize; it++) {
            if( tabs[it].url() ) {
                wintabs.push( {"name": tabs[it].name(), "url": tabs[it].url()} );
            }
        }
        if( wintabs.length ) {
            tablist.push(wintabs);
        }
    }
    return JSON.stringify(tablist);
}

and the shell script

export ANYENV_ROOT=/opt/anyenv
export PATH="$ANYENV_ROOT/bin:$PATH"
eval "$(anyenv init -)"

perl -MJSON -MPath::Tiny -MTime::Piece -M5.014 -w -E '
    my $jsonstr = do { local $/; <STDIN> };
    my $j = decode_json($jsonstr);
    my @lines;
    lsay("
");
    for my $w (@$j) {
        lsay("

");
        for my $t (@$w) {
            my $astr = "
{url}\">$t->{name}
";
            lsay($astr);
        }
        lsay("

");
    }
    lsay("
");
    my $sessdir=path( $ENV{HOME}, "Desktop/Sessions");
    $sessdir->mkpath;
    my $sessfile=$sessdir->child(localtime->strftime("s%Y%m%d-%H%M%S.html"));
    $sessfile->spew_utf8(@lines);;
    sub lsay { push @lines, $_ for @_ }
'

Example what do you see in the quick-look:

As I already told - it is NOT a solution for an common user. It is usable only by an developers... :(


Programmatically send text message through Messages app on OS X 10.10 With OSX 10.10 you can now send and receive text messages through your phone, from your mac. Is it possible to do this programatically? Either via applescript or a reverse engineered API?

Using:

tell application "Messages"
    get name of every service
end tell

I noticed that I have "SMS" as a 4th option (yours may be different). So then I used:

launch application "Messages"
tell application "Messages"
     activate --steal focus

     set targetBuddy to "12345550123"
     set targetService to id of service "SMS"
     set textMessage to "Just a test"

     set theBuddy to buddy targetBuddy of service id targetService
     send textMessage to theBuddy
end tell

This lets me send a text message over SMS Relay. I'm not 100% sure that I did this correctly, but it does work if targetService points to "SMS". Now to convert it to script that works from the terminal.


How can I stop my device open being reset to iPhoto When I plug in my Camera (Toshiba Camileo H20), it always opens in iPhoto. Because I want a little more control over the import process, I would like Image Capture to be the default app for it.

When I open up Image Capture to change the 'connecting this camera opens' drop down, and select another app, as soon as my mouse has left the selection, it reverts back to iPhoto. This is regardless of which other option I select.

The computer is an iMac 2009, with OS X 10.6.5 (Snow Leopard), and Image Capture v6.0.1 (428). The Camera is connected via USB, and appears in Image Capture as 2 Mass storage devices (internal + the card). The card device (2nd) is exhibiting this problem, the first device does have Image Capture set as its default when connected.

Other notes - each device now has a different name (Not just NO NAME for both).

How can I stop Image Capture reverting my choice for behaviour when the camera is connected?

Image Capture and iPhoto have cache locations to store the status of pictures and camera roll information for each device. It's likely those preferences and databases are corrupt.

If you have a recent backup, you might try quitting the apps and cleaning some of these by moving them to the trash:

~/Library/Preferences/ByHost/com.apple.Image_Capture*
~/Library/Caches/com.apple.iPhoto/Cache.db

Without emptying the trash you can reboot and test to see that it fixes the issue and doesn't cause other issues before emptying the trash. You can quit the apps and move things back if it causes you issues - but these should be regenerated from a normally working system (and yours is either slightly confused or potentially not working so well)


How to connect MacBook Pro to an iMac with a 3rd party keyboard? I was following the instructions here:

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

which say to press CommandF2 and that works fine when I use my Apple keyboard. However, I want to connect my Apple keyboard to my MacBook Pro so I wanted to use some other keyboard to enable target display mode (i.e display my MacBook Pro on my iMac).

I obviously opened the keyboard viewer on the imac to make sure I am pressing CommandF2 and I am. However, it still doesn't allow me to connect my MacBook to my iMac.

The instructions on that support page do not really suggest how to fix them though they do have a list of things to be done. I tried all the F1,...etc.

Anyway, is there a way to connect my MacBook Pro with a 3rd party keyboard?

I did noticed that despite me pressing F2 on the Mac keyboard the keyboard view did say I did press F2 but in the Mac it DOES say I press CommandF2 on the keyboard viewer. Odd.

Some instructions on that page if CommandF2 doesn't work:

  If Command-F2 doesn't work If your iMac doesn't
  switch to Target Display Mode when you press
  Command-F2, check these things:

  Make sure that the iMac you're trying to use as a display supports
  Target Display Mode.  Target Display Mode works only when your primary
  Mac is logged in to a macOS user account. For example, if your first
  Mac is at the FileVault login screen, pressing Command-F2 on your iMac
  does not enable Target Display Mode. You must first log in to your Mac
  (using a regular display, if necessary) before you can use an iMac in
  Target Display Mode. Make sure that you're pressing Command-F2 on the
  keyboard that's connected to the iMac you want to use as a display. In
  Keyboard System Preferences, if the checkbox is enabled for "Use all
  F1, F2, etc. keys as standard function keys," the key combination
  changes to Command-Fn-F2. Make sure that your Mini DisplayPort or
  Thunderbolt cable is connected to both computers. If you're currently
  logged in on the iMac you want to use as a display, try logging out to
  return to the login window. Then press Command-F2 again. Some older
  Apple keyboards and third-party keyboards might not allow Command-F2
  to toggle display modes. If this happens, use the keyboard that came
  with your iMac to toggle Target Display Mode on and off.  If your iMac
  is currently started up in Windows, it won't enter Target Display
  Mode. Target Display Mode isn't supported in Boot Camp.

Technically speaking, you're not pressing F2 (yes, it's labeled "F2), you're actually pressing "Brightness Up."  To actually get the "F2", you have to press fnF2

You can confirm with with a utility called xev which will display the scan codes of what you're typing.  The actual "F2" comes up as scan code 128 and will do so on both your Apple (when pressing the fn) and Dell keyboards.

Since you've already tried turning off "use all F1, F2, etc. keys as standard functions keys", your keyboard doesn't support this.  You most likely need an Apple keyboard or at minimum, a keyboard with "enhanced" function keys; with a fn to change the function.