How does Do Not Disturb work in iOS with message Favorites? New in iOS 10 you can add a message favorite instead of just phone favorites. How does that work with Do Not Disturb's only allow notifications from favorites? If I add just a contact's phone but not their message info to my favorites will I only get calls from them in the middle of the night or will I receive message notifications as well? Asked another way, do I need to add each method of contacting a person to my favorites in order to get those notifications?

If their chat settings are not included in their Apple ID then you will need to add the corresponding info.

I do not have an iPhone and use Messages desktop version, so the only way would be to add my chat info in your contact settings for me to send messages when DND is enabled.

Best practices would be to add all levels of contact info, or ask every contact what info is part of their Apple ID, if you do not already know. That doesn't sound fun.

Keep in mind that it will still silence the alert for incoming messages.

If you want to completely allow a user to get through at all times, simply override all DND settings via Emergency Bypass.

NOTE: You have to enable Emergency Bypass for each contact individually.

How to turn on Emergency Bypass on iPhone and iPad

Launch Contacts from your Home screen.
Tap on the contact you want to enable Emergency Bypass for.
Tap Edit.
Tap Ringtone (for calls) or Text Tone (for texts).
Tap the Emergency Bypass switch. The switch should be green when
it's enabled.
Tap Done
Tap Done again.


Have Reminders use date format set in System Preferences Over here, you can see that Reminders is using a different date format from the one I have set in System Preferences.

How do I get it to conform to the date format I have established in System Preferences?

The Reminders app doesn't respect custom date format. It adheres to the default format for the currently set region and ignores any further customization made to the date format.

Apple support document, macOS Sierra: Customize formats to display dates, times, and more, specifies how date, time, number and currency format can be changed which is then respected by certain apps like Finder and Notes.

The document doesn't mention any app other than Finder and Notes and makes an ambitious statement:

  Your formats are visible in Finder windows and in some apps. For example, dates in Mail or Notes show your custom format.

It's likely a bug in Reminders app or this could be by design. If this functionality is critical for you, consider filing a bug report (RADAR) using Apple Bug Reporter.


Tell iTerm2 not to remember open windows on quit After a recent upgrade of iTerm2 (I'm on build 1.0.0.20120203), when I open up iTerm2, it restores all of the terminal windows I had open. How do I disable this behavior so it doesn't "remember" how many windows I had open?

This is the resume feature introduced with Lion.

defaults write com.googlecode.iterm2 NSQuitAlwaysKeepsWindows -bool false


2FA code sent to wrong unknown number (Iran) I forgot my passcode and kept entering wrong ones.  In the end, I reset the phone and reinstalled the latest iOS (13.3.1).

Now on startup, it sends a 2FA code to a number I have never seen and it's not in the format of my country (Iran).

When I bought the phone (iPhone 6S), I put in my SIM card for the 2FA. I have received codes from Apple before on this same number. Now it's changed and I receive the error:  "Your request could not be completed because of an error. Try again later."

This has been happening for hours so it's not due to low server capacity.

You need to begin the account recovery process with Apple. Nobody on this site can help you change your 2FA settings or reset your password because this site is not run by Apple Employees.


New software on old device Is it possible to install one of the latest software on a old iPad or iPod? The device still works good. But because there is old software on it, I can't do anything with it.

Is it recommended, or do you recommend to do something else with the iPad/iPod?

I have an iPod Touch 3 and an iPad 1.

The last available version of iOS for the iPod Touch 3rd generation and iPad first generation is iOS 5.1.1. It is not possible to update your iOS device beyond this version.

You can download apps for older versions of iOS by adding the app to your purchase history using iTunes on your computer, since iTunes is version-agnostic. Once you've downloaded the app on iTunes, it will be in your purchase history and attempting to download it again on your device should prompt you to accept an older version of the app.


Light weight, free way to record a video with a blurred background using Mac webcam? When recording a video, sometimes it's preferable to blur the background, especially when working from home or outside the typical office environment.
I didn't figure out how to blur the background of a photo booth video recording, so I record without blurring the background. But blurring the background usually makes videos look much more professional. Example:

What is the quickest and easiest way to record a video from a mac webcam that blurs the background? (preferably using software that comes with macOS, but if not, something free and very light weight is preferred)

The easiest approach to attain your goal is to use a video calling application in combination with screen recording.
For the video calling application I suggest Jitsi as it works in your browser, but you can also look into any other popular application like Teams, Zoom or Skype.

Go to meet.jitsi.com to start a video call in your browser. For other applications follow the steps they need to start a video call.
Configure the calling application to use your camera and microphone.
Configure background blurring.

In Jitsi you can go to the three dot menu in the lower right and select "Blur my background [BETA]".
Here are instructions for other applications: Teams, Zoom, Skype

Now you should have a screen, showing live what is being recorded by your camera.
Open Quicktime, and follow these steps to record your screen, in particular the window of your video calling application.

This will generate a recording of your screen, and as that screen shows your webcam with a blurred background you will have a video of yourself with a blurred background.
Note that some video calling applications have a built in recording option, allowing you to skip step 5.


Big Sur - Homebrew Install - illegal variable name Trying to install Homebrew on Big Sur 11.2.3
Using:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
in my Terminal
Getting:
"Illegal variable name"
The above code installed fine on a VM of High Sierra an hour ago. so I know it works
Anyone have any ideas why it is not working on Big Sur?

You need to install homebrew with this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Note: Use /bin/bash rather than /usr/bin/ruby.
The curl command inside the $() expression is executed and returns the content of the install.sh file. Then, the shell replaces the $() expression with these install instructions. As the install instructions are written for bash rather than ruby, bash is needed to execute them.
I could not reproduce the "illegal variable name" issue, however. Therefore, here are a couple of other workarounds that might help:
Option 1: Switch to bash or zsh
The "illegal variable name" could occur if you are not using bash or zsh as your terminal shell, but csh or tcsh instead. (You could find out using echo $0.)
Try switching to bash or zsh before executing the install command:
/bin/zsh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

The first line starts a zsh shell. (You can also try /bin/bash instead, but I think, Big Sur uses zsh by default, now.) Then the second line is executed in this shell, which should circumvent the "illegal variable name" error.
The reason is that the bash and zsh shells might handle the $() expansion differently than csh and tcsh. If csh interprets everything after the $ as variable, it might consider $(... is an illegal variable name.
Option 2: Install from downloaded file
If, as mentioned in the comments, you have already downloaded the install.sh file, try executing the following in your terminal:
/bin/bash /path/to/install.sh

Here, /path/to/install.sh needs to be replaced by the actual path of the downloaded file. You could just type /bin/bash  and then drag-and-drop the file to your terminal, which should insert the path.


Disk Utility stuck at exit code 0 during partition restore (in Recovery Mode) I have an iMac running OS X El Capitan.

I tried to use the disk utility in normal boot to restore two partitions into one but it would exit with an error (exit code 8) and delete the second partition. I then tried to restore the partition in the recovery mode. It seemed to have gone fine but it has got stuck at the last step for ~20 hours now (please see attached image).

I realize it's a foolish thing to have done this without having my data backed up! So, I'm not sure if I should try a hard reset.

In theory, exit code 0 means "No errors found, or successfully repaired" - though I don't know why it has then failed to complete & light the Done button.

Exit code 8 was "A corrupt filesystem was found during a check, or repairs did not succeed." which would not really be surprising if you were trying to work on the partition you were booted from.

Disk Utility is actually running a process called fsck_hfs which has published exit codes on the OS X developer pages

EXIT VALUES
     fsck_hfs indicates some status by exit value.  The current list of exit status results is:
           0       No errors found, or successfully repaired.
           3       A quick-check (the -n option) found a dirty filesystem; no repairs were made.
           4       During boot, the root filesystem was found to be dirty; repairs were made, and the
                   filesystem was remounted.  The system should be rebooted.
           8       A corrupt filesystem was found during a check, or repairs did not succeed.
           47      A major error was found with -E.

If you cannot normally Quit Disk Utility, force Quit it with  Cmd ⌘   Opt ⌥   Esc  , or persuade the Mac to restart or shut down normally, then you may have no option but to hold the power key until it shuts down.


PDF files replaced by question mark icon in Dock I have pdf files in the Dock of my MacBook Air, I just left them there and everything was fine, now all of a sudden a large question mark comes up and I can't open them.

Any thoughts?

You can drag broken links out of the dock by click and drag them to the middle of the screen. Then use spotlight to locate the files - on your Mac or on a time machine backup before they went missing.


Bootcamp Macbook Air thinks my USB 3.0 ports are USB 2.0 I recently installed Windows 7 via bootcamp on my new Macbook Air. I have a Seagate USB 3.0 drive that works great in OSX but behaves strangely in Windows. Windows recognizes that it is a USB 3.0 drive, but tells me that it's connected to a USB 2.0 port. This is especially weird since I definitely have the Intel USB 3.0 eXtensible Host Controller installed. I used USB Device Tree Viewer and determined conclusively that Windows is operating my drive at USB 2.0 speeds. What can I do to get my speed back?

On Windows, you need drivers in order to have everything working fine. In this case, the bootcamp should install it for you right after Windows installation. It installs all drivers: trackpad, graphic card, webcam, USB 3.0; as well as some bootcamp utilities that allow you to use the F10, F11, F12 as volume keys for instance.

If you didn't get this part during your installation, you just need to use the USB-stick you installed windows with and run the bootcamp software on it (it's the only .exe you'll find).

OR

See this Apple Support page to download it again (64-bit, Mid-2013 MacBook Air): http://support.apple.com/kb/DL1721


Stop public betas from downloading on iPhone I have an iPhone SE running iOS 12 with the beta profile installed. I don't always update to the next beta when it comes out.

Is there any way to stop updates form downloading as they can take up quite a bit of space?

I don't believe it is an option without an MDM, but if you use an MDM you should be able to Defer Software Updates for a set number of days.

If you are running macOS Server you can use Apple's Profile Manager, if not I believe there are a few free MDM's if you only have a handful of devices.

Alternatively, you could remove the profile that opts you in to betas. That freezes your device and when you're ready to upgrade, then add the profile back and do the deed, repeating the removal as soon as you restart to prevent the next from arriving.


How can I extract the Mountain Lion installer from the recovery partition I just got a new macbook pro, and I want to swap out the internal hard disk with an SSD. My machine did not come with install media, so I was planning on trying to make some based on the recovery partition.

I have already used sudo chflags nohidden BaseSystem.dmg to get to the BaseSystem.dmg file on the recovery partition, but it is only 456.6MB, far to small to contain the (4.3GB? 4.75GB) Mountain lion install disk image. Where is the disk image hidden?

(I have blank DVDs of both sizes, but no erasable USB sticks.)

You don't need to worry about having to copy any data, making USB sticks or having the media present. Use Mountain Lion's Internet Recovery procedure, all files is downloaded and installed on the new drive without having any files.
You replace the HDD and start with Command-R...
See OS X Internet Recovery for more info about the procedure, quote:

If you happen to encounter a situation in which you cannot start from the Recovery System, such as your hard drive stopped responding or you installed a new hard drive without OS X installed, new Mac models introduced after public availability of OS X Lion or OS X Mountain Lion, automatically use the OS X Internet Recovery feature if the Recovery System (Command-R method above) doesn't work. OS X Internet Recovery lets you start your Mac directly from Apple's Servers. The system runs a quick test of your memory and hard drive to ensure there are no hardware issues.
OS X Internet Recovery presents a limited interface at first, with only the ability to select your preferred Wi-Fi network and, if needed, enter the WPA passphrase. Next, OS X Internet Recovery will download and start from a Recovery System image. From there, you are offered all the same utilities and functions described above.

Regarding "Where is the [OS X] disk image hidden?", the Recovery Partition is a minimal bootstrap that connects to a wi-fi network to download the complete OS X 10.8 install, that's why it is so small. See here for further info: About OS X Recovery.


How can I store edited pictures with iPhoto for iPhone? Im a bit surprise about few things in IPhoto for iPhone.

1) I cant create albums or group pictures into events. Is it true?

2) Once Ive dited few photos there isnt an easy way to save them i to my photo library. in the share menu, there is "Camera Roll", however it allows you the export 1 picture per ime (differently from other sharing options) and it takes ages.

This is not the same behavior I have on iPhoto for mac: when I edit a pic on mac the edited pictures replace the original ones (and they are automatically stored in my photo library and shared among all devices).

Thanks
Patrick

You can create albums directly on the iPhone.

Go into Camera Roll
Click the share icon in the upper right corner
Select all the photos you'd like to add to a new album
Select "Add To" and then "New Album"

When it comes to edited images I guess it depends on how you edit them. Most programs offer to save a new copy of the image and thus keep the original and new one. I guess it's possible that some programs also offer to replace the original. Regardless, when you create new albums just choose the edit image.


Can't activate iPhone 4S I recently purchased an iPhone 4S from Craigslist that had been reset when I bought it.  When I try to activate the phone with the Apple ID that the previous owner gave me I receive an error saying that the account provided couldn't be used to unlock the device.

I know that it needs to be associated with the correct account but how do I even tell what account the phone was activated with originally?

The only thing I can see on the activate phone screen is the following:

  This iPhoneis currently linked to an Apple ID (xxxxx@gmail.com).  Sign in with the Apple ID that was used to set up this iPhone.

Is there a way to show or reveal the Apple ID that is associated with the account?  At the very least I want to contact the original owner to see if it was stolen from them but I can't even do that.  Very frustrating.

As a rule of thumb, you should always prevent buying iDevices(iPod, iPhone, and iPad) from Craigslist and eBay, no matter how attractive they look. Even if you had went through eBay, you couldn't raise a dispute since the device isn't physically defective.

Your best bet now is contacting Apple, and I do not think they would give you the Apple ID. Have you tried contacting the person you purchased it from?


More rigid Apple USB-C to cable I own two USB C to C cables from Apple. One of which I bought about half a year ago (this one) and one that came with my MacBook Pro 13 (Mid 2017). I've noticed that the cable that came with the MacBook Pro has feels a lot more rigid, thicker and plugs into my devices a lot smoother than the older cable.

Does anyone know whether they updated the old USB C to C cable to this more rigid version or is it still the old one? (Or is the more rigid version exclusive to MacBook Pros?)

There is no way to ensure that you will get a specific cable design (for lack of a better word) when ordering an Apple cable. I'd suggest finding a third-party cable you like and sticking with it. I personally use the Amazon Basics cables (Lightning to USB-A, not USB-C, though) and have had no issues with them. I have found them to be much more rigid and thick than the Apple cables and therefore they last a lot longer.


How do I change the default boot option on rEFIt? I have two copies of OS X (10.6 and 10.7). By default rEFIt boots 10.6. However, I want to make it boot 10.7 instead.

How do I do this?

You will need to edit the rEFIt configuration file. Since version 0.14, the configuration file has supported adding a default boot selection, as documented in the news section of the website.

However, there isn't very clear documentation on how exactly to do this on rEFIt's website. You could just open the conf file, or view the default on their SVN repo here. This blog does have an example and some documentation that I've used before in a similar situation. You'll want to use the digit option instead of the OS type option (1-N, vs L,W,M).


Shortcut Keys do not work any more Previously when editing the information about a song, you could press Alt+G to go to the Genre, or Alt+A to the artist.

This seems to not work in the latest iTunes 12.

Is there a way to get the shortcut keys back?

Looks like that feature has been taken off.
While not exactly the answer, CMD-I shows information about the selected song or disk. A workaround could be sort by Artist or Genre


Upgrading Xserve hard drives Will 3Tb SATA hard drives work in Xserve (Model Xserve1,1) and allow all the space to be allocated.

This may be third-hand information, from this page of specs, but:

  Apple reports that this Xserve supports "any combination of SATA or SAS Apple Drive Modules: up to 2.25 TB using three 750 GB 7200 RPM SATA drive modules; or up to 900 GB using three 300 GB 15,000 RPM SAS drive modules."


Can both Mac OS and Windows (via Bootcamp) agree on a unique dropbox folder location? I'm planning to install Windows 8 via Bootcamp. I want to know if it is possible to make a third partition to hold my dropbox folder for my both Mac and Windows dropbox instances? & If possible, what type of partition should I have so that both Mac OS and Windows become comfortable reading and writing to it?

p.s. I'm trying to avoid duplicate syncing and duplicate storage of the same dropbox content in my laptop.

You should use an EXFAT partition. You can set a dropbox folder on an unique location, you'll save a lot of space and bandwidth with that.


How to set Photoshop CC window size to 1280x720 via AppleScript? I'm trying to resize the Photosshop CC window to 1280x720 to record it in 720p. I tried multiple ways, including AppleScript, SizeUP! app, terminal etc but none work.

Here's an example of AppleScript I'm using:

tell application "System Events" to tell application process "Adobe Photoshop CC"
    display dialog (get name of window 1)
    set position of window 1 to {50, 50}
    set size of window 1 to {1280, 720}
end tell

It does set the position, but does not set the size of the application window.

When I try

tell application "System Events" to tell application process "Adobe Photoshop CC"
           tell window 1
            set {size, position} to {{1280, 720}, {150, 150}}
            end tell end tell

I get the error "System Events got an error: Can’t set application process \"Adobe Photoshop CC\" to {1280, 720}." number -10006 from application process "Adobe Photoshop CC"

I have also tried to set bounds instead of size with the following code to no avail.

set the_application to "/Applications/Adobe Photoshop CC/Adobe Photoshop CC.app"
tell application the_application
    activate
    set bounds of window 1 to {1, 1, 1281, 721}
end tell

and I get "Adobe Photoshop CC got an error: Can’t set window 1 to {1, 1, 1281, 721}." number -10006 from window 1

SizeUP! app does change the position but does not effect the Photoshop window size.

Does anyone know how can I resize the Photoshop application window on a Mac to 1280x720 to record it in 720p?

Thanks!

I cannot replicate your problem as I don't own Adobe Photoshop, but it seems extremely likely that the process you're trying to tell s.th. to is NOT named "Adobe Photoshop CC".
(Did happen to me once, too ...)

My guess is supported by the fact that I could exactly reproduce your error messages by using "Safari" as placeholder but mis-spelling it "SafariX" in the script.
Try this command in Script-Editor (with Photoshop running) to find out:

tell application "System Events" to get processes whose ¬
name starts with "ph"


Videos in Messages chats look terrible on iPhone 11 Pro I seem to be having an issue with my iPhone 11 Pro. Videos sent from my Mac to iMessage chats look like garbage (tiny, really low-rezzed down, pixellated when viewed) on my phone. Videos sent from my phone look like garbage on my Mac in the same chat thread. Videos sent from other people’s phones look like garbage on my phone, but fine on the Mac in the same chat, and fine on other people’s phones (no iPhone 11s though) in the same chat.

It’s definitely not a storage issue - I have several hundred GB free. The low-res image setting in Messages is off.

Update: I have isolated this to only happening in group chats. Regular 1:1 message threads seem to have fine videos.

Has anyone else seen this?

Do you have Send As SMS, Text Message Forwarding, or Low Quality Image Mode enabled under settings? Low Quality Image Mode is most likely culprit. Go to settings->messages->Low Quality Image Mode (Scroll all the way down)


'Change resolution' in menu bar I just upgraded to Catalina with a new Mac... and am wondering if it is possible to change the screen resolution from within the menu bar?

I was sure I used to do something like this years ago in Snow Leopard or Lion or something, but I might be getting mixed up with the 'external displays' menu.
Is this possible or do I need to go into System Preferences each time?

I am not awre of anything built-in to macOS that would do this, however there is a utility that will do this.
Though I have never used it myself it has been around for a long time and often comes up in MacInTouch discussions as a great utility: SwitchResX.


Stop Mavericks from opening apps on the second screen? I have a MacBook Pro and connected an external display to it, so far, so great. However, Mavericks seems to insist on opening new applications on the secondary display, even if the currently active (key and main) window/app is on the main display. Incredibly frustrating because they have different screen sizes and it messes terribly with my saved window sizes. Is there any way from stopping Mavericks from doing that? I only want apps to open on the main display, or at least have them remember on which display I closed them last time.

In case it helps, this is my display arrangement from the system preferences:

I'm used to connecting to conference room projectors or big-screens that vary in resolution, so as I move from room to room over the course of the day, my windows constantly have to be resized too. So I feel your pain. :-)

In order to avoid confusion, I want to define a couple terms for this answer:

The primary display is the one with the menubar in the Arrangement tab in System Preferences.
The main display is the one you want stuff on, whether or not it is the primary display.
The secondary display is the one without the menubar in the Arrangement tab in System Preferences.

Basically, the problem is that you see an important difference between the main and primary displays; Mac OS X does not, and it's going to fight you when you try to maintain this distinction by treating the secondary display as the main display.

Unless they specifically try to do otherwise, apps will always open on whatever the primary display is. That's definitionally one of the characteristics of the primary display. (It's a pretty low level part of the Quartz API, specifically the CGConfigureDisplayOrigin call, so this behavior is unconfigurable if the app itself doesn't let you configure it.)

I'd suggest maybe asking about the things that are making it annoying for you ("messes with other things" as you put it in your comment) to not keep your main display as the primary display when you connect, because those may be configurable; this behavior is not.

I do have a couple tricks for you that might help, though:

Mirroring and then un-mirroring displays causes all windows too large to fit on the smaller screen to be resized to fit and gets all the windows onto the primary display. It isn't the perfect solution, I know, since you want things on the secondary display, but it can be a useful workaround when combined with the next trick, especially if you know the keyboard shortcut: ⌘-F1. Press it, let the system switch to mirroring, and press it again. All your windows will be resized to the smallest display and will be on the primary display.

Another very useful tool for working around the issue is the BetterTouchTool, which lets you set "Center Window on Next Monitor" and "Maximize Window to Next Monitor" gestures. I assign these to four- and five-finger clicks, respectively, and then I can quickly pop a window from one monitor to the other just by mashing on the trackpad. (If you don't use a trackpad when you're connected to the big display, BTT can do gestures with other pointing devices, too.)

These two tricks together have made working with constantly-changing resolutions not perfect, but at least tolerable. If I want to get all my windows onto the secondary display (I'm giving a training session, say, and want the menubar to be visible to students but I want all my windows not related to the training to be on the other display), I do the mirror/unmirror trick and then four-finger-smack the trackpad a bunch of times until the windows are all popped over.

Finally, if you like to fiddle, you could take a look at this Applescript which moves all windows to primary via a different method. Unlike the mirroring method, which moves windows to primary as a side-effect, this one does it explicitly, so you could modify it to move windows to your preferred main, secondary, display. But it isn't easy, which may give you an idea of why everything's fighting you against this usage. Here's the crucial line of this Applescript:

set position of window x to {0, 22}

Since the menubar is 22 display coordinates (what used to be "pixels" before Retina displays) high, and screens and windows have their origin points at the top-left, this line moves window x right below and flush-left with the menubar. In order to adapt this script so it would instead move all windows to the upper-left of the secondary display, you'd need to figure out its coordinates, and use that as the x value. In the arrangement you show in your screenshot, the "0" there will be replaced by a negative number, since you're to the left of the menubar. It would take some fiddling to get right, especially if you wanted the script to work regardless of the arrangement.

This is all kludgey, I know; but you're going to have to accept kludges if you want your main display and primary displays to be different. That's why I'd really strongly recommend you try to address what's keeping you from letting the other display be primary rather than fighting this particular battle.


Why isn't my shortcut for accessing desktop not working? I'm using a Macbook Pro and I just upgraded to Mac Sierra.  I wanted to see if there was a keyboard shortcut for accessing my Desktop (and the icons that are on it) so I read this article -- http://www.noproblemmac.com/blog/2015/05/21/how-to-always-get-to-your-macs-desktop/ , and tried the shortcuts provided.  Specifically, Fn + F11 or Command + F3 (Mission control key?) but neither combination works.

How do I enable keyboard shortcuts for the desktop or what are the proper key sto press?

Whether or not you should use the Fn key depends on whether you have enabled "Use F1, F2 etc. keys as standard function keys" in Keyboard preferences. Try just pressing F11, without pressing Fn. And then look in the Mission Control system preference pane and see what key is assigned to Show Desktop.


Restore scrollbuffer and tabs in iTerm as Terminal.app does I love the restore functionailty of the Terminal.app when the app crashes or I need to restart my computer, Terminal.app will show me the recent scrollbuffer for the tabs I have open with a - [Restored] - key word below. So I know what I did in each tab.

Unfortunately, I did not find a comparable option in iTerm2 and I do not mean the Save Window Arrangement option. What I want is the restored scrollbuffer including all tabs when the app closed as the Terminal.app does.

Now why do I want that so badly in iTerm when Terminal does what I want? I want to be able to use the awesome tmux integration of iTerm ;)

What you want is implemented in the night builds of iTerm2. Follow the instructions to enable window restore and you should get what you want.


Modify the keyboard opt symbols Is there any way to (or existing program which can) modify the keyboard symbols you get when holding down the option key?

I.e. I want to be able to modify these mappings:

If you want to do this without using external application there is a good answer here

https://apple.stackexchange.com/a/130099/46541

DefaultKeyBinding.dict

Create ~/Library/KeyBindings/DefaultKeyBinding.dict and enter

{ "~l" = (insertText:, "@"); }

This rebinds ⌥L to insert @

~ = ⌥

Quit and reopen applications for the change to take effect

Some examples of external sources

https://apple.stackexchange.com/a/112381/46541


How to open terminal from within a folder using contextual menu? I want to create a shortcut to open a Terminal window from within a folder using contextual menu in Mavericks. What is the procedure to do so?

It's not exact answer for your question, but there is small app in Mac App Store called Go2Shell which adds button to Finder which opens Terminal with path of current folder opened.


Can I change the action that occurs when I close my laptop's lid? Is there any way to change what happens when I close the lid of my laptop?

Do macs have the option of hibernating vs. sleeping like PC's do?

If so, which of these is the default behavior when I close the lid?

macs do have hibernate and sleep, the default on newer machines is a combination. the closing of the lid saves to disk for hibernate but on wakeup if the battery has not run out it wakes from sleep. Macworld explanation

You can change it from the command line

sudo pmset -a hibernatemode 3

Or via preference pane

Apple docs


Omnigraffle - how to make double ended arrows? I'm learning Omnigraffle and am ok with most shapes. But I want arrows with heads at each end, like this (done in Pages.app):

I'd also like to know how to put the tips of the arrows where I want, rather than Omnigraffle's default which is to attach a line to a corner:, like this:

Following Dave Delong's answer below, I realized that you have to style each end of the line.

Like so:

Select the line (or lines) in your OmniGraffle document
Open the Style Inspector (Inspectors Menu ▸ Styles, or ⌘-1)
Select the second style inspector ("Lines and Shapes")

Use the popup menus to choose an arrow style


Wrong name on Mail app I'm using Yosemite and I've added my Google account to my Internet Accounts and when I receive emails to that account the name is displayed as Holidays in New Zealand. This is somehow funny and wrong.

Just when I disable the Calendar item under my Internet Accounts > Google my email is displayed right on Mail.

All my details under Mail (Full Name, etc) are right.

How can I still have my Calendar linked and my name displayed under my Mail  app?

i had the same issue with the exact same name, its amusing by feels somewhat intrusive

I think i have fixed it by clicking the drop down menu by "Holidays in New Zealand" and clicking 'remove from previous recipients list'

hope this helps


Hear two beeps after wake When I sleep my MacBook Pro and then lift the lid to wake it, after several seconds I hear a double-beep. Here is a link to a recording of the sound.

I'm not positive that this is related to the 10.13.5 update, but it didn't happen before the update.

I would like to determine which process is responsible for this audio playback so that I can determine why it is happening.

For me, it was calendar notifications. I noted the change when I upgraded to Mojave, that I got a notification sound whenever I opened the lid.  I had the calendar notification set to NONE - so there was no visual alert, but I had left "Play Sound" checked. It appears that if you have any notifications for the day, calendar alerts you on opening the lid. I toggled on the visual alert to confirm and, yep -- it was calendar alerts. Turned off sound and all was well.

System Preferences > Notifications:


iPhone 3G camera doesn't work My iPhone's camera stopped working. App opens but the shutter never opens. It holds still forever. It just came suddenly without any warning.

My iPhone was Jailbroken and I thought it was something to do with that (though it didn't make any sense as I had it Jailbroken for a couple of years now). So I installed the iOS from scratch (restore) without Jailbreaking it. Restored the backup. Camera worked... for a day.

Stopped working again. I tried Camera+ - no luck either, freezes on the "autofocus" rectangle.

What's happening and how to get it to work again?

I'm fine with Jailbreaking it again if there's any point (like need to access system files...).

Based on a research I did on the Internet it seems that the reason for this malfunction could be the sensor (whatever that means). With new phones this usually means warranty replacement. My phone is a bit too old for that unfortunately, but... I accidentally found a workaround!

Covering completely the camera lens with a finger when opening the Camera app seems to solve the problem! Covering the lens when the Camera app is already opened doesn't cause shutter to open though so the lens has to be covered prior to Camera app launch.


How can I find the date that I upgraded to High Sierra? I have recently discovered that some background processes are no longer running.  They appear to have stopped running around the time that I upgraded to High Sierra (~ 3 months ago).  Is there anywhere that I can find exactly when I applied this upgrade to confirm?

Follow these steps:

Go to Apple > About This Mac
Click on the System Report button
In the lefthand Sidebar scroll down to Software and select the Installations option
In the righthand pane you will see a list of software. Scroll through the list until you see the macOS High Sierra installations (see screenshot below as example):


Can i set "accept incoming connection" option for Apple Remote Desktop (ARD)? We already use Apple Remote Desktop (ARD) for Admin > User connections for admin / tech support sessions. In this instance we DO NOT require the User to confirm acceptance for the ARD session.

We also want to use it for User > User connections for collaborations / meetings. In this instance we DO require the User to confirm acceptance for the ARD session.

Is it possible to set ARD on the receiving computer to require the local user to authenticate / accept the connection ?

We set the user default on all machines and then automate changing it right before an IT / Admin connection needs to be made and then reset the default after the support engagement.

The command you need to craft is two versions of kickstart and then your admin can send the less restrictive command over ssh/ARD, then screen connect, then rest the default after using ssh/ARD remote command.

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


How do I prevent autocorrection to change part of my email address I recently have found that when I put my email address in a safari form or other Application, it changes my name from one word to two. e.g. fredsmith@....   auto inserts to fred smith@...   Is there any way I can change this?

Add "fredsmith" to the OS X dictionary by right-clicking or Ctrl-clicking on it when underlined in red and selecting "Add to Dictionary".


Purpose of XPCservices and Agent related to an Application Just for general knowledge what is the purpose of XPCServices and Agent related to a specific application? I will try to give you an example.
I noticed when I launch the Calendar Application I see the following 2 processes running:
/System/Library/PrivateFrameworks/CalendarNotification.framework/Versions/A/XPCServices/CalNCService.xpc/Contents/MacOS/CalNCService
/System/Library/PrivateFrameworks/CalendarAgent.framework/Executables/CalendarAgent

XPC Services
From Apple's Creating XPC Services:

There are two main reasons to use XPC services: privilege separation and stability.
Stability:
Let’s face it; applications sometimes crash. We don’t want it to happen, but it does anyway. Often, certain parts of an application are more prone to crashes than others. For example, the stability of any application with a plug-in API is inherently at the mercy of the authors of plug-ins.
When one part of an application is more at risk for crashes, it can be useful to separate out the potentially unstable functionality from the core of the application. This separation lets you ensure that that, if it crashes, the rest of the application is not affected.
Privilege Separation:
Modern applications increasingly rely on untrusted data, such as web pages, files sent by email, and so on. This represents a growing attack vector for viruses and other malware.
With traditional applications, if an application becomes compromised through a buffer overflow or other security vulnerability, the attacker gains the ability to do anything that the user can do. To mitigate this risk, Mac OS X provides sandboxing—limiting what types of operations a process can perform.
In a sandboxed environment, you can further increase security with privilege separation—dividing an application into smaller pieces that are responsible for a part of the application’s behavior. This allows each piece to have a more restrictive sandbox than the application as a whole would require.
Other mechanisms for dividing an application into smaller parts, such as NSTask and posix_spawn, do not let you put each part of the application in its own sandbox, so it is not possible to use them to implement privilege separation. Each XPC service has its own sandbox, so XPC services can make it easier to implement proper privilege separation.
For more information about sandboxing, see App Sandbox Design Guide.


How do I print my logical volume group UUID to file? I'm in the process of trying to automate getting the LVGUUID and printing it as a string to a text file, or better piping it in terminal to other commands. All I can do right now is diskutil coreStorage list and then copy/paste the UUID as needed. Is there a faster way to do this?

Note: This answer is just example code as I only have one Core Storage Volume to test against, however, if there's more then one, the awk command could be modified to accommodate accordingly. Although without the output of multiple Core Storage Volumes, I cannot give an example.

If it's the Logical Volume Group UUID, you can user the following example:

$ lvguuid="$(diskutil coreStorage list | awk '/Logical Volume Group/{print $5}')"
$ echo "$lvguuid"
696AD841-1F53-4D33-9496-3E36D33AB270
$

In the awk command, you can substitute Logical Volume Group with Physical Volume, Logical Volume Family and  change $5 as appropriate. Based on the order of the search string shown in this line, it will be $5, $4, $5.

For Logical Volume, you'll need to use a regex, as in the following example:

lvuuid="$(diskutil coreStorage list | awk '/Logical Volume [A-F0-9]{8}-/{print $4}')"

Understanding the regex:

Logical Volume [A-F0-9]{8}-

Logical Volume matches the characters Logical Volume literally (case sensitive).

[A-F0-9]{8} - Match a single character present in the list below.

{8} Quantifier — Matches exactly 8 times.
A-F a single character in the range between A (index 65) and F (index 70) (case sensitive).
0-9 a single character in the range between 0 (index 48) and 9 (index 57) (case sensitive).
- matches the character - literally (case sensitive).

So, in my example awk matches Logical Volume 38712F52- and returns:

38712F52-5967-4A49-87D6-C66D4B199F28

The above examples set a variable that can be called from the command line or script, however, if you what the output to a file, then use the following example:

diskutil coreStorage list | awk '/Logical Volume Group/{print $5}' > /path/to/filename

On my system here's the output of the diskutil coreStorage list command on an encrypted USB Flash Drive:

$ diskutil coreStorage list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 696AD841-1F53-4D33-9496-3E36D33AB270
    =========================================================
    Name:         Encrypted
    Status:       Online
    Size:         15661490176 B (15.7 GB)
    Free Space:   16777216 B (16.8 MB)
    |
    +-< Physical Volume E0E76F6B-A4E2-466D-B8E5-D5977ECD0522
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk3s2
    |   Status:   Online
    |   Size:     15661490176 B (15.7 GB)
    |
    +-> Logical Volume Family EAF4984B-94C8-49B6-BCC6-76A8724E04D2
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         AES-XTS
        Conversion Status:       Complete
        Conversion Direction:    -none-
        Has Encrypted Extents:   Yes
        Fully Secure:            Yes
        Passphrase Required:     Yes
        |
        +-> Logical Volume 38712F52-5967-4A49-87D6-C66D4B199F28
            ---------------------------------------------------
            Disk:               disk4
            Status:             Online
            Size (Total):       15325941760 B (15.3 GB)
            Size (Converted):   -none-
            Revertible:         Yes (unlock and decryption required)
            LV Name:            Encrypted
            Volume Name:        Encrypted
            Content Hint:       Apple_HFS
$


Is there possible to export XML from Final Cut Pro without open the Application? Is it possible to export XML from Fincalcut Pro without open the Application?

By XML I mean .fcpxml.

Why? Cause I want to do automate export and process the data programmatically.

I don't think so, but you can automate opening the program, and exporting the XML.


Why doesn't Karabiner map F2 from the touch bar? I used Karabiner to map f2 to return_or_enter, so that F2 can rename files in the Finder. The configuration is "for all devices", not specific keyboards and is taken directly from Karabiner on-line configuration options "Use F2 as Rename."

This works on my external  keyboards (Apple and Microsoft), but not in the touch bar.

Apparently touch bar F2 is not being detected as such--even though Karabiner EventViewer shows its events as code 59, f2, just like the external keyboard.

Touch bar configuration is shown below.

How can I configure this correctly in Karabiner?

Maybe it's your setting problem.
https://github.com/pqrs-org/Karabiner-Elements/issues/1700


"__git_ps1: command not found" from running "/usr/bin/env bash" When I run $ /usr/bin/env bash (but not otherwise) I get the error: __git_ps1: command not found
I've tried updating ~/.git-prompt.sh and ~/git-completion.bash for the version of git that I'm using. I've confirmed that the lines source ~/git-completion.bash and source ~/git-prompt.sh are present in ~/.bash_profile.
The error doesn't appear when I only open Terminal from Finder, but when I run $ /usr/bin/env bash the error appears every line.
MacOS 10.10.5, bash 5.0.17(1)-release, git 2.22.0

The developer probably wants your output of env to suss out why your variables are not as expected. Running env with arguments tries to locate it in the path explicitly and without arguments dumps all the variables.


How to troubleshoot Network Connect issues? I have to use Juniper's Network Connect to use my company's VPN.  I haven't changed anything on my system in the past few days, but suddenly Network Connect fails to connect to the VPN with the following error message:

The log shows the following:
2013-03-20 11:38:35.675 ncproxyd[p298.t1799] ipsec.info New tunnel being created (tunnel.cpp:52)
2013-03-20 11:38:35.681 ncproxyd[p298.t1799] routeutils.info Creating Desktop route table iterator (routeutils.cpp:289)

I have tried to uninstall Network Connect, remove all of the files that NC leaves on my system (documented here), and reinstall.  I've removed my wifi connection, rebooted, and readded it.  I've mixed these.
I'm using OS X 10.8.2 and Network Connect 7.1.  I'm at a loss.  How can I get my VPN working again?
Edited on 2013-11-07 to add:
I'm now on 10.9 and still experiencing this issue.  My company's IT reports that there are several other Mac users across various versions of OS X who are having the same issue.  They haven't been able to figure out what is going on.  My company has a backup VPN from another provider, and those of us impacted by this issue have been placed on it.

Have you tried using Junos Pulse instead? At the very least it seems to be better at reporting errors.


Data Not Backed Up, Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF I was trying to install Linux on my MacBook for class when I bricked my computer, which now in an unbootable state.

I made my partition too small, so I was going to delete and create a larger one. However, Disk Utility did not allow me to delete the small partition. I followed the instructions from https://apple.stackexchange.com/a/238088/236252

However, not only was I still unable to delete it, but upon restarting I realized my primary partition (located on the same disk) changed into FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF, and I had no options to boot.
(I am sure I performed the command on the correct disk and partition)

I saw some similar threads, but my main bootable drive is the one that got corrupt.

I don't want to lose any data. I'm not the most terminal savvy, so ANY help is appreciated, and I will kindly provide any additional information!

(Disk 0, partition 2 is my main partition, and that only one I care about)

Below are the results of
$ diskutil list and $ gpt -r show disk0.

UPDATE: :
I have followed @klanomath 's instructions. At the last step I received the following error:

Checking prerequisites
Checking the partition list
Checking for an EFI system partition
Checking the EFI system partition's size
Checking the EFI system partition's file system
Problems were found with the partition map which might prevent booting
Error: -69766: The partition map needs to be repaired because there's a problem with the EFI system partition's file system
Underlying error: 8: POSIX reports: Exec format error

FINAL UPDATE: SUCCESS!

I just wanted thank @klanomath for helping me through this entire process. He spent 11 hours TeamViewing with me until not only my files were accessible, but until I could access my computer as could before this whole debacle (and this was after 5 hours of email correspondence).

To any future reader with this problem: PLEASE don't give up, it can be fixed!

To add an answer exactly fitting to your case I slightly modified my answer in the linked "duplicate" and posted it here again.

The second as well as the third partition of your internal disk got the wrong partition type, your data probably won't be lost.

A bootable OS X partition (except the Recovery HD) either has the GUID 48465300-0000-11AA-AA11-00306543ECAC for a standard OS X partition or the GUID 53746F72-6167-11AA-AA11-00306543ECAC for a CoreStorage partition. The FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF is an unknown partition type (but not no partition like the 000000-0000-0000.... one).

The first block of a standard OS X partition doesn't contain non-zeros, the first block of a CoreStorage partition contains some non-zeros. To get the first 3 blocks of a partition you have to use a substitute for hexdump/xxd (both aren't available in Recovery Mode/OS X Installer boot drive). The best I have found is dd if=/dev/diskXsY count=3 | vis -c.

The GUID partition table can be modified with gpt. gpt only writes to the first 34 and the last 33 blocks of a disk(512) or the first 6 and and last 5 blocks of a 4k disk. Modifying the partition table (even falsely) doesn't alter the content of any volume on your disk, if you don't initialize or repair a volume/disk by request. You may verify it though.

Boot to Internet Recovery Mode or an OS X Installer boot drive
Open Terminal in the menubar Utilities > Terminal
Get an overview with diskutil list
Get an overview of your internal disk with the disk identifier found in the previous command. Below I assume the disk identifier of your internal disk is disk0 (replace it with the one you have found in your environment)

gpt -r show disk0

Unmount disk0 with diskutil umountDisk disk0
vis the first 3 blocks of the FFFF... partition:

dd if=/dev/disk0s2 count=3 | vis -c

If you had a standard partition previously the first 1024 Bytes only contain non-printable (zeros): \0\0...
At ~Byte 1030 you will see the following sequence: \0HFSJ\0
If you had a CoreStorage partition some non-zeros in the first 512 Bytes and the string CS (...\0CS\^A...) are shown:

\^U\^D\^A\M-s\M^?\M^?\M^?\M^?\^A\0\^P\0\0\0\M-W\^A\a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^B\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\M^Pu\M-\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0CS\^A\0\0\0\^D\0\0\^P\0\0\0\0@\0X\M-7}\^C\0\0\0\0X\M-;}\^C\0\0\0\0X\M-?}\^C\0\0\0\0X\M-C}\^C\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\^P\0\0\0\^B\0\0\0006j v\^R\M-+\^U\M^[\f\M^CdG\M-y\^]...

Now remove the third, the fourth and the second partition:

diskutil umountDisk disk0
gpt remove -i 3 disk0
diskutil umountDisk disk0
gpt remove -i 4 disk0
gpt remove -i 2 disk0

If you get an error message like "resource busy" just unmount the disk again or unmount stubborn volumes with diskutil umount disk0sX.

Re-add the recovery partition with the proper type but the same index number, start block and size it had previously:

gpt add -i 3 -b 227212504 -s 1269536 -t 426F6F74-0000-11AA-AA11-00306543ECAC disk0

Re-add the main partition with the proper type but the same index number, start block and size it had previously:

Either a normal OS X partition (if you have found the typical traces of a normal partition in the dd ... vis step):

gpt add -i 2 -b 409640 -s 226802864 -t 48465300-0000-11AA-AA11-00306543ECAC disk0

or (if you have found the typical traces of a CoreStorage partition):

gpt add -i 2 -b 409640 -s 226802864 -t 53746F72-6167-11AA-AA11-00306543ECAC disk0

Your disk should finally look like this if you have found a standard OS X partition:

    start       size  index  contents
        0          1         PMBR
        1          1         Pri GPT header
        2         32         Pri GPT table
       34          6
       40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640  226802864      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
227212504    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
228482040    8496103
236978143         32         Sec GPT table
236978175          1         Sec GPT header

or this, if you have found a CoreStorage volume:

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

Finally verify/repair the disk with diskutil verifyDisk disk0 and/or diskutil verifyVolume disk0s2. If a repair is needed use repair (instead of verify) as prefix in the above commands but contact me before repairing it and send me the error message.

Further investigations via TeamViewer sessions revealed that the EFI partition and the Recovery HD partition are corrupted. The main volume is encrypted.
The Recovery HD contains a special intermediate FileVault key then. If the key is missing the main system won't boot. It was possible to unlock the drive though with diskutil cs unlockVolume ....

After installing a full macOS to a thumb drive and booting to it, the EFI partition and the Recovery HD of another non-FileVault drive (actually those of a Sierra VM) were dd'ed to the broken drive. Still booted from the thumb drive, the FileVault volume was reverted to a standard volume by right-clicking on the volume in the Finder, choosing "Decrypt volume" and entering a valid user password. This has to be the password of an eligible user account on the FileVault volume. Other methods to decrypt the volume like diskutil cs revert lvUUID or diskutil cs decryptVolume lvUUID - tested in a virtual machine only - didn't seem to work. This might be a restriction of VMs though.

To expand the main partition (disk0s2) to the full size, use Disk Utility or the diskutil resizeVolume ... command.

The volume initially didn't appear in System Preferences > Startup Disk, but alt-booting the Mac unveiled the main volume. This probably re-blessed the volume's boot.efi properly. The (now standard) volume appears in Startup Disk again.


Moving vast distances and keeping app store purchases It looks like I will be moving shortly (From Australia to America) and I am wondering if it is possible for me to keep my app store purchases when I get a new phone in the USA.

I currently have a 'few' apps that are paid for ( maybe $200+ worth ) from throughout the years, spread across my phone and a few ipads.

Last time I was in the USA I found great difficulty with installing apps on my ipad  (even though they had been previously purchased) due to not being able to connect to the australian tunes store. But that was a short visit.

I plan on doing a full backup/restore of my old phone to my new one once I have landed.

On top of trying to keep my paid purchases I would also like to keep my data from said apps if possible.

I believe that I will not have the same issues with my mac in regards to updates for apps but the apps themselves should be ok.

First: keep your apple-id in one “Country Store”. Don’t change the country of your apple-id. Apple will screw it up, throw away your purchases or something of the kind. You can move an apple-id to a new country store (and back again), but it seems like an afterthought from Apple. You will only be able to see/access your purchases from the country store presently associated with the account.

Stick with what you have for the moment. If you really need a new apple-id / iTunes account in the USA; Make a new one. Your old apple-id and purchases can live alongside the new on the new i-device and in the same iTunes library.


Macbook is waking up from sleep while on wifi with iMac I have an Macbook Pro 13" 2018 as my portable/home computer and iMac in the office as workstation. When I bring the Macbook to the office and it connects to office wifi, it keeps waking up in the bag, draining the battery.

I tried to reinstall macOS, everything was ok until I signed in with my Apple ID, so I suppose it's due to handoff/continuity (only thing I have installed now is iStat menus and I'm signed to iCloud, nothing else, clean OS.)

I can lose almost full battery in one day in sleep if I don't turn off wifi and also the Macbook gets very hot and it even reboots itself because of the high temperature.

I use macOS 10.15.2 on both computers.

How can I prevent this and still have handoff/continuity enabled?

Power Management is the culprit.

You should use the pmset command to see what power management has been doing.  In Terminal, the basic command is

pmset -g log

But that gives you all the power management events since last boot time.  You can reduce this with judicious use of grep.  I have used both of these (with similar results):

pmset -g log | grep -e "Wake from" -e "DarkWake" -e "due"
pmset -g log | egrep "\b(Sleep|Wake*|DarkWake|Start)\s{2,}"

Power Management has about 20 settings that can be changed by an admin user.  To view the settings (they will be different when on battery and power):

pmset -g

For my issue, which looks similar to yours, I changed the tcpkeepalive setting.  With this enabled (value = 1), the MacBook will frequently wake up due to network events.

To change turn off tcpkeepalive use the Terminal command:

sudo pmset -b tcpkeepalive 0

The -b is to set for when running on battery.

I have also tweaked a few other settings like standbydelayhigh, but this is purely tweaking.

This is based on my experience with a MacBook which would lose too much (I thought) battery whilst closed overnight.

You may find these two links helpful:
How to Fix macOS Mojave Battery Draining Issue and
man pmset.

Note that I have not changed hibernatemode from the default value of 3.  Many (including the linked article) discuss changing it to 25 which I do not recommend with recent (last 4 years) hardware and macOS version.


iPod Touch Not Showing Under Devices in Finder I'm a software developer that recently switched to a Mac. I am using OS X 10.8.2. I am trying to debug an issue with a website using an iPod touch. I've been told that I can connect the iPod to my Mac mini via USB and use the Safari development tools to debug on the iPod. However, I haven't even gotten this far, as when I connect my iPod it does not show under devices in Finder. Could anyone tell me what I am doing incorrectly?

The iPod won't appear under Devices in the Finder, so you're not doing anything wrong.

In Safari on the Mac, first enable the Develop menu by going to Safari > Preferences > Advanced > Show Develop menu in menu bar
Plug the iPod in over USB and launch Safari (on the iPod)
Back on the Mac, go to Safari's Develop menu and you'll have a new menu item for your iPod touch, which lists all of its open Safari tabs in a submenu
Select a tab from that submenu and Safari's Web Inspector will open. You can now debug the page on the iPod touch through the Web Inspector on the Mac


Manage Sort options in OS X Photos App OSX 10.10.3 has been just released and I immediately migrated my iPhoto library to Photos.

More or less there's everything I'm used to in iPhoto but Apple's removed a useful function: I can't reverse the order by date of an album! I mean, on iPhoto I have some smart album sorted with recent photos on top and older bottom but, by default it would be otherwise. In iPhoto there was a menu voice to set it but in Photos, actually, there isn't.

I tried searching album source file (as a .plist) to modify but I can't find it.

Has some one any idea on how to manage sort options on new Yosemite's Photos?

I sort by date by selecting Albums at the top of Photos window.

Then use the View menu to check Keep Sorted By Date

There isn't any way to reverse that currently and I don't see any indication that they'll do anything other than tell you to scroll to the bottom to see the other ordering.


macOS Catalina Downloading information to target volume failed ERROR I am trying to update macOS from Yosemite (10.10) to Catalina 10.15.) on my mac book pro 2015, I downloaded the installer from the app store on my mac but every time I click continue to set up the installation I get this error message that reads "downloading installer information to the target volume failed"
I tried many solutions and searched everywhere but no solutions so far, I tried to use a patcher that also didn't work. I tried to install it from the terminal but that also didn't work.
What could be the cause of this?
is there a way to fix this?

It is recommended to not make such a large leap in operating system versions, skipping more than two macOS releases is inherently dangerous.  I sincerely doubt it receives the same kind of testing that an incremental upgrade would receive. Ideally, it would be recommended to backup your data and perform a clean installation of Catalina if you can create a bootable macOS flash drive possibly with another Mac.
However you can try upgrading to an intermediate version such as Sierra or High Sierra then upgrade that to Catalina.  A great deal has changed and the big one is the change from JHFS+ filesystem to the new APFS filesystem.
If your disk is encrypted you need to turn off FileVault or you are going to be at far greater risk of a major problem.
Here are the Apple Support pages where you can download various versions of macOS using special links. The downloads are hidden from the App Store via search or are distributed from backend CDN Apple storage. For High Sierra+ the downloads will be made from the App Store but older releases will come from a CDN (Content Distribution Network).
https://support.apple.com/en-us/HT208202 - Sierra
This will download an InstallOS.pkg that creates the /Applications/Install macOS Sierra installer which needs to be run manually after the InstallOS.pkg.
https://support.apple.com/en-us/HT208969 - High Sierra
https://support.apple.com/en-us/HT210190 - Mojave
https://support.apple.com/en-us/HT201475 - Catalina
Instructions on how to make a bootable installation for everything but Sierra
https://support.apple.com/en-us/HT201372
El Capitan can be rather difficult to get working, your mileage may vary. I've found it to be far easier to go with Sierra or High Sierra.


How to prioritize WiFi networks on iPhone I can connect to multiple WiFi networks on my iPhone but the problem is that I cannot prioritize them. iPhone automatically connects to a specific network, which is slower in my case, and then I have to switch to the faster one from the network list.

How can I prioritize known WiFi networks on iPhone?

To ensure that your iPhone does not connect to the slower network, go to Settings > WiFi > tap on the blue arrow to the right of the slow network > tap on "Forget this Network"

Next, make sure you connect to the faster network. This way, your iPhone will connect to the fast network and not to the other each time the fast network is in range.


Is there a way to prevent iOS 7 from changing the colors of wallpaper images? When I create a custom wallpaper image and assign it to the lock screen on iOS 7, the colors of the image are changed. Oddly, if I take a screen capture of the lock screen, the colors match those of the original image.

Is there a way to prevent this? Is it intentional? Perhaps there's something subtle about color management on iOS that I'm missing.

Note: Providing images that document this is (clearly) tricky, but I hope to have some soon. In the meantime, perhaps this is a known issue or feature that someone can help with.

There is a toggle you can flip to increase this effect even further.

Settings -> General -> Accessibility -> Increase Contrast

I'm a bit surprised the screen capture restores the original color, but I'm not surprised that on iOS devices with a powerful GPU that processing is happening on something as layered as the home screen / springboard view. That processing is one of the main design features of iOS 7 as I see it. Increasing text legibility on the home screen and the lock screen are clearly design considerations I would expect to see - even if they are subtle or slight as you describe for your current choice of custom image.


I got Lysol in my headphone jack. How should I get it out? I was cleaning and I accidentally got Lysol in my phone. I’m mostly concerned about my headphone jack because I can’t listen to music since it’s saying I have headphones on when I don’t

I would take a piece of tissue and roll one corner into a tight long piece and slide it into the headphone jack and roll it around. This should clean out the jack. I'd recommend a cotton swab but I think the jack is too small. Maybe use a toothpick with the tissue paper. Be careful not to leave tissue in the headphone jack.


How do I create a directory structure? I ran these commands to make the directory:

mkdir webpack-demo
cd webpack-demo
npm init -y
npm install webpack --save-dev
npm install webpack-cli --save-dev

and then type cd webpack-demo, then if I type ls I get "node_modules"       "package-lock.json" "package.json"

but then when I attempt to follow the next instructions from the webpack basic set up instruction page:

  webpack-demo
 |- package.json
+ |- index.html
+ |- /src
+ |- index.js

I get the following output from terminal:

|- package.json
-bash: syntax error near unexpected token `|'
+ |- index.html
-bash: +: command not found
-bash: -: command not found
+ |- /src
-bash: +: command not found
-bash: +: command not found
+   |- index.js
-bash: +: command not found
-bash: -: command not found

What am I doing wrong?

The instructions use the same formatting for commands you need to enter and for output, which is confusing. Just use mkdir to create any missing directories.

PS: It seems as if the directory structure within webpack-demo is created automatically by the various commands you run (or are supposed to run), so you may not even need to create additional directories yourself.


How to create a recovery disk after using the up-to-date program? I used the Up-to-Date program to update OSX to Mountain Lion.

Now I'd like to create a recovery disk, but I can't use the same code to redeem installation package, and from the Apple Store it seems that I don't own a copy of Mountain Lion and that I should buy it to be able to download it. How to get the InstallESD.dmg file?

Or how should I create a recovery disk without this file?

Apple's Recovery Disk Assistant
...enables you to create a recovery USB. While this recovery USB does not contain the installer image, it is able to install Mountain Lion (see 3rd paragraph).
You can download the official software from Apple here. Note that you can create the recovery USB only if you have a Recovery HD partition on your Mac. You can verify this in the Terminal using: diskutil list.
The Recovery Disk Assistant requires just 1GB because is does not store an OS X installer image (usually named InstallESD.dmg). Instead it will download the latest version of Mountain Lion right before the installation - if the recovery USB has been created in Mountain Lion.
You are still able to use the recovery USB without internet access if you just want to open Disk Utility from it for example.


How do I stop VoiceOver on iPhone from being interrupted by notifications? Speak Notifications is set to OFF but it still will break mid paragraph and say "new notification from..." or "new text message from..." then I have to start the reading all over again.

This seems like a bug to me. It's especially annoying when the block of text is huge and can only be voiced in entirety.

I use Voice Over all the time and if I understand it correctly the setting for Speak notifications in the VO settings is just to speak the notificatons when the screen is locked. Unfortunately the only way to have it not speak individual notifications is to turn each one off as there is no way to all notifications on or off at once. Hopefully ios 6 might remedy this with the do not disturb setting that is supposed to be included.


macbook mid 2010 white 13.3" running high sierra has half chance to boot I have "Macbook (13-inch, Mid 2010)" it has white plastic case with 4GB 1067MHz DDR3 RAM and NVIDIA Geforce 320M 256MB.

Model Identifier: MacBook 7,1
Boot ROM Version: MB71.003F.B00.18022149
SMC Version (system): 1.60f6

It had originally El Capitan installed. It booted nicely every time. I think that I didn't go trough all software updates it provided.

I did a fresh install of High Sierra from USB flash drive. I went trough some installation steps with errors and restarts.

Now when I boot, there is a 50% chance of booting to OS.

Other times I see grey Apple logo and a progress bar that is filling slowly, gets to 100% and then nothing happens for a whole day.

There were some updates of software in between, but they are not related to this booting problem.

Is there any way how to fix this problem?

Here's a list of things I have done to test/diagnose the problem:

three passes of extended Apple Hardware Test;  passed OK.
First Aid on HDD; passed OK.
First Aid test from Disk Utility passed with no errors
smartctl short and long HDD tests passed with no errors.
I tried to reset NVRAM and SMC. Didn't help.
I recently did an update in High Sierra and update of the SMC to the latest version provided for my hardware. Didn't help.
I was doing some High Sierra updates, re-installs to Lion, El Capitan and Snow leopard and my Boot ROM Version has changed from MB71.003F.B00.18022149 to 66.0.0.0
according to this article from 31.10.2018, my firmware was latest to that day, so i probably have a recent firmware.
output of diskutil info disk0 | grep SMART is SMART Status: Verified but as I said I used smartctl to run short and long SMART tests which passed. Anyway SMART looking ok may mean nothing.
verbose boot shows a message Waiting for DSMOS... with few other messages

removed second partition formatted 320GB partition to APFS and reinstalled high sierra from usb flash drive, original distribution from apple store. didn't help it freezes every other boot.

What you don't say is how the system behaved before you installed/reinstalled High Sierra. That would be vital information along with what was on it before.

That said there could be a lot of things going on.

Damaged/corrupted OS install
Damaged/corrupted HDD
Other hardware problem including failing RAM or other failing component

What you are going to need to do if you want further help is to fill in the blanks by editing your original post (don't add a comment edit the original) so we can better be able to assist you.


How does one configure a temporary exception to ATS on El Capitan and fix webkit2png? [16:46] webkit2png http://www.google.com
Fetching http://www.google.com ...
2015-10-12 16:47:05.644 Python[34891:1646785] App Transport Security has
blocked a cleartext HTTP (http://) resource load since it is insecure.
Temporary exceptions can be configured via your app's Info.plist file.
... something went wrong: The resource could not be loaded because the App
Transport Security policy requires the use of a secure connection.

How/where does one configure a temporary exception to use webkit2png with ATS?

Code edit posted here allows for use of non-https domains under El Capitan. Edit code as specified. webkit2png --ignore-ssl-check [options] [http://example/] for desired result. Good luck.


ClickToPlugin alike for Firefox? I recently stumbled upon Pentadactyl. Its power is making me think about switching from Safari to Firefox. However there are some Safari extensions I really find useful.

ClickToPlugin
Reddit and MacRumors Minimal

I can live without the minimal extensions, however ClickToPlugin is really useful. It for once disables all flash content on the webpage, and when clicked transforms the flash content to an HTML5 video.

Do we have an equivalent ClickToPlugin extension for Firefox?

NoScript
...can block plugins which you enable once via click-to-play or permanently by white-listing domains that they load content from.

While its primary aim is preventing malicious JavaScript from running, NoScript effectively blocks Java™, Silverlight™, Flash®, and other plugins and embeddings (such HTML video/audio elements and downloadable fonts) on sites you didn't explicitly whitelisted.
Java Applets, Flash movies/applications, Quicktime clips, PDF documents and other content won't be even downloaded from sites where you consider them annoyances or dangers, saving your bandwidth and increasing your navigation speed.

NoScript's settings for blocking plug-ins can be found in:
NoScript Preferences → Embedded Content
Overall though, I'd not recommend this add-on if your goal it to merely to reduce  noise. NoScript has been written first to block javascript and it is a wonderful tool for that.
However, because it's so powerful and configurable, it can be difficult to use for newcomers and takes a while to setup.


Applescript to Heart or Love or Favorite song Anyone know if there's away to heart/love/favorite a song in the new iTunes via applescript?  Basically I want the ability to heart a song from Apple Music without switching back to iTunes.

This is the script I use. It toggles the loved status of the current track.
tell application "iTunes"
    if loved of current track is true then
        set loved of current track to false
    else
        set loved of current track to true
    end if
end tell

It also works for Apple Music; just replace "iTunes" with "Music".


Database Migration from legacy app on old iPad I recently replaced my old iPad 2 (2011 - iOS 9) with a new iPad 10,2" (iOS 14). I personally made the migration between the two iPad and everything worked quite well.
Everything but ONE APP. This app, called Anamnesis, reported "the app is not compatible with this iOS version". I wrote to the app developer (www.fuze.cc) which is not answering. I wrote to each member of the Fuze team and only one answered me (Icaro) who is no more working on Fuze, unfortunately.
I'm quite desperated because I strongly need this app to work: I use Anamnesis to register each patient I see everyday. I have about 1000 records in that Anamnesis database, which is stored locally in the old iPad.
There's no option in Anamnesis to export the database into a new one. There's no option to migrate it with a cloud service. I don't know what to do to make use of that database into the new iPad or to transfer that data into a new database which I can use into an app compatible with the new iPad.
I'm writing an webapp with Zoho Creator, so one day that I will have the database I can slightly control the migration. But actually, I don't know what to do.
This is a screenshot of Anamnesis taken in the old iPad:

Unfortunately it is completely irresponsible to store patient records without regards for security, backups and vendor support, and without being aware of the fact that the vendor discontinued the product and removed it from the App Store years ago. In many countries you would risk being fined heavily by the authorities.
At this point, you have a few options:

Contact the vendor offering money to have them help you migrate the data.

Contract a third party developer or IT-professional that can help you migrate the data (you could be 'lucky' that the data is simply stored in a SQLite database on device)

Migrate the data manually

I would strongly suggest initiating option 3 immediately while simualtenously pursuing the first two options.
Migrating the data manually could be done by simply going through all data in the app and taking screenshots along the way. Make sure to handle those screenshots in a professional and ethical manner - i.e. ensure they're not synced with Dropbox or Google Photos or something like that - and transfer them to a secure PC, where you can transfer the data into a new patient records system.


Clarifications for a controlled upgrade of a VirtualBox-ed Catalina For some tests, I need to deploy a precise setup: MacOS 10.15.4 with Xcode 12.3. My MacMini 2018/2020 is running 10.15.5 with VirtualBox 6.1.12. I have a running VM with 10.15.0 which I snapshot after installation. My plan was to then do a manual upgrade to 10.15.4 thanks to the corresponding combo update, as I do not want to jump to the latest Catalina version.
The process of the manual update is to mount the dmg file, which then shows the pkg file that starts the upgrade process when run, and asks to reboot at some point to finalize everything.
The reboot doesn't take me to the upgrade process, but back to the 10.15.0.
There are many blog posts and guides regarding what to do when you go through the more classical path of having an update be downloaded to /Applications/Install macOS xxx.app.
My guess is that at some point, both ways of upgrading follow the same process (eg reboot to some kind of "upgrade partition" that will overwrite the OS files, reboot to upgraded OS). I would like clarifications on the parts where these upgrade paths differ, so that I can troubleshoot what is preventing me from reaching 10.15.4.
In the past, I did similar things with 10.14 and my notes on the topic don't show such an issue (rather issues with lack of APFS support in VirtualBox at that time). In particular, I think the partition layout has changed since then.
Essentially, what I tried so far:

start manual upgrade process through the .pkg, reboot
interrupt boot by hammering Esc, reach some kind of grey and blue boot manager (is that VBox or Apple stuff? this is not the VBox EFI shell, there is a text-based UI menu with "Device Manager"/"Boot Manager"/"Boot Maintenance Manager")
explore partitions, looking for an EFI boot file (I spotted the recovery one, can't find the "regular" one nor the "upgrade" one)
boot

For example, I wonder if the pkg is partially extracted and that I am supposed to find a boot.efi somewhere on the "System Data" partition. If so, where should I look for it? Do I have a more "sysadmin" way of deploying this upgrade, in particular without reboot?

I restarted from scratch, with a new dynamic VDI of 60GB instead of 30GB, as I felt I would be in trouble later with the installation of Xcode.
The upgrade went flawlessly.
There was definitely no obvious sign nor warning that more space was needed previously.


How can I prevent a user to use admin rights to work around restrictions? We just bought my husband a new Mac.
Currently, we each have parental restrictions requiring a password on our accounts when it comes to "mature" ratings on our iPhones and iPads (older generations) This holds us accountable for each other and prevents inappropriate "adult" material from being viewed:downloaded on our machines and causing issues in our marriage.
However, with the new MacBook Air that we purchased, he is the administrator because it is his computer. We noticed you can't set up parental controls as the administrator. Is this correct?

If he were to set up another account as a guest, could he still use his iCloud under that setting? Could we lock the administrator account so that settings could not be changed?
Could someone set the password for "administrator" to something we don't know and have him use an account as a managed user under his Mac?

What is the best way to own the computer, be the primary user but also set self limitations?

Well, somebody (aka at least one user account) needs to have full admin privileges on a Mac, there is no way around it. If you want to restrict the ability of an account, you will have to set up a dedicated user account (and define Parental Restrictions for it) and use this account for day to day work.

You would still need an admin account to install software etc, so you could for instance split the admin password in half, with each of you only knowing one part. Whenever an admin password is required, you both would need to sit in front of the Mac then and enter your respective half.


MacBook Pro battery percentage jumping down and up Recently, my 2011 MacBook Pro 13' produces strange instantaneous jumps in battery percentage. Sometimes, when it is discharging, it drops by ~40% (and if it was near or at less then 40%, it shuts down unexpectedly), sometimes (both when discharging or charging) it suddenly increases by 40%.

The output of coconutBattery shows that the maximum charge is at the half of the design capacity when the 40% is "missing":

Then the maximum charge seems to go back to normal:

System Report says:

Battery Information:

  Model Information:
  Serial Number:    W00030C0L77ZC
  Manufacturer: SMP
  Device Name:  bq20z451
  Pack Lot Code:    0
  PCB Lot Code: 0
  Firmware Version: 3
  Hardware Revision:    2
  Cell Revision:    100
  Charge Information:
  Charge Remaining (mAh):   2979
  Fully Charged:    Yes
  Charging: No
  Full Charge Capacity (mAh):   2979
  Health Information:
  Cycle Count:  86
  Condition:    Normal
  Battery Installed:    Yes
  Amperage (mA):    0
  Voltage (mV): 12471

System Power Settings:

  AC Power:
  System Sleep Timer (Minutes): 10
  Disk Sleep Timer (Minutes):   10
  Display Sleep Timer (Minutes):    180
  Wake on AC Change:    No
  Wake on Clamshell Open:   Yes
  Wake on LAN:  Yes
  Current Power Source: Yes
  Display Sleep Uses Dim:   Yes
  PrioritizeNetworkReachabilityOverSleep:   0
  Standby Delay:    4200
  Standby Enabled:  0
  Battery Power:
  System Sleep Timer (Minutes): 10
  Disk Sleep Timer (Minutes):   10
  Display Sleep Timer (Minutes):    15
  Wake on AC Change:    No
  Wake on Clamshell Open:   Yes
  Display Sleep Uses Dim:   Yes
  Reduce Brightness:    Yes
  Standby Delay:    4200
  Standby Enabled:  0

Hardware Configuration:

  UPS Installed:    No

AC Charger Information:

  Connected:    Yes
  ID:   0x0100
  Wattage (W):  60
  Revision: 0x0000
  Family:   0x00ba
  Serial Number:    0x002b46f4
  Charging: No

Should I suspect hardware failure, or is there something I might try to fix this erratic behavior?

I do not know if your CoconutBattery is doing that but the numbers do not make sense at all.

Can you look under About this Mac -> More Info -> System report -> Power and get the battery numbers from there.

What you showing here is a old battery, that has already seen over half of its life but it shows only 86 load cycles--- which is not possible/correct.

In your case resetting the SMC might solve the problem.

Here is how to:

Intel-based Macs: Resetting the System Management Controller (SMC)


Can't run Google Chrome on macOS Sierra For some reason, no matter how many times I delete (using AppCleaner) and redownload Google Chrome, I am unable to launch Chrome on my 2017 MacBook Pro running 10.12.6 Sierra.

When I click on the application, it's icon appears momentarily in my Dock and then disappears.  I am using Firefox, downloading directly from Google Chrome's website.

This is what appears in my system log when I try to run the application:

Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.137 ksinstall[94677/0xa6f4a1c0] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer started.
Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.142 ksinstall[94677/0xa6f4a1c0] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer starting Installation.
Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.142 ksinstall[94677/0xa6f4a1c0] [lvl=2] -[KeystoneInstallBackend install] Google Software Update attempting to install.
Nov 17 12:29:36 [nameremoved]-mbp com.apple.xpc.launchd[1] (com.google.Chrome.9556[94673]): Service exited with abnormal code: 21
Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.438 ksinstall[94677/0xa6f4a1c0] [lvl=2] +[KSCodeSigningVerification verifyBundle:applicationId:error:] KSCodeSigningVerification verifying code signing for '/Users/[nameremoved]/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle' with the requirement 'anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists and certificate leaf[subject.OU]="EQHXZ8M8AV" and (identifier="com.google.Keystone")'
Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.475 ksinstall[94677/0xa6f4a1c0] [lvl=2] -[KeystoneInstallBackend shouldInstallWithVersion:error:] Google Software Update found version that is the same or newer: 1.2.9.98.
Nov 17 12:29:36 [nameremoved]-mbp ksinstall[94677]: 2017-11-17 12:29:36.475 ksinstall[94677/0xa6f4a1c0] [lvl=2] -[KeystoneInstallTool main] Google Software Update installer ran successfully.

Does anyone know why I might be having this problem? It's making it difficult to test UI code.

If you just deleted the app from the applications folder there may be some remnants hanging out in other places like pref files and other places in the ~/Library/Application Support folder.  Try downloading an app like AppCleaner
http://freemacsoft.net/appcleaner/
Drag the app onto its window and it will find the associated files for Chrome.  Then hit the delete button, and then re-download Chrome and try it again.  Hope that helps.


Pasting a screenshot into Powerpoint results in truncation: even though in MSWord it is perfect The following is an image representing the source of a clipboard cut and paste operation.  Actually the image shows up better in MsWord: here it is blurry

However it is much worse in PowerPoint when pasted either from (a) the clipboard or (b) first to Word, copy into clipboard again and then paste into Powerpoint: in fact it is truncated

So .. what is the deal with pasting to PowerPoint ?  I am using PP for Mac 2011 v 14.1.

It seems there were a  toolbar at the bottom of the screen that only shows up after you click once on the (messed up) screenshot and has an impressively unhelpful default value set.  Below I show having finally randomly clicked on the correct icon:

Now why the picture would not be already sized properly .. well we can (un)-thank the PP designers for that.


unexpected ApplicationSupport alias in ~/Library I've noticed a weird alias in ~/Library. It's ApplicationSupport (no space), pointing to the good old Application Support (with a space).

$ cd ~/Library
$ ls -l | grep Support
drwx------+ 111 myuser  staff   3552 11 Oct 23:10 Application Support
lrwxr-xr-x    1 myuser  staff     38  2 Aug 11:28 ApplicationSupport -> /Users/myuser/Library/Application Support

I don't know where it comes from, and I didn't create it myself. Does anyone know if it gets created by a specific app installation? Is there a way to verify it?

I guess I could rename it and delete it and see if anything breaks.

Alias is created by iTerm2. There's a ticket about this :

Maintainer:

  Sorry for the inconvenience. It has come to my attention that some people find this annoying. It's necessary for the Python API, but you can change the name of the alias or remove it completely with this setting in 3.3.3beta1:

The setting Create a Symlink in "Application Support" with this name being in Advanced" tab in App preferences.

https://gitlab.com/gnachman/iterm2/issues/8141#note_205533333


Batch conversion of xlsx to xls via CLI? I'm trying to convert a bunch of xlsx files to xls (because some other software<cough>matlab<cough> can process xls but not xlsx on the mac).

I've tried unoconv but it has issues (which apparently stem from pyuno's shared object not being 64-bit-compatible -- even trying to override this with

$ VERSIONER_PYTHON_PREFER_32_BIT=yes ./unoconv

still dies, this time with Fatal Python error: Interpreter not initialized (version mismatch?) which I'm surmising has to do with a mismatch between the python used with OpenOffice and the one shipped with MacOS X).

I'm using the Microsoft-provided "Open XML Converter" in the meantime, but I'd really like to figure out a way to do it with FOSS tools and via the shell.  Any ideas?

Oh, I'm running on Snow Leopard if that makes any difference.

I've not tried this with .xls(x) files per say, but I have used LibreOffice to batch convert .doc(x) files to .pdf using the convert-to option.  OpenOffice has the same options, afaik.

Check the help option for your app.  In my case it was:

/Applications/LibreOffice.app/Contents/MacOS/soffice -help

In particular, for my switch to .pdf files, I did something like this:

/Applications/LibreOffice.app/Contents/MacOS/soffice -headless -convert-to pdf:writer_pdf_Export *.doc

The -headless flag just prevents the whole GUI from loading.  There is likely a similar output file extension and filter (the pdf:writer_pdf_Export) for your .xls(x) case.


Apple Script runs fine, need kill switch The following script runs fine in the /etc folder and called by a plist. It basically says text when the battery is too low. This is a simplified version, the real script is much longer.
set Cap to (do shell script "ioreg -w0 -l | grep ExternalChargeCapable")

tell Cap to set {wallPower} to {last word of paragraph 1}
if wallPower = "Yes" then
    return 0
else
    set Pct to (do shell script "pmset -g batt | grep -Eo \"\\d+%\" | cut -d% -f1")
    if Pct ≤ 10 then
        display notification "Batterij 10%. Meteen opladen." with title "Batterij bijna leeg!" sound name "Sosumi"
        ##      delay 300
        say "Batterij 10%. Meteen opladen."
    end if
end if

The problem is that I haven't found a good way for a kill switch. The kill switch will be operated by a user without admin rights.
I am open to any suggestions for a kill switch.
As an example, I found this topic that implements a condition if "Do not disturb" is active. I inserted this in the script and it works just fine in the Script Editor itself, but once the script is copied to the /etc folder and called by a plist the execution appears to halt at this line:
  set statusOfDND to ¬
        (do shell script checkDNDstatusCMD) ¬
            as number as boolean

Not sure why, could be regional settings (I'm using Dutch whereas the original script owner uses English (US).

Crossing the user session barrier is non-trivial. Typically a local host only network connection is used, such as TCP/IP or a Mach port. These are complex to set up with AppleScript.
Below are a couple of reasonable alternatives.
File Based Flag
You could use the existence (or lack of) a file to determine how the script behaves:

On launch, script creates an accessible file at a known path:
/Users/Shared/delete-to-stop-power-script.txt

Periodically, or via kqueue, the script can check the file still exists;

On exit, the script should remove the file.

Using files makes dealing with permissions easier. Use chmod 0666 to allow anyone to delete the file.
The access permissions of the file can be used to ensure only specific groups of users can delete the file.
notifyutil
Use the lesser known notifyutil utility:

notifyutil is a command-line utility for interacting with the notify(3)
notification system and the notifyd(8) server.  It may be used to post
notifications, detect and report notifications, and to examine and set
the state values associated with notification keys.

notifyd allows processes to exchange integer values across processes and user sessions. The format is deliberately simple and constrained to enforce security.
See the linked manual page and Brett Terpstra's Quick Tip: system-wide notifications with notifyutil for samples.
Non-polling
If you need a non-polling alternative, Power Manager can trigger scripts on battery levels, offers a power source scripting API, and non-administrator users can be granted rights to cancel or stop events.
I am a software engineer involved with Power Manager, so feel free to ask me technical questions about how it works.


Preview: Fullscreen movie turns black after 5s When I open a movie in preview (tested with .mov and .wmv), and I go to full screen, the movie turns black after five seconds, unless I keep moving the mouse. The movie plays just fine in windowed mode, and the issue occurs both on external and internal monitor, and with Caffeine turned on or off.

I assume there's a timeout setting somewhere. How can I modify this so that I can watch an entire movie in preview?

It turns out this is a known bug with Pathfinder that doesn't interact well (yet) with Quick Look. As a workaround, you can use Quick Look from Finder.


Why does my LaunchAgent return ROOT as the user? I have a plist in the /Library/LaunchAgent folder (this should run as "logged in user", if I understand correctly but it seems to be running as root). It launches a .sh bash script.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.user.uloginscript</string>
        <key>Program</key>
        <string>/Library/TestArea/netcall.sh</string>
        </dict>
</plist>

The script, for troubleshooting, contains the following lines:

#!/bin/bash
curUser=$(id -u -n)
osascript -e 'tell app "Finder" to display dialog "'$curUser'"'

OR

#!/bin/bash
curUser=$(USER)
osascript -e 'tell app "Finder" to display dialog "'$curUser'"'

The message box result is always:

  root

This means that any scripting that I am trying to do has issues. Can anyone shed any light on why this is happening. The script runs on each login, runs before the user's desktop appears (the message appears on the login screen).

Curiously, if I use the following code:

#!/bin/bash
osascript -e 'tell app "Finder" to display dialog "'$1'"'

It returns the correct username. It seems that the script is running as root, but has passed the parameter of the logged in user (note that the plist has no parameters).

Running Mavericks 10.9.5

A LoginHook was present. Loginhooks run as root and was calling the same file.
The following command removed the hook:

sudo defaults delete com.apple.loginwindow LoginHook

Thank you all for your time, and apologies for the wild goose chase. I knew it wasn't correct.


Looking for advice setting up a new Mac Mini with Lion Server I am setting up a new Mac Mini server which will serve as a web server (with Apache and MySQL) as well as some other pieces of functionality.  I have seen little on securing OS X for such a scenario (I am running Lion - and this is not Lion Sever).

I assume it is recommended to use ipfw as opposed to the application firewall.  I also assume that it makes sense to lock down SSH (put it on a non-standard port and use certificate authentication).  However, should I also lock down screen sharing (and force an SSH tunnel for this)?  Any tips on this are welcome.

Although written for 10.5, this guide by Daniel Cuthbert (PDF) is fairly comprehensive and largely still applies to Lion.

Closing off screen sharing and tunneling it (if you need it at all) through SSH is probably a good idea.

Standard rules apply:

Only open absolutely necessary ports to the outside world
Keep your software up to date
Disable any unused services & Apache modules
Disable any listeners you don't need, rebind those you do need to localhost only if they're not needed outside (lsof -i is your friend)
Check that your firewall is really working as expected (nmap from an outside host)

Mac specific things:

Make sure the console is password protected, locks if you're using screensharing and doesn't auto-login on startup
You may want to enable verbose boot messages by default, it'll make debugging easier in case things go bad: sudo nvram boot-args="-v"


Symlink TO dropbox folder in different user account Recently purchased a new Mac to be used as a family Mac. We share my Dropbox account and I have installed this into my user folder.

Question: Can I create a symlink into my wife's documents folder TO the Dropbox folder in my account?

If your wife's account has read/write access to your Dropbox folder, then a symlink should work. You might need to give special permission to your Dropbox folder to your wife's account, and apply those permissions to enclosed items…


Can no longer download podcasts to iPhone I normally get new podcasts by doing the following on my iPhone:

Go to my list of podcasts
Select the podcast I'm interested in getting an episode for (e.g this week in google TWiG)
Select 'Get More Episodes'
This takes me to iTunes where I can normally see a list of all the episodes and download the ones I want. However, all I see now is the podcast logo (e.g., This Week in Google),
how many reviews the podcast has had, but no list of podcasts.

I've tried deleting a podcast (by deleting all the episodes on my iPhone) and then trying to add it again via iTunes, but still no list of podcasts.

Where has the list of podcasts gone? How do I get them back?

Which version of iOS are you running? I've just checked and it's fine for me so it's not a server side problem. The obvious recommendations are try rebooting etc. If you go into iTunes can you access any podcasts from navigating through rather than from the iPod app?