{"id":21396428,"url":"https://github.com/baslr/osx-trix","last_synced_at":"2025-07-13T19:31:10.315Z","repository":{"id":13647068,"uuid":"16340530","full_name":"baslr/osx-trix","owner":"baslr","description":"Handy Patches, Fixes, Tips and Tricks for Apples OS X Platform","archived":false,"fork":false,"pushed_at":"2018-02-02T08:45:37.000Z","size":71,"stargazers_count":29,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-09T02:34:34.536Z","etag":null,"topics":["apple","fixes","macos","osx","patches","tips","trick","tricks","trix"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baslr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-29T09:34:45.000Z","updated_at":"2022-03-09T13:10:46.000Z","dependencies_parsed_at":"2022-08-28T08:21:04.576Z","dependency_job_id":null,"html_url":"https://github.com/baslr/osx-trix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baslr/osx-trix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Fosx-trix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Fosx-trix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Fosx-trix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Fosx-trix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baslr","download_url":"https://codeload.github.com/baslr/osx-trix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baslr%2Fosx-trix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265194747,"owners_count":23725968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","fixes","macos","osx","patches","tips","trick","tricks","trix"],"created_at":"2024-11-22T14:27:04.480Z","updated_at":"2025-07-13T19:31:10.092Z","avatar_url":"https://github.com/baslr.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"osx-trix\n========\n\nCompilation of Patches, Fixes, Tips and Tricks for Apples OS X Platform.\n\n**Pull Requests are welcome.**\n\n# Notes\n``$`` means your normal user account.\n\n``#`` means your root account.\n\n## [Finder related](#finder)\n## [Display related](#display)\n## [Networking related](#networking)\n## [Animation related](#animations)\n## [Free Apps](#useful-apps-free)\n## [Terminal related](#terminal)\n## [git related](#git)\n\n# Finder\nAfter any change you made here you have to type *killall Finder*\n## show 'Quit' in the Menubar\nThis will enable CMD + Q and in the menubar Finder -\u003e Quit Finder\n\n    $ defaults write com.apple.Finder QuitMenuItem 1\n\ntested for 10.9\n\n## show extended save dialog via default\nThis will always bring up the extended save dialog in all applications.\n\n```\n$ defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE\n```\nYou need to restart your machine afterwards.\n\n\n## show extended print dialog via default\nThis will always bring up the extended print dialog in all applications.\n\n```\n$ defaults write -g PMPrintingExpandedStateForPrint -bool TRUE\n```\nYou need to restart your machine afterwards.\n\n## show hidden files in Finder\nThis wil show all files in the Finder.\n\n```\n$ defaults write com.apple.finder AppleShowAllFiles TRUE\n```\n\ntested for 10.4 - 10.9\n\n## show a specific hidden file/directory in Finder\nThis will show a specific file/directory in the Finder. e.g. The directory ~/Library/.\n\n```\n$ chflags nohidden ~/Library/\n```\n\nnecessary since 10.7\n\n## show full POSIX Path in title\nThis will enable the full POSIX path in any Finder menu.\n\n    $ defaults write com.apple.finder _FXShowPosixPathInTitle -bool true\n    \ntested for 10.7 - 10.9\n\n## prevent .DS_Store file creation over network connections\nThis will prevent the Finder from creating .DS_Store over network connections.\n\n    $ defaults write com.apple.desktopservices DSDontWriteNetworkStores true\n    \ntested for 10.4 - 10.9\n\n# Preparing your System for HDD + SSD usage\nThis 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.\n```\n# mdutil -d /Volumes/diskX\n# mdutil -i off /Volumes/diskX\n# pmset -a disksleep 1\n```\n\n# Testing your Memory\nSource: http://rampagedev.wordpress.com/os-x-tweaks/run-memtest-under-mac-os-x/\n## with normal RAM usage\n1. Download Memtest and install\n2. type *memtest all 2* this will test your whole unused memory 2 times\n\n## with minimal RAM usage (recommend)\n1. Download Memtest and install\n2. restart your Mac and hold down cmd+s while starting\n3. Type *memtest all 6* into prompt. To save the results into .txt file you need to mount your volume with \n*# /sbin/mount -uw /* and then run *memtest all 6 \u003e output.txt* this will save all results to the root of the volume.\n\n# Display\nSource: https://pikeralpha.wordpress.com/2017/01/30/4398/\n\nenable Night Shift on older machines.\n```\n\n# cd /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/Current\n# nm CoreBrightness |grep _ModelMinVersion\n000000000001e260 S _ModelMinVersion\n```\n0x1e260 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).\n```\n# node\n\u003e const a = fs.readFileSync('CoreBrightness');\n\u003e a[0x1e260]\n9\n\u003e a[0x1e260] = 8;\n\u003e fs.writeFileSync('CoreBrightness', a);\n\u003e .exit\n```\nNow we resign the binary:\n```\n# codesign -f -s - /System/Library/PrivateFrameworks/CoreBrightness.framework/Versions/Current/CoreBrightness\n```\nDon't forget to reboot your machine.\n\n# Networking\n\n## SMB / CIFS (samba)\n\ngenerally use `cifs://` instead of `smb://` \u003chttps://discussions.apple.com/thread/6635652?start=0\u0026tstart=0\u003e\n\n### speedup connection\nThis will speedup smb (samba) connections. Write a file (as root) with:\n\n```\n[default]\nminauth=none\nstreams=no\nsoft=yes\nnotify_off=yes\nport445=no_netbios\n```\n\nto\n\n```\n/private/etc/nsmb.conf\n```\n\ntested for 10.9\n\n## throttle TCP/IP Port throughput\n* (src|dst) means src-port xor dst-port\n* replace {port} with the port number you want to throttle\n\n```\n# ipfw pipe 1 config bw 500KByte/s\n# ipfw add 1 pipe 1 (src|dst)-port {port}\n# ipfw delete 1\n```\ntested for 10.8 - 10.9\n\n## disable delayed tcp ack\nSource: \u003chttp://www.jeremycole.com/blog/2010/01/13/delayed-ack-in-os-x-is-incomprehensible/\u003e\n```\n# echo 'sysctl -w net.inet.tcp.delayed_ack=0' \u003e\u003e /etc/sysctl.conf\n```\n\n## keep bluetooth disable on startup\nSource: http://www.kernelcrash.com/blog/os-x-disabling-bluetooth/2007/11/12/\n```\n# defaults write /Library/Preferences/com.apple.Bluetooth “ControllerPowerState” -bool FALSE\n```\n\n\n# Editing Apple-Apps\n\n## Enable diskutility debug-menu\n\n    $ defaults write com.apple.DiskUtility DUDebugMenuEnabled 1\n    \n## codesign\nAs 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:\n\n    # codesign -fs - /Applications/Utilities/Boot\\ Camp\\ Assistant.app\n\nonly necessary for 10.9\n\n## Make BootCamp Assistant create a bootable USB-drive on Mac's with optical drive\nSource: https://www.youtube.com/watch?v=5A5FG8EMEGc\n\n1. Edit the info.plist located in: */Applications/Utilities/Boot Camp Assistant.app/Contents*.\n2. Search for the string *\u003ckey\u003ePreESDRequiredModels\u003c/key\u003e* and paste your Model Identifier e.g. *\u003cstring\u003eMacBookPro7,2\u003c/string\u003e* (You can find the Identifier in Mactracker or by left clicking the -Menu while holding down the \"alt\" Key and clicking \"Systeminformation\")\n3. Copy your Boot-Rom-Version form the System-Profiler, which you start by left clicking the -Menu while holding down the \"alt\" Key and clicking \"Systeminformation\" and paste it in the info.plist at *\u003ckey\u003eDARequiredROMVersions\u003c/key\u003e*\n4. To make your Mac boot from USB just delete the \"Pre\" from *\u003ckey\u003ePreUSBBootSupportedModels\u003c/key\u003e* and add your Model Identifier\n5. Codesign your BootCamp Assistant\n\n# Animations\n\n## disable Mission Control animation\nThis disables the swoosh animation when you start Mission Control.\n```\n$ defaults write com.apple.dock expose-animation-duration -float 0\n$ killall Dock\n```\n\n## disable Launchpad  animations\nsource: http://apple.stackexchange.com/questions/117223/how-do-i-disable-launchpad-animation-on-mac\n```\n$ defaults write com.apple.dock springboard-page-duration -float 0\n$ killall Dock\n```\n\n## Install 10.x.app to USB thumb drive\nsource: http://coolestguidesontheplanet.com/making-a-boot-usb-disk-of-osx-10-9-mavericks/\n\n```\n10.x.app/Contents/Resources/createinstallmedia --volume /Volumes/{yourVolume} --applicationpath 10.x.app --nointeraction\n```\n\n## Install 10.11 installer to USB thumb drive\nsource: http://www.macworld.com/article/2981585/operating-systems/how-to-make-a-bootable-os-x-10-11-el-capitan-installer-drive.html\n\n`/Applications/Install\\ OS\\ X\\ El\\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/{yourVolume}/ --applicationpath /Applications/Install\\ OS\\ X\\ El\\ Capitan.app/ --nointeraction`\n\n## get TeamViewer.app from Teamvier.dmg\n\u003chttps://apple.stackexchange.com/questions/15658/how-can-i-open-a-pkg-file-manually\u003e \u003chttp://www.linuxquestions.org/questions/linux-newbie-8/how-to-extract-a-ascii-cpio-archive-svr4-with-no-crc-4175436617/\u003e\n\n* copy `Install TeamViewer.pkg` to a writeable place\n* `cd` to the directory where `Install TeamViewer.pkg` is located\n* exec `pkgutil --expand Install\\ TeamViewer.pkg viewer` this will extract the pkg\n* exec `cd viewer/TeamViewerApp.pkg`\n* exec `mv Payload Payload.gz` rename Payload to Payload.gz\n* exec `gunzip Payload.gz` gunzip the Payload\n* exec `cpio -i -F Payload` finaly unpack the App\n* exec `mv TeamViewer.app ~/Downloads` move the extracted App to the Downloads directory\n\n# Useful Apps (free)\n## Boot Camp 5\nhttp://support.apple.com/kb/dl1638\n\n## flux\nhttp://justgetflux.com/\n\nChanges the kelvin-temperature of your display when the sun goes down.\n\n\u003e Ever notice how people texting at night have that eerie blue glow?\n\n\u003e Or wake up ready to write down the Next Great Idea, and get blinded by your computer screen?\n\n\u003e 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.\n\n\u003e 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.\n\n\u003e 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.\n\n## img2icns\nTransforms images to icons.\n\n## Rufus\nCreate bootable USB-drives form any .iso.\nhttps://rufus.akeo.ie/\n\n## iTerm (Version 2)\nhttp://www.iterm2.com/\n\n\u003e What is iTerm2?\n\n\u003e 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.\n\n## TextMate\nhttp://macromates.com/download\n\nImproved text displaying with syntax highlighting. It's the Notepad++ equal for OS X.\n\n## 0xED, HexEditor\nhttp://www.suavetech.com/0xed/\n\u003e 0xED is a native OS X hex editor based on the Cocoa framework.\n\n\n## BetterTouchTool\nhttp://www.boastr.de\n\u003e 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.\n\n\u003e BetterTouchTool includes many goodies, like window snapping or an integrated window switcher.\n\n## Memtest\nhttp://cdn.command-tab.com/2008/memtest_422.zip (direct)\n\n## buildin http server\nsource: \u003chttp://osxdaily.com/2010/05/07/create-an-instant-web-server-via-terminal-command-line/\u003e\n\njust run\n```\n$ python -m SimpleHTTPServer 4104\n```\nin your terminal. It will serve the files and directories in the current directory.\n\n## VLC (media player)\nhttps://videolan.org\n\n\u003e 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.\n\n## KeepassX (secure password storage)\nhttps://www.keepassx.org/downloads/\n\n\u003e 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.\n\n# Peripherals\n\n## Prevent Volume from mounting\nSource: http://www.cnet.com/how-to/prevent-a-partition-from-mounting-in-os-x/\n\n1. Get the UUID from the Volume by running: *diskutil info {pathToVolume}*.\n2. *# pico /etc/fstab*\n3. Type: *# UUID=$NUMBER none hfs rw,noauto* for any other formatted drive you replace \"hfs\" with for example \"FAT\".\n\n## Make the SuperDrive work on any Mac\nSource: http://www.maclife.de/tipps-tricks/hardware/externes-superdrive-fast-jedem-mac-verwenden\n\n1. Copy the file */Library/Preferences/SystemConfiguration/com.apple.Boot.plist* to your desktop and open it with TextEdit.\n2. paste \"mbasd=1\" bewteen *\u0026lt;string\u0026gt;* and *\u0026lt;/string\u0026gt;*. Save the document and paste it into */Library/Preferences/SystemConfiguration/* replace the old file. Root is needed.\n3. Restart your Mac.\n\n## Keyboard changes \u0026gt;/\u0026lt; with ^° Keys\n```\n# rm /Library/Preferences/com.apple.keyboardtype.plist\n```\nthen reboot\n\n# Clearing Caches\nNone 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.\n## Rebuild Kext-cache\nSource: http://forums.macrumors.com/archive/index.php/t-1654766.html\n\nThis usually fixes slow boot ups.\n```\n# kextcache -system-prelinked-kernel\n# kextcache -system-caches\n```\n\n## Clearing sandbox containers\nNote: this will delete all configs from sandboxed apps\n\nEmpty the directory: *~/Library/Containers*\n\n## Removing User-Cache\nJust delete the content of the directory: *~/Library/Caches*\n\n## Clearing Font-Cache\nSource: http://www.extensis.com/support/de/knowledge-base/clearing-the-mac-os-x-font-cache/\n```\n# atsutil databases -remove\n```\n\n## Clearing DNS-Cache\nSource: http://reviews.cnet.com/8301-13727_7-57493543-263/how-to-reset-the-dns-cache-in-os-x/\n\n```\n# dscacheutil -flushcache\n# killall -HUP mDNSResponder\n```\n\n## Clearing User-temp\nJust delete the content of the directory: */private/var/folders*\n\n## Clearing application-states\nEmpty the directory *~/Library/Saved Application State*\n\n\n# disable bluetooth via terminal\nSource: https://discussions.apple.com/message/12448781\n```\n#set bluetooth pref to off\ndefaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 0\n\n#set bluetooth pref to on \ndefaults write /Library/Preferences/com.apple.Bluetooth.plist ControllerPowerState 1\n\n#kill the bluetooth server process \nkillall blued\n\n#unload the daemon \nlaunchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist\n\n#reload the daemon\nlaunchctl load /System/Library/LaunchDaemons/com.apple.blued.plist\n\n#restart blued daemon\nlaunchctl start com.apple.blued\n```\n\n## Rebuild Spotlight index\n\nOpen 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.\n\n\n# Terminal\n\n## send display to sleep\nworks since 10.9\n```\n$ pmset displaysleepnow\n```\n\n## remove file secure\n\nSource: http://www.macworld.com/article/3005796/operating-systems/how-to-replace-secure-empty-trash-in-os-x-el-capitan.html\n\n    srm -zv /{path-to-file}\n\n\n\n## show my group memberships\n```\n$ groups {username}\n```\nThe admin user has among others the group ``admin``\n\nThe root user has among others the groups ``wheel`` ``daemon`` ``kmem`` ``sys`` ``operator``\n\n\n## getting Display EDID as hex\n```\n$ ioreg -l | grep -5 IODisplayEDID\n```\nThe EDID informations are between \u0026lt;\u0026gt; and decoded in hex\n\n# Performance issues\n\n## Finder is slow on user actions / coreservicesd high cpu usage\nsource: \u003chttp://blog.hsoi.com/2014/02/25/my-slow-mac-mavericks-coreservicesd-iconservicesagent-and-how-fs_usage-saved-me/\u003e\n\nsee which app is called do get icon information\n\n    # fs_usage -f pathname -w com.apple.IconServicesAgent | grep open\n\n\n# Security\n## Configuring System Integrity Protection\n\u003chttps://developer.apple.com/library/mac/documentation/Security/Conceptual/System_Integrity_Protection_Guide/ConfiguringSystemIntegrityProtection/ConfiguringSystemIntegrityProtection.html\u003e\nreboot with `Cmd + R`, open up terminal and type `csrutil enable` to enable and `csrutil disable` to disable. Status via `csrutil status`\n\n# git\n## detect case in filename change\n\n    $ git config core.ignorecase false\n\nnow git detects casechanges\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaslr%2Fosx-trix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaslr%2Fosx-trix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaslr%2Fosx-trix/lists"}