macOS
Contents
- 1 How to resolve: "No Java runtime present, requesting install."
- 2 Mac OS X keyboard modifiers get reset after boot or sleep
- 3 Brew: installation of Brew packages fail with "/usr/local/lib/pkgconfig is not writable."
- 4 Show all files in the Finder
- 5 .DS_store sucks
- 6 Fink
- 7 Show top level mounted drives (volumes) in the Finder
How to resolve: "No Java runtime present, requesting install."
When trying to run java from the command-line you may get this message, No Java runtime present, requesting install.. After installing the JRE: (Java Runtime Environment), you find that you still get this message from the command-line. Restarting the terminal session does not fix this. You must add the following line to /etc/bashrc or your own ~/.bashrc:
export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
Mac OS X keyboard modifiers get reset after boot or sleep
If you set your Caps Lock key to be a Control key you may find that this setting gets lost after the machine reboots or restores after a sleep. The problem may be with a corrupt ~/Library/Preferences/.GlobalPreferences.plist file. To fix this delete or move this file out of the way, reset the Caps Lock key modifier back to Control then reboot. The problem should go away.
Brew: installation of Brew packages fail with "/usr/local/lib/pkgconfig is not writable."
During a step that creates symlinks you may see a message like this:
Error: Could not symlink file: /usr/local/Cellar/x264/r2197.4/lib/pkgconfig/x264.pc /usr/local/lib/pkgconfig is not writable. You should change its permissions.
I'm not sure what causes this. This seems to fix it; although, I'm not sure if this is the correct ownership to set:
sudo chown -R $USER /usr/local/lib/pkgconfig
Show all files in the Finder
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder
.DS_store sucks
.DS_store spreads like the common cold. There is no way to turn it off for locally mounted drives, including removable media, but you can disable it from being created on network drives.
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Also add to your .gitignore file:
.DS_store/
Fink
Install Fink and Fink Commander.
Install [XCode].
Show top level mounted drives (volumes) in the Finder
This is some same Applescript that I wrote. This gets me started with the basics.
(* Show top level mounted drives (volumes) in the Finder *) tell application "Finder" activate make new Finder window with properties {target:computer container} (* I can't set the column view in properties when making new Finder window because the user may have set the Finder view option "Always open in list view". *) set current view of front window to column view set zoomed of front window to true (* if using list view then adjust some of the columns... set sort column of list view options of front window to name column set sort column of list view options of front window to kind column set width of column id name column of list view options of front window to 200 set width of column id modification date column of list view options of front window to 170 set width of column id size column of list view options of front window to 90 set width of column id kind column of list view options of front window to 120 *) end tell (* tell application "System Events" if UI elements enabled then keystroke "t" using {command down, option down} else tell application "System Preferences" activate set current pane to pane "com.apple.preference.universalaccess" display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\"" end tell end if end tell *)