Mac OS X
Text

Mac OS X

The Mac OS X app is a second Mac in a window: an emulated Power Mac G4 running Mac OS X 10.4 Tiger, with a 100 GB hard disk of its own. The Mac OS 9 app keeps the classic system. This one is the system that came after it: Aqua and the Dock, Spotlight and Dashboard, a Unix underneath, and Xcode 2 on the disc it installs from.

What it is for

  • Run PowerPC Mac OS X software. Mount a CD or DVD image and install what is on it in the system it was written for.
  • Build for it. The install DVD carries Xcode 2, and Tiger has a Terminal and, if you choose it at installation, X11.
  • A Mac that stays as you left it. What you install and save is kept on its hard disk, on this node. Closing the window leaves the Mac running, and opening it again returns to the same Mac.
  • A Mac on the network. Once installed it reaches the internet through this machine.

It is a PowerPC Mac, emulated in software by the same emulator as the Mac OS 9 app's, and it needs no hypervisor. The two Macs are separate machines and can run at the same time.

What it needs

  • An emulator. The same one as Mac OS 9 uses: the two apps share it, and whichever is set up first fetches it.
  • Room on this node. The install DVD is a 2.6 GiB download. The hard disk says 100 GB to the Mac and takes only what the Mac has written: 3 to 5 GB after installation.
  • Memory. The Mac has 1 GB, taken from this machine while it runs.

Set it up the first time

  1. Choose Special → Mac OS X; it is also among the built-in apps. The first launch shows each setup step: preparing the emulator, downloading Apple's Tiger install DVD from the Internet Archive, checking its checksum, creating the hard disk, and starting the Mac from the DVD.
  2. When the Mac's screen appears, follow the guide the app shows above it. Choose a language, then Utilities → Disk Utility… in the Mac's own menu bar. Select 100.0 GB QEMU HARDDISK, open the Erase tab, name the disk, click Erase and confirm. Quit Disk Utility.
  3. In the Installer click Continue, agree to the license, select the new disk, click Continue, then Install. Customize on that last page leaves out what you do not want (the printer drivers are a third of it) and adds X11.
  4. Copying takes ten minutes to a quarter of an hour on a fast machine and longer on a slow one. At its end the Installer restarts the Mac, which closes the screen. Click Installation finished — start my Mac.
  5. The Mac starts from its hard disk into Tiger's Setup Assistant, which asks for a country, a keyboard layout and the name and password of your account. ⌘ Q on its registration page, then Skip, goes straight to the account.

Subsequent launches use the saved installation: opening the app starts the Mac from its disk. Pausing and resuming setup work as in the Mac OS 9 app.

The window

The Mac OS X window: Tiger's desktop with About This Mac open and the install DVD mounted, and the app's own buttons above it

The window is the Mac OS 9 app's, around another Mac: the same row of buttons, the same status line, the same CD dialog and the same Full screen. Mac OS 9 describes them. What differs:

  • The display is 1024×768. The window fits it to whole screen pixels, as it does for Mac OS 9.
  • Mac keys… sends ⌘ Q to quit, ⌘ W to close, ⌘ Tab for the next application, ⌘ Space for Spotlight and ⌥ ⌘ Esc to force an application to quit: the keys your own computer keeps for itself.
  • The pointer is where your browser's pointer is, as in Mac OS 9, from the Installer's first screen on. Mac OS X drives it itself, with nothing loaded into the Mac, and the mouse wheel scrolls. Tiger as installed puts the arrow on the very pixel. Once updated (10.4.11), its driver leaves the edges of a tablet's range unused; the window sees where the arrow lands, allows for it within a few moves of the pointer, and from then on the arrow is within a pixel of yours.
  • CD… takes images up to 9 GiB, so a dual-layer DVD fits. The Mac starts with its drive empty: the install DVD stays in the list, to mount when you want Xcode from it.
  • Sound needs the same optional audio runtime as Mac OS 9's, and the one installation serves both Macs. With it, Sound off turns Tiger's sound on in your browser.

Restart, shut down and sleep

Restart in the Mac's Apple menu brings it back by itself. Shut Down there saves its files and ends the Mac; Start Mac starts it again.

A fresh Tiger puts the Mac to sleep after ten idle minutes, and its screen turns black. Mac keys… → Wake display, or Shift with the Mac focused, wakes it. To keep it awake, set both sliders in System Preferences → Energy Saver to Never, or run sudo pmset -a sleep 0 displaysleep 0 disksleep 0 in Terminal.

Turn Tiger's screen saver off as well, under System Preferences → Desktop & Screen Saver: with no graphics card to draw it, it keeps a whole processor core of this machine busy for as long as it shows.

A shell and screen sharing from this machine

While the Mac runs, two of Tiger's Sharing services can be reached from this machine, and from no other. They are a second way in, for you and for an agent, that does not pass through the emulated keyboard and pointer: commands as text, and the Mac's own screen sharing.

  • Remote Login is a shell. Turn it on in the Mac's System Preferences → Sharing, then connect to 127.0.0.1 on the port that Setup details shows.
  • Apple Remote Desktop, with VNC viewers may control screen with password set under its Access Privileges…, shows the Mac's screen to a VNC viewer at 127.0.0.1 on the other port.

Tiger's SSH server is from 2004. A current ssh refuses it ("no matching key exchange method") until it is told to allow what that server speaks:

ssh -p <port> -l <account> -o KexAlgorithms=+diffie-hellman-group1-sha1 \
    -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa \
    127.0.0.1

The two ports are in the daemon's status as well (GET /v1/macosx, ports), and they stay the same from one start to the next while they are free. Nothing answers on them until the service is on in the Mac. Every program on this machine can reach them, so there it is the account's password that guards the Mac.

An agent on the Mac

Press Agent in the Mac OS X window and a Chat opens pinned to the Mac, the way a VM window's Run Agent pins one to its VM: ask it for things in words — "what is in /Applications?", "build Hello in Xcode and run it", "put the picture I painted on the desktop" — and it works inside the Mac over Remote Login while you watch the screen in the window beside it. Its tools are the shell, reading, writing and editing files, and upload, which copies a file of the Workspace into the Mac, a picture included. It knows what Tiger's 2005 tools lack, keeps a memory of the Mac between chats, and never restarts or shuts the Mac down unasked.

It needs a way in, once: in Setup details, enter the Mac account to work as (the short name in Tiger's Accounts pane), and paste the line shown there into Terminal on the Mac, signed in as that account. The line authorizes a key exe made for this Mac — an RSA key, since Tiger's SSH server knows no newer kind — and Remote Login has to be on in the Mac's Sharing pane. A chat with the Mac fails with the reason while any of this is missing.

Clock and network

The Mac's clock starts at today's date and time, and Tiger shows it in the time zone you choose in the Setup Assistant.

The installed Mac has an Ethernet adapter with outbound NAT and DHCP, over IPv4 only; networking is off while the Installer runs. Tiger's Safari is too old for most of today's HTTPS sites, though the network itself works: plain HTTP does.

Where it is kept

The installer, setup progress and disk live in ~/.exe/mac-osx/ (or $EXE_HOME/mac-osx/), outside app-data sync: the Mac belongs to this node and is not copied to joined ones. The emulator is the one in ~/.exe/mac-os9/runtime.

The API is the Mac OS 9 app's under another name: GET /v1/macosx, POST /v1/macosx/start, /cancel and /finish, the binary WebSocket at /v1/macosx/console, and for the drive GET and POST /v1/macosx/cd and POST /v1/macosx/cd/upload.

Contents