Files
gex/web/desktop.html
velzieandClaude Opus 5.5 3eb213c65b Demo desktop: a desktop shell on gex's compositor, a minimal base, everything else on demand (docs/gexcc.md §9)
One page, web/desktop.html, built stripped by web/build-demo.sh into
web/dist-demo. It opens two windows: an xterm running bash (X11 through the
in-page Xwayland) and a launcher drawn by the page. The base rootfs is 8.3 MB
of zstd for bash and xterm. Launcher items are tar.zst overlays
(tools/gexcc/debian/mkoverlay.py) unpacked into the running kernel, and apt
gets our pool as lazy files. Runtime .wasm ships as .wasm.zst
(web/src/zfetch.js). Measurements are in §9.1.

Shared code this changes, for every page:
- kernel: /proc lists every process (ProcTable info and snapshot through
  the global kernel), and each has stat, status, statm, cmdline and comm. A
  pty leaves FIONBIO and the close-on-exec ioctls to the kernel, which
  fixes libuv (nvim) on a terminal.
- gex-wayland and the shims: wl_output.scale and set_buffer_scale.
  Records carry the buffer and client scales; scale 1 behaves as before.
- compositor: a device-pixel output and decorations scaled by the page's
  scale (1 unless a page passes one). Nearest sampling for 1:1 draws. The
  client's cursor becomes the canvas's CSS cursor on every page (before,
  only in direct present), and no cursor is composited. The present path
  is unchanged: the worker's own WebGPU canvas, driven by its
  requestAnimationFrame.
- runtime.js: wlScale; glLazy starts Mesa on the first guest GL request.
- web/build-all.sh: --x-only and --gl-only, for build-demo.sh.

Fixes from the first users, and the open xterm presentation report, are in
§9.2. tests/demo/desktop.mjs drives the demo. Its cursor and presentation
legs run unless DEMO_LEGS=0.

Squashed from demo/desktop (a6b38999 plus the driver commit) on master
e4c2a2c3. That branch's history also committed web/public/gex-apt (56
.debs of build output) by mistake, and this commit does not carry it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_ea9f71488b6e448da93d6c2dabf4879c
2026-10-12 12:35:59 -04:00

42 lines
1.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>gex desktop</title>
<meta name="description" content="Debian programs, built to WebAssembly or translated from arm64, on a desktop in your browser." />
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><text y='26' font-size='26'>▚</text></svg>" />
</head>
<body>
<div id="panel">
<button id="apps" class="pbtn" title="Applications">▚ Applications</button>
<div id="tasks"></div>
<span id="pstatus"></span>
<button id="console-btn" class="pbtn" title="The system console: pid 1's terminal">console</button>
<span id="clock"></span>
</div>
<div id="screen">
<canvas id="out" tabindex="0"></canvas>
<div id="splash">
<div class="splash-card">
<div class="logo">▚ gex</div>
<div id="splash-text">starting</div>
<div class="bar"><div id="splash-bar"></div></div>
</div>
</div>
</div>
<div id="launcher" class="dwin hidden">
<div class="dwin-title"><span>Applications</span><button class="dwin-close" title="Close">×</button></div>
<div class="dwin-body">
<p class="lhint">Each program downloads once, the first time you open it, and is added to the running system.</p>
<ul id="items"></ul>
</div>
</div>
<div id="console" class="dwin hidden">
<div class="dwin-title"><span>Console (pid 1)</span><button class="dwin-close" title="Close">×</button></div>
<div class="dwin-body"><div id="term"></div></div>
</div>
<script type="module" src="/src/desktop.js"></script>
</body>
</html>