Browser and desktop
Every VM on the default image has Chrome and a Linux desktop on display :1; you can drive Chrome headless from a program or open the same screen to watch or take over. When the VM sleeps, a running desktop or browser keeps it in memory instead of on disk; stop it when you are done.
The samples use a VM named browser. VMs shows how to create it.
Open the desktop
Section titled “Open the desktop”Port 6080 serves the desktop’s noVNC page. The first visit starts a 1280x800 screen with the Openbox window manager; nothing of it runs before that visit.
- Open the dashboard.
- Select
browserin the list. - Select Desktop. The first visit starts the desktop in a new tab.
si svm desktop browserhttps://6080-6f1c0f0e8a.slashinfra.dev/vnc.html?autoconnect=1&resize=remoteOpen the address.
A member of the organization signs in once, and the browser keeps the session for 24 hours or until sign-out. Port 6080 follows the access levels of Web addresses. By default it is authenticated without a port row, so it does not appear in si port ls: members reach it, and a link for port 6080 admits anyone you share it with.
Every command in the VM sees DISPLAY=:1. While the desktop runs, a headed program such as google-chrome --no-sandbox appears on this screen, and so do xterm, xdotool and xclip. desktop screenshot writes a PNG of the screen, and desktop stop ends the desktop.
To choose another size, stop the desktop and start it with a width and height:
si exec browser -- desktop stopsi exec browser -- desktop start 1920x1080desktop: stoppedDesktop: https://6080-6f1c0f0e8a.slashinfra.dev/vnc.html?autoconnect=1&resize=remote DISPLAY=:1; VNC on 127.0.0.1:5900Run a headless browser
Section titled “Run a headless browser”A headless browser uses no desktop. The image installs Chrome, Playwright with Chromium, the Playwright CLI and the Playwright MCP server. Use the Playwright library in your own Node program, playwright-cli for a shell, browser cdp for a client that speaks the DevTools protocol, or browser mcp for a client without a shell. si exec browser -- playwright-cli open https://example.com opens a page from a shell, and si exec browser -- playwright-cli snapshot prints it with refs to click.
A Node program finds the global Playwright package with NODE_PATH=/usr/local/lib/node_modules. This program opens a page and writes a screenshot:
si exec browser -- env NODE_PATH=/usr/local/lib/node_modules node -e 'const { chromium } = require("playwright");(async () => { const browser = await chromium.launch({ args: ["--no-sandbox"] }); const page = await browser.newPage({ viewport: { width: 1280, height: 800 } }); await page.goto("https://example.com"); await page.screenshot({ path: "example.png" }); console.log(await page.title()); await browser.close();})();'Example DomainCopy the screenshot to your laptop. si cp prints nothing when the copy succeeds, so file confirms the result:
si cp browser:example.png ./example.pngfile example.pngexample.png: PNG image data, 1280 x 800, 8-bit/color RGB, non-interlacedStart a browser endpoint
Section titled “Start a browser endpoint”browser cdp starts a headless Chrome with the DevTools protocol on port 9222, for a tool that connects over CDP. browser mcp starts the Playwright MCP server on port 8931 at /mcp, for a client without a shell.
si exec browser -- browser cdpsi exec browser -- browser mcpChrome DevTools protocol: https://9222-6f1c0f0e8a.slashinfra.dev playwright: chromium.connectOverCDP('https://9222-6f1c0f0e8a.slashinfra.dev')Playwright MCP (streamable HTTP): https://8931-6f1c0f0e8a.slashinfra.dev/mcpBoth addresses are preview addresses. The CDP address accepts Playwright’s chromium.connectOverCDP or Puppeteer. The MCP address is the streamable HTTP endpoint. Stop both with:
si exec browser -- browser stopbrowser: stoppedWhat a sleep does
Section titled “What a sleep does”| What runs | A sleep keeps | After the wake |
|---|---|---|
| Desktop open | The screen and its windows in memory | Reopen the address; the viewer reconnects to the same screen. |
| Headless browser | Chrome and its page in memory | Reconnect with your program; the page is still there. |
| No user process, and no service declares a port | The files and installed packages on disk | The next start is a fresh VM. |
Scroll horizontally to see all columns.
Open connections end when the VM sleeps. A viewer or browser client reconnects on its next request, and that request wakes the VM. Opening the desktop address, si exec and si cp wake a sleeping VM. A sleep on disk starts only when no user process remains and no service declares a port, so a running desktop or browser prevents it. si svm stop ends the processes and keeps the disk; a delete removes the disk too.
Options
Section titled “Options”| Field | Type | Default | Allowed values | What it changes |
|---|---|---|---|---|
SVM (argument) |
string | The VM set with si use, or the only VM |
A VM name, or its id | The VM that runs the desktop or browser. |
--project |
string | default |
A project name, or its proj_ id |
The project that holds the VM. |
WIDTHxHEIGHT (argument of desktop start) |
string | 1280x800 |
^[0-9]{3,4}x[0-9]{3,4}$ |
The size of the desktop screen. |
Scroll horizontally to see all columns.
Errors
Section titled “Errors”| Code | When | Fix |
|---|---|---|
not_supported_by_image |
The VM runs the postgres image, which has no desktop. | Use the default image. |
svm_not_found |
The name or id matches no VM in the project. | Check the name and the project. |
Scroll horizontally to see all columns.
Errors that any request can return are in the error catalog.
Permissions
Section titled “Permissions”Any member opens the desktop. A link for port 6080 admits anyone you share it with, and creating the link takes svm:read.
| Operation | Who can | Key action |
|---|---|---|
| Open the desktop | Any member | svm:read |
| Start or stop the desktop | Any member | svm:exec |
| Run a headless browser | Any member | svm:exec |
| Copy a screenshot | Any member | svm:read |
| Create a link for port 6080 | Any member | svm:read |
Scroll horizontally to see all columns.
Limits
Section titled “Limits”- The desktop starts at 1280x800.
desktop starttakes a width and height of 3 or 4 digits each. - The desktop uses display
:1, and every command in the VM seesDISPLAY=:1. - An idle desktop viewer connection closes after about 100 seconds without traffic. Reload the page to reconnect.
- A VM accepts 64 preview connections at once, the desktop included; more answer 429.
- The desktop has no GPU and no sound. It suits browsers, editors and office work, not 3D or video.
- Port 6080 needs the default image, and a link for it gives full control of the VM; a postgres VM answers 409
not_supported_by_image. Share the link only with someone you would trust with your organization key.
The full list is in Limits.
- Web addresses: the access levels, links and port 6080.
- Sleep and wake: what a memory sleep keeps and what wakes the VM.
- Grants: share the VM’s API without an account.