User Tools

Site Tools


computers:mac_basic_setup

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computers:mac_basic_setup [2012/12/14 14:11] – [Ownership and permission] chkuocomputers:mac_basic_setup [2020/08/07 12:40] (current) chkuo
Line 5: Line 5:
   * [[http://www.mozilla.com/firefox/|Firefox]]: web browser   * [[http://www.mozilla.com/firefox/|Firefox]]: web browser
   * [[http://www.barebones.com/products/TextWrangler/|TextWrangler]]: text editor   * [[http://www.barebones.com/products/TextWrangler/|TextWrangler]]: text editor
-  * [[http://smultron.sourceforge.net/|Smultron]]: text editor 
   * [[http://filezilla-project.org/|FileZilla]]: ''sftp'' client   * [[http://filezilla-project.org/|FileZilla]]: ''sftp'' client
   * [[http://download.openoffice.org/|OpenOffice]]   * [[http://download.openoffice.org/|OpenOffice]]
 +  * MS Office available from the IPMB IT office (AS site license)
  
 ==== Optional ==== ==== Optional ====
Line 15: Line 15:
   * [[http://www.gnu.org/software/wget//|Wget]]: command-line utility to fetch files    * [[http://www.gnu.org/software/wget//|Wget]]: command-line utility to fetch files 
  
-  * [[http://www.jalview.org/|Jalview]]: multiple sequence alignment viewer (Java-based) 
   * [[http://www.gelanalyzer.com/|GelAnalyzer]]: electrophoresis gel image analyzer (Java-based)   * [[http://www.gelanalyzer.com/|GelAnalyzer]]: electrophoresis gel image analyzer (Java-based)
 +  * [[http://www.jalview.org/|Jalview]]: multiple sequence alignment viewer (Java-based)
 +  * [[http://tree.bio.ed.ac.uk/software/figtree/}FigTree]]: phylogenetic tree viewer
  
   * [[http://www.r-project.org/|R]]: software environment for statistical computing and graphics   * [[http://www.r-project.org/|R]]: software environment for statistical computing and graphics
  
 +  * [[http://www.macports.org/|MacPorts]]
 +  * [[http://www.finkproject.org/|Fink]]
 +
 +  * [[http://www.videolan.org/vlc/download-macosx.html|VLC]]: media player.
  
 ===== System Preferences ===== ===== System Preferences =====
   * Energy Saver: Computer sleep = **never**, Display sleep = **10 min**, shutdown when UPS battery level is **below 20%**, **enable** start up automatically after a power failure.   * Energy Saver: Computer sleep = **never**, Display sleep = **10 min**, shutdown when UPS battery level is **below 20%**, **enable** start up automatically after a power failure.
   * Print & Fax: add lab printer   * Print & Fax: add lab printer
-  * Network: set up lab intranet using AirPort +  * Network: set up lab intranet using DHCP. If using a desktop with ethernet connect, turn off Wi-Fi 
-  * Bluetooth: **off**+  * Bluetooth: **off** (unless wireless keyboard/mouse is used)
   * Sharing: set **Computer Name**, enable **File Sharing** and **Remote Login**   * Sharing: set **Computer Name**, enable **File Sharing** and **Remote Login**
   * Accounts: disable **Automatic login**, display login window as **Name and password**, enable **Show input menu in login window**   * Accounts: disable **Automatic login**, display login window as **Name and password**, enable **Show input menu in login window**
Line 33: Line 38:
   * Assign one external hard drive for each mac workstation as the Time Machine backup drive.   * Assign one external hard drive for each mac workstation as the Time Machine backup drive.
  
 +===== Network =====
 +  * Use Terminal, type ''networksetup -listallnetworkservices'' to see the list of network services 
 +    * e.g., ''Ethernet'' and ''Wi-Fi''
 +  * IPv6; often cause problems
 +    * to disable: ''sudo networksetup -setv6off Ethernet'' and/or ''sudo networksetup -setv6off Wi-Fi''
 +    * to enable: ''sudo networksetup -setv6automatic Ethernet'' and/or ''sudo networksetup -setv6automatic Wi-Fi''
  
-===== Ownership and permission ===== +===== xcode ===== 
-  * Use ''/etc/crontab'' to maintain ownership and permission of shared files on the file server:+<code> 
 +# Mac OS X 10.9.4 
 +xcode-select --install 
 +</code> 
 + 
 +===== Extended Attributes ===== 
 +Some files may have extended attributes, for example:
 <code bash> <code bash>
-cat /etc/crontab +chkuo@mesquite[~]ls -l 
-# /etc/crontab: system-wide crontab +-rwxr-xr-x@   1 chkuo  staff   3454 Jan 22 11:11 file1* 
-# m h dom mon dow user command +-rwxr-xr-x    1 chkuo  staff   2628 Nov  2  2006 file2*
-*/5 * * * * root /usr/sbin/chown -R root:wheel /Users/Shared +
-*/5 * * * * root /bin/chmod -R a+rw /Users/Shared+
 </code> </code>
 +
 +The ''@'' symbol after the permission info of ''file1'' indicates that there are extended attributes. To find out more details:
 +<code bash>
 +chkuo@mesquite[~]$ ls -@l *
 +-rwxr-xr-x@   1 chkuo  staff   3454 Jan 22 11:11 file1*
 + com.apple.FinderInfo   32 
 + com.apple.TextEncoding   15 
 +-rwxr-xr-x    1 chkuo  staff   2628 Nov  2  2006 file2*
 +</code>
 +
 +To get rid of these extended attributes:
 +<code bash>
 +chkuo@mesquite[~]$ xattr -d com.apple.FinderInfo file1
 +chkuo@mesquite[~]$ xattr -d com.apple.TextEncoding file1
 +</code>
 +
 +
 +===== Newline characters =====
 +Mac OS X and Unix uses different characters to denote newline break. This can cause problem when you need to manipulate files in Finder and Terminal. To convert between the two, use:
 +
 +<code bash>
 +#!/bin/sh
 +# change linefeed from unix to mac
 +for x
 +do 
 +  echo "$x"
 +  tr '\012' '\015' < "$x" > "tmp.$x"
 +  mv "tmp.$x" "$x"
 +done
 +</code>
 +
 +Or:
 +<code bash>
 +#!/bin/sh
 +# change linefeed from mac to unix
 +for x
 +do 
 +  echo "$x"
 +  tr '\015' '\012' < "$x" > "tmp.$x"
 +  mv "tmp.$x" "$x"
 +done
 +</code>
 +
 +===== Job scheduling =====
 +In addition to the use of ''crontab'' for reoccurring jobs, you can also use the ''at'' utility to schedule a job to run at a pre-determined time. By default, this utility is disabled due to power management issue (need to read hard drive every minute). This is more of a problem for laptops, but not so for servers (or desktops that are being used as servers). To turn it on, use the command:
 +<code bash>
 +sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist
 +</code>
 +
 +To turn it off again, use:
 +<code bash>
 +sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.atrun.plist
 +</code>
 +
 +To check if the ''at'' utility is disabled or not, check preference file to see if ''Disabled'' is specified:
 +<code bash>
 +cat /System/Library/LaunchDaemons/com.apple.atrun.plist
 +<?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 +<plist version="1.0">
 +<dict>
 +    <key>Label</key>
 +    <string>com.apple.atrun</string>
 +    <key>ProgramArguments</key>
 +    <array>
 +     <string>/usr/libexec/atrun</string>
 +    </array>
 +    <key>StartInterval</key>
 +    <integer>30</integer>
 +    <key>Disabled</key>
 +    <true/>
 +</dict>
 +</plist>
 +</code>
 +
 +For more details, read [[http://www.macosxhints.com/article.php?story=20050921214411382]]
 +
  
 ===== Maintenance ===== ===== Maintenance =====
Line 76: Line 168:
   * [[http://www.thexlab.com/faqs/maintscripts.html|http://www.thexlab.com/faqs/maintscripts.html]]   * [[http://www.thexlab.com/faqs/maintscripts.html|http://www.thexlab.com/faqs/maintscripts.html]]
   * [[http://managingosx.wordpress.com/2008/06/18/launchd-vs-periodic/|http://managingosx.wordpress.com/2008/06/18/launchd-vs-periodic/]]   * [[http://managingosx.wordpress.com/2008/06/18/launchd-vs-periodic/|http://managingosx.wordpress.com/2008/06/18/launchd-vs-periodic/]]
 +
 +
 +
 +
  
 ===== Troubleshooting ===== ===== Troubleshooting =====
   * [[http://support.apple.com/kb/HT3964|Resetting the System Management Controller (SMC)]]   * [[http://support.apple.com/kb/HT3964|Resetting the System Management Controller (SMC)]]
   * [[http://support.apple.com/kb/HT1379|Resetting the PRAM and NVRAM]]   * [[http://support.apple.com/kb/HT1379|Resetting the PRAM and NVRAM]]
 +
  
computers/mac_basic_setup.1355465463.txt.gz · Last modified: 2012/12/14 14:11 by chkuo