Windows desktop
The Windows app runs Utming's workspace and browser inside WSL 2, the Linux system built into Windows. You can't run it on a Mac or on Linux, so you build, test, and debug it on GitHub's Windows runners.
In this section
Section titled “In this section”- Debug a Windows problem: find the step that failed, match it to a known cause, and reproduce it.
- Test on Windows runners: run CI on your branch, try something on a probe branch, and build your branch on a runner.
Words used in this section
Section titled “Words used in this section”| Word | Meaning |
|---|---|
| Profile | Utming's data folder, %APPDATA%\utming\profiles\local. |
| Background service | Utming's server, which runs as its own process. The code calls it the engine. |
| Private computer | Utming's own WSL distribution, named utming-<id>. Docker runs the workspace and browser containers inside it. |
| Runtime pack | utming-Runtime-win32-x64.tar.gz, the Linux system, tools, and container images that Utming installs as the private computer. |
How the Windows app starts
Section titled “How the Windows app starts”flowchart TD
app[utming.exe]:::accent --> db[(PostgreSQL)]
db --> engine[Background service]
db --> wsl{{WSL 2 ready?}}
engine --> chat[Chat]:::go
wsl -- no --> install[Install WSL]:::stop
wsl -- yes --> computer[Private computer]
computer --> containers[Workspace and browser]:::go
- The database opens first. PostgreSQL runs on Windows itself, in the profile's
databasefolder, and listens only on127.0.0.1. - The background service starts. On a profile that's already set up, chat opens when it's ready. The first start after an install or update is the slowest, because Microsoft Defender scans each file the service loads.
- The private computer gets ready at the same time. Utming checks WSL, then locks the profile folder so only the user, SYSTEM, and Administrators can open it. On first setup, Utming installs the runtime pack as the private computer. Later starts reuse it. Docker then starts the workspace and browser containers. Tools that need them wait until they're ready.
- Without WSL, chat still works. The installer offers to install WSL and restart. If it's still missing after setup, Utming starts installing it once by itself. A profile from an earlier version, where that attempt already happened, gets one more question the next time a chat window opens. Windows asks for administrator approval, and the PC must restart. If that fails or the user declines, the error screen offers Install WSL.
How updates install
Section titled “How updates install”Utming downloads the new installer, plus the runtime pack if it changed, and checks that the configured Utming publisher signed the installer. The update installs when the user selects Restart to update, quits Utming, or leaves it idle. Utming quits, a hidden PowerShell runs the installer silently over the current install, and Utming opens again after Restart to update.
The profile and the private computer stay. A changed runtime pack updates the private computer on the next start.
Where things live
Section titled “Where things live”| What | Where | Code |
|---|---|---|
| App | %LOCALAPPDATA%\Programs\utming, by default |
windows-installer.nsi |
| Profile | %APPDATA%\utming\profiles\local |
protect-profile.ps1 |
| Startup log | logs\startup.log in the profile |
main.mjs |
| Database | database in the profile |
database.mjs |
| PostgreSQL programs | resources\engine\postgres\bin in the app folder |
build-windows.mjs |
| Private computer | Its disk, ext4.vhdx, is under desktop-runtime in the profile, or in the folder the user chose |
windows.mjs and windows-guest.py |
| Downloaded updates | %LOCALAPPDATA%\utming\updates |
windows-update.mjs |
The <id> in utming-<id> is the first 12 characters of a hash of the profile path, so each profile gets its own private computer.