This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
fuss:osx [2017/02/22 18:30] – external edit 127.0.0.1 | fuss:osx [2022/04/19 08:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Add Quit Menu to Finder ====== | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.Finder QuitMenuItem -bool YES | ||
+ | </ | ||
+ | |||
+ | ====== Show Hidden Files in Finder ====== | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.finder AppleShowAllFiles TRUE | ||
+ | </ | ||
+ | |||
+ | ====== Show Path in Finder Title ====== | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES | ||
+ | </ | ||
+ | |||
+ | Although, toggling '' | ||
+ | |||
+ | ====== Screen Sharing Authentication Issues ====== | ||
+ | |||
+ | In order to avoid authentication issues with Apple ScreenSharing, | ||
+ | |||
+ | ====== Activate VNC from Command Line ====== | ||
+ | |||
+ | Providing you have access via '' | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | and then restart '' | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Now you can connect via VNC (not Screen Sharing) to your computer by using the password '' | ||
+ | |||
+ | ====== Key Codes ====== | ||
+ | |||
+ | These can be used with AppleScript. | ||
+ | |||
+ | <WRAP box 600px> | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | ^Key^Code| | ||
+ | |'|12| | ||
+ | |,|13| | ||
+ | |-|39| | ||
+ | |.|14| | ||
+ | |/|33| | ||
+ | |0|29| | ||
+ | |1|18| | ||
+ | |2|19| | ||
+ | |3|20| | ||
+ | |4|21| | ||
+ | |5|23| | ||
+ | |6|22| | ||
+ | |7|26| | ||
+ | |8|28| | ||
+ | |9|25| | ||
+ | |;|6| | ||
+ | |=|30| | ||
+ | |F10|109| | ||
+ | |F11|103| | ||
+ | </ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | ^Key^Code^ | ||
+ | |F1|122| | ||
+ | |F2|120| | ||
+ | |F3|99| | ||
+ | |F4|118| | ||
+ | |F5|96| | ||
+ | |F6|97| | ||
+ | |F7|98| | ||
+ | |F8|100| | ||
+ | |F9|101| | ||
+ | |[|27| | ||
+ | |\|42| | ||
+ | |]|24| | ||
+ | |`|50| | ||
+ | |a|0| | ||
+ | |b|45| | ||
+ | |c|34| | ||
+ | |delete|51| | ||
+ | |down|125| | ||
+ | </ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | ^Key^Code^ | ||
+ | |d|4| | ||
+ | |enter|52| | ||
+ | |esc|53| | ||
+ | |e|2| | ||
+ | |f|16| | ||
+ | |g|32| | ||
+ | |h|38| | ||
+ | |i|5| | ||
+ | |j|8| | ||
+ | |k|9| | ||
+ | |left|123| | ||
+ | |l|35| | ||
+ | |m|46| | ||
+ | |n|37| | ||
+ | |o|1| | ||
+ | |p|15| | ||
+ | |q|7| | ||
+ | |return|36| | ||
+ | |right|124| | ||
+ | |r|31| | ||
+ | </ | ||
+ | |||
+ | <WRAP column 20%> | ||
+ | ^Key^Code^ | ||
+ | |space|49| | ||
+ | |s|41| | ||
+ | |tab|48| | ||
+ | |t|40| | ||
+ | |up|126| | ||
+ | |u|3| | ||
+ | |v|47| | ||
+ | |w|43| | ||
+ | |x|11| | ||
+ | |y|17| | ||
+ | |z|44| | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Enable Dashboard Widgets on Desktop ====== | ||
+ | |||
+ | Press '' | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.dashboard devmode YES | ||
+ | </ | ||
+ | |||
+ | ====== Installing MySQL Development Files ====== | ||
+ | |||
+ | On OSX Server (Snow Leopard, at the time of writing), the development files for '' | ||
+ | |||
+ | <code bash> | ||
+ | mysql --version | ||
+ | mysql Ver 14.12 Distrib 5.0.92, for apple-darwin10.0 (i386) using EditLine wrapper | ||
+ | </ | ||
+ | |||
+ | and compiling it in order to get the libraries and header files. This can be done by getting the '' | ||
+ | |||
+ | <code bash> | ||
+ | MACOSX_DEPLOYMENT_TARGET=10.6 CCFLAGS=" | ||
+ | </ | ||
+ | |||
+ | After which, we install using a fake root in order to extract just the libraries and includes: | ||
+ | |||
+ | <code bash> | ||
+ | make install DESTDIR=/ | ||
+ | </ | ||
+ | |||
+ | Then, we copy over the libraries and header files: | ||
+ | |||
+ | <code bash> | ||
+ | cp -Rap / | ||
+ | </ | ||
+ | |||
+ | to the system. Now, programs that need the development files will find them and will blend with the system since we have been using the MySQL that the system has installed. | ||
+ | |||
+ | ====== Disable World of Warcraft Error Reporting ====== | ||
+ | |||
+ | The ported World of Warcraft binary contains a call to '' | ||
+ | |||
+ | <code asm> | ||
+ | |||
+ | |||
+ | ====== B E G I N O F P R O C E D U R E ====== | ||
+ | |||
+ | |||
+ | ; Basic Block Input Regs: < | ||
+ | sub_3a3c: | ||
+ | 00003a3c 55 push | ||
+ | 00003a3d 89E5 mov ebp, esp | ||
+ | 00003a3f 57 push edi | ||
+ | 00003a40 56 push esi | ||
+ | 00003a41 53 push ebx | ||
+ | 00003a42 83EC1C | ||
+ | 00003a45 E9E1000000 | ||
+ | ... | ||
+ | 00003a97 C7442408B4736A00 | ||
+ | 00003a9f 8B151420BB00 | ||
+ | 00003aa5 89542404 | ||
+ | 00003aa9 890424 | ||
+ | 00003aac E810CCBA00 | ||
+ | ... | ||
+ | ; Basic Block Input Regs: < | ||
+ | 00003b2b 83C41C | ||
+ | 00003b2e 5B pop ebx | ||
+ | 00003b2f 5E pop esi | ||
+ | 00003b30 5F pop edi | ||
+ | 00003b31 5D pop ebp | ||
+ | 00003b32 C3 ret | ||
+ | ; endp | ||
+ | </ | ||
+ | |||
+ | ====== Turn Display Off ====== | ||
+ | |||
+ | This following will turn the display off on non-PPC Macs: | ||
+ | |||
+ | <file objc dimDisplay.c> | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main(void) { | ||
+ | io_registry_entry_t r = IORegistryEntryFromPath(kIOMasterPortDefault, | ||
+ | if(!r) return 1; | ||
+ | int err = IORegistryEntrySetCFProperty(r, | ||
+ | IOObjectRelease(r); | ||
+ | return err; | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Save the code to file called '' | ||
+ | |||
+ | <code bash> | ||
+ | gcc dimDisplayNow.c -framework IOKit -framework CoreFoundation -o dimDisplayNow | ||
+ | </ | ||
+ | |||
+ | ====== Reset Bluetooth Configuration ====== | ||
+ | |||
+ | The following steps perform a complete reboot of the Bluetooth subsystem and may solve numerous issues with paired devices, ranging from headsets to OSX not detecting discoverable devices. | ||
+ | |||
+ | Make sure you either have a wired mouse before attempting this or that you have some external capability to use the computer because the following steps will temporarily disable your bluetooth devices. | ||
+ | |||
+ | - Launch Bluetooth Explorer (a utility installed as Part of Xcode). | ||
+ | - Select the “Modify Software & Device Configuration” from the Utilities Menu. | ||
+ | - Keep the first four checkboxes checked (one of those will say “Full Factory Reset”). | ||
+ | - Click “Perform Actions” on the lower-right portion of the window. | ||
+ | - Reboot (the “Reboot Now” Button may work, it it doesn’t just go with a normal reboot). | ||
+ | |||
+ | ====== Enable ScreenSharing Remotely from Command Line ====== | ||
+ | |||
+ | Use the command below to remotely enable ScreenSharing while having access only to the console. The command enables ScreenSharing for the user '' | ||
+ | |||
+ | <code bash> | ||
+ | sudo / | ||
+ | </ | ||
+ | |||
+ | ====== Rebuilding Open Directory ====== | ||
+ | |||
+ | When recreating OpenDirectory after previously having destroyed an Open Directory master, the output of '' | ||
+ | <code bash> | ||
+ | slot 0001: 0x00000000000000000000000000000001 disabled-slot-0x1 | ||
+ | </ | ||
+ | Even if you use ''' | ||
+ | |||
+ | The easiest is to remove ''/ | ||
+ | |||
+ | ====== Keep Icons Arranged ====== | ||
+ | |||
+ | Holding < | ||
+ | |||
+ | ====== Screen Shots ====== | ||
+ | |||
+ | OSX has a screenshot shortcut built-in so there is no need for extra software. You will find it in the '' | ||
+ | |||
+ | {{fuss_osx_taking_screenshots.png? | ||
+ | |||
+ | |||
+ | ====== Speed-up OSX ====== | ||
+ | |||
+ | The operating system loads images into RAM, especially where the user-interface is concerned. An interesting idea would be to optimize the images and reduce their sizes in order to free up the RAM consumption and reduce loading times. | ||
+ | |||
+ | Perhaps the best tool to use is [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | cd /; sudo find . \( -name ' | ||
+ | </ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ====== Enable 64bit Kernel ====== | ||
+ | |||
+ | Some machines and OSX versions combinations do not have the '' | ||
+ | < | ||
+ | 64-bit Kernel and Extensions: | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | ====== OSX Boot Sequence Key Combos ====== | ||
+ | |||
+ | From the [[http:// | ||
+ | |||
+ | ^ Key Combo ^ Description ^ | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | < | ||
+ | | ⏏, < | ||
+ | |||
+ | Note that if the keys do not seem to have any effect, that is due to Apple' | ||
+ | ====== Changing Icons Without Extra Software ====== | ||
+ | |||
+ | {{fuss_osx_changing_icons.png? | ||
+ | |||
+ | Instead of downloading extra software: | ||
+ | |||
+ | - load an image ('' | ||
+ | - select the whole canvas | ||
+ | - copy it | ||
+ | - open the '' | ||
+ | - select the icon on the '' | ||
+ | - paste | ||
+ | |||
+ | ====== Alternate Activity Monitor ====== | ||
+ | |||
+ | < | ||
+ | |||
+ | ====== Screen Capture ====== | ||
+ | |||
+ | The QuickTime player that comes with OSX already contains a built-in function that allows you to capture the screen: | ||
+ | |||
+ | {{fuss_osx_screen_capture.png}} | ||
+ | |||
+ | ====== Increase TCP Parameters for Broadband ====== | ||
+ | |||
+ | Add: | ||
+ | < | ||
+ | net.inet.tcp.mssdflt=1460 | ||
+ | net.inet.tcp.sendspace=262144 | ||
+ | net.inet.tcp.recvspace=262144 | ||
+ | net.inet.udp.recvspace=74848 | ||
+ | net.inet.udp.maxdgram=65535 | ||
+ | net.inet.tcp.rfc1323=1 | ||
+ | net.inet.tcp.newreno=1 | ||
+ | net.inet.tcp.always_keepalive=1 | ||
+ | net.inet.tcp.keepidle=3600 | ||
+ | net.inet.tcp.keepintvl=150 | ||
+ | net.inet.tcp.slowstart_flightsize=4 | ||
+ | net.inet.tcp.strict_rfc1948=1 | ||
+ | net.inet.tcp.delayed_ack=1 | ||
+ | |||
+ | </ | ||
+ | |||
+ | to ''/ | ||
+ | |||
+ | <code bash> | ||
+ | cat / | ||
+ | </ | ||
+ | |||
+ | ====== Hibernate and Sleep Mode ====== | ||
+ | |||
+ | <code bash> | ||
+ | pmset -a hibernatemode 25 # always hibernate | ||
+ | pmset -a hibernatemode 3 # hibernate only when the battery is low | ||
+ | pmset -a hibernatemode 0 # to use ‘sleep’ mode (no hibernation, | ||
+ | </ | ||
+ | |||
+ | ====== Installing Packages from Command Line ====== | ||
+ | |||
+ | <code bash> | ||
+ | installer -pkg java.pkg -target / | ||
+ | </ | ||
+ | |||
+ | ====== Strip Architecture from Binaries ====== | ||
+ | |||
+ | <code bash> | ||
+ | ditto --rsrc --arch i386 Safari.app Safari-i386.app/ | ||
+ | </ | ||
+ | |||
+ | ====== Replacing Outdated Certificates on Leopard ====== | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | curl -ksO https:// | ||
+ | sudo sh -c 'cp curl-ca-bundle.crt curl-ca-bundle.crt.old; | ||
+ | </ | ||
+ | |||
+ | ====== Compiling PHP 5.3.x on Leopard ====== | ||
+ | |||
+ | After installing mysql using homebrew on OSX Leopard, PHP can be configured by issuing: | ||
+ | <code bash> | ||
+ | ./configure \ | ||
+ | --prefix=/ | ||
+ | --mandir=/ | ||
+ | --infodir=/ | ||
+ | --sysconfdir=/ | ||
+ | --with-apxs2=/ | ||
+ | --enable-cli \ | ||
+ | --with-config-file-path=/ | ||
+ | --with-libxml-dir=/ | ||
+ | --with-kerberos=/ | ||
+ | --with-zlib=/ | ||
+ | --enable-bcmath \ | ||
+ | --with-bz2=/ | ||
+ | --enable-calendar \ | ||
+ | --with-curl=/ | ||
+ | --enable-dba \ | ||
+ | --enable-exif \ | ||
+ | --enable-ftp \ | ||
+ | --with-icu-dir=/ | ||
+ | --with-iodbc=/ | ||
+ | --with-ldap=/ | ||
+ | --with-ldap-sasl=/ | ||
+ | --with-libedit=/ | ||
+ | --enable-mbstring \ | ||
+ | --enable-mbregex \ | ||
+ | --with-mysql=/ | ||
+ | --with-mysqli=mysqlnd \ | ||
+ | --without-pear \ | ||
+ | --with-pdo-mysql=mysqlnd \ | ||
+ | --with-mysql-sock=/ | ||
+ | --with-readline=/ | ||
+ | --enable-shmop \ | ||
+ | --with-snmp=/ | ||
+ | --enable-soap \ | ||
+ | --enable-sockets \ | ||
+ | --enable-sysvmsg \ | ||
+ | --enable-sysvsem \ | ||
+ | --enable-sysvshm \ | ||
+ | --with-tidy \ | ||
+ | --enable-wddx \ | ||
+ | --with-xmlrpc \ | ||
+ | --with-iconv-dir=/ | ||
+ | --with-xsl=/ | ||
+ | --enable-zip \ | ||
+ | --with-kerberos \ | ||
+ | --enable-intl \ | ||
+ | --with-pcre-regex \ | ||
+ | --with-freetype-dir=/ | ||
+ | --with-jpeg-dir=/ | ||
+ | --with-png-dir=/ | ||
+ | --with-mysql=/ | ||
+ | |||
+ | </ | ||
+ | |||
+ | In order to compile, you need to add the following libraries to the '' | ||
+ | |||
+ | < | ||
+ | -lresolv -lstdc++ | ||
+ | </ | ||
+ | |||
+ | After which, PHP will compile fine. | ||
+ | |||
+ | ====== Disable Spotlight ====== | ||
+ | |||
+ | Spotlight, along with the menu icon can be disabled by first turning indexing off: | ||
+ | <code bash> | ||
+ | mdutil -a -i off | ||
+ | </ | ||
+ | then by disabling the icon: | ||
+ | <code bash> | ||
+ | chmod 600 / | ||
+ | </ | ||
+ | and finally relaunching the UI with: | ||
+ | <code bash> | ||
+ | killall SystemUIServer | ||
+ | </ | ||
+ | |||
+ | Note that disabling spotlight will not disable searching for files in Finder. Spotlight is to OSX as Indexing Services is to Windows. If you frequently use spotlight just to launch applications, | ||
+ | |||
+ | ====== Show Hidden Files ====== | ||
+ | |||
+ | Issue: | ||
+ | <code bash> | ||
+ | defaults write com.apple.finder AppleShowAllFiles TRUE | ||
+ | </ | ||
+ | |||
+ | and then restart Finder by Option-clicking the Finder icon and selecting " | ||
+ | |||
+ | ====== Switch Samba Protocol in Mavericks ====== | ||
+ | |||
+ | Mavericks now uses SMB2 by default which is the samba protocol that is only supported in Linux kernels >= '' | ||
+ | |||
+ | < | ||
+ | [default] | ||
+ | smb_neg=smb1_only | ||
+ | </ | ||
+ | |||
+ | After which a restart may be required to pick-up the changes. | ||
+ | |||
+ | ====== Create Image File ====== | ||
+ | |||
+ | To create a '' | ||
+ | <code bash> | ||
+ | hdiutil create -ov -scrub -srcfolder folder/ -volname MyFolder folder.dmg | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | ====== Samba Optimisations ====== | ||
+ | |||
+ | OSX tends to handle Samba better when Unix extensions are turned off on the server side, by adding: | ||
+ | < | ||
+ | unix extensions = no | ||
+ | </ | ||
+ | in ''/ | ||
+ | |||
+ | On the client-side OSX Samba clients can be made more responsive by creating a file in '' | ||
+ | < | ||
+ | [default] | ||
+ | notify_off=yes | ||
+ | streams=no | ||
+ | </ | ||
+ | |||
+ | ====== Show Hidden Files ====== | ||
+ | |||
+ | Issue: | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.finder AppleShowAllFiles TRUE | ||
+ | </ | ||
+ | |||
+ | after which restart Finder (< | ||
+ | |||
+ | Issue: | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.finder AppleShowAllFiles FALSE | ||
+ | </ | ||
+ | |||
+ | to hide the files. | ||
+ | |||
+ | Note that this only reveals the files in Finder but given a selection dialog, you will not be able to select the file. To unhide the file, see [[fuss: | ||
+ | |||
+ | ====== Hide and Unhide Files ====== | ||
+ | |||
+ | This can be accomplished from the terminal using '' | ||
+ | <code bash> | ||
+ | chflags hidden file | ||
+ | </ | ||
+ | |||
+ | to unhide a file: | ||
+ | <code bash> | ||
+ | chflags nohidden file | ||
+ | </ | ||
+ | |||
+ | ====== Enable Disk Utility Debug Menu ====== | ||
+ | |||
+ | <code bash> | ||
+ | defaults write com.apple.DiskUtility advanced-image-options -bool true | ||
+ | defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true | ||
+ | </ | ||
+ | |||
+ | ====== Change Host Name ====== | ||
+ | |||
+ | To set the hostname, as '' | ||
+ | <code bash> | ||
+ | scutil --set HostName name.local | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | ====== Disable Access Times ====== | ||
+ | |||
+ | When using a Solid-State Drive '' | ||
+ | |||
+ | <file xml org.grimore.noatime.plist> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | <plist version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | and then restart the machine. We can check the status of the mounted drives by issuing: | ||
+ | <code bash> | ||
+ | mount | ||
+ | </ | ||
+ | |||
+ | and the following is the output we are looking for: | ||
+ | < | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Note the '' | ||
+ | |||
+ | ====== Disable Swap ====== | ||
+ | |||
+ | Swap is managed in OSX by a binary called '' | ||
+ | <code bash> | ||
+ | ps ax | grep dynamic | ||
+ | </ | ||
+ | |||
+ | gives: | ||
+ | < | ||
+ | | ||
+ | </ | ||
+ | |||
+ | to disable the '' | ||
+ | <code bash> | ||
+ | launchctl unload -w / | ||
+ | </ | ||
+ | |||
+ | and then remove the '' | ||
+ | <code bash> | ||
+ | rm / | ||
+ | </ | ||
+ | |||
+ | as well as the swap files (you do not have to backup these): | ||
+ | <code bash> | ||
+ | srm -rf / | ||
+ | </ | ||
+ | |||
+ | and finally reboot the system. | ||
+ | |||
+ | ====== Change Kernel Boot Mode (32-bit vs. 64-bit) ====== | ||
+ | |||
+ | To check which architecture you are currently running under, issue in '' | ||
+ | <code bash> | ||
+ | uname -m | ||
+ | </ | ||
+ | |||
+ | which will output either '' | ||
+ | |||
+ | To change the boot mode, for example, from 32-bit to 64-bit issue: | ||
+ | <code bash> | ||
+ | systemsetup -setkernelbootarchitecture x86_64 | ||
+ | </ | ||
+ | |||
+ | and then reboot the system. To switch back to 32-bit, issue: | ||
+ | <code bash> | ||
+ | systemsetup -setkernelbootarchitecture i386 | ||
+ | </ | ||
+ | |||
+ | ====== Change Log-in Window Background ====== | ||
+ | |||
+ | <code bash> | ||
+ | sudo defaults write / | ||
+ | </ | ||
+ | |||
+ | ====== Clear "Open With..." | ||
+ | |||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ====== Boot Flags ====== | ||
+ | |||
+ | The following settings can be set as boot parameters on OSX: | ||
+ | |||
+ | ^ Flag ^ Description ^ | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | They can be set by issuing as root: | ||
+ | < | ||
+ | nvram boot-flags=" | ||
+ | </ | ||
+ | |||
+ | In order to enable '' | ||
+ | |||
+ | ====== Delete Kernel Extension Cache ====== | ||
+ | |||
+ | Issue: | ||
+ | |||
+ | < | ||
+ | rm -rf / | ||
+ | </ | ||
+ | |||
+ | The caches will be recreated after a startup. | ||
+ | |||
+ | ====== Disable Automatic Spelling Correct ====== | ||
+ | |||
+ | {{fuss_osx_disable_automatic_spelling_correct.png? | ||
+ | |||
+ | Automatic spelling correction is a feature shows up blatantly in programs such as Skype and it is very hard to get rid of due to the fact that it is a system-wide setting in OSX rather than a per-application setting. The feature can be disabled by going to '' | ||
+ | |||
+ | ====== Turn IPv6 Off ====== | ||
+ | |||
+ | On OSX versions prior to 10.7, IPv6 could be turned off from the Network settings. On latter versions, IPv6 must be turned off via the command line by issuing as root: | ||
+ | <code bash> | ||
+ | networksetup -setv6off INTERFACE | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | ====== Combining Multi-Architecture Binaries ====== | ||
+ | |||
+ | One of the problems with [[cracks/ | ||
+ | |||
+ | To assemble multiple architectures in one file, we can use '' | ||
+ | <code bash> | ||
+ | lipo -info ShareMouse.x86_64 | ||
+ | </ | ||
+ | you will notice that it actually contains both architectures even if you produced the crack just for x86_64. So, assuming that '' | ||
+ | <code bash> | ||
+ | lipo -extract x86_64 ShareMouse.x86_64.crack ShareMouse.x86_64.solo | ||
+ | </ | ||
+ | |||
+ | and the cracked architecture for i386: | ||
+ | <code bash> | ||
+ | lipo -extract i386 ShareMouse.i386.crack ShareMouse.i386.solo | ||
+ | </ | ||
+ | |||
+ | Now if you run '' | ||
+ | <code bash> | ||
+ | lipo -create ShareMouse.x86_64.solo ShareMouse.i386.solo ShareMouse | ||
+ | </ | ||
+ | |||
+ | which will unite the x86_64 crack with the i386 crack and create an universal binary '' | ||
+ | |||
+ | ====== Fix File Permissions from Command Line ====== | ||
+ | |||
+ | Done by calling '' | ||
+ | |||
+ | <code bash> | ||
+ | diskutil repairPermissions / | ||
+ | </ | ||
+ | |||
+ | ====== Switch Between XCode and Command-Line Tools ====== | ||
+ | |||
+ | This is necessary sometimes if you get errors along the lines of: | ||
+ | < | ||
+ | xcode-select: | ||
+ | </ | ||
+ | which imply that you need to switch to Xcode. | ||
+ | |||
+ | To switch to Xcode use: | ||
+ | <code bash> | ||
+ | sudo xcode-select --switch / | ||
+ | </ | ||
+ | |||
+ | To switch to command-line tools: | ||
+ | <code bash> | ||
+ | sudo xcode-select --switch / | ||
+ | </ | ||
+ | |||
+ | ====== Disable Adobe Update and Cloud Services ====== | ||
+ | |||
+ | If you have any Adobe software installed, you will get a pesky little icon throwing updates at you from time to time. If you open '' | ||
+ | |||
+ | The files that are needed to be changed can be found at: | ||
+ | < | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | you can edit these files and change the '' | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ====== Format to FAT32 ====== | ||
+ | |||
+ | By default, the Disk Utility in OS X only allows you to create partitions formatted with FAT16. In order to format to FAT32 on OS X, you will need to perform the following steps. | ||
+ | |||
+ | * With the disk inserted, issue the '' | ||
+ | |||
+ | <code bash> | ||
+ | sh-3.2# mount | ||
+ | /dev/disk1 on / (hfs, local, journaled, noatime) | ||
+ | devfs on /dev (devfs, local, nobrowse) | ||
+ | map -hosts on /net (autofs, nosuid, automounted, | ||
+ | map auto_home on /home (autofs, automounted, | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Note that the partition in this case is ''/ | ||
+ | |||
+ | {{fuss: | ||
+ | |||
+ | * Now '' | ||
+ | |||
+ | {{fuss: | ||
+ | |||
+ | * Finally, remembering that ''/ | ||
+ | |||
+ | <code bash> | ||
+ | newfs_msdos -F 32 / | ||
+ | </ | ||
+ | |||
+ | where ''/ | ||
+ | |||
+ | * To check, right-click the partition in Finder and choose '' | ||
+ | |||
+ | {{fuss: | ||
+ | |||
+ | ====== Enable Loading Unsigned Kernel Extensions ====== | ||
+ | |||
+ | Issue as root: | ||
+ | < | ||
+ | nvram boot-args=" | ||
+ | </ | ||
+ | |||
+ | which will enable development for kernel extensions and then reboot. | ||
+ | |||
+ | ====== Disable System Integrity Protection ====== | ||
+ | |||
+ | With the release of El Capitain, Apple introduced another ridiculous feature comparable to the other abomination called " | ||
+ | |||
+ | To disable this monstrosity, | ||
+ | |||
+ | * Boot in recovery mode by rebooting and then hold down < | ||
+ | * Go to '' | ||
+ | * Issue '' | ||
+ | * Reboot back again into normal mode and issue '' | ||
+ | |||
+ | You can also partially disable SIP: | ||
+ | ^ Policy ^ Command ^ | ||
+ | | Allow installation of unsigned kernel extensions. | '' | ||
+ | | Disable filesystem protections. | '' | ||
+ | | Disable debugging restrictions. | '' | ||
+ | | Disable DTrace restrictions. | '' | ||
+ | | Allow writing to NVRAM. | '' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Oh, hang on, isn't that almost iOS? Well, not quite there yet. | ||
+ | |||
+ | ====== Disable Startup Chime ====== | ||
+ | |||
+ | To disable the startup chime, as root, execute: | ||
+ | |||
+ | <code bash> | ||
+ | nvram SystemAudioVolume=%00 | ||
+ | </ | ||
+ | |||
+ | (yes, indeed, two '' | ||
+ | |||
+ | Then, to restore the chime: | ||
+ | <code bash> | ||
+ | nvram -d SystemAudioVolume | ||
+ | </ | ||
+ | |||
+ | ====== Encrypt Disk Without FileVault ====== | ||
+ | |||
+ | You can encrypt your entire disk using a password under any OSX after Lion. In order to do that, you will have to reboot in recovery mode. You can accomplish that by rebooting the machine whilst keeping down < | ||
+ | |||
+ | Once the recovery interface has loaded, select '' | ||
+ | <code bash> | ||
+ | diskutil list | ||
+ | </ | ||
+ | |||
+ | You will see several disks most likely and you are looking for something like: | ||
+ | < | ||
+ | # TYPE NAME | ||
+ | ... | ||
+ | 3: Apple_CoreStorage Macintosh HD 800GB disk0s3 | ||
+ | ... | ||
+ | </ | ||
+ | so your main disk identifier is '' | ||
+ | |||
+ | You then issue as root: | ||
+ | <code bash> | ||
+ | diskutil cs convert disk0s3 -passphrase password | ||
+ | </ | ||
+ | |||
+ | Where '' | ||
+ | |||
+ | You can now issue: | ||
+ | <code bash> | ||
+ | diskutil cs list | ||
+ | </ | ||
+ | |||
+ | and watch the conversion process, for example: | ||
+ | < | ||
+ | Conversion Progress: | ||
+ | </ | ||
+ | |||
+ | If at a later time you decide to change the password, this can be similarly done with the command: | ||
+ | <code bash> | ||
+ | diskutil cs changeVolumePassphrase 5D9D5BB5-3E68-461A-971A-D549DB7D11D8 | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | <code bash> | ||
+ | diskutil cs list | ||
+ | </ | ||
+ | |||
+ | It should be the last one in the tree from the output. | ||
+ | |||
+ | In order to revert and unencrypt the volume, you would have to boot in recovery mode and use a terminal. First get the UUID of the disk by issuing: | ||
+ | <code bash> | ||
+ | diskutil cs list | ||
+ | </ | ||
+ | |||
+ | then, unlock the volume: | ||
+ | <code bash> | ||
+ | diskutil cs unlockVolume 5D9D5BB5-3E68-461A-971A-D549DB7D11D8 -stdinpassphrase | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | Finally, revert the volume to an unencrypted phrase with: | ||
+ | <code bash> | ||
+ | diskutil cs revert 5D9D5BB5-3E68-461A-971A-D549DB7D11D8 -stdinpassphrase | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== Add Some Plausible Deniability to FileVault 2 ====== | ||
+ | |||
+ | FileVault 2 encrypts the entire disk and relies on a configured user to unlock the drive during EFI boot - which is different from [[fuss/ | ||
+ | |||
+ | First add a different account - an account that will be seen during EFI boot by going to '' | ||
+ | |||
+ | After that, you can add the new account to the list of users allowed to unlock the machine by elevating privileges to '' | ||
+ | <code bash> | ||
+ | fdesetup add -usertoadd USERNAME | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | The next part is to issue the command for all user-names on the machine: | ||
+ | <code bash> | ||
+ | fdesetup remove -user USERNAME | ||
+ | </ | ||
+ | |||
+ | where '' | ||
+ | |||
+ | The last step is to go to '' | ||
+ | |||
+ | ====== Change Login Wallpaper on Yosemite and El Capitan ====== | ||
+ | |||
+ | The login wallpaper is usually generated by OSX as a blurred copy of the last user's wallpaper. However, the login wallpaper can be changed by going to ''/ | ||
+ | |||
+ | Here is an example of what your login screen could look like: | ||
+ | |||
+ | {{fuss_osx_stealth_man_login.png? | ||
+ | |||
+ | and here is the wallpaper if you like it: | ||
+ | |||
+ | {{fuss_osx_stealth_man_wallpaper.png? | ||
+ | |||
+ | It is a mix of the PipBoy with a StealthBoy allure from the Fallout Series by Bethesda Softworks. | ||
+ | |||
+ | ====== Login Screen Tricks ====== | ||
+ | |||
+ | At the login-screen you can type the following user-names for the corresponding desired effect: | ||
+ | |||
+ | ^ Username ^ Effect ^ | ||
+ | | ''> | ||
+ | | ''> | ||
+ | | ''> | ||
+ | | ''> | ||
+ | |||
+ | ====== Flush DNS Cache ====== | ||
+ | |||
+ | After working with DNS and DHCP servers, OSX may need the cache flushed such that it picks-up the changes. The following table gives the respective command for different OS versions. | ||
+ | |||
+ | ^ OSX Version ^ Command ^ | ||
+ | | 10.9.5- and 10.10.4+ | '' | ||
+ | | 10.10 to 10.10.3 | '' | ||
+ | | 10.6 - 10.8 | '' | ||
+ | |||
+ | ====== Managing Access Control Lists (ACLs) from Command Line ====== | ||
+ | |||
+ | OSX benefits from ACLs that are similar to POSIX ACLs and allow more fine-grained control over the standard Unix permission system. | ||
+ | |||
+ | ===== Setting ACLs ===== | ||
+ | |||
+ | This can be performed with an '' | ||
+ | < | ||
+ | chmod +a " | ||
+ | </ | ||
+ | |||
+ | where: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== List of Commonly Used Permissions ==== | ||
+ | |||
+ | * Full access for directories: | ||
+ | |||
+ | < | ||
+ | list, | ||
+ | </ | ||
+ | |||
+ | * Read/Write for directories: | ||
+ | |||
+ | < | ||
+ | list, | ||
+ | </ | ||
+ | |||
+ | * Read Only for directories: | ||
+ | |||
+ | < | ||
+ | read, | ||
+ | </ | ||
+ | |||
+ | * Full access for files: | ||
+ | |||
+ | < | ||
+ | read, | ||
+ | </ | ||
+ | |||
+ | * Read/Write for files: | ||
+ | |||
+ | < | ||
+ | read, | ||
+ | </ | ||
+ | |||
+ | * Read only for files: | ||
+ | |||
+ | < | ||
+ | read, | ||
+ | </ | ||
+ | |||
+ | ===== Listing Current ACL Permissions ===== | ||
+ | |||
+ | The command: | ||
+ | <code bash> | ||
+ | ls -le / | ||
+ | </ | ||
+ | |||
+ | will list the current ACLs set on ''/ | ||
+ | |||
+ | ===== Clearing ACL Permissions ===== | ||
+ | |||
+ | The command: | ||
+ | <code bash> | ||
+ | chmod -N / | ||
+ | </ | ||
+ | |||
+ | will clear any set ACLs from the folder or file at ''/ | ||
+ | |||
+ | ====== Copy Remote File Contents to OSX Clipboard using OpenSSH ====== | ||
+ | |||
+ | '' | ||
+ | <code bash> | ||
+ | cat / | ||
+ | </ | ||
+ | |||
+ | you would have copied the contents of ''/ | ||
+ | |||
+ | Unfortunately, | ||
+ | <code bash> | ||
+ | cat / | ||
+ | </ | ||
+ | where: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Note that you may have to enable SSH in OSX in order to be able to connect to your machine. You can do that by going to '' | ||
+ | |||
+ | ====== Copy Files Keeping Both ====== | ||
+ | |||
+ | On OSX a hidden option is to copy files from one location to the other whilst keeping both files without overwriting. This can be achieved by holding down the option key < | ||
+ | |||
+ | ====== OpenSSH Forwarding Locale from OSX to Linux ====== | ||
+ | |||
+ | When connecting via SSH from OSX to Linux with a different locale, you may get the following errors: | ||
+ | < | ||
+ | perl: warning: Setting locale failed. | ||
+ | perl: warning: Please check that your locale settings: | ||
+ | LANGUAGE = " | ||
+ | LC_ALL = (unset), | ||
+ | LC_CTYPE = " | ||
+ | LANG = " | ||
+ | are supported and installed on your system. | ||
+ | perl: warning: Falling back to a fallback locale (" | ||
+ | locale: Cannot set LC_CTYPE to default locale: No such file or directory | ||
+ | locale: Cannot set LC_ALL to default locale: No such file or directory | ||
+ | </ | ||
+ | |||
+ | The solution is to stop OSX forwarding the locale by editing ''/ | ||
+ | < | ||
+ | SendEnv LANG LC_* | ||
+ | </ | ||
+ | |||
+ | Or, using '' | ||
+ | <code bash> | ||
+ | sed -i -e '/ | ||
+ | </ | ||
+ | |||