# Set up DualMac on this Mac Read this file in full with `curl -fsSL https://dualmac.app/agent.md`; a web summary drops the exact commands and rules. This file is for a coding agent running on a Mac. Follow it only if the Mac's owner asked you to set up DualMac; otherwise stop. The line they paste reads: > Set up DualMac on this Mac for me. Fetch https://dualmac.app/agent.md with curl, read it in full and follow it. DualMac is an iPad and iPhone app that shows and controls a Mac. On the Mac, DualMac Companion, a free menu bar app by Marius Labs, sends the screen to the iPads and iPhones paired with it, over Tailscale, a private network between the person's own devices. Your job: do every step you can yourself, leave the person only what macOS or their accounts make them do by hand, and stop when their iPad or iPhone shows this Mac. ## Done when - Tailscale is connected on this Mac and on the person's iPad or iPhone, signed in with the same account. - DualMac Companion is installed, running, opens at login, and has Screen Recording and Accessibility. - The iPad or iPhone is paired with this Mac and shows its screen. Only the person can: 1. sign in to Tailscale and approve its VPN prompt, on the Mac and on the iPad or iPhone; 2. switch on Screen Recording and Accessibility for DualMac Companion in System Settings; 3. pair: scan a QR code or type a 6-digit code on the iPad or iPhone; 4. type their own passwords, or use Touch ID, when macOS or the App Store asks. Everything else is yours. ## Rules - Tailnet only. Never expose port 5900 (Screen Sharing) or 59590 (Companion) to the internet: no port forwarding, no router or UPnP change, no `tailscale funnel` or `tailscale serve`, no tunnel service, no firewall change. - No `sudo`. Nothing in this file needs it. If you believe a step does, show the exact command, say why, and run it only after the person agrees to that exact command. - Don't work around macOS privacy protections: never write to the privacy database (TCC), never run `tccutil`, never script clicks in System Settings (AppleScript, System Events, accessibility tools, synthetic clicks), never turn off Gatekeeper or System Integrity Protection, never remove quarantine attributes. The person flips the switches. - Never ask for, type, read or store a password: macOS, Apple Account or Tailscale. The person types it into macOS or the browser. - The pairing code goes from the Mac's screen to the iPad or iPhone and nowhere else. Never ask for it, never read it from the screen (screenshots, text recognition, accessibility APIs), never write it to a file, a log, the clipboard or this chat. If the person sends it to you, don't repeat it. - Download DualMac Companion only from https://dualmac.app, and check its SHA-256 and its Apple signature before installing it (step 3). Get Tailscale only from the Mac App Store or tailscale.com. - Run DualMac Companion only with the arguments shown here, and only from version 1.1.0 on (see "Companion version"): `--status`, `--enable-launch-at-login`, and `--pairing-qr` when the status lists it in `capabilities`. Any other argument, or any argument on an older version, can start a second copy of the app. - Change nothing else: no other setting, no app removed or replaced, no shell profile edited. - If what you see doesn't match this file, or you're unsure, stop, explain in plain words, and ask. - If your sandbox blocks a command (network, writing to /Applications, opening apps), ask the person to approve that command. Don't look for a way around the sandbox. ## How to work Each step below follows the same loop: 1. Check the current state with the commands given. If the step is already done, say so in a few words and move on. 2. Fix what you can yourself. 3. If a human gesture is left, tell the person exactly that one gesture: where to click and what they will see. 4. Check again by yourself every 5 seconds until the state changes. Start the polling command in the same turn as your message to the person: don't end your turn while a gesture is pending, and don't ask "done?". Keep each polling command under 2 minutes, then run it again: `for i in $(seq 24); do && break; sleep 5; done`. After 5 minutes without change, ask whether they're stuck and use "If something goes wrong". Talking to the person: - Use their language: the language of their message, otherwise the Mac's first language (`defaults read -g AppleLanguages`). - Plain words, one step at a time, only what's missing. No commands, JSON or file names unless they ask. - macOS names some settings differently across versions and languages. Screen Recording can read "Screen & System Audio Recording", and Accessibility can read "Device Control and Data Access" on recent versions. Open the panes with the links given here instead of describing menus. - This Mac appears in DualMac under its computer name: `scutil --get ComputerName`. ## Commands you'll reuse ### Tailscale The Tailscale app, from the Mac App Store or from tailscale.com, includes the `tailscale` command. Summary of the Tailscale network (`jq` is built into recent macOS versions; if it's missing, read the JSON of `"$TS" status --json` yourself): ```sh TS=/Applications/Tailscale.app/Contents/MacOS/Tailscale [ -x "$TS" ] || TS="$(command -v tailscale)" echo "${TS:-Tailscale not installed}" [ -n "$TS" ] && "$TS" status --json | jq '.Self.UserID as $me | { state: .BackendState, tun: .TUN, account: .User[($me | tostring)].LoginName, thisMac: {ip: .Self.TailscaleIPs[0], online: .Self.Online}, devices: [(.Peer // {})[] | select(.UserID == $me) | {name: (.DNSName | split(".")[0]), os: .OS, ip: .TailscaleIPs[0], online: .Online}] }' ``` - `state`: `Running` when connected, `NeedsLogin` when not signed in, `Stopped` when switched off, `Starting` while it connects (wait). `NeedsMachineAuth` means an administrator of that Tailscale network must approve this Mac first: tell the person. If the command fails, the Tailscale app isn't running. - `tun` must be `true`: the Companion needs Tailscale's network interface. `false` means Tailscale runs here without one: see step 1. - `account`: the Tailscale account this Mac is signed in with. `devices` lists only the devices of that account. - In `devices`, `os: "iOS"` is an iPhone or an iPad (`name` usually tells which; iOS devices all report `localhost` as host name, so go by `name`), `os: "macOS"` is another Mac. ### Companion version Read it before passing the Companion any argument: ```sh V="$(defaults read /Applications/DualMacCompanion.app/Contents/Info CFBundleShortVersionString)" echo "$V" | awk -F. '{print ($1 > 1 || ($1 == 1 && $2 >= 1)) ? "status ok" : "too old"}' ``` `too old` (before 1.1.0): that version doesn't know `--status` and starts a second copy instead. Pass it no argument at all. Ask the person to update it from its menu (menu bar icon, then Check for updates…), opening it first with `open -a /Applications/DualMacCompanion.app` if `pgrep` finds nothing, then read the version again. ### Companion status Run the Companion through `open`, never by calling its binary from your shell: called directly, macOS reports your terminal's permissions instead of the Companion's. ```sh APP=/Applications/DualMacCompanion.app F="$(mktemp)" open -n -g -a "$APP" --stdout "$F" --stderr /dev/null --args --status for i in $(seq 25); do [ -s "$F" ] && break; sleep 1; done cat "$F" ``` Every command you run costs the person several seconds before it even starts, so don't check step by step: where this file gives one command that waits for several things in a row, run that one command. The output is one line of JSON and never contains the pairing code. Judge by that JSON only, never by the exit code of `open`. Still empty after 25 seconds: the Companion didn't answer; check its version, then "If something goes wrong". - `error`: present only when the command failed. Explain it in plain words, with `message` if there is one. After `--enable-launch-at-login`, it is the reason macOS gave. - `screenRecording`, `accessibility`: `granted` or `required`, as macOS has recorded them for the app. - `launchAtLogin`: `Enabled`, `Disabled`, `Permission required in System Settings` or `Installed application not found`. - `serviceEnabled`: `false` when the person switched off "Allow connections" ("Private Service" in older versions) in the Companion menu. - `port`: the Companion's port, 59590 unless the person changed it. - `tailnetAddress`: the address an iPad uses to reach this Mac, or `unavailable` when Tailscale isn't connected. - `pairedClientCount`: number of iPads and iPhones paired so far. - A recent Companion may add `version`, `capabilities` (a list), `streamingClientCount` (devices showing the screen right now), `lastStreamStartedAt` (when a device last started showing it), `screenSharingEnabled`, and `restartPending` (`true` while the running Companion is about to restart by itself, see step 5). Use these when present, never require them, and never infer them from a version number. Is the Companion running: `pgrep -u "$(id -u)" -x DualMacCompanion` prints a process number when it is. ### Ports and connections No administrator rights needed: ```sh netstat -an -p tcp | awk '$4 ~ /\.(5900|59590)$/' ``` `LISTEN` on 59590: the Companion is reachable on the tailnet. `LISTEN` on 5900: Screen Sharing is on. `ESTABLISHED`: a device is connected right now. ## 0. Look before changing anything Read, change nothing: - `sw_vers -productVersion`: the Companion needs macOS 14 or later. On an older macOS, go to "Screen Sharing instead of the Companion". - The Tailscale summary. - `ls -d /Applications/DualMacCompanion.app ~/Applications/DualMacCompanion.app 2>/dev/null`. If the app is in `~/Applications`, use that path everywhere instead of `/Applications`. If it is installed: its version first, then `pgrep -u "$(id -u)" -x DualMacCompanion`, then the status if the version allows it. - Note `pairedClientCount` now: step 6 compares against it. Tell the person in two or three lines what's ready and what's left, then start with the first step that isn't done. ## 1. Tailscale on this Mac Done when `state` is `Running`, `tun` is `true` and `thisMac.online` is `true`. - No Tailscale app: open its Mac App Store page with `open "macappstore://apps.apple.com/app/id1475387142"`. Ask the person to click Get, then Install; the App Store may ask for their Apple Account password or Touch ID. Check every 5 seconds for `/Applications/Tailscale.app`. If they don't use the App Store, open `https://tailscale.com/download/mac` instead and let them run that installer; that version also asks them to allow a system extension in System Settings. - Installed but the summary command fails: `open -a Tailscale`. - First launch, or `NeedsLogin`: Tailscale asks to allow its VPN configuration (the person clicks Allow, and may confirm with their password or Touch ID), then to log in in the browser. Tell them to use the account they use, or will use, on their iPad or iPhone. - `Stopped`: ask them to switch Tailscale on from its menu bar icon. - `tun` is `false`: Tailscale runs here without its network interface, as some command-line installs do, and the Companion can't use that. Explain it and suggest the Tailscale app. Don't stop, remove or replace the existing Tailscale without the person's agreement. ## 2. Tailscale and DualMac on the iPad or iPhone Done when `devices` contains an `iOS` entry with `online: true`, and the person has DualMac on that device. - Tell them what you see, by `name`, for example: "On your Tailscale network: this Mac, example-mac (offline), ipad (online)." - No `iOS` device online: ask them to install Tailscale from the App Store on the iPad or iPhone, sign in with the same account as this Mac (give them `account` from the summary) and switch it on. - Several: ask which one they will use, by name. - DualMac, if it isn't on the device yet: https://apps.apple.com/app/dualmac-vnc-remote-desktop/id6807388587 ## 3. Install DualMac Companion Done when `/Applications/DualMacCompanion.app` exists and `spctl -a -vv /Applications/DualMacCompanion.app 2>&1` prints `accepted`, `source=Notarized Developer ID` and `origin=Developer ID Application: MARIUS LABS (54DYVSZCG7)`. If it is already installed, run that check. If it passes, keep the app: don't reinstall or replace it; it updates itself from its menu (Check for updates…). If it fails, stop and tell the person (it may be a test build); don't replace it without their agreement. Find the current download and its checksum on the official page: ```sh PAGE="$(curl -fsSL https://dualmac.app/companion)" DMG_PATH="$(printf '%s' "$PAGE" | grep -oE '/downloads/DualMacCompanion-[0-9]+\.[0-9]+\.[0-9]+-[0-9]+\.dmg' | head -n 1)" SHA="$(printf '%s' "$PAGE" | grep -oE 'SHA-256: [0-9a-f]{64}' | grep -oE '[0-9a-f]{64}' | head -n 1)" echo "$DMG_PATH $SHA" ``` Both values must be present. Download and check: ```sh DMG="${TMPDIR:-/tmp}/DualMacCompanion.dmg" curl -fL --proto '=https' -o "$DMG" "https://dualmac.app$DMG_PATH" [ "$(shasum -a 256 "$DMG" | awk '{print $1}')" = "$SHA" ] && echo "SHA-256 OK" spctl -a -t open --context context:primary-signature -vv "$DMG" 2>&1 ``` Expected: `SHA-256 OK`, then `accepted`, `source=Notarized Developer ID` and `origin=Developer ID Application: MARIUS LABS (54DYVSZCG7)`. Anything else: stop, don't open the file, tell the person. Copy the app into Applications: ```sh MNT="$(mktemp -d)" hdiutil attach -nobrowse -readonly -mountpoint "$MNT" "$DMG" ditto "$MNT/DualMacCompanion.app" /Applications/DualMacCompanion.app hdiutil detach "$MNT" spctl -a -vv /Applications/DualMacCompanion.app 2>&1 ``` Recent macOS versions warn that `hdiutil attach` is deprecated; it still works. The last command must print the same three lines as above. If `ditto` fails with a permission error (the account isn't an administrator), don't use `sudo`: run `open "$DMG"` and ask the person to drag DualMacCompanion to Applications; macOS will ask for an administrator's name and password. ## 4. Start the Companion and open it at login Done when `pgrep -u "$(id -u)" -x DualMacCompanion` finds it, `launchAtLogin` is `Enabled`, `serviceEnabled` is `true`, `tailnetAddress` is a 100.x address and port 59590 shows `LISTEN`. - Not running: `open -a /Applications/DualMacCompanion.app`. The first launch shows a "Welcome to DualMac Companion" window: ask the person to leave it open, the next steps use it. It lists the two permissions; once both are allowed it shows a "Show pairing code" button and no code. Ask the person not to click it: the QR code and the 6-digit code appear together in that window when you ask for them in step 6. If macOS asks whether the Companion may find devices on the local network, Allow lets iPads on the same Wi-Fi find this Mac by themselves; it isn't needed over Tailscale. - Read the status before anything else: the Companion usually switches on opening at login by itself on first launch. Only if `launchAtLogin` isn't `Enabled`: run the status command with `--enable-launch-at-login` in place of `--status`. If the JSON then has `error`, or `launchAtLogin` reads `Permission required in System Settings`, run `open "x-apple.systempreferences:com.apple.LoginItems-Settings.extension"` and ask the person to allow DualMac Companion there. The welcome window's "Open DualMac Companion at login" checkbox does the same when the window closes: tell them to keep it checked. - `Installed application not found`: the app isn't in Applications; go back to step 3. - `serviceEnabled` is `false`: ask them to switch on Allow connections (Private Service in older versions) in the Companion menu (its icon in the menu bar). - `tailnetAddress` is `unavailable`: go back to step 1. ## 5. Screen Recording and Accessibility Done when the status reads `granted` for both, and the Companion that runs was started after Screen Recording was switched on. If either reads `required`: 1. Ask the person to click Allow… next to Screen Recording in the "Welcome to DualMac Companion" window. macOS shows a prompt: they click Open System Settings in it, switch on DualMac Companion and confirm with their password or Touch ID. The window then opens Accessibility by itself: they switch on DualMac Companion there too. If the welcome window is closed: the Companion's menu bar icon, then Allow… next to each permission, under Finish setup (Allow, in older versions). 2. If System Settings doesn't open, open the pane for them: - Screen Recording: `open "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"` - Accessibility: `open "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility"` If DualMac Companion isn't in the list, they click + under it and choose DualMacCompanion in Applications. 3. Right after telling them, in the same turn, run the waiting command below. Don't check the status step by step. If `capabilities` contains both `self-restart` and `pairing-qr`, this one command waits for both permissions, then for the Companion's own restart, then shows the QR code of step 6. It ends in under 2 minutes; if it prints no `"window":"shown"`, read the status it prints and run it again: ```sh APP=/Applications/DualMacCompanion.app; U="$(id -u)" run() { F="$(mktemp)"; open -n -g -a "$APP" --stdout "$F" --stderr /dev/null --args "$1"; for i in $(seq 50); do [ -s "$F" ] && break; sleep 0.2; done; cat "$F"; } for n in $(seq 70); do S="$(run --status)" if echo "$S" | grep -q '"screenRecording":"granted"' && echo "$S" | grep -q '"accessibility":"granted"' \ && ! echo "$S" | grep -q restartPending && pgrep -u "$U" -x DualMacCompanion >/dev/null; then Q="$(run --pairing-qr)"; echo "$Q" | grep -q '"window"' && { echo "$Q"; break; } fi sleep 1 done echo "$S" ``` With `"window":"shown"`, the QR code is on the Mac's screen: go straight to the person's part of step 6. Without those capabilities, check the status every 5 seconds until both read `granted`. After Screen Recording, macOS may offer "Quit & Reopen": clicking it is fine, the welcome window comes back and carries on with Accessibility. The status reads what macOS has recorded, so it can say `granted` while the running Companion, started before the switch, still lacks Screen Recording. What happens next depends on `capabilities`: - With `self-restart`: the Companion closes System Settings and restarts by itself a few seconds after both are switched on. Tell the person the window will blink once. The waiting command above covers it: it only shows the QR code once `restartPending` is gone and `pgrep` finds the Companion again. If `restartPending` is still `true` after 30 seconds, restart it yourself as below. - Without it: restart it once yourself, before pairing. Tell the person first, and ask them not to type any pairing code until it has restarted: the code lives in the running Companion and stops working. To restart it yourself, first make sure no device is using this Mac through the Companion (put the status's `port` in place of 59590 if it differs): ```sh netstat -an -p tcp | awk '$4 ~ /\.59590$/ && $6 == "ESTABLISHED"' ``` If that prints a line, a device is connected: wait until it prints nothing, or ask the person. Then: ```sh APP=/Applications/DualMacCompanion.app; U="$(id -u)" pkill -u "$U" -x DualMacCompanion for i in $(seq 5); do pgrep -u "$U" -x DualMacCompanion >/dev/null || break; sleep 1; done if pgrep -u "$U" -x DualMacCompanion >/dev/null; then echo "still running"; else open -a "$APP"; fi ``` `still running` after 5 seconds: stop there, don't force it (no `kill -9`). Explain it, and ask the person to quit the Companion from its menu (Quit), then open it again. ## 6. Pair the iPad or iPhone Done when `pairedClientCount` is higher than in step 0, or when the device shows this Mac (step 7). A device that was paired with this Mac before and pairs again replaces its old entry, so the count doesn't go up: then step 7 is the proof. If `pairedClientCount` was already 1 or more, first ask whether their device already shows this Mac in DualMac. If yes, go to step 7. With a device already paired, the Companion shows no code by itself: the person opens one with New code in its menu, or you show the QR code. ### With a QR code, only if `capabilities` contains `pairing-qr` If the waiting command of step 5 already printed `"window":"shown"`, the QR code is on screen: skip to what the person does, below. `--pairing-qr` doesn't start the Companion: if `pgrep` finds nothing, run `open -a /Applications/DualMacCompanion.app` and wait until `pgrep` finds it. Then run the status command with `--pairing-qr` in place of `--status`. Success reads `{"expiresInSeconds":300,"window":"shown"}` (any value from 90 to 300), without the code, and a window on the Mac shows a QR code and the 6-digit code: the welcome window itself while no device is paired, brought to the front, otherwise a small "Pair your iPad or iPhone" window. With `self-restart` and no device paired yet, the welcome window shows no code after step 5: the command puts the QR code and the 6-digit code in it and brings the window above your terminal. Ask the person to point the iPad's or iPhone's Camera at the QR code and tap the DualMac banner. DualMac asks "Pair with ?", after Face ID or Touch ID if the app is locked: they tap Pair, and DualMac adds this Mac, pairs and opens it. If DualMac says Tailscale is off on the device, go back to step 2. When the code expires, run the command again. If DualMac shows an "Invalid DualMac link" alert saying the action pair is not supported (in the device's language), the app on the device is too old for QR codes: they update DualMac from the App Store on the device and scan again, or type the 6-digit code shown in the same window, as below. If the JSON has `error`: | `error` | What to do | |---|---| | `notRunning` | Open the Companion, wait for `pgrep`, run the command again. If it was already running, that copy predates an update: restart it (end of step 5) | | `outdatedInstance` | The running copy predates an update: restart it (end of step 5), then run the command again | | `serviceOff` | Ask them to switch on Allow connections (Private Service in older versions) in the Companion menu, then run the command again | | `tailscaleRequired` | Step 1 | | `permissionsRequired` | No device is paired yet and a permission is missing: finish step 5, then run the command again | | `rateLimited` | Too many wrong codes: wait `retryAfterSeconds` (or a few minutes), then try once more. Never retry in a loop | | `starting`, `noAnswer` | The Companion is still starting: wait a few seconds and run the command once more | | `unknownOption`, or anything else | Explain `message` and use the 6-digit code instead | Never call `--pairing-qr` if `capabilities` is missing or doesn't contain it: on those versions it starts a second copy of the app. ### With the 6-digit code While no device is paired yet and both permissions are allowed, the welcome window shows the code after `--pairing-qr`, or when the person clicks "Show pairing code" in it. Otherwise: the Companion's menu bar icon, then New code. A code lasts 5 minutes; New code makes a fresh one. Ask the person, in DualMac on the iPad or iPhone: 1. If this Mac appears with "Pair with 6‑digit code" or Connect, tap it. 2. If it doesn't appear: tap + at the top (Add a Mac by address), type this Mac's Tailscale address, then tap Save without connecting (at the bottom of Advanced options; in DualMac 1.4.1 and earlier, right under the address), then "Pair with 6‑digit code" on its card. Give them the address yourself: `tailnetAddress` from the status, for example 100.64.0.1. 3. Type the code shown on the Mac. Right after telling the person what to do, with the QR code or with the 6-digit code, run this one command. It ends as soon as a device is paired or shows this Mac's screen, or after 90 seconds; put `pairedClientCount` from step 0 in place of 0: ```sh APP=/Applications/DualMacCompanion.app; P0=0 run() { F="$(mktemp)"; open -n -g -a "$APP" --stdout "$F" --stderr /dev/null --args "$1"; for i in $(seq 50); do [ -s "$F" ] && break; sleep 0.2; done; cat "$F"; } for n in $(seq 60); do S="$(run --status)" P="$(echo "$S" | sed -n 's/.*"pairedClientCount":\([0-9]*\).*/\1/p')" { [ "${P:-0}" -gt "$P0" ] || echo "$S" | grep -qE '"streamingClientCount":[1-9]'; } && break sleep 1 done echo "$S" ``` A `streamingClientCount` above 0 is already the proof of step 7, even if `pairedClientCount` didn't move. Nothing after 90 seconds: run it again, and when the code has expired show a new one first. After a successful pairing, the welcome window, or the QR window, closes by itself. ## 7. Check that the device shows the Mac - If the status has `streamingClientCount`: ask the person to tap this Mac in DualMac if it isn't open yet, then check every 5 seconds until `streamingClientCount` is above 0 (`lastStreamStartedAt`, if present, also moves to that moment). That is the proof. - Otherwise: ask them to tap this Mac in DualMac, check that port 59590 shows an `ESTABLISHED` connection, then ask whether they see this Mac's screen. Their yes is the proof. - If DualMac says it's waiting for Screen Recording on the Mac, or the Companion menu still asks for a permission while the status reads `granted` (Setup required at the top and a Finish setup group; Required next to the permission in older versions): restart the Companion (end of step 5). If System Settings is still open on the privacy pane you sent the person to, and `capabilities` lacks `self-restart`, tell them they can close it. Then stop, and tell them in two lines what is set up. The Companion opens at login, so the Mac stays reachable whenever it is awake and logged in. ## 8. Other Macs From the summary, name the other Macs (`os: "macOS"`), online or not. Offer to set each one up the same way: "To add example-mac too, paste this line in a coding agent on that Mac: Set up DualMac on this Mac for me. Fetch https://dualmac.app/agent.md with curl, read it in full and follow it." Don't try to reach other Macs from here. Each Mac pairs separately with each iPad or iPhone. ## Screen Sharing instead of the Companion Use this when the person prefers not to install the Companion, when the Mac runs macOS 13 or older, or as a complement for the login window and after a restart, where the Companion isn't running yet. DualMac then uses macOS Screen Sharing (VNC) over Tailscale. Steps 1 and 2 still apply. 1. Check: `LISTEN` on 5900 in the ports command, or `screenSharingEnabled` if the Companion status has it. 2. If it's off: `open "x-apple.systempreferences:com.apple.preferences.sharing?Services_ScreenSharing"` and ask the person to switch on Screen Sharing. Don't switch it on from the command line (no `launchctl`, `kickstart` or `defaults`). If the switch is greyed out because Remote Management is on, don't change anything: check port 5900 first, it is often already open. 3. In DualMac on the iPad or iPhone: + at the top, this Mac's Tailscale address (`thisMac.ip` from the summary), Connect, then the Mac account's name and password, typed by the person on the device. You may tell them the account name (`id -un`); never ask for the password. 4. Proof: an `ESTABLISHED` connection on port 5900, then the person confirms they see the screen. ## If something goes wrong | What the person sees | Check | What to do | |---|---|---| | "Code expired" or "The pairing code is incorrect" on the device | The Companion menu | New code in the Companion menu, then Try again on the device. After several wrong codes DualMac asks to wait: wait, don't retry in a loop | | The device never appears in `devices` although its Tailscale app says it's connected | `account` in the summary, and the account shown in Tailscale on the device | Different accounts: on the device, sign out of Tailscale and sign in with the same account as this Mac | | It worked, then the device can't reach the Mac | Mac asleep, or Companion not running (`pgrep`) | Wake the Mac; `open -a /Applications/DualMacCompanion.app` | | A Companion command never answers, or a second Companion icon appears in the menu bar | A version before 1.1.0, or an argument this version doesn't know, started a second copy | Restart the Companion as at the end of step 5 (it quits both copies); then only the arguments its version allows | If none of this matches, stop and describe what you see to the person. Support: support@dualmac.app