# Use a machine's window

A running machine with a display opens in its own window, with a toolbar, full screen, and a DVD drive.

## Open a machine's window

Select the machine in the library, then click **Show Window**. Starting a machine opens it too.

Click inside the display to type in the guest, as [Use the keyboard and shortcuts](https://osmates.com/docs/keyboard) explains.

A paused or stopped window says why. Once the cause is gone, click **Resume** or **Start**, or press Return.

## Use the toolbar

To add **Force Stop**, **Restart**, or **Capture Keyboard**, choose **View > Customize Toolbar**.

Actions not in the toolbar are in the Machine and I/O menus. To change the hardware, see [Change a machine's settings](https://osmates.com/docs/settings).

## Resize the window

Drag the window's edge to change the guest's resolution, if the guest supports it. For a fixed size, see [Change the display](https://osmates.com/docs/settings#change-the-display).

To fill the screen, choose **View > Enter Full Screen**. The toolbar stays unless you turn off **View > Always Show Toolbar in Full Screen**. While the keyboard is captured, release it to reach the menu bar and Dock.

When you unplug a display, the window moves to another one and shrinks to fit. The machine keeps its resolution until you resize the window, or takes the new screen's size in full screen.

## Capture the pointer for games

Windows and Linux machines can take the pointer, so a game gets relative motion.

1. Choose **I/O > Capture Pointer**. Your Mac's pointer disappears.
2. To release the pointer and the keyboard, keep the mouse still and press Control-Option.

Control-Command-P releases only the pointer. Switching to another app releases it too.

## Insert a disc

Every machine has a DVD drive. A running machine gets the disc at once, and a stopped one at its next start.

1. In the machine window, choose **I/O > Disc > Insert Disc**.
2. Select an ISO or CDR file, not a symbolic link or Finder alias.

To swap or remove the disc, choose **Change Disc** or **Eject**, in the same menu or the library's **Machine** menu.

| System | The disc appears | Before you click Eject |
|---|---|---|
| Windows | In Explorer's empty DVD drive, within a second | Nothing, but eject in OSMates: Explorer's Eject does nothing while a program locks the drive |
| Linux | As a read-only USB disk you mount | Unmount it in Linux |
| macOS | Under `/Volumes` | Eject it in the guest's Finder, or macOS reports an improperly ejected disk |

If the guest still holds the disc, Eject waits 10 seconds, then offers **Eject Anyway**. A disc on an external volume keeps that volume busy until you eject it.

In Terminal, insert a disc, then eject it. `--force` ejects a disc the guest still holds.

```sh
osmates vm disc insert win ~/Downloads/tools.iso
osmates vm disc eject win
```

In Linux, find the disc's device, then mount it. Mount it again after a resume or a revert.

```sh
osmates vm exec dev -- lsblk -f
osmates vm exec dev -- mount -o ro /dev/sda /mnt
```

A Linux machine without a display that started without a disc must shut down before you insert one. Linux and macOS machines need the image on your Mac's own disk, not an external drive.
