Directory highlighted in terminal I just enabled coloring for ls command but for some reason few directories are highlighted, which bugs me because I don't know why.

Could someone tell me how to disable it or why they are highlighted?

ls -l ~/:
drwx------   3 hungig  staff   102B Oct 20 14:06 Applications/
drwx------+ 12 hungig  staff   408B Apr  6 13:23 Desktop/
drwx------+  9 hungig  staff   306B Apr  6 23:24 Documents/
drwx------+ 14 hungig  staff   476B Apr  6 22:38 Downloads/
drwxr-xr-x   6 hungig  staff   204B Mar 27 16:59 IdeaProjects/
drwx------+ 67 hungig  staff   2.2K Jan  5 19:27 Library/
drwx------+  5 hungig  staff   170B Jan 28  2016 Movies/
drwx------+  4 hungig  staff   136B Jan 26  2016 Music/
drwx------+  5 hungig  staff   170B Feb  4 16:21 Pictures/
drwxr-xr-x+  5 hungig  staff   170B Jan 26  2016 Public/
drwxrwxrwx  16 hungig  staff   544B Mar  6 12:28 Qt/

Env variables of interest

export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$
export CLICOLOR=YES
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'

The (background and foreground) color of the folder Qt in your ls output is determined by the last two pairs in your ls color scheme: ExFxBxDxCxegedabagacad because it's world writable.

drwxrwxrwx  16 hungig  staff   544B Mar  6 12:28 Qt/
        ↑↑
        |but no sticky bit (a sticky bit would be indicated by a "t")
        world writeable

The last (=11th) pair colorizes directories writable to others but without sticky bit. The color scheme as indicated by your LSCOLORS env variable is a=black foreground and d=brown background. To set it to your default directory color simply change it to ...Ex.

Applying the posted color scheme (PS1 & LSCOLORS and assuming user Davos Doe = user Hung Hoang, who posted the scheme as well as the ls output in an answer, which got deleted and is visible to users with a reputation of ≥ 10,000 only) in a default Terminal shell I get almost completely different color effects though.


Recovering an accidentally deleted  folder in OSX - no Time Machine or backup available I am a longtime Windows user, recently switched to Mac. I replaced folder with another folder (they had the same name) thinking that OS X will merge the contents of both folders. But OS X deleted the original folder and replaced it with the new one. Windows merges both the folders (I do this often in Windows). I have now lost hundreds of files. I haven't enabled Time Machine. I've tried using Finder's Undo, but that doesn't work.

Currently, I am trying to recover my data using photorec. It shows estimated time as 7 hours, 31 minutes. Does anyone know any free data recovery software that's faster and more powerful?

Data Rescue is a long time favorite for undeleting files. It is not free, but you can download a free trial to see if the folder and files can be recreated before deciding to pay for the software or seeking professional recovery.

Similar to Windows, OS X doesn't wipe the files but instead marks the directory entries as free. As long as the files do not get overwritten (say you powered off the Mac immediately after the error was performed) you should get most of the files back. It all depends on chance that the system didn't overwrite the files as part of the normal shutdown process.


How to filter out only searchable PDFs from amid a myriads PDF files? I have a folder containing only PDF files from amid which some are searchable PDFs (OCR'ed scanned documents). There are almost 6000 PDF files in the folder and I need to filter out (copy/move to another folder) only the searchable ones.

How can I achieve this, please?

Can you just use the finder search, and search for 'the' (or another search term that is guaranteed to be in every searchable pdf). Then just copy those files to another folder.

Just pick a term that doesn't appear in the filenames of the other files.


Reboots hang. Cold Starts Boot on iMac 27" i7 (Mid 2010) I've been having a problem with my iMac i7 (mid 2010) for quite awhile. Any kind of restart from a software update, or a user selected restart, causing the iMac to get stuck on the restart gray screen with the rotating loading "carat."

If I power down the machine, then turn it back on it, it boots up fine.

Internal hard drive checks out fine.

I took it to the Apple Store Genius bar, and they could not find anything physically wrong with it, and blamed it on a problem with my user (software), thinking since the OS has been transferred over from several previous machines (an iMac G4 and then a PowerMac G5), that something PowerPC is causing the freeze.

I've tried doing a verbose mode, but not seeing anything.

Any ideas on how to further diagnose this and ultimately fix it so I can restart without having to power down and then back on?

To further diagnose the problem I would try creating a 2nd user account to log in with, while also disabling any kind of automatic log in if that is enabled for your normal account. This could be used to see if it is something specific to your user account.

Test to see if the machine can restart from the login window or the other user account.

If it does then there is a User account problem occurring, and you can try to manually locate what the problem is by doing manual house cleaning tasks.

If the problem still persists I would try seeing if when you boot your mac into Safe Mode and see if the problem still exists.

  To start up into Safe Mode (to Safe Boot), do this:

  Be sure your Mac is shut down.
  Press the power button.
  Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
  Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).

If it goes away then there is some kind of third party driver, etc that may be causing the issue. See more information on what Safe Mode does to find out where to look to troubleshoot next.

If all else fails a very good solution in this case is to backup everything to an external drive, and then do a clean install of OS X. Then you can import just the files you need using Migration Assistant or manually.


Importing text into PowerPoint drops all text into a single field instead of multiple slides The most detailed "how-to" that I could find https://www.ellenfinkelstein.com/pptblog/import-text-from-word-or-notepad/ tells us to

Open a Word or Notepad document.
Type the content if you haven’t already done so, following the guildines below.
Make sure each line, whether for a slide title or bulleted text, is on its own line. There should be no blank lines, because   these come in as blank slides!
For each slide title, format the line as Heading 1 in Word or just type in Notepad.
For each line of bulleted text, format the text as Heading 2 in Word or insert a tab in Notepad
For each line of indented bulleted text, format the text as Heading 3 in Word or insert 2 tabs in Notepad
Save the file as a .docx or .txt file.

I have followed those steps:

I added  some text that starts like so: (note that the left indents are one or more tabs):

Core Stats Concepts and Procedures
Let's get warmed up: Basic Descriptive Statistics
    Define:  N === |X|
    Population Mean:  Sum(X_i)/N
    Sample Mean:  Sum(S_i)/N
        for S_i member of X
    Population Standard Deviation:  Sqrt( Sum(X_i- mean(X))^2 /N)
    Sample Standard Deviation:  Sqrt( Sum(X_i- mean(X))^2/(N-1))
Warming Up: Additional Basic Descriptive Stats
    Mode: the most common observation(s)*
        *May be more than one observation with same cardinality
    Order Statistics : Statistics based on Sorted observation values
        Min   Smallest observation
        Median   "Middle" Observation
            Simple enough if N odd
            If N even then might be taken as the average of the (N-1)/2 + (N+1)/2 observation values
        Max   Largest Observation
    Quartiles: Expands on the Order Statistics:
        The Order Statistics
            Plus
        (0th Quartile: The min value)
        1st Quartile: The (approx) 25 percentile of  observations
        2nd Quartile: Same as Median
        3rd Quartile: The (approx) 75 percentile of  observations
        (4th quartile: The max value)
        Inter-Quartile Range:  The difference between 3rd Quartile and 1st Quartile values
        ** Show example**

The result?  Everything is put into a single textbox on a single slide with centering on each line and an overly large font.

This has been attempted about ten times with the same result.  Any pointers?

I am on Microsoft PowerPoint for Mac version 16.12 (2018)

Apparently PowerPoint requires DOS formatted lines crlf even on Mac (how lame ..) So preprocessing via unix2dos <myOutline.txt> did the trick.


unable to create partition on free space using disk utility Running 10.13.4 on a MBP with 750GB SSD.

The problem
i started with a single APFS container that spanned the whole 750GB of the internal SSD disk. Only half of it was in use so i decided to free the unused half and use it to create an additional APFS container (for reasons, please see below). I ran the diskutil resizecontainer command to free the space and that succeeded. I then ran disk utility guy and selected the whole disk and then partition. This shows the free space and the existing APFS container. I was hoping that when i click on the free space i would be able to partition it and go from there but the add functionality (+ sign) is greyed out as are the partition information details. Why is that? Is there a way to regain access to this free space and assign it to a new partition without zapping the whole disk and starting again? Pictures below.

Why I want to create extra APFS partitions.
I see lots of admonitions to only create one APFS container as APFS is designed to share space and volumes will grow and shrink and you don't have to worry, etc. But i also see that 'your startup disk is filling up' is quite a common occurrence after a while. Seems to me that the solution to that is to ring fence the space that your startup disk is sitting on so that the rest of the disk can fill up without any risk to the system. I have no control over the creation of the 'Macintosh HD' volume (or the other 3 volumes that are created at install) and it seems that once an APFS volume has been created there is no way to resize it.The best I can hope for is to resize the container of the startup disk and use the free space to create an additional APFS container which will then house the user data.

Thanks in advance.

diskutil apfs list before i started

diskutil list before i started

diskutil list after resizecontainer shrinkage

Disk Utility GUI showing free space and + button as well as Name, Format and Size fields greyed out

Both the Disk Utility application and diskutil command do not allow free space to be converted to a new partition. Instead, you are suppose to create new partitions by splitting an existing partition.

So first of all, enter the command given below to reclaim the free space to the existing APFS partition.

diskutil apfs resizecontainer disk0s2 0

Open the Disk Utility application and highlight the container disk1, then click on the Partition button. You should get an image similar to what is shown below.

Next, click on the Partition button in the popup window. You should get an image similar to what is shown below.

Click on the +button, then enter a name. I chose Macintosh HD 2. Make sure the format is APFS and the size is 350 GB. The result should be an image similar to what is shown below.

Next, click on the Apply button. You should get an image similar to what is shown below.

Next, click on the Partition button in the popup window. The result should be an image similar to what is shown below.

  Note: The Disk Utility application may show incorrect results. You may need to quit and reopen the Disk Utility application to see the correct results.


Scroll lock on USB keyboard does not enable scroll lock I have a Windows keyboard that attaches to a KVM that I use to control my Macbook Pro and my desktop. Pressing scroll lock twice on the KVM switches between the two computers. On the Macbook scroll lock is mapped to the decrease brightness button, and pause/break is mapped to increase brightness. I can switch between the two machines, but the screen changing brightness is a bit of an annoyance.

Is there a way to map the scroll lock button to using scroll lock on just the USB keyboard?

Take a look at Karabiner.  It isn't very user friendly for this level of customization but it has amazing power and flexibility.

The PrintScreen, Scroll Lock, and PauseBreak buttons are actually F13, F14, and F15.  You would have to configure the custom private.xml with something like this.  In this example, it will remap F14 (the Scroll Lock key) to nothing but only on a Microsoft Sculpt keyboard.  It will continue to be the same on the MacBook's keyboard.

<deviceproductdef>
  <productname>SCULPT_ERGONOMIC_DESKTOP</productname>
  <productid>0x07a5</productid>
</deviceproductdef>
<item>
  <device_only>DeviceVendor::MICROSOFT,DeviceProduct::SCULPT_ERGONOMIC_DESKTOP</device_only>
  <name>Disable F14 on external keyboard</name>
  <identifier>private.external.disable.f14</identifier>
  <autogen>__KeyToKey__ KeyCode::F14, KeyCode::VK_NONE</autogen>
</item>

Read thru the docs regarding the device definitions and how to add your own if it isn't in the predefined list, as I've done in the example above.

The KVM switch will still detect the double Scroll Lock keypress and switch between systems.


Reset Safari from command line I accidentally navigated to one of those sites that pops up a dialog telling me that my computer is infected. Upon clicking the OK button, that dialog reappears, ad infinitum.

I cannot close the tab or otherwise interact with Safari while the dialog is up. No matter how many times I Quit or Force Quit (and no matter how many times I tell Safari "Do Not Re-open Windows") the previously-open set of tabs always reopens and this dialog pops to the fore.

How can I delete the state of things while Safari is closed?

From http://seanscus.blogspot.com/2012/08/completely-reset-safari.html

Open a terminal and enter the following commands to fully wipe out all of your old Safari settings:

mv ~/Library/Safari ~/Desktop/Safari-`date +%Y%m%d%H%M%S`; \
rm -Rf ~/Library/Caches/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery; \
rm -Rf ~/Library/Caches/Metadata/Safari; \
rm -Rf ~/Library/Caches/com.apple.Safari; \
rm -Rf ~/Library/Caches/com.apple.WebKit.PluginProcess; \
rm -Rf ~/Library/Cookies/Cookies.binarycookies; \
rm -Rf ~/Library/Preferences/Apple\ -\ Safari\ -\ Safari\ Extensions\ Gallery; \
rm -Rf ~/Library/Preferences/com.apple.Safari.LSSharedFileList.plist; \
rm -Rf ~/Library/Preferences/com.apple.Safari.RSS.plist; \
rm -Rf ~/Library/Preferences/com.apple.Safari.plist; \
rm -Rf ~/Library/Preferences/com.apple.WebFoundation.plist; \
rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginHost.plist; \
rm -Rf ~/Library/Preferences/com.apple.WebKit.PluginProcess.plist; \
rm -Rf ~/Library/PubSub/Database; \
rm -Rf ~/Library/Saved\ Application\ State/com.apple.Safari.savedState


Migrating old Xcode project to version 4.3 Today I moved to the latest version of Xcode (4.3). I tried to open an old project and when I try to launch the iOS simulator it returns me the following error:

Xcode cannot run using the selected device.

No provisioned iOS devices are available with a compatible iOS version. Connect an
iOS device with a recent enough version of iOS to run your application or choose an iOS
simulator as the destination.

I also tried to create a new project and there I am able to launch the simulator.

How can I fix this problem and run all my old projects again?

Thanks!

The problem is that Xcode 4.3 ignores the schema you had selected in older versions, and automatically sets it to run on device for iOS projects. Since you don't have an eligible device attached to your computer, you get this error. The fix is simple. In the toolbar, click on the menu which says iOS Device and choose one of the simulator options instead.


How to fix a Macbook Pro (late 2013 model) with liquid damage? I bought a refurbished 13" Macbook Pro (late 2013 model retina) from the Apple store website in Sept 2014. It worked great till last month, when I had some water leak out in backpack and get through the ports in the Macbook.

I believe it has affected the logic board which connects the power port to the battery. When the system is plugged into the power adaptor, it works normal. But, as soon as the power adaptor is unplugged, the laptop shuts down as battery charge can't get going. The diagnostics are showing that the battery should be replaced.

I took the laptop to the Genius Bar and was told that there is a flat fee for liquid damage repair - $795. I bought this refurbished laptop for $1300 and paying $795 seems quite expensive. I can continue to use it with the power plugged in, but it reduces its usability considerably. Also, once in a while the power cable gets disconnected shutting down the system unexpectedly.

I called my renters insurance as well, but they did not cover the claim. I may have to just bite the bullet and get it repaired, but I was wondering if anyone has any suggestions on if there are any other options that I have to fix this?

I would say that you would need to go ahead and use the Genius Bar option to repair your computer.

My reasoning is that water damage can cause errors in strange ways that, upon first glance, seem to be straight forward, but are in fact impossible to properly diagnose without professional diagnostic equipment. For example, in your case, I doubt that the problem actually lies in the battery. Rather, the water damage may have caused a part somewhere along the battery-charge monitoring path to fail rather than the entire battery, but that is simply conjecture.

For that $800, a trained technician will take apart the entire Mac and inspect each piece for corrosion and/or liquid damage. Each will be repaired and replaced and then the computer re-assembled and tested and a warranty will be issued for the work. Typically 90 days or the remainder of the existing warranty if any. Local regulations might extend these as well. The only reason this doesn't cost much more than the new Mac is that the parts are not all scrapped and some have repair / reuse value to Apple and they can pass the savings on to you.

Definitely not what you wanted to hear, but I hope this helps.

Caveat: if you can pinpoint that the battery - and only the battery - is the issue without a shadow of doubt, replace it yourself; it will be much, much cheaper.


Mac renames itself automatically - host name is incorrect in terminal I've got a handleful of macs (all with unique names) and on occasion it prompt a notice about saying another computer on the network as this name and adds a (2) or (3) to my mac.

How can I set the host name from the command line?

Yes you can :

sudo scutil --set HostName "YourHostName"
sudo scutil --set LocalHostName "YourLocalHostName"

to change the computer name :

sudo scutil --set ComputerName "YourComputerName"

To check if everything is okay : sudo scutil --get HostName


How to install Windows 8.1 on MacBook Pro from USB? I'm on a 2011 MacBook Pro trying to install Windows 8.1 from a USB. I tried creating bootable FAT32 and NTFS USBs from my Windows ISO with Rufus, but still I don't see anything in Startup Disk in Windows or OS X:

Update 1:

Attempted to write ISO to USB with Disk Utility in OS X, but it wouldn't let me select the ISO (see JeremyKun's comment).

Update 2:

Managed to write the ISO to USB with dd in OS X, but still I don't see it in Startup Disk.

Non-retina display MacBooks cannot boot anything other than OS X from a USB flash drive.  It's a limitation in the firmware.  Apple fixed this with the retina models because they have no optical drive, meaning USB is the ONLY way to install Windows.  On a retina display MacBook, the Boot Camp assistant even makes a USB flash drive for you the same as Rufus does.  However, they never backported this fix to non-retina models (and the Boot Camp assistant on non-retina models does not have the USB option).

The only way to boot a USB stick for the purpose of installing Windows is to use rEFInd and bless the rEFInd directory as your startup folder (which itself must be done from the command line as the Startup Disk control panel won't even show it as an option).

rEFInd will then take over the boot process and will allow you to boot to USB media.  If you don't like rEFInd you can remove it after Windows is installed.  You will then see Windows and OS X as options in the Startup Disk control panel.

Here is a link to the rEFInd home page, and here's how to install and bless the rEFInd directory.

NOTE:  Use Disk Utility to create yourself a FAT-formatted partition on the disk BEFORE you attempt to install Windows.  This will create the hybrid MBR that Windows needs to boot.  You can reformat it NTFS during the Windows install.  I you already have an NTFS partition (as your screenshot above shows), you can skip this step as you already have the hybrid MBR created.


Screen Sharing with Multiple Monitors I'm connecting to a work VPN through cisco anyconnect and remoting into my work computer via Mac's native Screen Sharing.

My work computer (iMac 2019) AND home computer (macbook pro 2014) both have dual monitors but I seem to only be able to view the remote desktop on 1 (either just the primary screen or BOTH work screens on the 1 home screen).

Question:  Is it possible to screen share a dual monitor setup on 2 monitors?

Thank you so much!

I had the same problem. The only work around I found was to duplicate the Screen Sharing application. Connect to your work computer with the first application, once connected launch the second (duplicated) application and it will give you a second window. You can then allocate one screen to each application window.


How do I get my purchased books in Mavericks iBooks? With the new iBooks for Mac I get all my books that I didn't buy in the iTunes store. But all books I did buy on the iTunes store, I don't get! When I go to the preferences and tell iBooks to sync purchases I just get a dialog saying, I need to authorize my Mac. But there is no hint on how to do that. How do I fix this?

In iBooks: menu 'Store' -> 'Authorize this computer'?


How to disable PDF editing in Preview app? I am running OS X 10.10, Yosemite, and there is one feature which really annoys me. I know it must be useful for a lot of people but it's just not for me.

When I open a PDF document and, by habit, I keep clicking on the text while reading it. There are some areas where Preview thinks I would like to insert text.

As soon as this happens, the PDF document is marked edited in the title bar. When I close the document, it saves (or tries to save) it, changing the modify date and other side-effects such as triggering the DropBox sync etc.

I have accidentally inserted some text in many documents because Preview doesn't ask before saving the modified copy.

I would like to disable all PDF editing features unless explicitly invoked. Is it possible to do that?

According to me, the best way to resolve this, is to go to System Preferences -> General.
Make sure "Ask to keep changes when closing documents" is selected.

This will prevent accidental changes in PDF files, as well as other files when opened by other apps.


Find and replace literal control characters Is it possible to replace control characters like newline and tab in Pages version 5.6.1?

I'm aware of How to use find and replace to replace a character with new line and the possibility of inserting literal characters in TextEdit by using option-return or option-tab but both those don't apply to current Pages version.

In my case I want to replace multiple newlines with a single one, I tried exporting the document to ODF and doing the replace with LibreOffice but the structure of the document is such that LibreOffice cannot correctly save it back.
Once the file with the replaced newlines is saved I cannot open it again, neither with Pages nor with LibreOffice itself.

Pages no longer supports finding and replacing "special" characters since version 5.1.

Just one of the features that disappeared not to come back again.


Why am I seeing captive portal requests on my home network? I have suddenly started getting prompts on my 2014 Mavericks MBP (10.9.5) every five minutes that bring up a page with HTML like the following:

<TITLE>Success</TITLE>Success

At the bottom of this modal window is a url:

http://www.apple.com/library/test/success.html

I am on my home network which uses an Airport Extreme running 7.6.4.  I did not make any known configuration changes to either my computer or my network.  Why am I suddenly seeing this page, which other posts suggest is a captive portal test?

I saw another question that demonstrated how to disable the Captive Network Assistant, but as I do take my computer to hotels that use these portals, I'm reluctant to jump straight to that.  Instead, is there something on my Airport that is generating/blocking these all of a sudden and it shouldn't be?  I tried a factory reset of the Airport and I'm still seeing this issue.

How can I configure my network so I stop getting these annoying popups?

The page has now been corrected, which should mean that the popup no longer occurs.


Reformatting disk with no partition map I have a 250GB hard drive that I tried to "burn" an ISO to (to make it bootable). Something went terribly wrong.This is what the disk looks like in Disk Utility (unmounted).

When I mount it, this happens.

I have tried formatting, erasing, verifying, and repairing the disk through Disk Utility and terminal's diskutil command, all to no avail. I have tried deleting the files contained on this hard drive (Windows boot folders/executables) using both the GUI and a sudo command in terminal with no luck. This is a partial output of diskutil list:

The drive is /dev/disk4.

I consider myself decently knowledgable in technology in general, but this problem has been very difficult. Can someone please help me? Please feel free to leave any questions or comments below.

Remove all external disks (just for safety reasons). If possible also remove all internal disks except the boot disk or "refresh" your backups.

The proposed command (dd) used improperly can be deadly for your data.

Open Terminal.app and get the disk identifier of the disk containing the DVD partition:

diskutil list

Unmount the disk:

#replace diskX by the disk identifier of the "DVD disk" you found previously
diskutil umountDisk /dev/diskX

Overwrite the first sectors of the disk with

sudo dd if=/dev/zero of=/dev/diskX bs=4096 count=8

This will zero the first 8 physical blocks (or 8 4k/64 512b logical blocks) of the partition and should remove any "DVD hints".

Open Disk Utility and try to erase/repartition the disk again.


If I buy Pages from the Mac OS app store, do I then have to buy it again in the iOS store? I'd like to not have to buy it twice.

Yes, you do. They are two entirely separate apps for two radically different devices.


AppleScript: trying to press "w" but getting "wa" I'm trying to press just 'w' but 'a' is pressed along with it.

osascript -e 'tell application "System Events" to key down (key code 13)'

How can I get AppleScript to just send the 'w'?

You're telling Applescript to send key down and key code 13.

Just use the following:

osascript -e 'tell application "System Events" to key code 13'


Restore Windows 8.1 System Image Backup to new Boot Camp partition I just got a new hard drive because the old one was going bad. I made a system image backup of the old Boot Camp partition and saved it to an external drive.

Got the new drive set up, with Mavericks, ran bootcamp and got a partition set up, installed windows 8.1 on it, and then tried restoring it from the image. When I get into the system restore I can choose the backup location, but the next step where you choose/format/partition the drive looks like it needs some kind of disk driver, but I don't know where to find a MacBook disk driver.

I'm hoping to restore so I don't end up having to reinstall everything.

if you already installed WIN8.1 how or why would you also restore a backup image as well?

it seems like that is what is going on based on "next step where you choose/format/partition the drive" would indicate an attempt to restore the backup image on the new WIN8 install partition. btw, did you use winclone?


How to safely do a factory reset, lend my iPad, then restore it? Someone wants to borrow my iPad2 and I'd like to

make a complete backup of it
do a factory reset
let my acquaintance generate their own AppleID and use the device for a day
after the device is returned restore my backed up snapshot and continue from where I was at the time of the backup.

Is this feasible at all? Would I need anything else for this beside iTunes plugged into a Mac?

that should work fine.

Do your full backup
Go into General -> reset ->reset all content and settings

This COMPLETELY wipes the IOS device so your friend will set it up as if it were new.

When you get it back ask him to do the same thing first, in case they set a password. Sometimes if you have a PIN set you have to enter that to wipe it.

But your scenario should work fine


No service on my iPhone In top left corner it is written that no service in settings the carrier name is wrong and when I select the carrier manually it says the network does not exist
P.s. I ported my sim to a new carrier few months ago and used it normally but now suddenly in the settings it shows my old carrier

Ask your carrier for a new SIM.
The firmware on them changes over the years, so yours may well be long out of date now.

[Knowledge source, recent similar issues & similar cure]
My phone would drop the carrier network every few days, with a message that 'if this happens frequently, talk to your carrier.'
I did, they sent a new SIM, it's not misbehaved since. The 'old firmware' explanation was theirs, over the phone, so I have no documentary evidence.


What happens when WhatsApp from an old phone is connected again? I‘ve got an old iPhone in my closet, which I used until one year ago, when I bought a new one.

On the old iPhone, I had WhatsApp with iCloud Backup enabled. However I did not include the videos in the backup.

When I got the new one, I set it up via iCloud backup, and continued my online life and history.

Now I do miss these videos. Now I‘m wondering what happens when I start my old phone which has these videos locally, and open WhatsApp. What will happen? What will happen to the backup? What will happen to the chat history? Is there a way I could like download the messages on my old phone (and be current) while still having the videos, then recreate the backup, turn it off and then having the videos on the new device, when restored from backup?

If you have a Mac, you can navigate to the following folder using terminal:

~/Library/Mobile Documents/

List all hidden files (from the terminal) to see a folder which looks like: 12HJ1123DHJ~net~whatsapp~WhatsApp, i.e. random alpha-numeric sequence ending with net~whatsapp~WhatsApp. cd into this folder.
Next, navigate into Accounts/<PhoneNumber>/backup from this folder.

Finally you'll be in a folder whose path which looks like this (check with pwd):

~/Library/Mobile Documents/12HJ1123DHJ~net~whatsapp~WhatsApp/Accounts/<PhoneNumber>/backup

Your chat backup and history is stored in this folder. (Hidden files, can be seen with ls -al)

-rw-r--r--@  1 pse  staff  177 Jun  2 17:20 .BackedUpKeyValue.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  159 Jun  2 17:21 .Backup.plist.icloud
-rw-r--r--@  1 pse  staff  174 Jun  2 17:20 .ChatStorage.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  165 Jun  2 17:20 .Document.tar.aux.icloud
-rw-r--r--@  1 pse  staff  162 Jun  2 17:20 .Document.tar.icloud
-rw-r--r--@  1 pse  staff  158 Jun  2 17:21 .GIFs.tar.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:21 .Media.tar.aux.icloud
-rw-r--r--@  1 pse  staff  159 Jun  2 17:21 .Media.tar.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:20 .Media_1.tar.icloud
-rw-r--r--@  1 pse  staff  168 Jun  2 17:20 .Ranking.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  168 Jun  2 17:20 .Sticker.sqlite.enc.icloud
-rw-r--r--@  1 pse  staff  162 Jun  2 17:21 .Stickers.tar.icloud
-rw-r--r--@  1 pse  staff  167 Jun  2 17:21 .Thumbnail.tar.aux.icloud
-rw-r--r--@  1 pse  staff  163 Jun  2 17:21 .Thumbnail.tar.icloud
-rw-r--r--@  1 pse  staff  167 Jun  2 17:21 .Thumbnail_1.tar.icloud
-rw-r--r--@  1 pse  staff  172 Jun  2 17:20 .UserDefaults.plist.enc.icloud
-rw-r--r--@  1 pse  staff  161 Jun  2 17:20 .calls.log.enc.icloud
-rw-r--r--@  1 pse  staff  177 Jun  2 17:20 .current_wallpaper.jpg.enc.icloud

You can make a copy of this folder (cp -r)

Technically these are just Apple binary property lists:

$ plutil -p .calls.log.enc.icloud
{
  "NSURLFileResourceTypeKey" => "NSURLFileResourceTypeRegular"
  "NSURLFileSizeKey" => 1411
  "NSURLNameKey" => "calls.log.enc"
}

The quest to find the actual data still goes on :-)


Why my iPhone 6s restore application and its user data by Internet even when I backup them by iTune? I got my iPhone 6s and transfered content from my old iPhone 5 by following Apple Support HT201269, and backup my iPhone 5 with iTunes. After I restored the backup to my iPhone 6s, it's seemed that 6s was reinstalling all my 3rd party Apps and restored its user data with Internet.

There are several questions that confused me:

Where is my Apps user data saved? In my iTunes backup or in my iCloud automatically? I found that all Apple's applications restored their data including settings, and some of 3rd Apps restored their user data, but some not. How does iTunes backup my all 3rd party Apps?
Whether or not I click "File > Devices > Transfer Purchases.", it seemed that iTunes backup would not save any app, and will re-download them from App Store after iOS restored. But I can find all my App backup in iTunes, it doesn't make any sense at all.
How can I backup all my Apps and all their user data from old iPhone to the new one? if I need always connect usb cable when iPhone re-download Apps?

If you backup to iTunes, then iTunes. If you set up iCloud backup, then iCloud. If you set up both, then both. Some 3rd party apps don't restore, as the developers may have specified that user files shouldn't be backed up.
iTunes keeps apps in a separate location than iOS backups. Apps don't get copied over each time you backup, as that would consume a lot of space
Backup your old device to iTunes or iCloud. Then when setting up your new iPhone, choose either restore from iTunes or iCloud (depending on which you backed up to).


Reduce file size of exported PDF from Notability app I use the Notability app for note taking in my iPad. I need to export one of my notes and upload it to a web site with file size restrictions (unfortunately I don't know the maximum size, but I have reason to believe it is 2 MB).

A 12-page-long note, consisting only of written text/mathematics and a single grayscale imported figure in one of the pages is taking up 10+ MB, which is frankly outrageous. Also, I'm pretty sure taking out the figure would make little difference; seems like the developers never paid attention to exported file sizes.

How can I reduce this to fit into my 2 MB budget?

Ideally I'd like to flip a switch inside Notability itself which reduced the export file size, but I don't think anything like that exists.

Otherwise, I'm looking for free tools which would help me reduce the file size. EDIT: online tools are not a possibility, as I can't run the risk of my file being stored and later distributed somehow.

I've already tried exporting a PDF from Preview.app with the "Reduce File Size" filter, which didn't make a difference.

Ghostscript fared a little better: gs -o out.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET in.pdf reduced the file size to 7 MB, but it's not enough for me.

ImageMagick's convert tool produced output that could be barely classified as readable, even at an alleged 600 DPI.

I also tried exporting JPEGs from Notability and concatenating them with Preview.app, which produced a 4 MB file size, still unsuitable for me (and also, I lose vector rendering, searching, etc. that way, which if possible I'd like to retain).

My best result until now was running this 4 MB file through gs -o out.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET in.pdf (note ebook instead of printer). It is readable, although visibly compressed, and takes up 1.3 MB. Lacking any other options, this is the file I'm going to submit, but I'm hopeful there's a better solution.

Any other suggestions?

Assuming your top priority is to minimize file size. You are going to have to sacrifice and switch over to an image format. Notability uses a vast amount of vectors in order to keep your handing writing sharp and readable at any size, so we will need to discard that information in favor of a simpler , less sharp jpeg file.

If you have photoshop, export all the files from Notability into an image format and bring them into your desktop to work on. Opening all the images inside Photoshop, use the “save for web” feature and select the absolute minimum of colors possible. I suggest 2 colors for the page (background & lines), and and 3-5 colors for pens (black, red, blue, green, is okay with dithering ).

This will allow you to create an image with minimal compression, at a sharper resolution.

If you have GIMP (free and open source <3): You can add an extension that gives you similar functionality to that of Photoshop’s “save for web” function. Here is a guide to how to install and use its different options on TemplateToaster.com.

These are both options for bringing 1920x1080 images down to about ~<80 KB each with readable text and minimal compression.

Edit:

I thought I would include an example that I create with my own notes, exported to Jpeg directly from Goodnotes 5 (this works regardless of program). All images are at the native resoultion of 1668x2154

Below are the results you can expect to see.

On the right, are the original, straight from Goodnotes exported jpegs. On the left, are the images compressed down with the "save for web" plugin on Gimp.

Below are the options that I used for most of the pages, with the exception of pages with images, where instead the "use web-optimized pallete" option was selected. Note how there are only 5 colors.(page, page line, 2 pen colors, white text)

Using this option will retain all text sharpness from the original exported text. Below is difference in quality, on the left is the compressed image, and the right uncompressed.

This should answer your question. As previously stated, you cannot expect to maintain the .pdf format and submit your work under such a tight data budget. The size of all the files combined together in the first image is in relative to a normal folder with all the images inside. When .zipped, you can expect an even larger file reduction (depending of course on the level of compression that you select with something like 7zip). As I predicted in my orignal response, the average file size among the 13 pages is 76.38 kb, just 3.62 kb under.


Apple TV can't login to iCloud I have an AppleTV 3rd generation (A1469) that will not login to iCloud.  After entering the correct password I get

"Unable to sign in.  Could not communicate with server".

If I try the wrong password, it gives a different error saying wrong password.  My account has 2FA enabled.  I've read unofficial forum posts saying you need to use a "decorated password" which is your password plus the 6 digit 2FA code appended.  But in this case my iPhone does not show any notification about a login attempt.  I've already tried "Reset all settings" in the menu and it's running the latest OS 7.3.  Network test does not identify any problems.

It turns out this is what happens when you have 2FA enabled.  The solution is to get a verification code from an iOS device.  Then use this 6-digit code together with your password on the AppleTV.  So if my password is mypassword then I would enter like mypassword123456.

Settings > Apple ID > Password & Security > Get Verification Code


How to share photos from Photos.app to Flickr retaining title, description and tags? In the new Photos.app application, the export of photographs to other services is via the OS X extensibility feature. Sharing one picture to Flickr shows the picture's filename as the title and empty description and tags even though the pictures had these three fields filled in the 'Info' window. This metadata was exported fine with iPhoto which had its own sharing mechanism so this issue is either with Photos.app or with the extensibility feature of OS X. How can I upload pictures from Photos.app to Flickr without having to retype all the metadata for each one of them?

Nearly a year later you would expect Flickr integration to have improved. As of February 2016 I have the exact same experience. To investigate further I opened this forum thread:

https://www.flickr.com/help/forum/en-us/72157665235195925/


Should I get Windows 10, 32-bit or 64-bit? I have a MacBook Pro, macOS Catalina with 16 GB RAM and a 1.4 GHz Quad-Core Intel Core i5 processor and I want to download Windows 10 so that I can get games on steam that are only for Windows.
It’s giving me the option of the 32-bit download or the 64-bit download and I don’t know which one to choose...

It was answered in a comment, but you want the 64bit, else you can't allocate more the 4GB of RAM.


What does "Failed to open swapfile" mean and is it a problem? A couple of times a day my fans start spinning, ready for take off. The activity manager shows that Mail is eating up my CPU, 250% and more.

The console shows the following lines:

13-09-16 10:46:46,000 kernel[0]: Failed to open swap file 2
13-09-16 10:46:46,000 kernel[0]: vm_swap_create_file failed @ 42649 secs

And continues to do so for quite a long time. Is this a problem and if so how can I fix this?

OS Version: El Capitan 10.11.6

Hardware: MacBook Pro (Retina, 15-inch, Mid 2014), 16 GB RAM, 256 GB SSD.

This could mean a number of things and yes, I would be concerned about it. First things first, ensure you have a working backup.

My next suggestion would be to reset both the PRAM/NVRAM and the SMC to see if this changes your computer's behaviour.

Reset your PRAM/NVRAM

Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). Here’s how to reset your PRAM/NVRAM:

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

Note: When you log back in you may need to readjust some of your system preferences (e.g. mouse speed, time and date/timezone, etc).

Reset the SMC

Your computer's System Management Controller (SMC) can also be reset. The instructions for resetting your SMC depend on three things:

Does your device run from a built-in battery?
Does your device run from a removable battery?
Does your device just run off power from the wall?

Now, since I don't know what computer you're using, I will provide the process for resetting the SMC in all three scenarios. Just use the one that is appropriate for your machine.

For MacBook Pros, MacBook Airs, and MacBooks where you can’t remove the battery on your own (i.e. it's a built-in battery), here’s what you do:

Shut down your computer
Keep the MagSafe adapter (power cable) plugged in.
Press at the same time shift-option-control (on the left side of the keyboard) and the power button
Let go
Turn your computer back on with the power button.

For MacBook Pros, MacBooks etc that you can remove the battery from, here’s what you do:

Shut down your computer
Disconnect the MagSafe plug (power cable) from the computer
Remove the battery
Press the power button for 5 seconds and release
Put the battery back in
Reconnect the MagSafe cord (or power cable)
Turn your computer back on with the power button

For iMacs, Mac Pros, Mac Minis, etc that only run from a power point in the wall

Shut down your computer
Unplug it from the power
Press and hold the power button for 5 seconds
Plug it back in and turn it on.

Hope this helps. Please report back and let us know.


What is the __CHECKFIX1436934 environment variable? On OS X 10.9.5 my bash shell has the following environment variable set:

__CHECKFIX1436934=1

What is the purpose of this value? I am surprised there is no record of anybody asking this before.

It comes from launch services, specifically this binary

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices

and that environment variable seems to be inherited by many processes, as you can see with ps -Efax

1436934 looks like the number of digits in recent Apple "radar" bug numbers, so perhaps it refers to some value used internally for testing.


Associating Protocol handler in Mac OS X Many tools support an item link feature using protocol; with a given link, I can open the page with the tool that created it.

For example, I can open the DEVONthink page that I made:

open -a "DEVONthink Pro.app" x-devonthink-item://2AD2E3D2-58B5-455F-99D4-C91D68C5F959

Can I teach Mac OS X that the x-devonthink-item is the "DEVONthink" protocol to make the command like this?

open "x-devonthink-item://2AD2E3D2-58B5-455F-99D4-C91D68C5F959"

Protocol handlers are registered with OS X in application bundles (specifically, in the info.plist file in the bundle's Contents directory). This should be done by the application that supports it. In other words, you should be able to straight-up run the second command and have it open DEVONthink. Based on this page it sounds like that's how it works, but you say it doesn't, so there's a relatively easy way to do it for any program.

If not, or if you just want to register your own handler, here are some steps (modified from Launching External Applications using Custom Protocols under OSX).

Create an AppleScript file that contains the following.

on open location this_URL
    do shell script "open -a 'Applications/DEVONthink Pro.app' this_URL"
end open location

On the second line, you are defining what should happen when your protocol is called. this_URL will be the full URL entered (on the command line or elsewhere), including the protocol. In your case, you want to pass the whole URL including x-devonthink-item into DEVONthink. If you were creating your own protocol, you might only want to pass part of the string, so keep that in mind.

Save the AppleScript as an Application bundle. Once saved, find it on disk, right-click on it, and choose Show Package Contents. Inside the Contents folder there will be a file called info.plist. Open this in a text editor (not TextEdit, as it will almost certainly screw up the file format).

At the bottom of the file will be

</dict>
</plist>

Directly above this, add the following:

    <key>CFBundleIdentifier</key>
    <string>org.personal.dttrick</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLName</key>
            <string>Pass To DEVONthink</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>x-devonthink-item</string>
            </array>
        </dict>
    </array>

Save and double-click on your app. Nothing should happen, and that's fine - but in the background, it's registered the protocol with the OS.

Finally, back in Terminal, run your desired command:

open "x-devonthink-item://2AD2E3D2-58B5-455F-99D4-C91D68C5F959"

DEVONthink should open with the specified item. I don't have DEVONthink and couldn't test it; I am relying on the command you originally provided as working. If not, you'll need to modify the shell script in the AppleScript to reflect what the actual command needs to be.


Appleworks USB Incompatibility I am running OS X 10-6.8 on a 2007 iMac and have noticed lately, that whenever I run Appleworks, the USB string seems to be dead.  I have not found a way to re-activate the USB short of Restart.  Is there a better way to get USB working again?

I feel I have to stay with 10.6.8 as I have a ton of documents that don't port easily to other software.  I have not found an integrated word processing/database/drawing program. Nor have I found a set of apps that will talk to one another like Appleworks is able to do.  I know I can buy individual apps such as Word, Filemaker, and some version of a drawing program, the they cost big $$$.

Meanwhile, if I run Appleworks and want to run the scanner or connect my camera, I have to restart or shutdown/restart before the USB devices will work.

kennyS

Appleworks and 10.6.8 was working with USB before, then stopped working, correct?

These are the trouble-shooting steps I'd go through for your USB problems:
-- Try backing up and deleting the Appleworks preferences file
-- Try a different USB Port
-- Remove USB devices one by one to see of one device is the problem.  -- Try a different USB "string" (cable? / thumb drive?)
-- Repair Disk Permissions  - http://support.apple.com/kb/HT1452
-- Reset PRAM - http://support.apple.com/kb/PH6478
-- Update or Reinstall Appleworks


YouTube won't accept login/account I've upgraded my apple tv to ios 5.1 only to have it now reject my youtube login.  I've previously had this same Apple TV login just fine, but I accidentally hit log out.  It just gives me the "This account can not be used with Apple TV" error.  I've tried multiple login types.

Youtube Username
Google Email Address
Normal Password
2 Factor Auth Password (after entering the normal password first and it failing, hoping to trigger the 2 logins required for Google sometimes)
I even created a brand new YouTube account without 2 factor auth and it does the same thing.  Using a simple password even.
Reset All Settings on the AppleTV
Tried a restore, but it failed. I plan to try another one, but dread hooking it up to iTunes.

I'm on my last attempt and I feel it likely won't work.  Any ideas?  Anyone willing to logout and try to replicate ;) ?

Turns out the entire youtube app wasn't able to connect at all. No Featured Videos or anything. Makes sense why it couldn't log in. I ended up trying multiple reboots and nothing working. A full restore fixed it though. Annoying.


`createinstallmedia` fails to create bootable volume for some Macs I’m using the createinstallmedia utility to create a bootable volume on an external 4TB USB drive. This drive has 6 partitions (some encrypted) on it, all of them are JHFS+, 1 is being used as the boot volume.
The drive successfully boots a MacBook Pro 2015. When holding down the option key during startup, I can see the external drive and successfully boot from it.
If I try to boot a Mac Mini 2012 using the same process, I don’t see the external drive. If I try to set the startup volume using System Preferences > Startup disk, the drive appears as an option, however upon restart, it fails to boot from the external volume.

Here’s the odd bit. If I format the drive as a single 4TB volume, use createinstallmedia to make it bootable, it will boot the Mac Mini 2012. If I then resize the drive using Disk Utility, create some partitions, both normal and encrypted, it still boots the Mac Mini. If I then use createinstallmedia again over the top of the existing boot volume, it no longer boots the mac Mini. It will boot the Mac Book Pro.

I have a limited knowledge of bless, but tried bless --folder "/Volumes/EXT/System/Library/CoreServices" --bootinfo --bootefi as per the man page. No Success.

I also tried reducing the amount of partitions, from 6 to 5. That ended up booting the Mac Mini. Curiously, adding the 6th partition back again gave a successful boot, where the previous 6 partition configuration failed.

Ideally I’d like to be able to easily use createinstallmedia to create an install drive for different versions of macOS, 10.11, 10.12, 10.13, across different hardware, from this 4TB drive.

Has anybody else come across these kind of issues with booting from a 4TB drive?

I just experienced a similar, though non-identical, issue with my own 2012 Mac Mini which failed to start-up from a bootable High Sierra installer on a 64GB multi-boot flash drive. The drive is formatted with bootable installer partitions for 10.6/10.8/10.9/10.10/10.11/10.12/10.13/blank. I, too, was able to view all the partitions as start-up drive options, but the Mini refused to actually boot from any of them. And recovery mode’s reinstaller was forcing the internal start-up SSD to reformat as AFPS, which I did not want. I put the Mini in target disk mode & connected it to my MacBook Air & the Air to the flash drive & used Terminal on the Air to install HFS+ High Sierra on the Mini. So, my take is that the issue is likely not related to details of the boot drive or its partitions but to something innate in the 2012 Mac Mini, itself.


How to switch Karabiner profile via shortcut? Is there a way to change the Karabiner profile (formerly KeyRemap4MacBook) using a shortcut?

Yes, there is, using Karabiner's command-line tool. Paste this into your private.xml:

<vkopenurldef>
    <name>KeyCode::VK_OPEN_URL_SHELL_switchprofile_newitem</name>
    <url type="shell">
        <![CDATA[    /Applications/Karabiner.app/Contents/Library/bin/karabiner select_by_name NewItem    ]]>
    </url>
</vkopenurldef>
<item>
    <name>Switch Profile to NewItem with F4</name>
    <identifier>private.switch1</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::F4,
        KeyCode::VK_OPEN_URL_SHELL_switchprofile_newitem
    </autogen>
</item>

Obviously, you will need to change the name of the profile (here it is NewItem).

If you want to toggle between them with a single hotkey, paste it twice and change the name, then check the box for the profile you want to switch to on each one.


iTunes opens directly to music, not the store When I open iTunes it opens directly to the store. How do I set iTunes to open to my music?

Note: I am running Windows XP

iTunes opens to the last page that it was at before it was last closed. To set it to open to your music, make sure that that's the last page that you view before closing iTunes.


Power off block devices I would like a way to shut down the block devices to do safe removal by turning them off. On Linux there is the UDisks2's udisksctl power-off -b /dev/sdX command. Is there something similar? Or if you know a library to use to create a script that can do this.

umount will unmount a block storage device. Once the device is unmounted, it is safe to remove/unplug it. There doesn't appear to be a udiskctl for macos.


Check the battery level of connected bluetooth headphones from the command line I am trying to check the battery level of my wireless headphones from the command line.  I came across a few discussions, and it seems all I need to do is enter the following:

ioreg -c 'deviceName' |grep -i batterypercent

I tried this command using "Powerbeats Wireless" and "bluetoothaudiod" for the 'deviceName''s, but neither returned the batterypercent. I tried ioreg -c bluetoothaudiod |grep -i battery to get general information about the battery, and get this as a response:

| |   +-o AppleSmartBatteryManager  <class AppleSmartBatteryManager, id 0x100000250, registered, matched, active, busy 0 (0 ms), retain 7>
| |     +-o AppleSmartBattery  <class AppleSmartBattery, id 0x100000252, registered, matched, active, busy 0 (0 ms), retain 6>

If I connect the headphones to my iPhone, the battery level immediately pops up on the toolbar.  This leads me to believe that the device is broadcasting battery level, and that I should be able to access this information from my computer.

How can I check the battery level of my bluetooth connected headphones?

Edit:

Initially I thought the issue was with the device name, but it seems "Powerbeats Wireless" and bluetoothaudiod work interchangeably.  Just can't figure out how to access the batterypercent param.

Edit 2:

Looking at the Bluetooth docs, it seems there's a Battery Service which exposes the Battery State and Battery Level.  The Battery Level can be read using the GATT Read Characteristic Value sub-procedure, so I need to figure out a way of interfacing with this service from the command line. I have a feeling batterypercent may only be coded for standard peripherals (trackpad, mouse, keyboard), as all battery monitoring widgets I've tried are only compatible with such devices.

Edit 3:

Revisiting this almost a year later.  I know have a wireless trackpad & keyboard, and can see their battery levels perfectly fine ( in both the toolbar or the command line). Still unable to get the battery level from my headphones though, and not sure why :/

On my iMac(macOS 10.12.6), none of solutions mentioned above works. After reading the man page of ioreg. The solution that works on my computer is:

// the -r option is used to reduce output
// the -l option is used to display properties for all object
// by default some object properties are not shown
// the -c specify device class, the class could be specific or general
ioreg -c AppleDeviceManagementHIDEventService -r -l
ioreg -c AppleDeviceManagementHIDEventService -r -l | grep -i battery

// instead of using device io class, you could also use a property key to query
// you need to know one of target device's property key(-k), for example it is BatteryPercent for Bluetooth keyboard and mouse
// any device with this property will be listed
ioreg -r -l -k "BatteryPercent"
ioreg -r -l -k "BatteryPercent" | grep -i battery

There are some other device classes to try for the -c argument: AppleHSBluetoothDevice  AppleHSBluetoothHIDDriver AppleMultitouchMouseHIDEventDriver AppleHIDKeyboardEventDriverV2, they give different output.


Apple Remote Desktop- How to send Terminal Command to Networked computers I'm hoping that you can help me with creating a unix script for sending a terminal command through ARD to multiple networked computers. I'm hoping to disable air drop on a set of 36 lab computers at my school. I can definitely manually enter the script below to turn off air drop, but it would be great if I could just do this "behind the scenes" and 36 at a time.

The script that works is:

 defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES

I have limited knowledge of scripting/UNIX/ARD, but I'd love to learn. So far, all I've gotten is for terminal to open:
    open /Applications/Utilities/Terminal.app

However, I cannot get the script/text to run. Any help is greatly appreciated! Thanks,

Don't bother with Terminal; ARD can run shell commands directly on the computers. Just select the computers you want to run it on, click the UNIX button in the toolbar (or choose Manage menu > Send UNIX Command). A window will open that lets you paste in the command/script you want to run, and select what user to run it as.

But it's a little more complicated than that, because you're changing a per-user setting. If you run the command as root, it'll only take effect if someone logs in as root, which (hopefully) nobody ever does. If you select "Current console user on target computer", it'll run as whoever's logged in at the moment, if someone's logged in. Do you have multiple users using the same computer and/or logging out between usages? If so, it's going to get set for some users but not others.

I think this short script will work to set the setting for all current user accounts (everyone with a home directory in /Users) and also adjust the user templates so that new users will get this setting as well. Note that this script must be run as root, and won't take effect for current users until they log out & back in.

# Disable AirDrop for current users
for userdir in /Users/*; do
    if [ -d "$userdir/Library" ]; then # only do this for "real" users
        sudo -u "${userdir##*/}" defaults write com.apple.NetworkBrowser DisableAirDrop -bool YES
    fi
done

# Disable AirDrop in the user templates, so new user accounts come with it pre-disabled
for templatedir in "/System/Library/User Template"/*; do
    defaults write "$templatedir/Library/Preferences/com.apple.NetworkBrowser" DisableAirDrop -bool YES
done

WARNING: I have not tested this script. Try it out on one or a few computers that you can clean up or reimage easily if something goes wrong.


How can I open an app using Terminal? I want to be able to open any given app from the terminal, now I have tried

osascript -e 'open app "Calendar"'

I have tried for Mail, Calendar and Slack.. Slack acctually opens but it does generate a error msg in terminal.. The two others generates errors and doesn't open. The errors are Execution errors.

Now I tried with AppleScript, is bash better?

How can this be done?

You can use open’s -a option:

open -a Mail

You can specify the application path instead:

open /Applications/Mail.app

If you want to use AppleScript (osascript from command line), open app isn't quite equivalent. Instead, you can either use

osascript -e 'tell application "Mail" to activate'

or

osascript -e 'tell application "Mail" to launch'

You can see this question for the difference between the two.


Create WPA2 Enterprise Wifi + Certificate Apple Device Configuration Profile Without a Mac? I am fully aware that in the recent times, Apple has moved from the IPhone Configuration Utility to the Apple Configurator that is available on Mac only.

I, unfortunately, don't have a Mac, but I have a few WPA2-Enterprise networks that I need to create a configuration profile for.  I have Windows and Linux systems at my disposal, is there a way to create a configuration profile that works with recent iOS versions without the Apple Configurator, and if so, how would I go about doing that?

NOTE: Any solution needs to support adding certificates and WPA2-Enterprise networks.  This is not available everywhere!

Mobile Device Management.

Mobile device management allows you to remotely deploy profiles, and many let you create basic profiles in the web interface. You'll need to chat with several companies to find one that suits your needs.

Basically, all you have to do is install a premade profile on all the devices you need, then you're free to create a profile online.

The only downside to this approach is that many of the better solutions require payment. I know SimpleMDM, Miradore, Jamf NOW and many others give free trials.


Refreshed MacBook + BootCamp unable to boot restored Windows 7 partition I recently had my MacBook's HDD crap out on me. The OS X partition, in particular, quit working, but my Windows 7 partition was still in decent enough shape for me to grab an image. I got a replacement drive from Western Digital and restored the Win7 partition. I am able to see it from Mac OS X and am able to select it as a boot target with the Boot Disk tool, but when I reboot the machine, I get a gray screen for a few seconds and then a fully black one with simple white text reading "No bootable device -- insert boot disk and hit any key..."

Any ideas on what I need to do to get my Windows partition back up and running? I don't want to try a reinstall from the Win7 DVD (which I believe I've misplaced anyways) and Boot Camp Assistant doesn't offer any other alternative.

Sounds like a problem establishing where the bootable partition begins.  Insert the Win7 dvd, boot up from it, and do a "startup disk repair" - which should not touch apps or data on the partition, but should restore the umm, boot-ability of said partition.


Smart mailbox for unread messages in Mail.app Problem

I've created a smart mailbox in macOS Mail for "Unread" messages with the following rules:

  Contains messages that match all of the following conditions:

  Message is in the mailbox: Inbox
  Message is unread

The smart mailbox will always correctly include unread messages in my inbox. But often, it will incorrectly include read messages in my inbox. Any ideas on how I can fix this?

Other information and troubleshooting steps so far

Currently using macOS Sierra 10.12.6
Email account is hosted by Google
Other smart mailboxes with other rules still work properly.
If I use the filter button in my inbox, Mail will properly perform filtering -- even for unread messages.
I tried marking the problematic messages as unread and then as read again. Afterwards, the number next to the title of the "Unread" mailbox will decrease (because I have taken steps to mark messages as read), but the "Unread" mailbox itself will still list those messages (even though they are read).
I tried the above step from gmail.com. Same result.
I tried getting new mail. Nothing changes. I tried rebuilding my mailboxes. No rebuilding happens.
I tried rebooting my computer in safe mode. Then, any smart mailbox I created would contain no messages regardless of the rules I set.
There doesn't seem to be any pattern to which messages are problematic.
My "Unread" smart mailbox still behaves properly for non-problematic messages even if it contains problematic messages.
Once a problematic message appears in my "Unread" smart mailbox, it will stay there for a few days. Then, it will suddenly leave "Unread" and sit in my Inbox where it belongs.

Spotlight is responsible for searches, so I would add your home folder to the spotlight system preference privacy settings.

Then say Ok to any prompts that mention search will break.
Then remove your home folder and let the indexer re-index mail messages.
Restart after 30 minutes if you don’t see an improvement

There are more drastic and questionable options, but let’s start with safe and easy.


Unable to boot up with Snow Leopard DVD I accidentally deleted my /bin folder. My computer is now permanently stuck at the Apple screen with an infinite spinning indicator.

I have:

Inserted my Snow Leopard DVD
Held down c - nothing
Held down option - shows me Macintosh HD, but then hangs

I am not sure how I can just start fresh and install a clean build of Snow Leopard?

Create a bootable flash with Mac OS X, then hold down options and load from that drive. Then just install a clean build as usual.


How do I delete/break a symbolic link in Lion? I've made a symbolic link from my SSD to my HDD incorrectly and want to keep the folder on my SSD. How can I delete or break the symlink? Is there a Terminal command that will delete every symbolic link on my Mac?

You can delete the symlink the same way as any other file. It will not follow the link. You can do this in finder by moving the link to the trash, or from the command line using rm path/to/symlink.

Do not attempt to remove all symlinks on your computer. They are used by the system in some places, such as frameworks.


Printers that Work With Mac OS X? I'm planning to purchase a printer + scanner soon and want to have one that will be able to work with Mac, as well as Windows machines. I am hoping for one that will have a wireless printing/scanning feature.

There are certain types of printers that I heard that work with Macs, but I'm not sure what differentiates them from other normal printers.

What's the difference?

Printers are easy, they mostly all work with Macs. Scanners are another story, and drivers for those used to be complex to find and use.

However 10.6 introduced far better support for scanners and a number of those now work just out of the box. I recommend you go for one listed as compatible if possible as an Apple maintained driver is more likely to keep working when you upgrade.

You can find the list of all printers and scanners supported out-of-the-box by Mac OS X 10.6 in this knowledge base entry.


App icons go missing on MacBook I've been having this problem for a while now and it really starts to bother me. Every once in a while, a lot of my app icons go missing in the dock, launchpad, finder, cmd-tab switcher, just everywhere.

Some pictures:

Obviously this is really annoying.
I already tried a lot of stuff to solve it.

I tried relaunching the Finder
I tried relaunching the Dock (terminal: killall Dock)
I tried clearing icon cache

The only way I can (temporarily) solve this by doing the following:

Reboot, now the icons have reloaded in finder and launchpad, dock icons are still missing
go to Library/preferences/com.apple.dock.plist
& delete the file
open terminal: killall Dock

This way everything is fixed, but I have to rearrange my dock again since I removed the preferences file. It is only a temporary fix though, the issue keeps coming back and I always have to do this, which is very annoying.

Does anyone know what causes this? How could I solve it permanently? It’s really getting frustrating!

Thanks a lot!

How to Rebuild Launchpad Database in OS X Yosemite (10.10) and Later

Go to Library folder, which is hidden. To access it, click anywhere on desktop and make sure you see word 'Finder' in the top menu near Apple logo.
Press and hold alt/option key and in the top menu bar select Go and finally Library.
In the Library folder, locate and open the Application Support folder.
In the Application Support folder, locate and open the Dock folder.
You'll find a number of files in the Dock folder, including one named desktoppicture.db, and one or more files starting with a dashed set of capital letters and numbers and ending in .db. An example file name is FE0131A-54E1-2A8E-B0A0A77CFCA4.db. Grab all the files in the Dock folder with the dashed set of letters and numbers that end in .db and drag them to the trash or press ⌘/command + delete keys.
Launch Terminal, located in the /Applications/Utilities folder.
In the Terminal window, enter the following:

defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock

Launchpad has now been reset. The next time you open Launchpad, the app will rebuild the databases it needs. Launchpad may take a bit longer than usual to launch the first time, and the Launchpad display will now be in its default organization, with Apple apps shown first, and third-party apps next.


Can i create my own back up iCloud account other than the one my ex boyfriend set my iphone up with? When I first got my iPhone, my boyfriend set it up with his iTunes and iCloud account because I didn't have one of my own. We recently broke up, and he then changed the password for his Apple ID and iCloud account so I couldn't download any more music and/or apps. I have a lot of things on my phone that I really don't want to lose. How can I back my iPhone up without losing anything on it especially the music and contacts I have?

You can do this by signing out of that iCloud account. Open the Settings.app and go to iCloud. Then select "Delete Account". Not to worry, this doesn't delete any information from your device, as long as you choose "Keep on iPhone" after signing out of that iCloud account. It will display a prompt after you select "Delete Account", and give you the option of keeping iCloud contacts, calendars, and such on your phone. Like I just mentioned, you will want to select "Keep on iPhone" when facing this prompt. After signing out of iCloud, create an Apple ID (there should be a way on the iPhone itself), and sign into it.

As a side note, unfortunately, you will likely have to purchase any music, or apps, again, that were purchased on his Apple ID. The apps that were purchased with his Apple ID will continue to function, but you will no longer be able to update them, and consequently, the need will likely arise that you will need to purchase them again.


Why are switches grayed out in the iPhones Settings app with iOS 8.3? In 'Settings' > 'Cellular': all the switches under 'Use cellular data for:' are grayed out. Some are ON and some are OFF but none can be changed. These are the switches that control cellular data usage for individual apps. Why are they disabled?

In the same panel I have 'Cellular Data' turned ON and "Enable LTE" turned ON.

Looks like it's restricted —someone activated parental controls on your device.

Go to Settings > General > Restrictions and scroll down until you see the Cellular data item, you can deactivate it there (given you know the passcode).

On iOS 13, restrictions have been moved under Settings > Screen Time > Content & Privacy Restrictions


Is it possible to long press on Apple Maps screen in CarPlay and get directions to that location? I'm familiar with long-pressing on Apple Maps on iPhone to drop a pin and then getting directions to that location. Is it possible to long press on Apple Maps screen in CarPlay to a drop a pin?

As of iOS 14.4, you're not able to long-press a location on Maps in CarPlay to select a destination.
Apart from selecting a destination on your iPhone prior to using CarPlay, you can only select a destination by choosing a previously entered Destination or by using Search.
I often just tell Siri where I want to go and I'm presented with different options that meet my criteria.


Disk storage graphic and usage amount inconsistent? I have a Macbook Air(6,2) with 120 GB SSD. When I checked About This Mac --> Storage, I see inconsistent information.

It says 87.89 GB free but Apps take up 92.65 GB. So there should only be about 30 GB free according to the graphic. However, I believe the graphic is wrong because OmniDiskSweeper says Macintosh HD is ~30GB.

Why do the graphic and numbers disagree?

Blame Spotlight. About this Mac relys on Spotlight's data, and it's clearly screwed up here. You can fix this by forcing Spotlight to reindex your hard drive. Goto System Preferences > Spotlight > Privacy tab. Then add Macintosh HD into the list, then remove it. Spotlight should start reindexing your hard drive. (You can test this by pressing CMD Space and entering an equation. It should say indexing).

(Oh, and this is a duplicate of this Finder and About this mac shows different free space sizes?)


Facebook Messages won't work on OS X (10.9) Messages when two-step verification and other safety features are used on Facebook Does anyone know how I can get (10.9) Messages and Facebook messages to play nice?

I have some security features enabled on Facebook that make it more difficult for someone to log into my account outside of my list of trusted devices/apps. Facebook has a password generating feature that requires you to either scan a QR code or type in their generated password and it seems to only work for mobile 3rd party apps, not 3rd party OS X apps.

I did try plugging in the generated code into messages in the account set up menu but no dice.

You'll need to get an application specific password from Google.

Fire up your web browser and go to Google.com
Once there, sign in if you haven't already done so.
Go to the section where your picture is, and click on the "Account" link.
Once in that Account page, on the top there are links, click on the "Security" link.  Here you will probably notice that the 2-Step authentication is enabled.
Go to the App Password's "Settings" link. It will probably ask you to authenticate yourself, go ahead and do that.
Now you should be on the "Authorized Access to your Google Account" page, and you should be able to generate a new password for "Messages on Mavericks. Go ahead and give it a name, I named mine "Mac Pro Messages Google Talk Account", and then I clicked "Generate".
Once you have this password, go to "Messages" on your Mac, try to log in and copy/paste that password.

You should be all set.


Sending MMS with WiFi only iPad Air When trying to send a picture to a non iMessage contact on my iPad Air (WiFi only) it says that MMS must be enabled. Am I not able to send MMS on WiFi only?

That would be correct.

If you are trying to send a pic to your contact that is not on iMessages, then it would use the MMS system (the phone system) to deliver it.

That has little to do with WiFi but with how else should it deliver it without knowing the other persons WiFi connection. The iMessages would use the other person phone number as identification to deliver a MMS.

If you use any other communication system like Skype, Twitter, Facebook ..., both parties have to be on it, so the messages/pictures flow occurs using that app.


What are Alias and com.apple.LSSharedFileList.Binding data in sidebsarlists.plist In the com.apple.sidebarlist.plist file you can find different CustomListItems for the "Favorites" items in Finder's Sidebar.

For example:

<dict>
    <key>Alias</key>
    <data>
    AAAAAACmAAMAAQAAzyiimAAASCsAAAAAAAkOewAJDn8A
    AM8oo6IAAAAACSD//gAAAAAAAAAA/////wABAAgACQ57
    AAJl2QAOABQACQBEAG8AdwBuAGwAbwBhAGQAcwAPABoA
    DABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASABVVc2Vy
    cy9uYWlhZC9Eb3dubG9hZHMAABMAAS8AABUAAgAM//8A
    AA==
    </data>
    <key>CustomItemProperties</key>
    <dict>
        <key>com.apple.LSSharedFileList.Binding</key>
        <data>
        ZG5pYgAAAAABAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAZm53ZAIAAAAAAAAA
        </data>
        <key>com.apple.LSSharedFileList.TemplateSystemSelector</key>
        <integer>1935819884</integer>
    </dict>
    <key>Name</key>
    <string>Downloads</string>
</dict>

What are "Alias" and "com.apple.LSSharedFileList.Binding" data and how to create your own data?

I guess they are icons or path to them, but how to generate these data strings, what are the specification for those icons and where do they have to be stored?

See Apple's documentation on NSURL and bookmarks:

https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/index.html#//apple_ref/doc/uid/20000301-SW34


What are all the OS X special user folders? I know OS X has a ~/Sites folder with its own icon for keeping your websites, and it isn't there by default, you have to create it.

Are there more folders similar to this one that receive special icons after creation?

~/Applications

For storing apps that you want to be private to your account, and does have a 'special icon' (the icon of /Applications) upon creation.

 ~/Sites

For storing your websites. Accessible on the network as /~username.

 ~/Library

If you're not already aware, there's a ~/Library which is hidden, but does have a 'special icon' if you unhide it using chflags nohidden ~/Library or enable Show Library Folder in View Options.


How to uninstall Linux from a MacBook properly? There are a lot of questions by those who have already bricked their macs trying to remove Linux so their questions usually stem from a position where one of the disk is labelled FFFF-FFFFFFFF-and more F's.
They come from the angle of having already done something wrong.

I'm not in that position, and I'd rather not start by bricking my mac.

Does you have any ideas on how to properly remove Linux from my mac (this includes the hidden FFFF partition)?

Any help explained in a very basic manner would be much appreciated.

diskutil list below

It may also be worth mentioning that in both
/dev/disk0 and /dev/disk1 there are gpt partitions when looked at via recovery mode.

to address the suspicious MBR sector I've used the command

sudo fdisk/dev/disk0

to give an inside look

Evidently, the tricky part is the removal of the Linux partitions (disk0s3 and disk0s4).

The last partition (disk0s4) is the Linux swap partition. The following command can be used to return this partition free space. This should also remove the hybrid partitioning in the Master Boot Record (MBR) Partition Table.

sudo diskutil eraseVolume free none disk0s4

The command below should return the remaining Linux partition (disk0s3) to free space. However, when tested under High Sierra (macOS 10.13.6), this command failed to work properly.

  Note: When tested under Catalina (macOS 10.15.2), command below did work properly. However, after participating in discussions posted at this question, I can report the command may still fail under Catalina.

sudo diskutil eraseVolume free none disk0s3

The alternative way to remove this partition is to boot to macOS Recovery and use the command shown below. I would recommend using the command below over the above command. After entering the command below, you can boot back to macOS.

gpt -f remove -i 3 disk0

The next command returns the free space back to the APFS container (disk0s2).

sudo diskutil apfs resizeContainer disk0s2 0

The next command mounts the EFI volume (disk0s1).

sudo diskutil mount disk0s1

The next command removes the linux boot files from the EFI volume. This will prevent Linux from appearing in the Startup Manager. With some versions of Linux, this folder may not exist.

rm -r /Volumes/EFI/EFI/BOOT

There will be other boot files remaining in the EFI volume. You do not have to remove these files if you do not wish to. The files will be in a folder named after the Linux that was installed. For example, with Ubuntu the command would be as follows.

rm -r /Volumes/EFI/EFI/Ubuntu

The next command unmounts the EFI volume (disk0s1).

sudo diskutil unmount disk0s1


Is the 20 cm Lightning to 30-pin adapter functionally different than the shorter all in one part? Are the two male Lightning to female 30-pin adapters that Apple is selling functionally equivalent (other than the fact that one has a 20 cm cable between the endpoints)?

 Part MD823ZM/A
 Part MD824ZM/A

Yes - they are equivalent in all measurable aspects other than length. Sometimes we find out things that don't make the public specifications about Apple products, but these two items don't seem to fall into that category.


Weak/Variable Connection between our Macs and our WiFi router I have a Belkin N+ Wireless router. Up until recently, it was reliably connecting my husband's Mac Pro (wired), my Mac Mini, our iPad, and a couple of video game consoles (all wireless) to the Internet. The problem started when we bought a network storage drive (wired), mainly to back up my husband's computer. After we got it set up with Time Machine, the router started requiring daily hard resets. After checking around online, I tried updating the router's firmware and eventually got it to accept the latest version. The need to reset to router has decreased since then, but we're still need to do it from time to time. The bigger issue is that our connection speed on the iPad is ridiculously inconsistent. I've been getting anywhere from around 25Mpbs - where it should be - to well under 512k.

NEW UPDATE: I've been experimenting with position of the router and it's antennae with limited success. Connections speeds on the iPad remain high in the basement, low on the second floor, and super variable one the first floor. (I realize that the basement is not an ideal place for the router, but I don't have a better option and it worked previously.) I've been on the first floor doing nothing and had SpeedTest record speeds around 25Mbps, around 13Mbps, and under 1Mbps in the space of half an hour.

So now the question is, why is my router performing so poorly when it was fine just a few weeks ago? How can I get it back to providing reasonable speeds for my entire house?

When you added the NAS to the LAN did you move the router?  It's possible that even a very minor shift in the position of the router or the antenna could impact the shape of the signal zone.

You might try pairing up with your husband where one of you is in by the router and the other in key use-areas and recording signal strength based on the location, orientation and position of the router and router antennas. (don't know if this model has external antenna, if not rotating the router itself).

There are tools that can give you more detailed report on the signal strength, for instance you might want to download and install Kismac on your MacBook.  Kismac and similar tools can also give you some insight into what other networks might be interfering with your own.  If you see strong signals on the same channel that you are using you might consider moving your network to another channel.


How to get MP3 file into iPad Music app without iTunes? Background: My Mac is out of commission, I don't want to borrow my son's Windows 8 laptop, and I don't want to install iTunes (or anything else that touches the Registry) on my employer's Window 7.

I have an MP3 file that I edited with "portable audacity" and I want to use "Music" with it.  I know there are other programs that can play it, but I have my reasons...

I've heard there are other programs that can get MP3s into the Music library.  Are any of them Windows-portable, i.e., can run from a flash drive without adding more garbage into the already full garbage can called "Registry"?

Or is there a portable file manager (for Windows) that can replace an MP3 file in the Music library with another of the same name (without jailbreaking to tamper with permissions)?  (In other words, something that would do what iTunes can do but won't touch the Windows registry.)

bmike, the answer is "if you think it's clearer, go for it."  SE is not cooperating with letting me log in and comment at the moment.  And I'll have my Mac again soon, at which point the question is only of value to someone besides me.  :-)

Sorry but all the Programs i know out there which are really able to add Files to the coorrect place (iTunes Folder on your iPod) will ask you to first install iTunes to use its sync Function in the Background.


Configuration profile for managing multi monitor display I am not sure how exactly to phrase this, but wondering if there is a way to manage the display preference and monitor arrangement with a unique profile on macOS?

The problem is, I have a home and office multi monitor setup but the specific monitors are arranged different in each environment. So when I move the laptop between work and home the display arrangement is all confused and I have to manually change in display preferences.

+------------+ +----+ |  +----+ +------------+
|            | |    | |  |    | | 4K Dell    |
| TB Display | | 4K | |  | TB | |            |
+------------+ |DELL| |  |    | +------------+
   +------+    |    | |  |    |  +--------+
   | MBP  |    +----+ |  +----+  | MBP    |
   +------+           |          +--------+
   +------+           |          +--------+
                      |
    Home Setup        |   Work Setup
                      |
                      +

Because of specific physical constraints I am unable to change the physical layout of the monitors. macOS seems to automatically detect by monitor type.

I am wondering if there is a software configuration and profile I could create to manage this? For example, tell the system when at home the TB Display is on the left and horizontally oriented, but at work it is on the right and vertically oriented, etc..

Is there an app or AppleScript technique that manages this?

The best I've been able to find that does this is SwitchResX, To get what you're asking for, I believe you would set up a display set for your home and work environment. SwitchResX also advertises that it can be controlled via AppleScript.


IntelliJ IDEA - how to enable keyboard shortcuts I have IntelliJ IDEA and a MacBook Pro with an Italian keyboard.

I want only be able to use keyboard shortcuts.

I see for example that I should be able to comment a block of lines with:

alt + cmd + /

But when I try nothing happens. Absolutely nothing.

I think the Italian keyboard should be the key of the problem.

Any idea?

Maybe this shortcut is not assigned in IntelliJ (at least not for the italian keymap) or a different shortcut is mapped to block comments.

First you can lookup if this shortcut is mapped (Preferences -> Keymap (or search for keymap). The keymap preferences dialog contains a search field (top right). If you search for 'block', you will get all mappings.

You may assign your desired shortcuts (double click on "Comment with Block Comment") and IntelliJ even warns you if your shortcut is already assigned.

Additionally there is an open issue in their issue tracker for "screwed up shortcuts" for many non-US keyboard layouts (see https://youtrack.jetbrains.com/issue/IDEA-167193)


Apple support contacted by someone pretending to be me Yesterday i received an automatic mail for apple thanking me to have contacted the support and there was a practice ID and my mail.

The problem is that i never contacted the apple support, so i further investigated it by going to the apple support practices website, inserted the ID and the mail and that showed me that someone has contacted the support asking for something about an iPhone 4 update, and on the field "Your contact info" there was my surname but a different name.

Worried by this situation i called the Apple support and explained.
The operator told me that he don't see anything under my name and probably someone was wrong when entered the mail to contact the support, so i can stay safe.

But i don't feel completely safe, also i'm quite sure that this was done in purpose by someone because some years ago i solded an iPhone 4 to a guy , after purged everything from it and disassociated by account from it, but this guy know my mail and some details about me and i can't completely trust him. We also litigated few months ago, and this guy's name is the same that i see on the ticket ID , but with my surname.

There is clearly too coincidences.

My question is, how i can i do in this case to prevent anything bad and feel really safe?

You should way the risks and ensure that if in fact someone is trying to take advantage of your account or even using social engineering to compromise your account, you minimize the damage that could happen.

• You should call Apple support again, perhaps using the same ticket number, and explain your situation yet again. Explain to them what you just explained to us. If you can convince them, they will likely get a senior support advisor to handle the issue. Perhaps you can negotiate some sort of verbal password with Apple support such that anyone calling them on your behalf would need to know the verbal password before Apple would make any critical account changes. You also need to be careful that the other person does not convince Apple that they are the real you and you are the imposter.

• In order to make any account changes via Apple support, the caller needs to know some information about the account other than just the email address. After all, an email address is fairly public information. You need to make sure these pieces of info are not obvious. For example, your birth date would be required, however this is also fairly easy to find info.
You therefore need to make sure your security questions are secure, and by that I mean the answers to your security questions are not easily discovered information. Note that the answers to security questions do not need to be accurate. You just need to be able to remember them.
I also recommend setting up two-factor authentication on your Apple ID, which eliminates security questions with amore secure unique one-time code.

All security-related settings may be found at appleid.apple.com.


How do I create a passwordless keychain? How can I create passwordless keychain on OS X? Specifically, I'm wondering if it's possible to sign application without keychain storing p12 and developer certificates

Using 10.7.1 OS X

Hold down Option when clicking OK with a blank password; Keychain Access will allow it.  Just worked for me on El Capitan.  Note-- when you log in (with a password) you will have to press OK to unlock it.


How to show progressbar in App store during installation? I try to install Xcode through App store. As I found, it can take a long time (hours) while it is fully installed. Is it possible to display progressbar, how much time (estimately) is remaining to finish installation? Or at least a progress bar, that shows, how much percent of size was downloaded / installed?

There should be a progress bar underneath the Launchpad dock icon.

If you removed Launchpad from your dock, open it through Spotlight, then search for the icon of the app you are installing (which in your case would be Xcode). There should be a progress bar and further status information on it.


Why did some applications have to rebuild their database after a Time Machine rollback? Recently my system (10.8) got totally borked, so I booted into recovery mode and rewrote the entire disk from a two day old Time Machine backup. When I started back up, I found that:

Spotlight needed to reindex the entire disk.
Dropbox didn't recognize my computer, and after I logged back in it re-downloaded everything in my dropbox folder (even files that hadn't changed in the last two days).
Microsoft Office needed to rebuild the user database before I could use Outlook.

If my system was restored to the exact state it was in two days ago, why did all this happen? What made these applications behave differently from how they would have if I'd just left the computer off for two days?

I'd also be interested if anyone could point me to a list of things that are lost, reset, or rebuilt after restoring from Time Machine. Many thanks.

A lot of caches and index files are excluded from backup because they can be rebuilt from information that is backed up. This helps save space on the backup drive.

Another question lists the default exclusions for time machine.


How can I make Back to my Mac Screen Sharing go full screen? I've got two macs, both with the same monitor. When I use Back to my Mac Screen Sharing from Mac A to Mac B, I see the full screen of Mac B, but it's in a window on Mac A, and the image is scaled a little bit.

Also, since I set up all my machines the same way, the dock is on the bottom and has auto hide enabled for both. When I try to expose my doc on Mac B, My cursor winds up leaving the window and exposing the dock on Mac A.

Is there any way to get that screen sharing window to go full screen, the way something like VMWare or Parallels does? I tried other VNC clients, but Apple's Screen Sharing is the most responsive.

Up to 10.5.4 included, it was possible to add, among other possibilities, a full screen item to Apple Screen Sharing application : .

But, from 10.5.5 they remove all these features and so, the simple trick becomes more hacky.

I don't know why Apple remove these options, but anyway, if you want them back and if you're not scared about tweaking Screen Sharing application with XCode or if you have a backup of Mac OS X 10.5.4, here's an how-to.


Remove seconds of silence at end of GarageBand exports Whenever I export a song to disk from GarageBand, it automatically adds a few seconds of silence to the end.

I don't want that silence, as the files I'm exporting are sound effect mixes to be played manually one at a time. I know that I can go into Audacity and manually remove all of the silence at the end, but I'd rather avoid spending that much time cleaning up after GarageBand.

Is there a way to tell GarageBand not to add silence to the end of tracks it exports?

As far as I know, GarageBand doesn't add anything to the end of exported tracks, but it exports as much as there's sound in any track. Therefore, to avoid having extra "stuff" exported, you should always create a loop region and export with that. As you can see in the following picture, I'm at second 47 in the "timeline", however, I've created a region (the yellow bar on top) that starts at second 1 instead of 0, therefore creating a 46 second clip.
The exported version can be seen in quicktime with a length of 46 seconds, without any extra silence or sound.

In order to create such region, you have to activate the "repeat/loop" (next to the Play button in GarageBand). That will create an extra space below the Beat Bar (where you move the Play Head). When you hover your mouse over that small region, the cursor changes. You can click and "drag" to paint the yellow zone. That's the zone that will be repeated over and over.
Always export with a repeat/loop zone created and Garageband will only export that.
NOTE: Logic Pro/Express behaves the same way when creating bounces.
There's a draggable cursor at the end of the timeline on the upper right corner. If it is beyond the end of your sound on your longest track GB will include that much silence. Drag it back to the end of your longest track, or leave however many seconds of silence you want.
Update 2020 - What about iOS?
I don't use macOS anymore but if you want to do this on iOS or iPadOS, if I don't incorrectly recall, your only choice is to have a region that encompasses the part you want to export, tap it (to select it), then tap it again (to see a floating set of buttons), and pick "Loop". I don't know/think there's a way to do the same "playback region selector" on iOS. I may be wrong, but this question was about the OS X version of GarageBand so I don't know more :)


macOS Sierra - Switch to English input only for several characters I'm new to Mac, and trying to do the following -

In previous systems, when I was on a non-English input source (e.g. Hebrew), I could mid-sentence hold down the Shift key and type some keys, and they would type as uppercase-English letters. As soon as I would release the Shift key, pressing more keys would return to writing Hebrew.

This is very useful for embedding some English acronyms inside a non-English sentence, like:

אם למישהו יש OCD, הוא לא יאהב את זה שהמשפט כתוב בכיוון לא נכון.

When I try this on a Mac, it either types nothing, or types some weird Hebrew characters with diacritic marks (useless).
Is there any way to do this on Mac?

I have a Sierra MacBook Pro.

Go to System Preferences/Keyboard/Input Sources and activate the Hebrew PC keyboard provided by Apple and use that (instead of Hebrew or Hebrew Qwerty).

Or in system preferences/keyboard/input sources, check the box for using caps lock to change the keyboard to Latin.  That will let you switch to US and back to Hebrew by hitting caps lock, if you find that useful.


iPhone 4 restore to a replacement phone I recently got a replacement iPhone 4 (under warranty to replace my old iPhone 4), and just before returning the old iPhone 4, I did a backup. When I connect the new phone to my iTunes, it only gives me the option to register the phone and does not offer me an option to restore. My new phone's iOS is 5.0.1; I can't recall if my old phone was on 5.1 or 5.0.1. I'm worried to update the iOS of the new phone to 5.1, in case my old backup wasn't on 5.1. Can a backup done on an older version restore to a new phone on a newer version?

You have to register/activate the phone first before you can restore it from backup. Even in case you won't get asked during/after activation, you can always connect your phone to iTunes later and click on Restore.