Erco's Mac OSX Page |
OSX from the point of view of a Unix savvy developer who's never owned a Mac before. It's a damned good system.
These comments are all with respect to the 10.0 and 10.1 releases of OSX. I only recently upgraded to Jaguar, so some problems noted below might be fixed in Jaguar.
Work in progress. Last updated 03/26/03.
I'm told you can download the developer stuff for free from http://www.apple.com/developer if you sign up as a free member then log in you should be offered software downloads and the developer CD image is one of them.
But if you buy the OSX cds (a paltry $100.00) you get the full developer environment, aka. the 'developer cd'. On it, among other things you get:
% cc -v Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 19991024 (release) |
Me, I like the good old vi/make way of doing things, which works just fine. However, I noticed if you hit ^Z during a make, it hangs. Also noticed if you hit ^Z in VI bad stuff happens too. This appears to be a bug.
What I found is that you can change around the gui without recompiling. Basically the program loads a 'gui file' (a '.nib' file) at run time, which you can change separately. Interesting, but it means your gui is dependent on there being two files for release; the app itself, and the .nib file.
However, if you are doing low level stuff, like trying to access information about cpu or memory, you'll be interfacing with Mach directly.
You don't need any access codes or anything, they just want to know your name and email, and want you to read their license. They use a CVS oriented repository, along with a web based way to peruse the source, but as I said you have to join first.
You can run things as root via 'sudo', but if you want to login as root, you have to enable the root user first.
Here's some things a Unix admin might want to know about the mac OSX. I'm running OSX 10.1.
If OSX is running and you want to boot into OS9, click on Apple -> System Preferences -> Startup Disk, then select OS9 and restart. The machine will then always boot OS9.
However, if you buy the OSX CDs, the developer CDs come with it (both 10.1 and 10.2/Jaguar), which you can install to get the full on Apple developer environment that has the command line C and C++ compiler, as well as 'Objective C', and a complete GUI developer environment. Not to mention indispensible tools (like /Developer/Tools/CpMac & MvMac). The OSX 10.1.x cd's only cost ~$100USD (10.2.x/Jaguar is ~$120), and all stores that sell Apple hardware or software seem to carry it, so it's worth it.
I'm told you can download the developer stuff for free from http://www.apple.com/developer if you sign up as a free member then log in you should be offered software downloads and the Developer CD image is one of them.
Although the core(5) man page in 10.1.x disagrees, this is actually where they go.
# /etc/exports /net mymac(rw,no_root_squash,insecure) |
2) You can see my administration log notes for the NFS tweak, and various other OSX installation notes.
Command-V -- hold down during boot to get verbose console Command-S -- single user mode (command line interface as root, no password by default! That's bad!) Command-X -- boot UMA Macintoshes into Mac OS X
2) Click on the button with the lock and enter your password to authenticate yourself.
3) In the menu choose "Domain -> Security -> Authenticate" then "Domain -> Security -> Enable Root User". You will now be prompted to enter a password for the user root.
4) You are now able to login as user root with your new password.
If you have trouble, don't ask me. Go on the net and look around for yourself. A good place to look is to search the usenet newsgroups.
I've found that in a pinch, you can hack mount commands directly into the /System/Library/StartupItems/Network/Network script. Just be sure the mount commands appear after the network is up, and is resolving hostnames correctly, and/or use IP addresses when specifying hostnames, so the machine doesn't hang while trying to resolve a mount's hostname.
Jaguar Note: I'm told the Jaguar release now has a text comment in the /etc/fstab indicating the file is more or less obsolete.
In the case of getting rsh(1) and rcp(1) to work for root, you can just 'echo + > ~root/.rhosts; chmod 600 ~root/.rhosts' to open up rsh to allow all other machines to access it without asking for a password. Or, in place of '+', use a list of hostnames or ip addresses, one per line.
*** OSX 10.3 NOTE: Be sure to disable the firewall in System Preferences|Sharing|Firewall, or make the appropriate holes for the protocol in question AND for "ident" port 113.
[fuzz:~] erco% strings foo.exe strings: file: foo.exe is not an object file [fuzz:~] erco% file foo.exe what kind of file causes this problem? foo.exe: MS-DOS executable (EXE), OS/2 or Windows [fuzz:~] erco% uname -a what rev of the OS? Darwin fezzik 5.5 Darwin Kernel Version 5.5: [..] [fuzz:~] erco% man strings no man page either? man: no entry for strings in the manual. |
..stuff like that scares me. /All/ the unix command line tools should have man pages. (grr..) It would appear some man pages are missing when the Developer kit isn't installed.
(I'm told that this may have been rectified in Jaguar. -erco 03/26/03)
Apple actually responded on this one, recommending 'niutil', a command line way to access the NetInfo database.