Mac OS X
From MyWiki
Snow Leopard
OS X Setup
- Install X11:
- Panther: By running X11User.pkg from the /Applications/Installers directory.
- Tiger: Use installer DVD and follow directions at [1]
- Install the Mac OS X Developer Tools. Run Developer.mpkg in the /Applications/Installers/Xcode Tools directory. Then install X11SDK.pkg in the Packages subdirectory.
- Install Fink. Enable access to 'unstable' packages for more selection. Then run the FinkCommander to install packages. (Alternatively, or additionally, you may want to install DarwinPorts.)
- The version of emacs provided with OS X 10.3.3 doesn't contain
X11 support, so install emacs21 via Fink for a version of emacs with
X11 support.
- For those who want a Carbon-integrated (GUI) Emacs there is CarbonEmacs
- Some people really like AquaMacs for a GUI version of emacs. It has some really nice LaTeX features, too.
- In /etc/hostconfig, I changed
HOSTNAME=-AUTOMATIC-
replacing -AUTOMATIC- with my full-qualified hostname so my hostname doesn't change as I change networks.
- In leopard this line didn't exist, so you'll have to add it.
- As I typically turn off my PowerBook at night, I installed anacron via Fink to run standard MacOS X cron jobs, uncommented the entries for "Standard MacOS X cron jobs" in /sw/etc/anacrontab and commented out the corresponding lines in /etc/crontab.
- According to [2]: "Note: This version of Anacron will run on MacOS 10.5 (Leopard) but it is not needed, as the Leopard launchd will run skipped jobs when the machine is next awake."
NCSA Setup
- See this page and this page for NCSA-specific instructions on setting up Kerberos and OpenAFS.
- Once you have AFS running, you can access NCSA site-licensed
software at /afs/ncsa/packages/MacOSX. You'll need to
email afs@ncsa.uiuc.edu and ask to be added to the macosx group so
you can access that directory.
- Mac AFS Tools: http://www.ibiblio.org/macsupport/afs/afstools.html
- Alternatively, if you don't want to run AFS, you can access the site-licensed software from smb://file-server.ncsa.uiuc.edu/software-mac.
- Follow instructions here for enabling automatic system backups.
- Subscribe to the NCSA macos-users list for announcements and discussion of MacOS topics at NCSA. Send email to majordomo@ncsa.uiuc.edu with subscribe macos-users in the message body.
Email Setup
- I decided to use MH-E
for email. First, I installed nmh via Fink. Then I
downloaded MH-E, ran make, and installed with sudo cp
-r mh-e-7.4.3 /sw/share/emacs21/site-lisp/mh-e-7.4.3. An
alternative would be to add the mh-e-7.4.3 directory to my emacs
load-path following the instructions in the provided README.
I then ran sudo vi /sw/etc/nmh/mts.conf to setup nmh
for smtp by setting localname to my email domain name
(ncsa.uiuc.edu) and servers to my smtp server
(smtp.ncsa.uiuc.edu). I also setup a ~/.mh_profile:
Path: Mail Draft-Folder: drafts Alternate-Mailboxes: jbasney@*
To get threading working correctly, I followed these instructions to create ~/Mail/replcomps:
%(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\ %<(nonnull)%(void(width))%(putaddr To: )\n%>\ %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ %<(nonnull)%(void(width))%(putaddr cc: )\n%>\ %<{fcc}Fcc: %{fcc}\n%>\ %<{subject}Subject: Re: %{subject}\n%>\ %<{message-id}In-Reply-To: %{message-id}\n%>\ %<{message-id}References: \ %<{references}%(void{references})%(trim)%(putstr) %>\ %(void{message-id})%(trim)%(putstr)\n%>\ --------and ~/Mail/replgroupcomps:
%(lit)%(formataddr{mail-followup-to})\ %<(nonnull)%(void(width))%(putaddr To: )\n\ %|\ %(lit)%(formataddr %<{mail-reply-to}%?{reply-to}%?{from}%?{sender}%?{return-path}%>)\ %<(nonnull)%(void(width))%(putaddr To: )\n%>\ %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\ %<(nonnull)%(void(width))%(putaddr cc: )\n%>%>\ %; %<{fcc}Fcc: %{fcc}\n%>\ %<{subject}Subject: Re: %{subject}\n%>\ %<{message-id}In-Reply-To: %{message-id}\n%>\ %<{message-id}References: \ %<{references}%(void{references})%(trim)%(putstr) %>\ %(void{message-id})%(trim)%(putstr)\n%>\ -------- - I run fetchmail included in the OS X install. My
~/.fetchmailrc file contains:
set daemon 900 poll pop.ncsa.uiuc.edu proto apop ssl mda "/usr/bin/procmail -d %T" fetchsizelimit 0
Note I use apop authentication; change proto apop to proto pop3 or proto kpop
to use pop3 or kpop authentication instead. (It has been reported that OS X fetchmail doesn't support kpop. If you know how to get it working, please send me email at jbasney@ncsa.uiuc.edu.)
- I'm told kpop doesn't work with Eudora at NCSA.
Use pop over SSL instead.
- In Checking Mail -> Set Authentication: Passwords
- In SSL -> Set SSL for POP: Required (Alternate Port)
- In SSL -> Set Alternate Port SSL Negotiation Maximum Compatibility
- Instructions are also available for setting up Microsoft Entourage and Mac Mail.
- The Insidious Big Brother Database integrates nicely with MH-E to remember contact email addresses. Run ./configure; make to build and copy to /sw/share/emacs21/site-lisp as with MH-E.
- I installed Emacs 21.3.50.1 via Fink, which contained Gnus 5.9.0. MH-E works better with Gnus 5.10, so I installed that from gnus.org.
- For reading text/html mail (yuk!), I installed w3m via Fink and w3m.el. I also installed mailcrypt and emacs-wget.
- Since fetchmail is sending my mail through procmail, I can take
advantage of some nice procmail features. My ~/.procmail file looks
something like this:
MAILDIR=$HOME/Mail JUNKFOLDER=$MAILDIR/junk/. # send mail from some senders to junk folder :0 * ^From:.*junk.com $JUNKFOLDER # don't deliver duplicates :0 Wh: msgid.lock | formail -D 8192 $MAILDIR/msgid.cache
- NCSA users will probably want to sign up for spam filtering.
Sample .emacs
;; MH-E setup
(global-set-key "\C-xr" 'mh-rmail)
(global-set-key "\C-xm" 'mh-smail)
(add-hook 'mh-before-send-letter-hook 'ispell-message)
(add-hook 'mh-before-send-letter-hook 'untabify-hook)
(setq mh-reply-default-reply-to "all")
(setq mh-yank-from-start-of-msg 'autoattrib)
(defun my-mh-letter-mode-hook () (mh-to-fcc "outbox"))
(add-hook 'mh-letter-mode-hook 'my-mh-letter-mode-hook)
(setq mm-text-html-renderer 'w3m)
(setq mh-show-threads-flag t)
(setq mm-discouraged-alternatives
'("text/html" "text/richtext"))
;; Insidious Big Brother Database
(require 'bbdb)
(bbdb-initialize 'mh-e)
(add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh)
(setq bbdb-offer-save 0)
;; mailcrypt
(load-library "mailcrypt")
(mc-setversion "gpg")
(autoload 'mc-install-write-mode "mailcrypt" nil t)
(autoload 'mc-install-read-mode "mailcrypt" nil t)
(add-hook 'mail-mode-hook 'mc-install-write-mode)
(add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
(add-hook 'mh-letter-mode-hook 'mc-install-write-mode)
(add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
(add-hook 'message-mode-hook 'mc-install-write-mode)
(add-hook 'news-reply-mode-hook 'mc-install-write-mode)
(setq mc-passwd-timeout 600
mm-verify-option 'known
mm-decrypt-option 'known)
(setq pgg-scheme 'gpg
pgg-cache-passphrase t
pgg-query-keyserver t
pgg-passphrase-cache-expiry 1800)
(if (not (fboundp 'comint-read-noecho))
(defalias 'comint-read-noecho 'read-passwd))
;; w3m browser
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)
;; gnus
(setq load-path (cons (expand-file-name "~/elisp/gnus-5.10.6/lisp") load-path))
(require 'gnus-load)
Virtual Desktop Software
- VirtueDesktops
- Version 0.54 (Beta 4)
- No longer in development (July 25, 2007)
- Seems to work reasonably well.
- Turn off "Change desktop to show focused application" to allow applications to spread over multiple desktops more easily.
- Spaces
- Promised virtual desktop software in OS X 10.5
- CodeTek Virtual Desktops
- Currently (as of July 25, 2007) pending a Universal binary
- My favorite under PPC --Vwelch 11:59, 25 July 2007 (CDT)
- Space.app
- Currently (July 25, 2007) only a PPC binary
- Desktop Manager
- A 0.5.4 Intel-based build is available [3]
- Pager only works on Desktop 0 (and Desktops in status bar don't show windows for other than Desktop 0) (5.4r1, July 2007)
- Cannot move applications to other Desktops, or set applications to start on a specific desktop (5.4r1, July 2007)
- You Control: Desktops
- Works well, but I just didn't like the interface as well as CodeTek Virtual Desktops. Doesn't seem to let me assign Apps to specific desktops. Seems to have a general assumption that a App will only run on one desktop. --Vwelch 11:59, 25 July 2007 (CDT)
Cleansing Intel Mac of PPC Applications
Power PC (PPC) Applications on a Intel Mac using the Rosetta emulator. Unfortunately this seems to cause a fair amount of general slow down and instability of the whole system. So it's best to make sure you are running Univerisal binaries that include both a Intel and PPC executable.
To figure out if your applications are Intel or PPC, use the Activity Monitor (found under Applications/Utilities). Start it up and select show Activity View, and then on the status bar, click on View/Columns and select Kind. Now the view should show you if a given process is Intel or PPC.
Securing your Mac
- Good Macworld Article
- There is a security issue with sudo that Apple refuses to fix. Information on a fix is here.
- The NSA provides a very useful Mac OS hardening guide for Panther. It is a little out of date for Tiger, but still pretty useful.
Spaces Hints
Turn Off Spaces Auto-Switching to Active Application Space
From [4] (note "dock" with lower case 'd'):
defaults write com.apple.dock workspaces-auto-swoosh -bool NO killall Dock
Time Machine and FireVault
Some articles ([5], [6]) suggest that with Fire Vault on, Time Machine will:
- Only backup when you log out
- This doesn't seem to be true at all for me. I see it run backups on the hour that include my home directory.
- Note that when I turned Time Machine on after turning on Fire Vault, my home directory was in the "do not back up" list (under Time Machine Preferences/Options). I removed it from that list.
- I have seen it do full backups when I log out, and this is actually really annoying as it can take a while, so I've gotten in the habit of unmounting my backup drive before logging out.
- Only back up a sparse image you then have to unpack outside of Time Machine to restore
- I'm still not sure what is going on here. Some times when I enter time machine I do just see a series of sparse bundles, other times I see what looks like normal directories.
- It seems like if it is in the middle of a backup and I enter TM I do just see sparse images, but if I give it a while afterwards, I see normal directories.
- Ah, if I clock on "Von's Mac" in the upper left of the finder window, I see directories as I would expect. If I click on my home directory about half way down the finder window, I see the sparse bundle.
I'm still not sure if the Time Machine backups are encrypted or not. And I'm not all that concerned since FireVault is mainly to protect against loss of my laptop.
The above is all with 10.5.4 and Fire Vault turned on under Leopard.
Other tidbits:
- You probably want to tell Spotlight not to index your Time Machine back ups.
- For a discussion of everything Time Machine does not back up and how to change it, see [7] (Yes, this is more than what appears on the Preference pane).
- Every once in a while I'm getting a failure during a backup - "error copying files". Not sure what that is about. Next backup has always worked fine.
Password Managers
- Looking for a password manager more powerful than Keychain? That syncs with your iPhone? Check out: http://1passwd.com/.
- Commercial program: $34.95
- Seems to be Mac-only
- KeePassX is compatible with KeePass under Windows.
- Supports import of Password Safe databases.
- My current favorite. --Von 09:54, 12 August 2008 (CDT)
- passwordsafe.swt is a Java version of Password Safe
- Password Gorilla is a TCL/TK program that is compatible with Password Safe
- Last I tried this it was rather slow and clunky on my mac. --Von 09:54, 12 August 2008 (CDT)
- SplashID looks interesting with iPhone, Mac and Windows clients
- It's a commercial program. $10 for mobile version, $30 for desktop.
PGP/GPG
- Mac GNU Privacy Guard has a lot of neat little GUI GPG front-ends. Unfortunately, they don't update often. So most of the tools are for for PowerPC, but they seem to work under Rosetta. They do not update the GPG binaries often, so I use fink for that.
- GPGMail is a must have Mail plugin for using GPG.
- Enigmail is a add-on for Thunderbird that has a decent key manager GUI built in.
System Monitoring and Control Software
- X Resource Graph is a nice application window display of CPU, network, memory, disk usage.
- MenuMeters provides nice CPU, memory, disk, and network meters for the menubar.
- Temperature Monitor will tell you how hot your Apple computer is.
- smcFanControl can control your laptop fan to keep it cooler.
Other Stuff
- Jim likes Konfabulator better
than Dashboard. Adam likes Dashboard better. We report. You decide. :-)
- Konfabulator seems to have been subsumed into Yahoo Widgets
- Best widget ever for your Apple notebook is AirTrafficControl. It is a great way to see the available networks, their signal strengths and encryption settings at a glance. They are working on an update for the Intel Core 2 Duo chipsets (UPDATE: A beta release for version 2 fixes these problems).
- For great documentation of all the LaTeX options on Mac, see the Mac OS X TeX/LaTeX Web Site.
- If you use Firefox on the Mac, you will not be able to view PDFs with the Adobe PDF plugin. If you use a PowerPC Mac (or want to run Firefox through Rosetta on an Intel Mac), you can download the PDF Browser Plugin free for academic use. It is pretty good, but it is unknown whether it will ever be made as a universal binary.
- I hear quicksilver is an excellent launcher.
- Powerbook/iBook/MacBook/MacBook Pro docking stations are available from BookEndz.
- Toast is a great little tool for burning DVDs, CD's, VCDs, etc for the Mac. While it does more than the default burning software built-in to Mac OS, it does everything more easily and conveniently.
- Backup alternatives:
- Location X is a network location manager for Mac OS X. Alternatives include LocationChanger and this script. Also, SleepWatcher will run commands on sleep/wakeup/idle events.
- Apple Mail users might be interested in Mail Act-On to manage key mappings.
- Growl is a powerful notification system for Mac OS X.
- Do you want to sync addresses, bookmarks, mail settings, mail, calendars, etc but don't want to pay for a .Mac account. Check out SyncTogether. It was previous called MySync in beta.
- Skype works well on Mac OS X for cross-platform audio chat.
- DesktopSweeper is nice for keeping a clean desktop.
- Adium is an excellent multi-protocol IM client.
- SSHKeychain can manage your SSH keys.
- Steelray Project Viewer will display Microsoft Project files.
- Need Windows? If you have an Intel Mac, you can use Boot Camp. VMware for Mac Beta is available now. Parallels Desktop for Mac is another virtual machine option. Office 2004 for Mac includes Remote Desktop Connection that lets you use a Windows machine remotely. There's also an open source rdesktop client. Be sure to Secure Remote Desktop for Windows XP if you use it. Chicken of the VNC is another option for remote desktop connections from Mac to Windows.
- Looking for cool folder, device or file-type icons? Check out this site.
- RCDefaultApp lets you control default applications and file extension associations.
Tips
- Calibrating your computer's battery for best performance is good practice.
- Mac OS puts these annoying .DS_Store files in every folder on remote files systems (e.g., WebDAV, SMB, NFS, etc). They are hidden by Mac OS, but any non Mac users see these files describing your folder settings when they connect to the shared file system. A fix is described here.
