This shows you the differences between two versions of the page.

Link to this comparison view

apple [2012/02/24 10:31]
apple [2020/03/17 17:26] (current)
dblume [Configuration] brew install telnet
Line 1: Line 1:
 ====== Apple ====== ====== Apple ======
-We got our first Macintosh.  Here are some things I'm considering doing. +First time configuration of a new Macintosh. Updated for macOS Sierra 10.12
- +
 ===== Configuration ===== ===== Configuration =====
-  * Get [[http://www.google.com/chrome/intl/en/landing_chrome.html?hl=en&platform=mac|Chrome]] 
-    * Set up sync: Preferences -> Personal Stuff -> Sync 
-  * Configure [[http://mail.google.com/support/bin/answer.py?answer=81379|mail to use Gmail]]. 
-  * Cofigure [[http://www.google.com/support/calendar/bin/answer.py?answer=99358#ical|iCal to sync with Google Calendar]]. 
   * System Preferences:   * System Preferences:
-    * Keyboard +    * Trackpad -> Tap to Click (For not having to press hard for a click.) 
-      Command KeyControl Panel -> Keyboard -&gtModifier Keys... -> swap Command and Control keys +    Tap-and-dragAccessibility -> Mouse &ampTrackpad -> Trackpad Options and enable 'Dragging (with/without) Drag Lock' 
-        Except that [[https://discussions.apple.com/thread/2793826?threadID=2793826&tstart=90|it doesn't persist past logging out]]. +  Open the Photos app, and drag a userpic to it. Then change your userpic in the System Preferences. 
-      * [[http://lifehacker.com/5826055/make-your-keyboard-keys-repeat-properly-when-held-down-in-mac-os-x-lion|Make Your Keyboard Keys Repeat Properly When Held Down in Mac OS X Lion]]. +  * Get [[http://www.google.com/chrome/intl/en/landing_chrome.html?hl=en&platform=mac|Chrome]] (Login and sync.) 
-    Appearance +  * [[http://www.tekrevue.com/tip/show-path-finder-title-bar/|Show the full path in the finder]] with <code>defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder</code> 
-      * Place scroll arrowsAt top and bottom+  System Preferences:
     * Mouse      * Mouse 
       * Make tracking speed much faster!       * Make tracking speed much faster!
       * Enable Secondary click for the right mouse button       * Enable Secondary click for the right mouse button
 +      * 2017-01-15 (still needed): Consider [[http://pilotmoon.com/scrollreverser/|Scroll Reverser]] to have [[http://apple.stackexchange.com/questions/116617/how-to-separate-mouse-and-trackpad-settings|natural scrolling for trackpad, but reversed for the mouse]].
 +      * Disable [[http://apple.stackexchange.com/questions/159180/yosemite-disabling-inertia-scrolling-using-scroll-wheel-for-the-mouse|inertia mousewheel scrolling]] with:<code>defaults write .GlobalPreferences com.apple.scrollwheel.scaling -1</code>
       * Get SteerMouse (linked below) to stop wheel acceleration (Or [[http://www.logitech.com/en-us/428/146?section=downloads&bit=&osid=9|Logitech V200 LCC]])       * Get SteerMouse (linked below) to stop wheel acceleration (Or [[http://www.logitech.com/en-us/428/146?section=downloads&bit=&osid=9|Logitech V200 LCC]])
 +    * Keyboard 
 +      * Set Key Repeat to fastest, and Delay until Repeat to second shortest.
 +      * Some apps don't repeat anything because some keys have a character accent menu. To disable: <code>defaults write -g ApplePressAndHoldEnabled -bool false</code>
 +      * Microsoft Natural Ergonomic Keyboard 4000 doesn't have a current driver. That's OK.
 +      * Swap the Option and Command keys.
     * Dock     * Dock
       * Position on Right       * Position on Right
-      * Maybe automatically show and hide dock?+      * Automatically show and hide dock 
 +    * Outlook 
 +      * Turn off auto underline-to-italic, dashes, smart quotes: Preferences -> AutoCorrect then click on the AutoFormat page 
 +**BSD vs. Linux commands** 
 +macOS comes with BSD grep pre-installed, which doesn't use the Perl -P flag. 
 +Go to http://brew.sh/ and run the ruby command. 
 +  brew install grep --with-default-names 
 +  brew install gnu-sed --with-default-names 
 +  brew install findutils --with-default-names 
 +  brew install jq 
 +  brew install tree 
 +  brew install httpie 
 +  brew install inetutils  # If you need telnet (maybe nc is good enough?
 +  brew install gnuplot 
 +  brew install pv 
 +  brew install gnupg 
 +  brew install telnet 
 +  # Maybe also readline if you brew install python3 
 +  brew install bash 
 +  sudo echo /usr/local/bin/bash >> /etc/shells 
 +  chsh -s /usr/local/bin/bash 
 +Log out of that console window and log back in again. 
 ===== Tips ===== ===== Tips =====
Line 37: Line 66:
 | Command+Opt+Esc     | Force Quit the application                                | | Command+Opt+Esc     | Force Quit the application                                |
 | Shift+Opt+Command+V | Paste without formatting                                  | | Shift+Opt+Command+V | Paste without formatting                                  |
 +===== Daemons, Agents, Cron, Launchd =====
 +The preferred way to set a repeating task is not to use a cronjob but launchd. :!: Note that there's a breaking change in macOS Catalina. [[https://www.reddit.com/r/MacOS/comments/dffpzj/launchd_agent_no_longer_functions_after_catalina/|Launchd agent no longer functions after Catalina upgrade]].
 +In your ~/bin directory, create a job to run, tag_ip_address.sh
 +<code bash tag_ip_address.sh>
 +#!/usr/bin/env bash
 +curl --data "`hostname -s`=`ifconfig | /usr/local/bin/grep "inet " | grep -v "" | \
 +sed -E 's/.*inet (([0-9]+.){3}[0-9]+).*/\1/' | perl -p -e 'chomp if eof;s/\n/,/'`&auth=[your secret auth]" "https://kvs.dlma.com"
 +sleep 11  # if launched as a daemon, live for 11s to not be detected as buggy.
 +That "sleep 11" is to mitigate the buggy daemon detection mentioned [[https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html|here]].
 +Note that we had to specify the path to the homebrew grep, because LaunchAgent would use the default one instead.
 +cd into ~/Library/LaunchAgents or (/Library/LaunchDaemons if it can really be a daemon) and add a new plist file
 +<code xml com.dlma.tag_ip_address.plist>
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
 +  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 +<plist version="1.0">
 +    <key>Label</key>
 +        <string>com.dlma.tag_ip_address</string>
 +    <key>Program</key>
 +        <string>/Users/dblume/bin/tag_ip_address.sh</string>
 +    <key>StandardOutPath</key>
 +        <string>/tmp/com.dlma.tag_ip_address.plist.out.txt</string>
 +    <key>StandardErrorPath</key>
 +        <string>/tmp/com.dlma.tag_ip_address.plist.err.txt</string>
 +    <key>StartCalendarInterval</key>
 +        <dict>
 +            <key>Hour</key>
 +            <integer>12</integer>
 +            <key>Minute</key>
 +            <integer>0</integer>
 +        </dict>
 +Finally, [[http://apple.stackexchange.com/questions/217453/configure-launchd|you need to explicitly load it]].
 +<code bash>
 +$ launchctl load -w /Library/LaunchDaemons/com.dlma.tag_ip_address.plist
 ===== Software to Get ===== ===== Software to Get =====
-  * [[http://www5e.biglobe.ne.jp/~arcana/StartupSound/index.en.html|Startup Sound]] (Make it quieter!)+  * [[http://iterm2.com/|iTerm2]] and install your [[http://git.dlma.com/dotfiles.git/|dotfiles]]. 
 +    * Preferences -> Profiles -> Terminal -> uncheck "Save lines to scrollback in alternate screen mode" 
 +  * If you want [[http://ipython.org/|IPython]], you probably have to install [[http://pypi.python.org/pypi/readline/|readline]], too: ''sudo easy_install readline ipython'' 
 +  * [[http://www5e.biglobe.ne.jp/~arcana/StartupSound/index.en.html|Startup Sound]] (Make it quieter before Lion!) [[http://hints.macworld.com/article.php?story=20120513121111656|Adjusting Startup Chime]] after Lion. 
 +  * [[http://foreword.com/2012/07/6869/vanilla_folders/|TotalFinder]] for some intuitive Finder features.
   * [[http://plentycom.jp/en/steermouse/|SteerMouse]] to change ScrollWheel rolling to constant 3x instead of accellerated   * [[http://plentycom.jp/en/steermouse/|SteerMouse]] to change ScrollWheel rolling to constant 3x instead of accellerated
   * [[http://decimus.net/DTerm/|DTerm]] for quick one-off terminal commands   * [[http://decimus.net/DTerm/|DTerm]] for quick one-off terminal commands
   * [[http://www.apple.com/downloads/macosx/development_tools/plisteditpro.html|Property List Editor]] for giving [[http://bura-bura.com/blog/archives/2006/08/18/increasing-the-heap-size-of-freemind-on-macos-x/|Minecraft more memory]].   * [[http://www.apple.com/downloads/macosx/development_tools/plisteditpro.html|Property List Editor]] for giving [[http://bura-bura.com/blog/archives/2006/08/18/increasing-the-heap-size-of-freemind-on-macos-x/|Minecraft more memory]].
-  * [[http://toolbar.google.com/gmail-helper/notifier_mac.html|Google Notifier]] (especially for GMail)+  * [[http://toolbar.google.com/gmail-helper/notifier_mac.html|Google Notifier]] ([[http://support.google.com/mail/bin/answer.py?hl=en&answer=10960|Two-step Authentication instructions]])
   * GTD: [[http://www.hogbaysoftware.com/products/taskpaper|Taskpaper]] or [[http://culturedcode.com/things/|Things]] or [[http://www.omnigroup.com/products/omnifocus/|Omnifocus]]   * GTD: [[http://www.hogbaysoftware.com/products/taskpaper|Taskpaper]] or [[http://culturedcode.com/things/|Things]] or [[http://www.omnigroup.com/products/omnifocus/|Omnifocus]]
   * [[http://magicprefs.com/|MagicPrefs]] for finer tuning of the Magic Mouse   * [[http://magicprefs.com/|MagicPrefs]] for finer tuning of the Magic Mouse
   * [[http://www.delicious-monster.com/|Delicious Library]]: Keep track of my physical media.   * [[http://www.delicious-monster.com/|Delicious Library]]: Keep track of my physical media.
   * Code Editing   * Code Editing
 +    * [[http://www.sublimetext.com/3|Sublime Text 3]] and then [[http://config.dlma.com/#sublime|configure]] it.
     * [[http://developer.apple.com/tools/xcode/|XCode]]     * [[http://developer.apple.com/tools/xcode/|XCode]]
     * [[http://macromates.com/|TextMate]]     * [[http://macromates.com/|TextMate]]
Line 67: Line 153:
   * http://gimpshop.com/   * http://gimpshop.com/
   * http://pixelmator.com/   * http://pixelmator.com/
 +===== Preferences I don't set anymore =====
 +  * [[http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/|Show hidden files]] with <code>defaults write com.apple.Finder AppleShowAllFiles YES; killall Finder</code>
 +  * Configure [[http://mail.google.com/support/bin/answer.py?answer=81379|mail to use Gmail]].
 +  * Cofigure [[http://www.google.com/support/calendar/bin/answer.py?answer=99358#ical|iCal to sync with Google Calendar]].
 +  * System Preferences:
 +    * Keyboard
 +      * Command Key: Control Panel -> Keyboard -> Modifier Keys... -> swap Command and Control keys
 +        * Except that [[https://discussions.apple.com/thread/2793826?threadID=2793826&tstart=90|it doesn't persist past logging out]].
 +      * [[http://lifehacker.com/5826055/make-your-keyboard-keys-repeat-properly-when-held-down-in-mac-os-x-lion|Make Your Keyboard Keys Repeat Properly When Held Down in Mac OS X Lion (macOS)]].
 ===== iOS Apps ===== ===== iOS Apps =====
Line 74: Line 172:
   * [[wp>Sokoban|Sokoban]]   * [[wp>Sokoban|Sokoban]]
   * A [[http://build.last.fm/category/Scrobblers|Scrobbler]]   * A [[http://build.last.fm/category/Scrobblers|Scrobbler]]
-  * A [[http://www.plurk.com/API|new Plurk client]] 
 ==== Sokoban ==== ==== Sokoban ====
Line 84: Line 181:
 What matters here is the ability to scrobble what I've played to last.fm directly from my iPhone/iPod. What matters here is the ability to scrobble what I've played to last.fm directly from my iPhone/iPod.
-==== Plurk ====+====== Prey ====== 
 +[[https://panel.preyproject.com/]] for when the device goes missing. (Or is stolen by a thief.) 
 +====== NFS for macOS ====== 
 +On the server side get your user ID and group ID (id -u; id -g), and update /etc/exports with something like: 
 +/path/to/share 10.?.?.?(rw,sync,insecure,all_squash_anonuid=<uid>,anongid=<gid>) 
 +10.?.?.? would be the IP of the Macintosh. (That'll have to be updated every time it changes.)  For a Macintosh to connect, "insecure" was said to be needed. And "all_squash" was needed for the uid and gid to be set.  Restart and check the NFS server with "sudo systemctl restart nfs-server.service; systemctl status nfs-server.service". 
 +Get the "hostname" for the server for the next bit on the client side. Call it jdoe-t3610. 
 +On the client side, you could manually mount the NFS volume with something like, "<nowiki>nfs://jdoe-t3610/path/to/share</nowiki>" 
 +Or better, configure automounter by adding a line to <nowiki>/etc/auto_master</nowiki>: 
 +/- auto_sandbox -rw 
 +And then make the file /etc/auto_sandbox 
 +/sandbox nfs://jdoe-t3610/path/to/share 
 +For the purpose of P4 client compatibility with the dev system, I use a symbolic link at root. 
 +$ sudo ln -s /sandbox/sandbox/stb/ /link_to_p4_root 
 +If you want your changes to take effect immediately,
-The existing official client could stand improvement.+<code> 
 +$ sudo automount -vc 
 ====== Keywords ====== ====== Keywords ======
 aps, todo aps, todo
apple.1330108300.txt.gz · Last modified: 2012/02/24 10:31 by dblume
Recent changes RSS feed Driven by DokuWiki