Building a Unix-geek Mac
Security Configuration
- Turn off bluetooth.
- If you leave bluetooth turned on, go into System
Preferences->Bluetooth, select the File Exchange tab, and under
"Bluetooth File Transfer", turn off "Allow other devices to browse
files on this computer" because "browse" includes writing. Then
look and see if
/Users/Shared
has any surprises in it...
- Apple's X11R6 public beta
- Apple's X11R6 public beta devkit (same page)
- Safari Browser public beta
- Developer Tools (needs ADC membership)
- KFM Extras [from MIT, not apple]
- OpenAFS from openafs.org (Mac OS X version, not the Darwin one)
Configuration bits
- Turn off autologin: Apple->system preferences; System->accounts, users tab, turn off
"auto login as this user".
- Change your shell to bash:
nidump
/niload
or nictl merge
/delete
- Changing kerberos ticket files is done with kswitch; changing the
K* environment variables can only break things, it doesn't actually cause
you to change ticket sets.
- I've seen persistent problems with stty settings with bash under
xterm, so I use
stty -ixany oxtabs erase '^?' kill '^u' reprint '^r' eof '^d' quit '^\' intr '^c' discard '^o' dsusp '^y' start '^q' stop '^s' susp '^z' werase '^w' lnext '^v'
- If you want to do rendezvous-based web sharing, look in
~/Sites
- OpenAFS:
/var/db/openafs/etc/config/afsd.options
wants to say -fakestat -dynroot -afsdb
- Kerberos:
/Library/Preferences/edu.mit.Kerberos
wants
additional [realms]
entries (no SRVLOC support, for subtle
reasons) for the realms you care about. You probably don't actually
need any additional [v4 realms]
entries, but keep it in mind.
Stuff to build
- I find GNU "stow" vaguely useful for managing
/usr/local
instead of just dumping stuff in there.
- You can build emacs from cvs, but there's not much point unless
you have some tweaking in mind; you can get ansi color from the native
emacs just by changing TERM to xterm-color...
- Athenoid stuff:
- ssh2 with gssapi-krb5 support
- aklog
- zephyr
- Use the
compile_et
from /System/Library/Frameworks/Kerberos.framework/Support/compile_et
- also build: ss, readline
- Postfix (still in progress. build libpcre first.)
- I use keylauch and ratpoison under X; keylaunch benefits from
support for additional modifiers, but binding Meta just isn't going to
work, because Mod1Mask is still 1<<3, but the mod1 key changes the
keyboard state by 1<<13 (0x2000).
Other Downloads
- If capslock/ctl bothers you, uControl is on osx.freshmeat.net
- If you use a Palm, you probably want Missing Sync from markspace.com
- If you use a Canon Camera, but it didn't come with tools disk 3.1
or later, find someone with a newer canon camera; 3.1 (and later)
includes PhotoStitch for OS X
- netcat builds with "make generic"
- xtoolwait just builds
-
TuxPaint is a
friendly drawing program which, although described as "for kids", has
surprisingly good use of sound for pseudo-haptic feedback.
Other Tricks
Query the battery:
$ /usr/sbin/ioreg -p IODeviceTree -n "battery" -w 0 | grep IOBatteryInfo
| | | "IOBatteryInfo" = ({"Voltage"=12538,"Flags"=5,"Amperage"=1200,"Capacity"=4149,"Current"=4149})
macosxhints says:
'flags' is usually 0x004 when you're unplugged, 0x005 when you're plugged in, and 0x08_ or 0x09_ when you're low on juice.
- Cut & paste integration: points out, among other things that you can run
pbpaste
to read the mac clipboard from the shell, and pbcopy
to
put something into it. Potentially quite useful, especially when
combined with open
.
-
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &
runs the screensaver on the root...
Development
If this page interested you, This Apple Tech Note will probably also give you useful context.
Panther (10.3)
For Panther, do an archive+install, and "do it all over again". Key
things to know about the upgrade itself:
- when then installer quits, don't try to log in from the login
screen it gives you. (Not sure why it even gives it to you instead of
just rebooting, but maybe
fix_prebinding
is still
running.
- If you've got a dock icon for X11, get rid of it - X11 moved into
/Applications/Utilities
and the old icon will just cause you
pain (thanks shmike
for catching that one.)
- after the basic install, be sure to take the 10.3.2
software-update. Also be sure to install the Xcode Tools disk,
because that gets all of the developer tools, including
/usr/bin/cpp
, without which xrdb
is unhappy. Be
sure to go in and Custom select the X11SDK, too, you'll want it later.
- According to CERN's MacOSX Support list, the key to getting fink emacs working again,
instead of giving you the dreaded
Fatal malloc_jumpstart() error
is to be sure to gcc_select 3.3
and rebuild from source (fink
install
, rather than apt-get install
. This worked for
me, too.
- For openafs, looks like you have to drop the
/afs
symlink
and put a directory there. Don't forget the afsd.options
settings from above.
- emacs builds faster if you install it from
apt
first, you
don't really need to rebuild all the dependent libraries.
Other little panther issues (mostly positive):
- The fastest speech rate in the voice synthesizer is a lot faster;
if you were using that before, you probably want to adjust it back
down.
- There seems to be some typebehind when you do %-TAB application
switching, at least with Terminal.app I've seen a number of command
strokes go to Terminal.app instead of the next application. The
middle-of-screen app-switcher is much nicer, though, and it
fixes the bug where %-H would hide an app but it would still be
the "next" application in the %-TAB ring, yay.
- Under Jaguar, my laptop had developed a problem where it wouldn't
see the RTC at boot, and would be stuck at the unix-epoch (Jan 1969 in
this timezone) until
ntpdate
yanked it into the present.
Panther seems to have fixed this problem.
- Preview.app is now fast, which is particularly nice for
looking at slideshows generated by TeXpower