Desktop

Open the Desktop tab in an orb thread to use a high-resolution, interactive Linux desktop environment running in the orb.

Amp knows how to use the Desktop, so you can ask it to do things there while you watch.

This is useful when you want to verify Amp’s work on Linux, Android, and Chrome extension development tasks, or when working with file formats that need to be opened in native applications. You can also try computer use in the orb desktop, but this is early and unsupported. You’ll hear from us when we think orb computer use is really good.

Desktop starts Google Chrome at about:blank when you open it for the first time. You can set a Desktop resume script in Project Settings, or add .agents/desktop/resume to the repository to share the script with everyone who uses the project.

You can click any of the other apps in the Desktop toolbar to open them. Amp installs an app the first time you open it, so the first launch can take longer.

Read the Desktop announcement for more examples.

An Android app running in an emulator in the orb Desktop

Customizing the Environment

Orbs run Debian 12, so you can use apt-get to install graphical apps. See Installing Software for an example and guidance on making the installation available in future orbs.

Launch Behavior

Add a Desktop resume script in the Orb section of Project Settings to replace the default Chrome window with your own startup script. You can also add .agents/desktop/resume to your repository. The repository script takes priority over the Project setting.

To set the project script from the CLI, pass a file when you create or update the project:

amp projects create acme/widgets --desktop-resume-script-file ./desktop-resume.sh
amp projects update acme/widgets --desktop-resume-script-file ./desktop-resume.sh

Amp runs the selected script from the repository root each time the Desktop session starts, so your script should check whether the application is already running to avoid opening it again.

Commands and child processes that you start from the script keep running after the script exits. Run an app in the background if the script should continue or exit while the app remains open.

#!/usr/bin/env bash
set -euo pipefail

sudo -n /opt/amp-desktop/install-app blender
if ! command -v libreoffice >/dev/null; then
  sudo apt-get update
  sudo apt-get install -y libreoffice
fi

if ! pgrep -x blender >/dev/null; then
  blender &
fi
if ! pgrep -x soffice.bin >/dev/null; then
  libreoffice &
fi

If you are testing changes to the script while Desktop is already running, run sudo systemctl restart amp-desktop after each change.

Built-in Apps

Amp can install and configure commonly used Desktop apps. Run sudo -n /opt/amp-desktop/install-app <name> with one of these names:

  • chrome for Google Chrome
  • firefox for Firefox
  • code for Visual Studio Code
  • blender for Blender
  • terminal for the Foot terminal

Games

If you’re curious what Puck does for fun when not helping you, turn on Fun Games in Desktop to add TuxRacer, ioquake3, and LinCity-NG to the Desktop toolbar.