text:
macOS - ntpd uses more than 100% of CPU
it happens couple times every day, my MacBook becomes extremely slow. When I check Activity Monitor, I see that ntpd process uses more than 100% of my CPU (usually around 140-180%).
If I kill it (Force Quit), MacBook starts working as usual. But it will happen again in several hours. How can I fix this issue? It becomes really annoying
It started after one of the software updates (not sure exactly when).
MacBook Pro (Retina, 13-inch, Late 2013) with macOS 10.12.3

Go to System Preferences > Date and Time (unlock if needed) and uncheck Set date and time automatically. Close System Preferences, then reopen and re-check Set date and time automatically. Make sure the time server info is correct for your location on the planet.

just did it, will check in a few hours if it helped, thanks

@IconDaemon looks like it helped. If you can post your solution as an answer, I will confirm it

Go to System Preferences > Date and Time and uncheck Set date and time automatically. Close System Preferences, then reopen and re-check Set date and time automatically

Thanks for answer - this helped resolve my 200% utilized process.  I presume this is an OS bug?  Has it been reported to Apple?

What a broken Mac is, I constantly fight some internall stuff eating CPU. Today is ntpd.

I tried just unchecking because I didn't mind if it did not auto-update, and that was not sufficient.  I had to uncheck and recheck to fix the problem, and then I could set the check however I liked.  Also ntpq -p in the answer below was useful as a diagnostic because it timed out until the problem was fixed and CPU back near zero.

On one occasion, this did not work, and I was told by our help desk about an alternate fix:  On the Date and Time tab, I had to change the server to Apple and then back to our work server.  (There are authentication-related reasons to keep it pointed at the work-managed server.)

Check if the NTP servers you have configured are correct and reachable.
Open a Terminal window and run
ntpq -p

This is the output I got on my system which had ntpd using around 80-90% cpu.
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*aer-foo5d20-dc- .GPS.            1 u   23   64   17   17.888   20.617   2.226
 aer-foo6t20-dc- .GPS.            1 u   23   64   17   17.938   20.598   2.211
 defra1-ntp-001. .INIT.          16 u    -  68m    0    0.000    0.000   0.000

This shows that I had 3 ntp server configured, the 2 first ones are ok but the 3rd one was unreachable (I'm no NTP expert but refid=.INIT., st=16 and reach=0 all seem to indicate something is wrong).
So I went to System Preferences > Date and Time , where indeed I had 3 ntp servers configured: 2 inside my company's network, and time.apple.com - so nothing resembling "defra1-ntp-001".
Assuming "defra1-ntp-001" referred to time.apple.com I removed that one, and this resolved my problem.
Of course in my specific case, probably time.apple.com was unreachable because it is blocked by my company's firewall, so I don't recommend removing it as a general solution. Instead check your 'ntpq -p' output and try to determine which server is causing the problem and remove that one (and if none are left, add a known good one).

I tried your suggestion and the query timed out.  Then I followed the suggestion from the accepted answer and in System Preferences > Date and Time saw that my system is pointing to my corp ntp server.  Then I ran the query again and this time it worked.  Maybe some bug related to switching to VPN?


text:
How do I identify what PowerPC apps I use?
I have a Mac with Snow Leopard 10.6.8 still installed on it and am seriously considering installing Mountain Lion. I’ve read that from Lion onwards PowerPC apps can no longer run.
My questions are: Is this true? How can I identify what PowerPC apps I currently use?
I don’t want to go to the trouble of cloning my drive and then doing the upgrade only to find some software I rely on will not run in Mountain Lion.

Yes, this is true.
It's also very easy to identify what PowerPC apps you're still using. To do this, follow these steps. On the Mac which still has Snow Leopard installed:

Click on the Apple Menu
Select About This Mac
In the About This Mac window that pops up, click on the More Info... button near the centre bottom.
This opens up the System Profiler window. In the Sidebar on the left you will see a number of headings and subheadings.
Under the Software heading (it's the 3rd one down) you'll see a subheading labelled Applications. Click on this.
In the main part of the window on the right-hand side you will see a list of apps appear. Be patient as this may take a little while to populate.
Once the list appears, you'll see column headings at the top.
Click on the Kind column heading (it's the 4th one) and this will sort the list by the kind of app.

Now all you need to do is peruse the list to identify any apps labelled PowerPC and/or Classic. These are the apps that will no longer run in Mac OS X Lion or above.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Aggregate Table with Numbers.app
I have a table featuring some outcome (column B) versus the day it happened (column A):

and I would like to produce another table with the unique dates in the first column and the total outcome of the day in the second column, looking like this:

I want the aggregated table to update itself automatically as new data are added to the first table, and I therefore tried to do it using formulae but it evaded me.

As of Numbers 11.2, you can accomplish this using a Pivot Table.

The formula for the right column of your aggregate table is:
=SUMIF(Data::A,A1,Data::B)

The parameters to SUMIF are:

The column of dates which you wish to group by.
The individual date you wish to output the sum of (i.e. the cell to the left).
The column which you are taking the sum of for the group.

But how do you get the aggregate's first column? (Sort the input table by 1st column then for each row in the 2nd table pick the min that is greater than the previous row for each cell?) That's the hard part here from my point of view. That would be great if you included it.

@cglacet - I think the problem is that Numbers doesn't support formulae that output a column of values (vs. an individual value). Otherwise, an ergonomic solution here would be to have a formula defining Aggregate::A as something like DISTINCT(Data::A). See also: https://apple.stackexchange.com/q/269875/12509

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Receiving notification from Mail and Messages, but no snippets
When I first got my iPhone, I disabled receiving notifications from Mail and Messages apps on the lock screen and the notification center, because these apps display snippets of received messages in those locations and anyone could see them without a password. (Since most people send short emails and messages these days, the snippets are practically the whole messages.) I left the sound notification and the banner enabled.
Yesterday, I saw someone else's iPhone: He still received notifications from Messages but the notification read: "You have a new message!"
That's perfect! I want that too. But no matter how much I searched, I didn't find any setting that enables me to do this. Web search was a complete waste of time.
Does anyone know how to conceive such a thing?

There is a setting in Settings, Notifications, Messages at the very bottom: "Show Previews".
Toggling it would disable previews for Messages. Such a setting, however, is not available for Mail.


text:
after waking from sleep native screen in clamshell mode wakes up and takes dock
I work on external screen mostly and have MacBook in clamshell mode. External screen is set as main screen with dock attached to it.
When I wake MacBook up from sleep, sometimes screen in clamshell mode wakes up and overtakes my dock. Screen itself is turned off, but soft thinks its on.
To fix this I've to open MacBook lid and close it again. This brings dock to my external screen.
Atm I've set external monitor to mirror MacBook screen avoiding this issue altogether. But surely its annoying. Seems like a bug as I didn't notice this in OS X.
I noticed this issue on macOS sierra. I've a MacBook Pro (Retina, 13-inch, Mid 2014), 2.6/8/256

Since you didn't notice this in OSX, can you clarify what OS you're running? Or is it that you're running macOS Sierra and didn't notice this with earlier versions of the OS?

@Monomeeth yes I updated OP

@Monomeeth OSX was renamed to macOS in version Sierra. That's what I meant. So before Sierra didn't have this.

All good - that's what I thought but didn't want to be presumptuous. Can I ask that you also edit your question to include the exact model of MacBook you're using?

@Monomeeth added that in too

The first things I'd try are to reset both the NVRAM and SMC in that order. Before following the steps below, ensure you have no external hardware connected (so, unplug your external display) and make sure you use the built-in keyboard.
Reset the NVRAM
Older Macs had what's called Parameter RAM (PRAM), newer Macs use Non-Volatile Random-Access Memory (NVRAM). Here’s how to reset the NVRAM on your particular MBP:

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

Note: When you log back in you may need to readjust some of your system preferences (e.g. speaker volume, screen resolution, startup disk selection, time zone information, etc).
Reset the SMC
To reset the SMC on your particular MBP, follow these steps:

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

After resetting both the NVRAM and SMC, use your computer to determine if the issue still persists.

Did as you've advised. Didn't encounter issue so far.

Unfortunately issue is back. this did not help. I think its OS bug.

If everything was working previously and you are using the same external display and cables, then you should submit a bug to Apple.


text:
What happens to a MacBook's battery once it reaches the maximum cycle count?
I have a MacBook Pro and according to Apple, its cycle count limit is 1000. What happens when it surpasses 1000 cycles? Will the battery continue working or not? Will the MacBook still be able to receive power from the battery or not? Should it be replaced?
Thanks.

All I can say is that my Late 2014 MacBook Pro currently has ~1800 cycles, and, although it isn't able to hold a charge as long as before, I still get an hour of power when videoconferencing over Skype of watching a movie. Apple's 'cycle limit' is a worst-case scenario, the battery will last much longer than that.

As it says on the page you've linked to (emphasis mine):

Batteries have a limited amount of charge cycles before they're considered to be consumed. Once consumed, a replacement battery is recommended. You can use your battery after it reaches its maximum cycle count, but you might notice a reduction in your battery life.
Knowing how many charge cycles your battery has and how many are left can help you determine when a battery replacement is required. For best performance, replace your battery when you reach its maximum cycle count.

I disagree. You should only replace the battery once it stops holding a charge or its capacity becomes noticeably bad, unless you're under warranty and can get it for free.

I agree with you :-) Also, there is little risk of an old battery exploding or catching fire, unless the temperature sensors have died — and macOS will most certainly catch that quickly enough. If not, your Mac is already so seriously damaged that it should not be used anyway :-) So, in general, assume that you can use the battery for as long as it holds a charge, not when Apple starts "recommending" the replacement.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Recurrent error during sync: "The certificate for this server is invalid"
Recently, I restored my iPhone from backup using iTunes 12.5.5.
Now, every time I sync my iTunes, I receive this message:

Is there any way of getting rid of it?

Most likely is that you need to tell your iPhone to clear this "safe-browsing" data, and then recreate it.
https://www.intego.com/mac-security-blog/google-safe-browsing-data-syncs-to-ios-devices-via-itunes/
On your iPhone device, go to Settings > Safari, then look for the Fraud Warning slider and turn it off. Then resync the iPhone. Turn the Fraud Warning back on and synce your iPhone again and hopefully that will clear up the warning.
Less likely: you might be able to clear this up by resetting the iTunes Store cache under Edit > Preferences > Advanced.
https://discussions.apple.com/thread/7843167?start=0&tstart=0

Resetting the iTune Store cache had no impact.

Did the "fraud warning" cycle clear it up?

Yes. That did the trick.


text:
Are there default shortcuts for special hyphens and minus sign?
On Mac, en dash and em dash characters can be typed with Opt - and Opt Shift -, respectively.
But are there default shortcuts for other bar-like characters, especially for these ones:

U+00AD SOFT HYPHEN,
U+2011 NON-BREAKING HYPHEN,
U+2012 FIGURE DASH,
U+2212 MINUS SIGN?

I did not find them, but maybe I was not searching properly. If you are going to answer that there are no such shortcuts, please point me to some reliable evidence like an official article on Apple’s website, or a full list of all existing shortcuts in latest version of macOS etc.
Also, my question is about default shortcuts in a freshly-installed system, not for custom settings, tweaking DefaultKeyBinding.dict file, using third-party keyboard managers etc.

The characters you mention are not available on the US layout.  Apple does not publish a list of all the shortcuts, but you can use the Keyboard Viewer to see what each key does.  This list is old but probably still accurate.
The standard way to access them would be via the Character Viewer (Edit > Emoji & Symbols).  If needed often, then creating a shortcut in System Preferences/Keyboard/Text/Replace  With  would be an option.


text:
Where are j5create USB to HDMI drivers saved?
Does anyone know where I could find the j5create USB to HDMI drivers that I just downloaded, or where they saved? I've searched but I can't seem to find them.

I checked hd/library/extensions and found them. I've included a screenshot, the mct drivers are the drivers in question.

Welcome to Ask Different and thank you for your answer. I'm glad you resolved your issue! :) However, short answers such as this don't really provide enough detail or context to help many users. If possible, it'd be good if you could add some more info such as the full path (there are multiple library folders in macOS) and also how you would access/view the folder (in the event it is hidden).


text:
Put a preinstalled macOS SSD to another MacBook, will this occur any problem?
I hope you're doing well.
I have 2 MacBook Pros, different models, same size 15", 2010 and 2012. The 2012 one is suddenly dead and I have removed its SSD and put it into the 2010 one (HDD on 2010 is also removed). After then, I turned on the 2010 MBP, it works like a charm. There are still some minor weird activities: asks me to login again to iCloud, Firefox new addons popup, Photoshop warning about VRAM... but most of the system is working smoothly.
So my concern is, will the SSD change occur any problem later? Can I do a Time Machine backup without any damage in the future? Thank you for any help.

No, you should never experience problems with this. There will never be any damage from this kind of transfer or by doing a time machine backup after the transfer.
That said, depending on which apps you use, some apps and app licenses may have been tied to hardware information such as the old computer's serial number. I'd recommend using migration assistant from a time machine backup of the 2012 computer to make sure you don't have a problem with these licenses.


text:
Putting display to sleep using windows keyboard
Is there some key combination to put the display on a mac to sleep using a windows keyboard, or somewhere where I can change the default key combinations?

function-win-shift-f12 (if you have hotkeys turned off where function keys act as normal function keys)
otherwise,
win-shift-f12

You can utilise hot corners on mission control, indeed it's quite handy for putting monitor on sleep or show desktop.
Simply you can attribute a corner of your screen to put on sleeping your monitor (by mouse pointer though, not with your keyboard, If you are using mouse/trackpad)
To activate this on your mac:
preferences > mission control > hot corners
You will see four corners and many options for each corners.

I came across somewhere that you can use hot-corners and require holding down the cmd key for it to work, but I can't find anything explaining how to make this change, any idea?
With hot corners alone I keep doing it by accident.

@CorneliusJEhmke i think you can do it simply by: choose a hot corner action from drop down menu while you are pressing a shortcut you wish to make the combination.

That's worked, thanks. but it's having a bit of a freakout about the peripherals attached to it now.. :P these things are such a nuisance


text:
Launchd will not execute plist. Where am I going wrong?
I am trying to create a plist for a unix executable. The executable works perfectly well when I run it in Terminal. However I simply cannot get it to run from launchd. Here are the steps I took:
sudo touch /Library/LaunchDaemons/Parity.plist

sudo nano /Library/LaunchDaemons/Parity.plist

Then I input the following data:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  <plist version="1.0">
    <dict>
      <key>Label</key>
        <string>Parity</string>
      <key>ProgramArguments</key>
        <array>
          <string>/usr/local/Cellar/parity/1.5.12/bin/parity</string>
          <string>start</string>
        </array>
      <key>RunAtLoad</key>
        <true/>
      <key>KeepAlive</key>
        <true/>
   </dict>
</plist>

If I run:
sudo launchctl load /Library/LaunchDaemons/parity.plist

I get the response:
/Library/LaunchDaemons/Parity.plist: service already loaded

Does anyone have any suggestions?

you have to unload it first:  sudo launchctl unload... then load it again sudo launchctl load...

@Allan Thanks for your reply. I followed your advice, but it unfortunately has not made any difference. Do you have any other ideas?

Try removing it sudo launchctl remove... to remove it.  Then reload.

@Allan Unfortunately that didn't work either. However I have found that when I run launchctl list I get - 1 Parity. Everything else has a 0 next to it.

That means the program or script exited with an error so the plist is loading, it's just Parity is erroring out.  What does the log for Parity say?

@Allan You're right about that. I got to the bottom of it. I wrote a bad .plist, and had to delete <string>start</string>. It works perfectly now. Thank you for your help.

Glad I could help.  Post your solution as an answer so you can "accept it" and I can vote you up for some reputation points.

@Allan I updated my post with the solution. Thanks again for your help.

@klanomath My apologies. I am new here. I have now added the answer.

It turns out that the cause of the error was a poorly written plist - <string>start</string> was instructing the exec file to run a start command when initiating the daemon, which was causing it to crash. I erased that line from the plist and now it behaves as I had intended.


text:
How to mount VeraCrypt full disk encrypted volume in read write mode under macOS?
I am able to mount VeraCrypt full disk encrypted volume under macOS Sierra, but I am not able to write to it. The VeraCrypt disk shows read-only as false, but I don't have permission to write. The volume is formatted as NTFS. I tried with Paragon NTFS driver, the free version, but it does not work.
How to mount an NTFS volume as read-write?

Paragon's free version is only for Seagate drives. Is that what you have?

Mine is buffalo.

Then the free version won't work.

Which format should I choose in veracrypt so that it works with macOS and Windows without additional software?

I don't know the app at all, but ExFAT is the only large file-aware format that both can natively read & write


text:
Notification Centre preferences are empty
I'm not receiving any notifications for any apps on my Mac running Sierra. I'm pretty sure the screenshot of my notification centre preferences below is illustrating the problem, i.e. there's nothing there.
Does anyone have any idea what's wrong and how to fix it?

I have exactly the same thing after trying to work out why my iMessages notifications aren't appearing. No idea how to fix it though.

I had exactly this problem and fixed it by doing an NVRAM reset. Switch off computer and restart. Immediately press and hold Command and Alt/Option and the P and R keys. When you hear the second start up chime (about 30 seconds later) release the keys. Your Notifications preferences should be fully populated again by all the apps that use it.


text:
Is there a way I can back up my iPhone to my MacBook but exclude the bulky apps?
I have a small hard drive on my MacBook, and a (not so) large iPhone.  Is there a way I can back up my phone to my laptop but exclude the hundreds of bulky apps?  Most of the apps can be reinstalled quite easily from the App Store, and store no unduplicated local data worth protecting.  I don’t see any reason to concern myself with including them in the backup and they make the size of the iPhone backups prohibitive.
Alternatively, is there a way to get iTunes to allow me to store my iPhone’s backups on an external drive?  That too would resolve the problem well enough.
Unfortunately, I am not enthusiastic about backing up my phone to the cloud, so that is not a solution for me.

2015 MacBook Pro 256 GB HD
iPhone 5S 64 GB

The best backup for your situation (you just want a small backup and aren't concerned about the apps) is to use iCloud.  I know you said it's not a solution for you but is that because you don't like it or there's a network or technical reason?  I'm just curious.

It's personal, not technical.


text:
Random [Google Mail] folder/label in iOS Mail after updating to 10.3
After updating to iOS 10.3 (and 10.3.1) there is a random, additional folder in Mail app attached to my Gmail account, named [Google Mail]. Prior to this update it was not there.
It's similar to a well-known older issue where all folders nested themselves under a top-level label of the same name. The answer there was to put [Google Mail] into the "IMAP Path Prefix" field in the Mail account settings. That, as mentioned below, is not helping for this problem.
Here's what I know:

If I put something in this folder on my phone, a label appears on the Gmail side. If I leave it empty, no label appears on the Gmail side.
If I add a label named [Google Mail] and turn IMAP on (on the Gmail side), the folder font becomes dark and the folder becomes active in the iOS Mail app. You can tap into it and see what's inside.
Putting [Google Mail] or any variant of that into the "IMAP Path Prefix" field in Mail settings causes an error in Mail saying that the IMAP settings must be wrong.
Trying to delete the [Google Mail] folder from the iPhone side causes an error bubble that says the folder cannot be deleted.
Deleting the label on the Gmail side only causes the folder font to "gray out" on the iOS side.
If I turn on IMAP for folders like Starred or Important, they nest themselves under this [Google Mail] label.

I've searched all over and can't see anyone talking about this. Any suggestions are greatly appreciated.
My Gmail mailbox on my iPhone 7:

My Gmail account settings on my iPhone 7:

I had the exact same issue and found this solution online. It's working for me and the [Gmail] folder is no longer there. I think you would just substitute [Google Mail] for [Gmail]. Good luck!
"That folder is where gmail store all your mail (like the enclosing folder), I think it's a weird artifact of the way that Google have designed their IMAP system.
In Apple Mail, open the Accounts preferences, select the Gmail account > Advanced Tab. In the 'IMAP Path Prefix' insert [Gmail] (or however the folder is named - for me it is [Google Mail])."

I actually explain in my question that this is not the solution, but many thanks for the reply.

As Jin has written I added  [Gmail], it's important that  with brackets!!!, and grey folder label from Gmail is gone. Big thanks!

Jim's solution works like a charm! Been struggling with this on my iPhone and you just fixed it.

This solution works but then all the gmail labels disappear. Also I find it confusing that iOS mail and macos mail sync differently.


text:
Macbook to iPhone tether, hotspot or wifi
If I am connected to wifi on my iPhone, and I turn on my personal hotspot, and then tether to my MacBook will my MacBook use the wifi that my iPhone is connected to or will it use my data via personal hotspot? MacBook is not connected to wifi, only the usb tether to the iPhone, which is connected to wifi.

When using you iPhone as a hotspot, it will use your data plan. In the screenshots you see my iPhone connected to WiFi, and when a device is connected to it's hotspot, my iPhone will be disconnected from the WiFi.
iPhone connected to WiFi:

iPhone not connected to WiFi, but network still available

Don't see why this answer was down voted. Seems like a good explanation to me.

Because "usb tether to the iPhone", not wifi to the iphone. Also, Dutch UI.


text:
Location icon randomly appearing in status bar every hour
Since updating to 10.12.4, an icon has started appearing in my status bar 1-3 times every hour:

It looks like something's requesting access to my MacBook's location, but there's nothing in the privacy preferences that would indicate what:

I don't know what would be requesting my location: both Weather and Siri are disabled, and I have all "fancy" features turned off. The "Setting Time Zone" part is especially confusing, because I upgraded Sierra the same night daylight savings ended.
Seeing this pop up while programming is starting to get really distracting. Is there a way to hide it? Preferably by fixing whatever keeps causing it to appear.

Setting Time Zone is a System Service. Press the Details button in your screenshot, then disable it.

As for why this is occurring now: 10.12.4 introduces Night Shift, which adjusts the display colours for night use. If you have the Sunset to Sunrise option selected, your location is used to determine when to adjust the display.

The padlock was the culprit here. Because I had everything disabled, I figured that was the reason the Details button was also disabled. I just hadn't clicked on it, which is why I couldn't find a fix in the first place... ugh. Thanks!


text:
What are the green columns/lines mean in Activity Monitor - Energy - Battery?
What do these green columns in activity monitor - energy - battery mean? I've included a screen shot of activity monitor - energy if that helps.

Since your battery level was rising throughout that period, the green columns would indicate that your laptop was charging/plugged in.

Green = power cord plugged in (charging or fully charged)


text:
Skype for Business Mac Chat History Storage Location
I downloaded Skype for Business on Mac and I have tons of Chats saved, but there is no setting for deleting them after X amount of days or a way to delete them in mass. Currently, I have have to right click then delete on every single chat.
Does anyone know where the Chat history is stored on Mac?

Open Finder and navigate to ~/Library/Application Support/Skype/.
The “~” sign means your home folder. To find your home folder, open Finder and in the main menu, select Go > Home or press Command (Apple) + Shift + H keys.
It is the folder that has your Skype Name.
An app restart may be required after making modifications.
Source: https://support.skype.com/en/faq/FA10888/how-do-i-manage-my-conversation-history-in-skype-for-mac
Also, try this location: /Library/Application Support/, as there is a difference when the tilde sign is used.
Furthermore, the stores file can be found in ~/Library/Containers/com.microsoft.SkypeForBusiness, which is the user folder according to This Post

I found the same article, but that is for Skype for Mac. There is no folder for Skype for Business in the Library/Application Support/ folder

Have you tried the /Library/Application Support/ file instead, there is a difference when the tilde sign is used.

If not, it is likely stored in the Exchange account that is linked to.

Also, have you seen this post it says to try ~/Library/Containers/com.microsoft.SkypeForBusiness

I put a small shell script together to do this, note in my testing this did not break anything but do this at your own risk.
Also this is Skype for Business Specific.
#!/bin/sh
# Kill existing Skype Session
kill -9 `pgrep -f Skype`
# Change into the application data folder
cd ~/Library/Containers/com.microsoft.SkypeForBusiness/Data/Library/Application\ Support/com.microsoft.SkypeForBusiness
# Remove all Conversations
sqlite3 DataStore.sqlite "delete from Conversation"
# Remove all Conversation items
sqlite3 DataStore.sqlite "delete from ConversationHistoryItem"
# Restart Skype

This method works temporarily. Once you logged in again, it will download the chat history from the server again! And it freezes again!


text:
Guided access equivalent for macOS
I have written a desktop application that I would like to install onto my clients machine and then lock down so that the user cannot leave that application (Exactly the same as guided access for iOS).
Ideally, I'd like to stop the user from leaving the app at all. Otherwise I can set up parental permissions to stop the user from accessing an internet browser and messing with anything important.
Q: Is there any Guided access equivalent for macOS?

Heard of Kiosk mode? Maybe give it a whirl.


text:
How to boot Mac from CD from verbose command line
So already I've tried booting Ubuntu on a USB from the Mac's command line (verboes or something like that). But it didn't seem to work at all and said load size is too small or came up with a no entry symbol.
So I put a Ubuntu 32 bit on a CD and now I don't know how to boot it. I can't open up the boot menu as all of the important drivers are gone from the computer.

Please add your Mac model. Are you really using a PowerBook? The last PB was discontinued in April, 2006!

@klanomath yes i am, i got it from someone else actually

Mac hardware will always boot to an os chooser holding down the option key. You of course need a USB / thunderbolt / FireWire drive with bootable media at that point.

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

Newer Macs use internet recovery to net boot and from there you can repartition any drives and reinstall all drivers needed to boot macOS and start again.

Accessing Internet Recovery

For a PowerBook, you might also use cd / DVD media since internet recovery isn't an option for PPC hardware.

it wont detect the externel drive

You might want to check out a Ubuntu specific forum, there may be more to booting Ubuntu on a Mac than just a general purpose liveCD/Installer. If it does not detect the drive it may just be that does not have anything on it in the way of needful boot software. If you boot macOS does it see the drive in Disk Utility? Remember that macOS is won't access EXT formatted drives without special software.


text:
Remove files from MS Outlook
A couple months ago I thought I'd switch from Thunderbird to Outlook, I thought it would make sense seeing as I'd started paying for MS Office.
However it reminded me on just how bad Outlook is and I stopped using it a few days later.
Seeing as it downloaded a pretty hefty amount of emails (there didn't appear to be a way to limit the sync like in Thunderbird) I would like to remove any files it generated from my hard drive.
Does anyone know how I can do this? I imagine it is just a case of deleting the necessary file(s) folder(s)?

I'm assuming you're using MS Outlook 2016. If so, the location of your data will be within your user's Library folder.
To view this:

Go to Finder
Press and hold the option key
Click on the Go menu and select the Library option
You can let go of the option key now
Within the Library folder navigate to the Group Containers folder
Within the Group Containers folder look for a folder starting with "UB" and ending with .office
Open this folder and you will see the Outlook folder

Within this folder are located any profiles you created - you can delete these as you wish.

WARNING: This will delete your entire email setup. I had 5 different google mail accounts setup with specific preferences and had to re-setup everything after deleting this folder - add and authorize each account one at a time and add any custom settings again.

Try ~/Library/Group Containers/, Microsoft office is wierd like that... it should be in a folder named something like UBF8T346G9.Office then inside /Outlook/Outlook 15 Profiles/ to go straight there, try going to ~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/ alternatively, run the following in terminal: rm -rf ~/Library/Group\ Containers/UBF8T346G9.Office/Outlook/

WARNING: This will delete your entire email setup. I had 5 different google mail accounts setup with specific preferences and had to re-setup everything after deleting this folder - add and authorize each account one at a time and add any custom settings again.

sorry @squarecandy totally should have mentioned that in the answer.

It's ok - if I had read the question more carefully ... it does say "I started using Outlook, hated it, wanted to get rid of it completely". But if you're wanting to continue to use Outlook, but just want to clear some of the bulky cached attachments, this is not the solution for you.

I suppose that creating a macro would be a more ideal approach for the issue at hand (removing bulky attachments). There seems to be a pretty good guide on macroing here

Can confirm

rm -rf ~/Library/Group\ Containers/UBF8T346G9.Office/Outlook/

was an effective method of freeing up space on my computer and did not harm the Outlook app.

This purges the cache, but as soon as the person checks outlook, all the space will return. Would you change download headers setting or just hope less mail is on the server after this?


text:
Notification Center iTunes widget bug?
Does the iTunes notification center (Today view) not display the track for live streams? Mine only shows for tracks in my library. In the case of live streams, it is simply blank. The main iTunes window, and mini-player, show the live track info just fine.


text:
How can I copy a PDF from OneDrive to iBooks using the OneDrive iPhone app?
I have a PDF file in OneDrive that I would like to copy to iBooks on my iPhone. Usually apps have an option to copy the PDF to iBooks, but apparently the OneDrive app doesn't. I tried pressing the button on the top right corner after opening the PDF in the OneDrive app and then selecting "Share a link", but it doesn't seem like the iBooks option is available there:

I clicked on More to see if there was an iBooks option that was hidden, but no.
I also tried Open in another app, but nothing happened. The other options in that menu (delete, rename, etc) don't seem to have anything to do with what I want to do.
I also tried opening the PDF online on OneDrive's website with Safari, since Safari usually has an option to copy PDF files to iBooks, but that didn't open it as a PDF file but as a webpage, so copying it to iBooks that way created a screenshot in iBooks and not the actual PDF.
The only solution that I found was sending the PDF to myself by email and copying it to iBooks through the Gmail app, but I would like to know if there is a better way to do.
Is there an easy way to export a PDF from OneDrive to iBooks on an iPhone, preferably directly from the OneDrive app?

Three dots and then "Open in app" more or less worked for me.  It crashed the OneDrive app the first three times, but after upgrading to the 21017 Aug 25 release, it worked.

Try downloading the PDF, there should be an option called "Open with ..." or "Open in iBooks".
Or after selecting it, click on the 3 dots on the top right, there should be the option "Open in"

As I said in my question, I tried clicking on the three dots on the top right and clicking on Open in another app, but nothing happened

I find it strange, in every cloud service there is the download function and then you can open it in Ibooks. Also downloading from Safari and not from app

You tap on the three dots instead of the Share button. After tapping the three dots you will see the option to “Open in Another App”. Tap that and you will see “Copy to iBooks”

If you have IOS 11, you should also have the Files app and your OneDrive account should appear as one of the "positions"
If you select the PDF file there and then use the "share" command, "open in iBooks" will be there.
Dunno why it's not available directly from OneDrive (probably it requires an integration that MS still have to provide)

A "longer" path can be to "copy to Files" from OneDrive (it will end in your iCloud storage) and then to "open in iBooks" from the "Files" app


text:
join multiple png images
Often I find myself needing to take many PNG images and join them into a larger image.
Specifically, in this particular case, I'd like to take 2 PNGs of roughly equal width (±2px) and different heights and create a new PNG where the first is above the other. E.g.

The join should be seamless.
Is there a command line tool/app that does this? Best would be if Preview offers a solution.

sips is the closest thing I know of, but I don't think this'll do what you want. Anything wrong with using a photo editing program like GIMP?

@JMY1000 I'm hoping there's a native method or some simple one-liner terminal script. Using GIMP to do this simple task takes forever (starting up GIMP, creating new image of correct dimensions, pasting in the two PNGs.) Maybe there's a specialist app that isn't native to macOS, I wouldn't mind installing it if there was.

Fair enough. Not aware of anything off the top of my head.

In your OP you said, "Best would be if Preview offers a solution.", Preview doesn't have that functionality and neither does sips as mention in the comments. In your comment you said, "I'm hoping there's a native method or some simple one-liner terminal script", there is no native method that I know of, but that does't mean there isn't. The third-party app ImageMagic has a montage command to create a composite image by combining several separate images. You might have to first rotate the images using some other command of ImageMagic, or sips. Can't say for sure as I've not used it.

@user3439894 I already have ImageMagick installed, I'll look into the montage command. :)

ImageMagick can do this:
convert 1.png 2.png -append result.png

Alignment options can be (optionally) specified using the -gravity switch,

-gravity East align the right edges
-gravity West align the left edges
-gravity center align the centers

Note: using +append instead of -append will stitch the images together horizontally (side-by-side) rather than one above the other.

+1 for coming back to share that ImageMagick could do this and how you did it. :)

Is there anyway to link some gui type interaction here? I find most of the time I want to convert screenshots with long names that are hard to distinguish between effectively at the command line. It would be nice if I could pick the images I want combined via finder, and then the rest of this script runs.

@Rey type convert and then drag and drop the files from finder into terminal

@Rey — I added an answer to address your question: https://apple.stackexchange.com/a/395488/136164

If you want to do this entirely in Finder, you can create an Automator service and run it as a Service through the right-click menu.

open Automator.app
New > Service
Service receives selected "Image Files" in "Finder.app"
add Utilities > Run Shell Script
enter the script shown below (include the trailing newline)
Save as "Image Append - Vertical" (saves to ~/Library/Services/Image Append - Vertical.workflow)

To run — select two or more images in Finder, right-click > Services > Image Append - Vertical
A new file will be created with the name of the first image suffixed with "v" before the file extension.
Bash Script:
#!/bin/sh
DIR=$(dirname -- "$1")
FILE=$(basename -- "$1")
NAME="${FILE%.*}"
EXT="${FILE##*.}"
# call ImageMagick with selected files and create new file with "v" suffix
convert "$@" -append "${DIR}/${NAME}v.${EXT}"
# GraphicsMagick version (smaller & faster than ImageMagick)
#/opt/local/bin/gm convert "$@" -append "${DIR}/${NAME}v.${EXT}"

Automator screenshot (macOS High Sierra):


text:
Chrome loses sound input and mouse with Thunderbolt setup
Have a couple of weird things going on with Chrome and external devices on my MacBook Air 2014 (OS 10.11.6). I have a setup where I have several devices connected to my MacBook via Thuderbolt port connected to a Belkin Thunderbolt 2 Express Dock HD (namely, monitor, wireless keyboard, wireless mouse, headphones, Ethernet and external disk).
First, when I exit Chrome, my mouse sometimes stops working. Just does not react to anything. This has been happening pretty consistently with Chrome, and only Chrome - did not notice any other app behaving like that. After I disconnect the Thunderbolt cable and reconnect it again everything works again. The touchpad works fine all the time.
Second, sometimes (usually after disconnecting Thunderbolt cable and reconnecting it again) Chrome stops interacting with the microphone. I am talking about internal one - Chrome just ignores it, e.g. when I use Google Hangout, nothing can be heard. If I restart Chrome - without doing anything else - it starts working again. System sound configuration has internal mic selected and does not have any problem detecting and using it - but Chrome does.
Anybody encountered such effects or has any idea what could be causing it? It sounds rather weird but I had it happen multiple times and by now I'm pretty sure the conditions are as described, though still have no idea why.

It's helpful if you provide the specific MacBook Air and the version of macOS  you are using.  Also have you tried to see if the problem occurs in Safe Mode and/or a different browser?

Did not notice it happening with other browsers. But I mainly use Chrome, so it is possible I don't use them enough for it to happen (it doesn't happen every time I exit Chrome, but frequently enough I have noticed the pattern).
Added the specs to the question.

Actually, noticed it happening with Brave browser (built on Chrome opensource engine) too, so it's probably something in Chrome code...


text:
How to find out which cipher suites an iOS application uses?
I'm trying to find out which cipher suites and SSL/TLS protocol an app uses. In the privacy policy it is written that it uses SSLv3 but when I tested the server of the app's developer using an SSL checker it said it supports TLS 1.2 1.1 1.0 and SSL 3.0. Is there any way to determine the cipher suites used and the exact protocol an app uses to send data to a server?

You could install a web proxy on your router or a computer and there are even web proxies on iOS like Charles Proxy.

https://www.charlesproxy.com/

There are great tutorials on the site above using the Mac / Linux / Windows version of this to debug and investigate ios / iPhone traffic. The iOS app to run this on the device itself is here: Charles Proxy by XK72

You should try this tool https://www.ssllabs.com/ssltest to grab detail information about Protocols, cipher suites, Handshake Simulation. It will help to know the configuration of any SSL web server.

but it wont tell which cipher suites an app uses to connect with its server

Checkout https://helpcenter.gsx.com/hc/en-us/articles/207831828-How-to-identify-the-Cipher-used-by-an-HTTPS-Connection

an app doesnt use a specific browser

Yes, app doesn't use the browser. Searched a lot and found this resource for your query's solutions https://security.stackexchange.com/questions/52150/identify-ssl-version-and-cipher-suite


text:
Is it possible to turn off iCloud Photo Library on one device only?
I would like to know if its possible to turn off iCloud Photo Library on one of my devices. The device in question is a MacBook Air which I use while at the office during the day. I would like to keep photos on for my iPhone, iMac, and MacBook Pro. Anyone know if this is possible on a device level?
I might add the reason that I would like to know if this is possible. I’m noticing the photo processes are using high CPU as well as kernel_task. I’m attempting to minimize CPU.

On your MacBook Air, open  → System Preferences → iCloud and uncheck Photos.

This will prevent iCloud Photos from syncing to and from the device on which you did this.
On iOS, this is done by going into Settings → Photos and disabling iCloud Photo Library.

Yes, I use iCloud photo library. If I turn of this feature from my MacBook Air, I will have disabled iCloud photo library on an account level and on all of my devices, hence compromising my iCloud library. Right?

No, it will not disable it at the account level, only on the computer that you disable syncing from. Disabling at the account level is done by going into Manage… → Photo Library → Disable and Delete.


text:
Accidental upgrade of iPhone SE to iOS 10, any way to go back to 9?
I'm fairly sure this is not possible but had to ask anyway.
My wife's iPhone SE was on iOS 9 which she loved, and she hates iOS 10 (has tried it on my phone and can't stand it).  Today her phone popped up a dialog to upgrade and her finger slipped just enough to hit "OK" rather than "Cancel" (or whatever the precise wording, I forget).  Now she's on iOS 10 and is absolutely miserable.
Is there any possible way to revert?  I'm aware of the new "prometheus" option but as she's never jailbroken or had any interest in such things, she has no saved blobs for her phone from any prior OS version.  I know this is a long shot but... fingers crossed.

No, this is not possible - see this answer. As an aside, is there something in particular your wife hates about iOS 10? Perhaps you could ask another question (or questions) about those issues? I've found most users grow to really like iOS 10 after sorting out some initial bugbears.

Her issues with iOS 10 are nothing that can have anything done about them.  She despises change for change's sake, and iOS 10 (actually every i OS upgrade) is loaded with things that absolutely didn't need to change.  Looks like I'm just going to be stuck with an extremely unhappy partner for a very long time - or go buy a used iPhone SE that still has 9.x on it.  Did it before with her iphone 4s when I accidentally upgraded it to 7, so it's not a new concept for me.  Sigh.


text:
Clear Terminal command history
I'm trying to clear the history of commands that have been run on Terminal, I found an article which said I can do it with rm ~/.bash_history
However, I am still able to see the previous commands that I've ran by pressing the up arrow

The correct command is history -c, as shown in the picture below.

In case anyone is here in 2020+ and is having a brain fart, it's ~/.zsh_history now!

As @jksoegaard says, You'll need to close the terminal and open it again - after hitting the command.

If you are running zsh, you'll need to use this command to clear the Terminal history:
rm ~/.zsh_history

Alternatively, you can open your user folder in Finder, press Command + Shift + . to show all files, and manually drag the hidden .zsh_history file to the trash.
You might also want to check and clear the .zsh_sessions folder too, as it also might contain the history of previous Terminal sessions.

The command that has worked for me in zsh is
history -p

p = purge

It‘s more a matter of the shell used than the OS version, so in which shell are you running this?

Yes, you are right, I should have mentioned that it is zsh the default shell.

mac os uses zsh by default since catalina https://support.apple.com/en-us/102360

An easy way to accomplish this is to close all terminal windows, and then open a single new terminal window, where you run:
rm ~/.bash_history

You'll need to close the terminal and open it again. Now when you press arrow up, you'll only see the rm command, and not earlier commands.

I have used this method without problems. You just need to be aware that your current session's history will be saved when you close it. So close all sessions, and create a new one that will have no history to speak off - then clear the file. You can use history -c to the same effect ofcourse, but again if you have open sessions and close them afterwards, then their previous commands would be saved to history as well.

You have to write following in terminal step wise: -

cat > .zsh_history
clear
press return ⏎
press Ctrl ^ + D

Then close terminal using Cmd ⌘ + Q and then reopen again.

What does this do, especially step 3 and 4?

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

So what you have to do is:

run "rm ~/.bash_history" (without quotation marks)
run "exit" command
quit Terminal and open it again
You can check that your history is cleared by running "history" command. All that should be left is the "exit" command and "rm ~/.bash_history" command.

Hope this helps!

Welcome to Ask Different.  This isn't much different than the answers already provided.  It would be better if you edit one of the other answers, to add the 'exit' command, instead of creating a new answer with mostly recycled info. - From Review

Your chance to improve the answer for newer macOS versions, e.g.using zsh or even shell-independent with environment-variable $HISTFILE.

I found this on Udemy's Linux Mastery course.
history -r; history -w

history -r removes the terminal history temporarily for the current session. history -w removes it permanently.

None of these worked. History is deleted, yet every time I re-opened terminal, I still had access to my command history. It's a security risk, and the only indication you get is in case you cleanly exit a session: "Saving session... ...copying shared history... …saving history...truncating history files... ...completed."
The full answer is this:
https://www.swiftforensics.com/2018/05/bash-sessions-in-macos.html
The history still gets saved to ~/.bash_history and recalled every time.

This basically is a link-only answer which will become useless once the link breaks (it also makes the answer not show up in search). Can you please include the relevant parts directly in your post, and leave the link for reference?

There are several things here that caught my attention:  1) macOS uses Zsh, not Bash, as the default now.  2) The messages you’re seeing are not common, so we’ll need additional info about your environment.  3) This is more of a comment and 4) This seems to only promote the link you supplied.

@allan Ah right, the linked page doesn‘t actually explain how to delete the history.


text:
Protect hosts file
I am under the impression that there is no real way to protect the hosts file completely without creating a none-admin user account on my Mac and setting the password of the admin account to one that I won't remember.
So therefore I would like to make editing of my hosts file difficult as a next-best alternative.
I have read that it is possible to set a system immutable flag on specific files which would need to be disabled before the files are able to be edited.
So of course it would still be possible to edit the hosts file, but it would at least make it a bit trickier.
Is this a recommended approach? or is there a better way to achieve it?

If you want to prevent yourself from wasting time on Facebook et all while working there are applications for this :-)

Protecting with ‘schg’, the system immutable flag, is a potential solution, depending on how much protection you need. You can set the schg flag using
sudo chflags schg /etc/hosts

Removal of the protection depends on your kernel security level. Run sysctl kern.securelevel:

1 means you need to boot to single-user mode to run chflags noschg /etc/hosts,
0 means you can simply sudo chflags noschg /etc/hosts.

Instead of schg, you can use System Integrity Protection's restricted flag in El Capitan and later. You can boot to the Recovery HD to set the flag using chflags restricted /etc/hosts.
This protects the file from modification whilst SIP is enabled, which is enabled by default and can only be disabled by booting to the Recovery HD and running csrutil disable.
Check the status of SIP by running csrutil status: if it is enabled, any files with the restricted flag cannot be modified without disabling SIP from Recovery first or by installers signed with Apple's Software Update certificate (even root cannot modify the file).

thanks! I am running Yosemite so looks like schg is the only option then... my kernel security also appears to be set to 0, is there a way to increase this?

also I've tried running sudo chflags schg /etc/hosts in Terminal but I am still able to access the hosts file with sudo nano /etc/hosts... is this normal?

@pealo86 Unfortunately I have no experience with modifying the security level, perhaps someone else will be able to help with explaining any impacts this may have. As for opening with nano, this doesn't prevent access to the file, only modifications — try writing out with nano to the file?

ah I see what you mean about not being able to make modifications actually! it now gives me an error when I try to write-out the hosts file... that should do nicely then. Im struggling to undo the sudo chflags schg command however, if I run it again I am still unable to modify hosts?

@pealo86 By “previous command” I meant the noschg command I mention after — run sudo chflags noschg /etc/hosts to remove the protection.

@grgarside Thanks. So this csrutil trick helps you prevent modification but an attacker can still read the file right ? Can this pose a threat with a normal non custom hosts file?

@grgarside Also can this protection using csrutil cause some apps or services to bug ?

@Espressotron Restricted files can still be read, SIP doesn't protect against reading the file as that's not its purpose. I'm not sure I understand what you mean by threat — many processes read the hosts file and they shouldn't be prevented from doing so, but writing is a different thing and rarely needs to be performed. Apps shouldn't be writing to hosts except in very rare circumstances, so having an error or other caught exception is part of the protection. Should Apple ever wish to edit the file in a macOS update, their SU certificate bypasses SIP as designed, so this is not an issue.

@grgarside ok great, thanks a lot for taking time to answer my questions. Is there an official hosts file to check against to see what the regular hosts file should look like ?

@grgarside when we do the csrutil technique you mentioned, is there a way to verify the protection on that file has been activated like when verifying permissions for a folder or file for example ?

@grgarside when I check the manual for chflags they don't mention the restricted option, is there a way to get a more detailed command manual than the BSD General Commands Manual widely used online (including the Apple Developer Site) ?


text:
Bootcamp assistant errors, and disk utility can't fix it

Boot Camp Assistant says this:

The startup disk must be formatted as a single Mac OS Extended (Journaled) volume or already partitioned by Boot Camp Assistant for installing Windows.

But when I try to go into disk utility, I have a single partition, Macintosh HD (stock partition), not counting the system 18 MB partition, and it is indeed a "Mac OS Extended (Journaled)" format.
What can I do?  Does that small 18 MB partition actually make that much of a difference? I can't delete it, so it seems to be important.
diskutil list gives:
 rikermacbookpro:~ rikerw$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            398.8 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s6
   4:                        EFI NO NAME                 104.9 MB   disk0s4
   5:         Microsoft Reserved                         16.8 MB    disk0s5
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +398.5 GB   disk1
                                 Logical Volume on disk0s2
                                 A2648FC0-6D9F-4DB8-98FF-22D33E028A4E
                                 Unencrypted
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Riker Backup            249.7 GB   disk2s2

And sudo gpt -r show disk0:
rikermacbookpro:~ rikerw$ sudo gpt -r show disk0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640  778989752      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  779399392    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  780668928     204800      4  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  780873728      32768      5  GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE
  780906496  196198531
  977105027         32         Sec GPT table
  977105059          1         Sec GPT header

Can you edit your question to include the output of terminal command 'diskutil list'?

Try to delete volumes disk0s1,s4 ans s5 with:
diskutil eraseVolume Free Space /dev/disk0s1

and respectively 0s4 and 5 then launch BCA.
Hope this solves the problem.

This didn't error, but it didn't solve my problem either. If I run it from standard terminal, it says it's already in use. If I run it from recovery mode, it says it works, but didn't actually work.

@Riker guess you would have to unmount the volumes first

Your main volume mustn't contain more than three partitions to allow Boot Camp Assistant to add a Windows partition. These are one visible partition:

The startup disk must be formatted as a single Mac OS Extended (Journaled) volume

and two invisible partitions: EFI and the recovery partition.
To return to the default disk layout you have to delete the last two partitions (disk0s4 – the No Name EFI – and disk0s5 – Microsoft Reserved) and expand the main partition disk0s2.

Backup your main volume
Detach your backup drive
Boot to Internet Recovery Mode
Open Terminal in the menubar > Utilities > Terminal
Enter diskutil list and with the disk identifier of the internal disk found there: gpt -r show diskX. Usually it's disk0 - below I assume it's disk0. Use the disk identifier you have found in your environment in the commands below! You also have a CoreStorage volume (e.g. FileVault). Check its disk identifier also. Below I assume it's disk2. If you haven't mounted it (because you didn't unlock it - if it is encrypted), you don't have to unmount it below.
Verify the disk with diskutil verifyDisk disk0 and diskutil verifyVolume disk0s2. If you get errors try to repair them with repairDisk/repairVolume. If you can't repair the errors add a comment to the answer mentioning the error message(s) and don't continue with the steps below.
Unmount the logical volume and then the internal disk:
diskutil umountDisk /dev/disk2
diskutil umountDisk /dev/disk0

Remove the fourth and fifth partition:
gpt remove -i 5 /dev/disk0
diskutil umountDisk /dev/disk2
diskutil umountDisk /dev/disk0
gpt remove -i 4 /dev/disk0

Reboot
Open Terminal and enter diskutil cs list to get the UUID of the logical volume
Resize your main partition to the full available size:
diskutil cs resizeStack lvUUID 0g

In your case that's
diskutil cs resizeStack A2648FC0-6D9F-4DB8-98FF-22D33E028A4E 0g

In macOS Sierra the magic size 0g often doesn't work and you have to use a real size like 499600m. If you get an error like: Error: -69771: The target disk is too small for this operation choose a slightly smaller size like 499500m until you are successful.
If you get another error, the whole (previous) Boot Camp Assistant operation failed and corrupted the internal structure of the LVG. You have to restore the main volume from your Time Machine backup then.
Quit Terminal.app and launch Boot Camp Assistant to install Windows.

This errors at unmounting disk0. It says it's already partitioned or something, and can't unmount. (this is with unmountDisk, not unmount)

@Riker Please add the whole error message! You first have to unmount the logical volume and then the underlying disk. In your diskutil list output that's first disk1 and then disk0. In Internet Recovery Mode it can be different e.g. disk2 and then disk0 or disk13 and then disk0. Simply check your diskutil list output in Recovery Mode and don't be confused by the 11-14 other disks (which are much smaller <1.2 GB)

Make macintosh HD the only partition formated as Mac OS Extended (Journaled). that worked for me


text:
Purchasing Affinity designer on mac
If I purchase Affinity Designer on my iMac will I be able to use the app on my MacBook as well? I'd like to know if it works on one device or on any device that my iCloud account is signed into.

Mac App Store apps can be used on any Mac signed in with your Apple ID.

Can I use apps from the Mac App Store on more than one computer?
Apps from the Mac App Store may be used on any Macs that you own or control for your personal use.

Mac App Store: Frequently Asked Questions (FAQ)


text:
Apparently damaged external disk drivers. Can they be repaired?
I have a MacBook Pro (Retina, 13-inch, Early 2015), and about a month ago I tried to enable NTFS read/write with some guides on the internet. Crucially I can't remember which guides I followed.
It didn't work, however I noticed that I can no longer mount any MAC OS external drive (USB stick, USB external hard disk, SD Card), regardless of the formatting.
I can see all these drives fine with 'Disk Utility' but I simply can not mount them. I've tried mounting from the terminal as well, but I really get no error message at all. I have another MacBook Pro (without my NTFS adventure) and the drives all work fine.
Is there any way I can repair the disk drivers? I would really prefer not to have to reinstall my system (especially now file backup isn't possible!)
Note : Currently running macOS Sierra v 10.12.4

Basically there are two free methods to enable write access to NTFS: fstab & ntfs-3g. So check whether /etc/fstab and/or /sbin/mount_ntfs.original & /sbin/mount_ntfs exist.

Thanks @klanomath - I will look, but my problem is that no disks are working any more, including MAC OS ones

If you don't remember the guide, you/we have to narrow it down systematically. NTFS is the first step. Checking mod dates (~April, 1 2017) of various system or bin/sbin folders is the next one.


text:
How can I never see scroll bars?
I can change the scroll bar behaviour to only show when scrolling:
 > System Preferences... > General > Show scroll bars

But I never want to see scroll bars.
How can I completely disable them? I just want to scroll with keyboard/trackpad, the scroll bars are ugly and get in the way too often, and I never have a need for them.
I want to turn off scroll bars 100%.

You get the three options shown. That's it. macOS makes no provision for your particular desire in its design.
You should make an enhancement request at Apple's Product Feedback site.

What have you done to search for third-party tools? You don't indicate any effort, on your part, to find the answer for yourself. Part of the philosophy at AskDifferent is to ask questions when you have tried, but failed, to find the answer for yourself. IMHO, scroll-bars are an integral part of any modern operating system, and your desire to disable them is perhaps difficult or impossible to effect in software.

Good luck. I don't there is such a setting.


text:
Where to find VNC access logs with IP addresses on Sierra?
I'm looking for logs on attempts by someone to access one of my Macs on a previous day. I have remote management running and I allow VNC access. In the logs I have found, I see the attempts they made, but there's no IP address logged. Where can I see this?
An example of a console log I have is "system.log.0" (backed up the last day). I have tons of these log events from when someone was connected:

(com.apple.screensharing[2323232]): Endpoint has been activated through legacy launch (3) API's

There is no other logged info.
Also, I don't have a "secure.log" file.
I just want to know what IPs were connected to my Mac during a specific time frame. Is there any other log or source of info in macOS Sierra I could harvest for this?

I'm not sure if you've found any solutions, but I've began combing through this https://www.mac4n6.com/blog/2016/11/13/new-macos-sierra-1012-forensic-artifacts-introducing-unified-logging but haven't had the time to figure out how to log / monitor VNC connections

Beginning with macOS Sierra, there is a new unified logging system, which requires a bit more work to access than the old system.log, but includes far more details.
Use this command to show the last three days of access logs:
log show --last 3d --predicate 'processImagePath CONTAINS "screensharingd" AND eventMessage CONTAINS "Authentication"'
This will show timestamps, IP, username, and authentication failure/success for both VNC and Apple Screen Sharing connections.

This is great...thanks for sharing the command. How can we make it persistent and have it log this in Console? Is there another log maintaining this I can't see?

What do you mean by persistent? The console app is nearly useless in Sierra. To show in real-time you can use log stream instead.

More info about Console: https://eclecticlight.co/2016/09/23/sierras-console-promising-but-incomplete/

I mean see a backfilled log the console keeps. I want to see log records in the console

Can this be adapted to show ssh connections?

Certainly. You just need to find the right predicate

How can you remove VNC logs out of the log and where is the actual file ?

@Kevin I'm not aware of any way to remove entries. The files are tracev3 compressed binary format in /var/db/diagnostics so you could delete the whole thing.


text:
Is there a way to get the received and transmitted wifi waveform from an iPhone?
I want to get the wifi waveform for a project involving signal processing, I was wondering if one of you heard of a way to get such an access ?

You mean like get a machine that reads and shows the microwave signals going through the air?

Ideally, I mean embedded on the device, for prototyping. I want to get a reading on the signals that a phone would have given all the interference he could get and emit.

Possibly related but I just realized that if you Alt (Option) click the WiFi icon on a Mac, you can click Open Wireless Diagnostics. From there you can click Window in the menu bar and some of those windows like Performance may have relevant charts. Not sure if that's what you needed though.

Thanks, I just checked it, unfortunately, those data are not sensitive enough for signal processing. There is a "detector" windows that generates *.wcap files within the tool, but those are packets related data.


text:
Is using mid 2012 MacBook Pro RAM in mid 2011 iMac 27" an option?
I recently came into possession of a 27 inch mid 2011 iMac. It only has 4GB RAM and I have been pricing compatible memory modules online.
I  then remembered I also have a 13 inch mid 2012 MacBook Pro that was damaged some time ago. It has 8GB RAM that I have no reason to suspect has any faults as it worked fine before the damage which was not anywhere near the bottom case. So I thought I would investigate the types of memory modules the iMac and MacBook Pro use.

I found the iMac uses 204 pin PC3-10600 (1333 MHz) DDR3 SO-DIMM modules.
I found the MBP uses 204 pin PC3-12800 (1600 MHz) DDR3 SO-DIMM modules.

Obviously I'm thinking that if I can use the MacBook Pro RAM in the iMac I can save some money and it's a good way of recycling.
I understand this RAM would not operate at 1600 MHz in the iMac. My questions are:

Would the MBP RAM work okay otherwise?
If it would work, does it make a difference if I add them to the original RAM so I have 12GB in total, or will I have to remove the old modules and just use the 8GB instead?

While I am not a fan of of mixing and matching memory, Crucial, a manufacturer of quality memory components, has this on their website:

Memory is designed to be backward-compatible, so generally speaking,
  you can safely add faster memory to a computer that was designed to
  run slower memory. However, your system will operate at the speed of
  the slowest memory module.

So, technically speaking, the answer to both your questions is, yes it will work and no it won't make a difference as you can mix and match the different speeds.
They also go on to say...

Keep in mind, that the right memory for your computer is the kind of
  memory it was designed to take. Check your system manual or look up
  your system in the Crucial Memory Advisor or System Scanner tools to
  find the memory guaranteed to be 100 percent compatible or your money
  back!

Well, the "system scanner tool" is for PC's but the rest of the statement is absolutely true.  The last part about "money back" is why I only buy from reputable manufacturers like Crucial (PNY and  Kingston are excellent choices as well).
That said, according to Everymac.com, the maximum supported memory configuration is 32GB1.  Personally, I would (at minimum) sell the  existing memory that you have (4GB modules are going for around $20USD on eBay) and instead buy a  16GB kit so you can max out your memory in your iMac either today or at a later date.
My personal iMac runs with 32GB of RAM which allows me to virtualize a Windows 10 machine, and two FreeBSD servers (one for development/testing and the other for a Plex media server).  I am a firm believer in the old axiom "it't better to have and not need than to need and not have."

1 Everymac.com:  Officially, this model supports four 4 GB modules -- one in each slot for a maximum of 16 GB of memory. However, third-parties have discovered that it actually will support 32 GB of memory using four 8 GB modules.

The MBP RAM should work just fine on the iMac. The instruction on how to install the memory in the iMac is here. To mix them, make sure you put the pair that came with the iMac in a bank, and the one that came with the MBP into the other (don't mix them basically). If you never touched the memory on the iMac before just put the one on the MBP in the empty slot.
Also for reference your iMac supports up to 16GB.

No, the iMac definitely has 4 slots. So, do you know if can I mix them to get 12GB, with all running at the lower 1333MHz?

@Little.Eden OK, never mind... used that longtime ago, didn't remember that well. It should work together.


text:
Can a shortcut be created to toggle menubar visibility (that would persist, as the dock's does)?
I can choose in Syst Prefs to have the menubar show always or hide with auto-show (auto-show being show on hover or show on focus-by-keyboard-shortcut).
But when I'm working, I want the menubar always visible. And when I'm recreating, I want it usually hidden.
I like that with the dock I can hit commandoptiond to show or hide the dock, and it stays shown or hidden until I press the same shortcut again.
I wish the menubar worked this way too. Can such a shortcut be created somehow?

Just an FYI, I downloaded and tested FastScripts under macOS 10.12.3 with my code as a .scpt and gave it a keyboard shortcut of ⌃⌘M and it works great! Much better then as an Automator Service and System Preferences key binding.

You asked, "Can a shortcut be created to toggle menubar visibility (that would persist, as the dock's does)?" and the short answer is, yes.
However, the longer answer is, while it's technically and natively possible to create an Automator Service workflow that gets assigned a keyboard shortcut to hide/unhide the Menu bar in OS X 10.11 and later, including the current macOS, it's not without its issues.

You'd have to assign the Automator Service a keyboard shortcut that does not interfere with an existing shortcut in every app that might have focus when you triggered the service's keyboard shortcut.
Every app that has focus when the service's keyboard shortcut is triggered would have to be added to System Preferences > Security & Privacy > Privacy > Accessibility, in order for the service's keyboard shortcut to work.

A possible workaround to the second point above would be if there's a third-party app that can be globally set to trigger the Automator Service work flow (or the AppleScript code as an AppleScript script or app not using an Automator Service). This might include apps like Alfred, FastScripts, Karabiner, Karabiner-Elements, Keyboard Maestro, etc., and having not tested these third party apps under this particular scenario I can only offer that as something to look into.
So, how about an AppleScript app you could place in the Dock, so it's readily available to click on, that will toggle the state of the Menu bar? You'd only have to add that AppleScript app to System Preferences > Security & Privacy > Privacy > Accessibility, in order for it to work.
In lieu of a third-party app or as an Automator Service and just as a plain AppleScript app, you do have a keyboard shortcut built in by way of Spotlight, in that you press ⌘space and the first character or two of the name you gave to the AppleScript app and then press enter. As an example, name it tmb.app for toggle menu bar, the you'd press ⌘spacetmenter to trigger the AppleScript App. After all, I double you already have an app named tm installed.
However, that said, it too is not without possible issues in that it relies on UI Scripting, meaning, it has to open System Preferences to the General settings and click the "Automatically hide and show the menu bar" checkbox and close System Preferences. This means once you triggered the app, you have to let it run and not manually steal focus from System Preferences while the UI Scripting events take place. In other words, you have to stop multitasking for a couple of seconds.
In part, one of the issues using AppleScript and or UI Scripting to hide/unhide the Menu bar is it's just not as graceful as hiding the Dock with its built-in keyboard shortcut, but it's at least doable.
That all said, here's the AppleScript code, that can be used in either an AppleScript script/app, Automator Service, or possibly a third party app, that will toggle the state of the Menu bar in OS X 10.11 and later via UI Scripting.

tell application "System Preferences"
    reveal pane id "com.apple.preference.general"
    delay 1
    tell application "System Events"
        click checkbox "Automatically hide and show the menu bar" of window "General" of process "System Preferences"
    end tell
    quit
end tell

Note there is no error checking to ensure this code in run under OS X 10.11 and later so don't try using it in versions of OS X prior to 10.11. Also note that the value of the delay command may need to be adjusted as necessary under the working conditions of your system.

@jaepage, How about if you don't see the System Preferences window? In other words, it opens off screen, checks/un-checks the checkbox and closes? Then the state of the Menu bar is toggled, but you don't have to watch the UI events take place. That is other then if System Preferences is in the Dock it will bounce once and the dot will be under its icon until is closes.

@user3439894  you deserve the credit for the accepted answer.  Is there any way I can post my revision as just a comment to your answer?

@jaepage, I updated the code to hide System Preferences windows while making the change to hide/show the Menu bar. I replaced activate for set bounds of window 1 to {0, 0, 0, 0} and so you do not see the System Preferences window but it makes the change.  You actually could just leave both those out and you should't see the UI.

@jaepage, I named the app tmb.app for testing and after searching for it once in Spotlight by tmb then subsequent searches for just tm show tmb before Time Machine.  That said, you could name it something else that wouldn't near match anything else. I just suggested tmb as it makes it easy to remember for Toggle Menu Bar, which the full name like that wouldn't bring up Time Machine but to might catch on other things too. You'll have to figure what naming convention works best for you to only have to type one or two characters after ⌘space.

@jaepage, I do not recommend using Automator and binding it to a shortcut key sequence in System Preferences for reasons I explained in my answer and also because it's not reliable. This is why I suggested third-party apps to trigger or use just the AppleScript app method in the Dock and or from Spotlight as the AppleScript app it all that has to be authorized and that method has never failed me!

@jaepage, I just don't think it's a big deal to install an app that can do the job reliably when the native solution can be and is problematic at times. Now that I have FastScrips installed I'll use it on a few other scripts and apps to start, as it can run up to 10 before having to purchase it. That is if I need the added functionality. Your other option is to programmatically set the _HIHideMenuBar key in the user's .GlobalPreferences.plist and have the system updated to its change. You'd probably have to write this in Objective-C. (Maybe Coca AppleScript.)...

@jaepage, You would then still have to employ some method of keyboard hook or bind the running of the executable to something anyway.

For all the qualifiers you gave, this works perfectly and almost instantly. I was worried a GUI script would be slow, but it's not.

It works perfectly.

Made an app with Automator using this AppleScript code by "@user3439894".
You can try setting the delay to 0.1 which worked for me.

    tell application "System Preferences"
        reveal pane id "com.apple.preference.general"
        delay 1
        tell application "System Events"
            click checkbox "Automatically hide and show the menu bar" of window "General" of process "System Preferences"
        end tell
        quit
    end tell

Made a keyboard shortcut for the app and mapped it to cmd-ctrl-9
Works great.

Instructions here:
https://appleinsider.com/articles/18/03/14/how-to-create-keyboard-shortcuts-to-launch-apps-in-macos-using-automator

Answers on Ask Different need to be self contained, since if your link goes down, your answer will be useless. Paraphrasing the source and including any relevant information in the answer will ensure it stays relevant

Making some minor adjustments to the original code from user3439894’s answer.  Running this revised code will not bring system preferences app to the front.
tell application "System Preferences"
    reveal pane id "com.apple.preference.general"
end tell
tell application "System Events" to tell process "System Preferences" to tell window "General"
    click checkbox "Automatically hide and show the menu bar"
end tell
delay 1
quit application "System Preferences"

In some comments to my answer, it has been pointed out where I have the delay command in my script, makes the script fail.  On my system this script works.

However this script on my system will not work if I put the delay command before the system event.

@jaepage, wch1zpink's code will fail at times because of where he placed the delay! In this case, there has to be a delay before System Events click the checkbox, so as to allow the element to be available to act upon, and doesn't need to be there before quit especially when nested as how mine is written.

@user3439894 I deemed it necessary to put the delay before the quit command because on my system, for some reason, System preferences kept quitting before the checkbox got selected in the previous command

Your code without the delay before the System Events call will fail if the checkbox isn't yet available to be clicked and does constantly fail on my system without the delay as in my code. This is a part of why UI Scripting is not the preferred way to go! I only use UI Scripting if I have no other choice.

@user3439894 Please look at the edits I've made to my original answer.  Do you have any insight as to why my version of the script works for me and not for you? I'm using operating system Sierra.

Let me try to clarify things... There is nothing wrong with having the delay where you have it, however while your code, as written, fails on my system, and not yours is why some UI Scripting isn't always reliable on each individual system. Purely from a programatic standpoint, the checkbox has to be available before it can be acted upon, for the same reason you can't close the app before it's acted upon and why a delay is actually appropriate anywhere as needed (or wanted for some reasons) and may need different values depending on the individual system and its overall usage.

FWIW, putting delay 0.05 between the two tell blocks is sufficient on my system (High Sierra 10.13.4, MacBook Pro (Retina, Mid 2012)) to not produce an error and work every time (works about 30% of the time otherwise).

I'm posting this as a second answer instead of editing my original answer as this new version of the example AppleScript code accommodates issues raised with the use of the delay command and where it was placed in the code presented by wch1zpink and myself between our versions of the code.
The new code wraps a much smaller value for the delay command in a repeat loop, thus making the over all code run faster while accommodating the timing differential based on the system specifications of the computer it's been run on. Additionally, because of the use of UI Scripting, the two repeat loops ensures that the UI Elements are available and or have been changed respectively before proceeding within the code.
This code was tested under macOS High Sierra and worked as an AppleScript application, Automator service, as described in my original answer, and as an AppleScript .scpt file triggered by FastScripts with an assigned keyboard shortcut, as with the Automator service.
Example AppleScript code:
if running of application "System Preferences" then
    try
        tell application "System Preferences" to quit
    on error
        do shell script "killall 'System Preferences'"
    end try
end if

repeat while running of application "System Preferences" is true
    delay 0.01
end repeat

tell application "System Preferences" to ¬
    reveal pane id "com.apple.preference.general"

tell application "System Events"

    repeat until exists checkbox ¬
        "Automatically hide and show the menu bar" of ¬
        window "General" of process "System Preferences"
        delay 0.01
    end repeat

    set cbVal to value of checkbox ¬
        "Automatically hide and show the menu bar" of ¬
        window "General" of process "System Preferences"

    click checkbox "Automatically hide and show the menu bar" of ¬
        window "General" of process "System Preferences"

    repeat until cbVal is not (value of checkbox ¬
        "Automatically hide and show the menu bar" of ¬
        window "General" of process "System Preferences")
        delay 0.01
    end repeat

end tell

tell application "System Preferences" to quit

    Scroll as necessary to view full code.

Note: The example AppleScript code is just that and, other then included error handling, does not contain any additional error handling as may be appropriate. The onus is upon the used to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors.
Also note that I am not affiliated with Red Sweater Software, the developer of FastScripts, just a satisfied user of their product.

There are 2 Apple Scripts
To show the menu bar:
tell application "System Events"
    tell dock preferences
       set autohide menu bar to false
    end tell
end tell

To hide the menu bar:
tell application "System Events"
    tell dock preferences
       set autohide menu bar to true
    end tell
end tell

Save them as quick actions in Automator and assign the hot keys. Here is the guide how to do it.

Open the Automator app on your Mac.
Click "New Document" and select "Quick Action" from the list of templates.
In the "Workflow receives current" dropdown, select "no input" and "any application".
In the search bar, type "Run AppleScript" and drag the "Run AppleScript" action to the right side of the window.
Paste your AppleScript code into the "Run AppleScript" action.
Save the workflow with a name that describes what it does.
Open "System Preferences" and click "Keyboard".
Click "Shortcuts" and then "Services" in the left sidebar.
Scroll down to the "General" section and find your saved Automator workflow.
Click the "Add Shortcut" button next to your workflow and press the keys that you want to use as the hotkey.
Once you have assigned a hotkey to your Automator workflow, you can use that hotkey to run your custom AppleScript application from anywhere on your Mac.

The specific steps and options may vary depending on the version of macOS you are running.
There is no other way to access the dock preferences settings without using the System Events application. This is because the dock preferences settings are a part of the system settings, and can only be accessed through the System Events application.
Here are some additional scripts:
The script to hide the dock together with the menu bar:
tell application "System Events"
  tell dock preferences
    set autohide menu bar to true
    set dockAutohide to get autohide
    set autohide to true
  end tell
end tell

The script to show the dock together with the menu bar:
tell application "System Events"
  tell dock preferences
    set autohide menu bar to false
    set dockAutohide to get autohide
    set autohide to false
  end tell
end tell

I combined the scripts, so this script will change the state of the menu bar - if it is hidden, then shown, or otherwise. It can be used with a single hot key.
tell application "System Events"
    tell dock preferences
        set currentStatus to autohide menu bar
        set autohide menu bar to not currentStatus
    end tell
end tell

And the following script will show or hide both menu bar and the dock - it can be used with a single hot key.
tell application "System Events"
 tell dock preferences
    set currentStatus to get autohide menu bar
    if currentStatus then
        set autohide menu bar to false
        set dockAutohide to get autohide
        set autohide to false
    else
        set autohide menu bar to true
        set dockAutohide to get autohide
        set autohide to true
    end if
  end tell
end tell

I have made some changes to the previous scripts so that it works in 2022 as the location of the checkbox appears to have changed with the MacOS update. For anyone who wants to put the script to use, you can do so via the shortcut app by clicking the '+' icon and typing in "run AppleScript". This way, you can have the shortcut appear in the menu bar. You can also create a service with the Automator.app and define a keyboard shortcut for the service in system preferences.
tell application "System Preferences"
    reveal pane id "com.apple.preference.dock"
    delay 1
    tell application "System Events"
        click checkbox "Automatically hide and show the menu bar in full screen" of window "Dock & Menu Bar" of process "System Preferences"
    end tell
    delay 1
    quit
end tell

They moved the show / hide menu bar option to a pull down menu in Sonoma (10.14.2). This Shortcut (using embedded script) toggles between "always show" / "hide on full screen only" which are the two modes that I use:
on run {input, parameters}
## This script toggles the hide menu item setting from "Never" to "In Full Screen Only"
## Used the great UI Browser https://pfiddlesoft.com/ app (now no longer operational) to write
## confirmed to work for MacOS 14.2.1, but they are changing the control center layout quickly
## Archon Fung on December 22, 2023

##open the system settings app in background
do shell script "open -j x-apple.systempreferences:com.apple.ControlCenter-Settings.extension"

tell application "System Events"

    tell application process "System Settings"
        ## set CurrentShowStr to "Never"
        ##get value of pop up button 1 of group 9 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Control Center"
        delay 1
        set CurrentShowStr to value of pop up button 1 of group 9 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Control Center"
        if (CurrentShowStr is "Never") then
            set NewShowStr to "In Full Screen Only" ##In Full Screen Only
        else
            set NewShowStr to "Never" ##Never
        end if
        tell pop up button 1 of group 9 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Control Center"
            click
            ##need delays to allow the menu items to populate
            delay 0.5
            click menu item NewShowStr of menu 1
            delay 0.5
        end tell
    end tell
end tell
quit application "System Settings"
return input
end run


text:
How do I bypass or remove the iCloud activation lock on iPad2?
I found an iPad at my working office which was owned by the former director. Unfortunately, he locked it with his Apple ID. I restored the iPad via iTunes because I thought it would wipe everything out alongside with the Apple ID on it but it was not working at all. After restoration , the iPad asks me for language, country and Wi-Fi. Then it asks me for the Apple ID of former director. I can't find or contact that person. Plus, I don't have any information about that ID. I want to unlock that iPad for office purposes. How do I unlock it? The model is iPad2, A1395.
I found IMEIUnlock sites but it asks me for 39.99$. Is it really reliable?
P.S - Trust me, I'm not a thief.

It's really simple: You don't.

Apparently you can contact him by his email... iCloud email by the way, so you can contact him by FaceTime, iMessage, email...


text:
Is there a way save with cron?
Is there a cron command that go into a specific App and save?
Or, another way around, how to save an App with a bash script? (and run the script with cron).
Running OS 10.11

Which application specifically? A solution will require calling an  AppleScript snippet from bash, so it only works for Applications supporting AS

POEdit. I went to AppleScript Editor > Open Dictionary, but that App was not available.


text:
Does iOS 8 support AES in GCM mode to encrypt data in TLS/SSL?
While sending data over SSL/TLS in iOS 8 iPhone, is it possible to encrypt data using AES in GCM mode?

Yes, it is possible.
YMMV depending on which app you're using or which SSL/TLS library you're using, if you're talking about your own app.

is there any method to determine which ssl/tls library an app uses or any other method to find out the encryption type

You could use packet sniffing such as Wireshark to determine which encryption type is being used. You can examine the app binary itself to try to detect the TLS library being used.


text:
How do I validate data in Automator?
I'm making an app in Automator to quickly delete my iMovie Library (to save space). However, I want my app to check if the iMovie Library has already been deleted and show a dialog saying so. I know how to make the dialog, but I can't figure out how to do it. How do I do this? I'm using macOS 10.11.
My workflow:

Ask for confirmation
Get specified Finder items (the validation would go after this)
Move Finder items to trash
Run AppleScript (to show a dialog saying "Done")

Show us the workflow and code you already have. Also what version of OS X/macOS are you running?

You can use a Run AppleScript action to perform validation. Between actions 2 and 3 in your workflow, add a Run AppleScript action with the following:
on run {input, parameters}
    if input is {} then
        display notification "File already deleted"
        tell me to quit
    end if
    return input
end run

This checks if the input is empty (because the file can't be found), and if so, runs your desired code — you can customise display notification as you please, such as showing an alert. The use of tell me to quit if the input is empty will stop the workflow at this point.

An old question, but a bit more info could be added.
You can use other "Run" actions Automator, not just AppleScript. You can Run a Shell Script as well. An exit value of the script that is 0 will be deemed a successful check, any other value will be an error. And the equivalent to "Display notification" is the stderr from the script. So:

Ask for Text - creates a single-variable dialog
Set Value of Variable - gives the collected variable a name
Run Shell Script - pass input to [stdin]
 read -r varname
 if [[ ! "$varname" =~ ^SomeValidatingRegexp$ ]]; then
   echo "Validation failed!" >&2
   exit 1
 fi

Ask for Text - next variable
etc.


text:
How to permanently block all incoming connections in the macOS firewall?
I have the default macOS firewall enabled with stealth mode and block all incoming connections option set. And I have it locked. But after a while, the firewall is in green state with selective blocking and not block all connections.
How to identify which application is changing the firewall state? I have another admin user in my system, but I have remote login option disabled. I think this user is responsible for system change. I have removed that account meanwhile, but still want to know how to identify firewall state changes.
Is it possible to get an alert or something when the state changes?
Edit: It is not related to the admin account. After removing it, still this senario happens.
Figured. It is the policy applied. JAMF.

Please don't post a possible answer (JAMF policy) in your question. Instead write a proper answer with some details/some explanation...

You might want to install Little Snitch, a tool that helps you to identify and control any incoming and outgoing traffic and what it was initiated from.
Note that I assume it is not advisable to completely block any incoming traffic.


text:
How to have Single App mode for a web app on an iPad using Apple Configurator 2?
I would like to have a web app to be the only thing you can use with an iPad. I managed to make the website (a simple HTML file with lots of integrated JS) open full screen when added to the home screen as a starter, so there are no browser controls, just the app and a black panel displaying battery status and clock. On the other hand I can use the Apple Configurator 2 to lock the iPad to a single app like Safari but in Safari I have all the browser controls.
What I would like to achieve is locking the iPad to use the web app full screen. However, I cannot do this, because in the Apple Configurator I can only choose from the apps installed on the MacBook it is executed on. Since the web app is not a proper app but just a starter on the iPad's home screen, it is not listed amongst the MacBook's apps.
Is there a possibility to have the iPad locked into the web app in full screen, without browser controls?

Yes that is possible and it is even easier then using Apple Configurator 2. You just need to go to settings-> general->accessibility->Guided Access.
Then when you are in the webapp click three times the home button and draw where the you user can not interact anymore. They can not leave the app, or use the home and power button.
I hope this is what you are looking for.

Any update to this method?
It's 2020 and just trying understand if something has changed since.