Completely Disable Siri

 Oh no, not this shit again! Unfortunately, MacOS at release Sierra has gone the same funny route that Microsoft did such that you will have bloatware forced onto your machine - it's free, so you'll be made to feel guilty enough to be data mined in return. Siri, the speech-to-text assistant, will launch and stay in the background eating your CPU cycles (and do hell knows what else given Apple's reputation). Not only did you not ask for it, but why the frack cannot you just fracking remove it?

Siri cannnot be removed (go figure, why the frack not?) so you can only disable it - at least it will not run in the background. In order to do so, you need to disable system integrity protection and then edit /System/Library/LaunchAgents/com.apple.Siri.plist to change:

        <key>Disabled</key>
        <true/>

to:

        <key>Disabled</key>
        <true/>

You can then save the file, reboot and, if you want, turn system integrity protection back on.

Hide a User

In order to hide an user from the log-in screen and other areas, issue as root:

dscl . create /Users/flot IsHidden 1

where /Users/flot is the path to an user directory.

To revert the change, issue:

dscl . create /Users/flot IsHidden 0

Reset PRAM Without Keyboard

In cases where you have a bluetooth keyboard that is not original and no USB keyboard available, issue the following command as root on MacOS in order to set a flag that will flush PRAM:

nvram -c

and then restart the computer.

Disable Gatekeeper on macOS Sierra

The following command:

spctl --master-disable

will just enable the Anywhere option in the Gatekeeper control panel.

Prevent Hostname to be Overridden by DHCP

Issue as root:

scutil --set HostName HOSTNAME

where:

  • HOSTNAME is the hostname or FQDN hostname to set the machine to.

Don't Default to Store New Documents to iCloud

defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

Control+Alt+Delete

On a Mac keyboard without a Del, to send the key combination to Windows, use the alternative Fn+Ctrl+Alt+Backspace.

Disable Image Verification

Images being mounted by MacOS are first verified before becoming available. To skip this procedure, issue as root:

defaults write com.apple.frameworks.diskimages skip-verify YES

To revert the behaviour, issue as root:

defaults write com.apple.frameworks.diskimages skip-verify NO

Disable Quarantine Verification

Ever so often, for downloaded application, OSX performs an extra verification step when they are launched. This behaviour can stall the startup proceedure when the Mac boots up. To disable quarantine verification of programs, issue as root:

defaults write com.apple.LaunchServices LSQuarantine -bool NO

and to revert to quarantine verification, issue as root:

defaults write com.apple.LaunchServices LSQuarantine -bool YES

Masquerade Traffic from Connected Interface

Using only the MacOS interface, MacOS can be setup to be a gateway and masquerade traffic for a wireless machine by turning on Internet Sharing from System Settings→Sharing. Unfortunately, a machine has to connect to the MacOS access point and OSX cannot be setup to just pass network traffic between interfaces using only the graphical interface.

One example where the former is relevant, is the case where a Raspberry Pi is setup as a wireless access point and MacOS connects to the Pi. In case Intenet Sharing is turned on, MacOS severs the connection to the Raspberry Pi access point and converts its own wireless interface into an access point.

To convince MacOS to masquerade traffic, edit or create /etc/forwarding and append a line:

nat on EXTERNAL_INTERFACE from CONNECTED_NETWORK to any -> (EXTERNAL_INTERFACE)

where:

  • EXTERNAL_INTERFACE is the MacOS external interface (ifconfig will list all interfaces such that the interface that passes Internet traffic can be chosen, for instance, en0).
  • CONNECTED_NETWORK is the network for which packets will be forwarded, for instance, 192.168.4.0/24

Followed by:

pfctl -d

to disable the firewall, and:

pfctl -F all

to flush all existing rules.

After that, the firewall can be restarted by loading the rules from /etc/forwarding:

pfctl -f /private/etc/nat-rules -e

The last step is to use sysctl to enable forwarding:

sysctl -w net.inet.ip.forwarding=1

Fix OpenDirectory Reboot Loop or Hang

MacOS may get stuck whilst booting; when holding the Cmd+V during boot, the message may show and OpenDirectory crash complaining about "too many corpses". To fix the issue, reboot in recovery mode, mount the disk if needed and then open up a Terminal.

Issue:

cd /Volumes/Macintosh\ HD/var/db/caches/opendirectory

followed by:

mv ./mbr_cache ./mbr_cache-old

and then reboot.

Access Google Calendar via CalDAV on OSX

  1. Open System Preferences… from the Apple menu,
  2. Select Add Other Account…,
  3. Select CalDAV account,
  4. Set Account Type to Advanced,
  5. Enter the username and password where the username is the full E-Mail address,
  6. For the Server Address enter www.google.com,
  7. Set the Server Path to /calendar/dav/username@googlemail.com/user and substitute username@googlemail.com for your Google account E-Mail address,
  8. Tick Use SSL and set the port to 443.

Solve Empty Network Preferences

In case SystemUIServer spools the CPU up when clicking the wifi icon in the toolbar or opening Network Preferences opens an empty window then delete the contents of /Library/Preferences/SystemConfiguration and reboot.

Boot in Target Disk Mode

Issue as root:

nvram target-mode=1

followed by:

reboot

to reboot a Mac in target disk mode.

Make Firefox use Trusted Operating System Root Certificates

  1. import the certificate using Keychain Access and set the desired trusts,
  2. open about:config and set security.enterprise_roots.enabled to true.

Get Apple Model Identifier from Terminal

Run as root:

system_profiler SPHardwareDataType | grep "Model Identifier".

Enabling NAT and Forwarding on Mac OS 10.10

# enable IP forwarding
sysctl -w net.inet.ip.forwarding=1
 
# flush all firewall rules 
pfctl -F all 
# or, to just flush the NAT rules
pfctl -F nat
 
# this line should be placed in a file
#
# 192.168.1.0/24 is the network to NAT traffic for 
# and 192.168.1.1 is the local machine IP address
nat on en0 from 192.168.1.0/24 to any -> 192.168.1.1 
 
# load NAT rules from the previously stored file
pfctl -f nat-rules -e
 
# list all firewall configurations
pfctl -s all

Make ISO

hdiutil can be used to make an ISO image out of a folder or to convert other image types:

hdiutil makehybrid /PATH -o image.iso -iso -joliet

where:

  • /PATH is either the path to a folder to be bundled in an ISO or an image in a different format,
  • image.iso is the output ISO,
  • the -iso parameter instructs hdiutil to create an ISO,
  • -joliet enables Joliet extensions on the ISO to be created (modern ISO files, without name restrictions, etc.)

Enable Bluetooth without Mouse

Bluetooth can be enabled in case it has been turned off accidentally by using spotlight (+Space) and then opening up the Bluetooth Exchange program. The Bluetooth Exchange program will ask whether bluetooth should be enabled.


fuss/macos.txt · Last modified: 2022/08/07 12:33 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.