Handy Patches, Fixes, Tips and Tricks for Apples OS X Platform
Compilation of Patches, Fixes, Tips and Tricks for Apples OS X Platform.
Pull Requests are welcome.
$
means your normal user account.
#
means your root account.
After any change you made here you have to type killall Finder
This will enable CMD + Q and in the menubar Finder -> Quit Finder
$ defaults write com.apple.Finder QuitMenuItem 1
tested for 10.9
This will always bring up the extended save dialog in all applications.
$ defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE
You need to restart your machine afterwards.
This will always bring up the extended print dialog in all applications.
$ defaults write -g PMPrintingExpandedStateForPrint -bool TRUE
You need to restart your machine afterwards.
This wil show all files in the Finder.
$ defaults write com.apple.finder AppleShowAllFiles TRUE
tested for 10.4 - 10.9
This will show a specific file/directory in the Finder. e.g. The directory ~/Library/.
$ chflags nohidden ~/Library/
necessary since 10.7
This will enable the full POSIX path in any Finder menu.
$ defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
tested for 10.7 - 10.9
This will prevent the Finder from creating .DS_Store over network connections.
$ defaults write com.apple.desktopservices DSDontWriteNetworkStores true
tested for 10.4 - 10.9
This will disable Spotlight on your selected Drive and it will stop spinning after 1 minute (for this the option must be first activated in energy preferences). Useful for Macs with HDD and SSD.
# mdutil -d /Volumes/diskX
# mdutil -i off /Volumes/diskX
# pmset -a disksleep 1
Source: http://rampagedev.wordpress.com/os-x-tweaks/run-memtest-under-mac-os-x/
Source: https://pikeralpha.wordpress.com/2017/01/30/4398/
enable Night Shift on older machines.
# cd /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/Current
# nm CoreBrightness |grep _ModelMinVersion
000000000001e260 S _ModelMinVersion
0x1e260 is the starting position add 4 to the offset to access all machine types. offset 0 is MacBookPro, followed by iMac, Macmini, MacBookAir, MacPro and MacBook. We use node to rewrite the CoreBrightness binary for the MacBook Pro (offset 0).
# node
> const a = fs.readFileSync('CoreBrightness');
> a[0x1e260]
9
> a[0x1e260] = 8;
> fs.writeFileSync('CoreBrightness', a);
> .exit
Now we resign the binary:
# codesign -f -s - /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/Current/CoreBrightness
Don't forget to reboot your machine.
generally use cifs://
instead of smb://
https://discussions.apple.com/thread/6635652?start=0&tstart=0
This will speedup smb (samba) connections. Write a file (as root) with:
[default]
minauth=none
streams=no
soft=yes
notify_off=yes
port445=no_netbios
to
/private/etc/nsmb.conf
tested for 10.9
# ipfw pipe 1 config bw 500KByte/s
# ipfw add 1 pipe 1 (src|dst)-port {port}
# ipfw delete 1
tested for 10.8 - 10.9
Source: http://www.jeremycole.com/blog/2010/01/13/delayed-ack-in-os-x-is-incomprehensible/
# echo 'sysctl -w net.inet.tcp.delayed_ack=0' >> /etc/sysctl.conf
Source: http://www.kernelcrash.com/blog/os-x-disabling-bluetooth/2007/11/12/
# defaults write /Library/Preferences/com.apple.Bluetooth “ControllerPowerState” -bool FALSE
$ defaults write com.apple.DiskUtility DUDebugMenuEnabled 1
As soon as you edit any .plist etc. in an original Apple-App it crashes after editing the .plist, because every App is signed by Apple. To sign the edited App (e.g Boot Camp Assistant) get root and type:
# codesign -fs - /Applications/Utilities/Boot\ Camp\ Assistant.app
only necessary for 10.9
Source: https://www.youtube.com/watch?v=5A5FG8EMEGc
This disables the swoosh animation when you start Mission Control.
$ defaults write com.apple.dock expose-animation-duration -float 0
$ killall Dock
source: http://apple.stackexchange.com/questions/117223/how-do-i-disable-launchpad-animation-on-mac
$ defaults write com.apple.dock springboard-page-duration -float 0
$ killall Dock
source: http://coolestguidesontheplanet.com/making-a-boot-usb-disk-of-osx-10-9-mavericks/
10.x.app/Contents/Resources/createinstallmedia --volume /Volumes/{yourVolume} --applicationpath 10.x.app --nointeraction
/Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/{yourVolume}/ --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app/ --nointeraction
https://apple.stackexchange.com/questions/15658/how-can-i-open-a-pkg-file-manually http://www.linuxquestions.org/questions/linux-newbie-8/how-to-extract-a-ascii-cpio-archive-svr4-with-no-crc-4175436617/
Install TeamViewer.pkg
to a writeable placecd
to the directory where Install TeamViewer.pkg
is locatedpkgutil --expand Install\ TeamViewer.pkg viewer
this will extract the pkgcd viewer/TeamViewerApp.pkg
mv Payload Payload.gz
rename Payload to Payload.gzgunzip Payload.gz
gunzip the Payloadcpio -i -F Payload
finaly unpack the Appmv TeamViewer.app ~/Downloads
move the extracted App to the Downloads directoryhttp://support.apple.com/kb/dl1638
Changes the kelvin-temperature of your display when the sun goes down.
Ever notice how people texting at night have that eerie blue glow?
Or wake up ready to write down the Next Great Idea, and get blinded by your computer screen?
During the day, computer screens look good—they're designed to look like the sun. But, at 9PM, 10PM, or 3AM, you probably shouldn't be looking at the sun.
f.lux fixes this: it makes the color of your computer's display adapt to the time of day, warm at night and like sunlight during the day.
It's even possible that you're staying up too late because of your computer. You could use f.lux because it makes you sleep better, or you could just use it just because it makes your computer look better.
Transforms images to icons.
Create bootable USB-drives form any .iso. https://rufus.akeo.ie/
What is iTerm2?
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with OS 10.5 (Leopard) or newer. Its focus is on performance, internationalization, and supporting innovative features that make your life better.
http://macromates.com/download
Improved text displaying with syntax highlighting. It's the Notepad++ equal for OS X.
http://www.suavetech.com/0xed/
0xED is a native OS X hex editor based on the Cocoa framework.
BetterTouchTool is a great, feature packed FREE app that allows you to configure many gestures for your Magic Mouse, Macbook Trackpad and Magic Trackpad. It also allows you to configure actions for keyboard shortcuts, normal mice and the Apple Remote. In addition to this it has an iOS companion App (BTT Remote) which can also be configured to control your Mac the way you want.
BetterTouchTool includes many goodies, like window snapping or an integrated window switcher.
http://cdn.command-tab.com/2008/memtest_422.zip (direct)
source: http://osxdaily.com/2010/05/07/create-an-instant-web-server-via-terminal-command-line/
just run
$ python -m SimpleHTTPServer 4104
in your terminal. It will serve the files and directories in the current directory.
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.
https://www.keepassx.org/downloads/
KeePassX is an application for people with extremly high demands on secure personal data management. It has a light interface, is cross platform and published under the terms of the GNU General Public License.
Source: http://www.cnet.com/how-to/prevent-a-partition-from-mounting-in-os-x/
Source: http://www.maclife.de/tipps-tricks/hardware/externes-superdrive-fast-jedem-mac-verwenden
# rm /Library/Preferences/com.apple.keyboardtype.plist
then reboot
None of these steps will harm your settings or something like that. Everything listet below is to delete temporary files which can removed without harming the System or other applications.
Source: http://forums.macrumors.com/archive/index.php/t-1654766.html
This usually fixes slow boot ups.
# kextcache -system-prelinked-kernel
# kextcache -system-caches
Note: this will delete all configs from sandboxed apps
Empty the directory: ~/Library/Containers
Just delete the content of the directory: ~/Library/Caches
Source: http://www.extensis.com/support/de/knowledge-base/clearing-the-mac-os-x-font-cache/
# atsutil databases -remove
Source: http://reviews.cnet.com/8301-13727_7-57493543-263/how-to-reset-the-dns-cache-in-os-x/
# dscacheutil -flushcache
# killall -HUP mDNSResponder
Just delete the content of the directory: /private/var/folders
Empty the directory ~/Library/Saved Application State
Source: https://discussions.apple.com/message/12448781
#set bluetooth pref to off
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0
#set bluetooth pref to on
defaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1
#kill the bluetooth server process
killall blued
#unload the daemon
launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist
#reload the daemon
launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist
#restart blued daemon
launchctl start com.apple.blued
Open the system preferences go to Spotlight and add your whole volume to the exclude list. Then wait a few seconds and delete it again. Open Spotlight to see the indexing-process.
works since 10.9
$ pmset displaysleepnow
srm -zv /{path-to-file}
$ groups {username}
The admin user has among others the group admin
The root user has among others the groups wheel
daemon
kmem
sys
operator
$ ioreg -l | grep -5 IODisplayEDID
The EDID informations are between <> and decoded in hex
see which app is called do get icon information
# fs_usage -f pathname -w com.apple.IconServicesAgent | grep open
https://developer.apple.com/library/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html
reboot with Cmd + R
, open up terminal and type csrutil enable
to enable and csrutil disable
to disable. Status via csrutil status
$ git config core.ignorecase false
now git detects casechanges