Files
RuneStone/docs/linux.md
T
Knotty Wyvern aebe700366 Ship the browser engine as its own release file
The installer no longer bundles the engine, and the installer script
stops when the bundle names it or when the setup file is over 30 MB.
pnpm build:browser-engine packages the engine, writes a deterministic
ZIP and its record to releases/browser-engine/<version>/, and pins the
ZIP in the host. The installer hooks remove the engine folder that 0.1.48
leaves behind, and uninstall removes the downloaded engine.
2026-10-29 01:25:53 -07:00

97 lines
6.0 KiB
Markdown

# Linux development
[Development](development.md) · [Build Linux packages](builds.md#build-linux-packages) · [Install on Linux](installation.md#install-on-linux)
This guide gives the Linux-specific parts of source development and the native desktop checks for Linux.
For the general source setup, use [Run from source](development.md#run-from-source).
## Prerequisites
- The tools in [Run from source](development.md#run-from-source): Node.js 24, pnpm 10, and a stable Rust toolchain.
- The native libraries in [Tauri's Linux prerequisites](https://v2.tauri.app/start/prerequisites/#linux), including GTK and WebKitGTK 4.1.
- A graphical desktop session.
- A terminal with `node`, `pnpm`, and `cargo` on its `PATH`. If a command is missing, load the environment that its installer configured.
Do not copy `node_modules`, `src-tauri/target`, or `src-tauri/browser-engine` from a Windows checkout. They contain platform-specific binaries.
## Record the environment
Run these commands in the Linux session that you use for native checks:
```sh
cat /etc/os-release
uname -m
printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$XDG_SESSION_TYPE"
```
Record the distribution, version, processor architecture, desktop, and session type with the source commit and the test results.
Test Wayland and X11 separately before you claim support for both. An x86_64 test does not prove ARM64 support.
## Browser runtime on Linux
Use the general steps in [Built-in browser runtime](development.md#built-in-browser-runtime). On Linux, these differences apply:
- Package and stage the runtime on the same architecture as the host build.
`npm --prefix browser-runtime run package` selects the current platform and architecture.
`package:linux` always builds x86_64. Do not use it on ARM64.
- `pnpm browser:stage` stops when the packaged runtime does not match the current platform and architecture.
- Staging makes sure that the `RuneStone-Browser` file is executable and sets the runtime folder to mode 755.
- Staging replaces the full `src-tauri/browser-engine` folder, so no files from an older package stay.
It moves the previous folder to `output/browser-stage-backups/`.
The Browser runtime always runs with the Electron sandbox. It stops when it receives `--no-sandbox`.
Run RuneStone as an ordinary desktop user, not as root.
Some distributions limit user namespaces, which the sandbox can need. Test the Browser on each target distribution.
The native host uses WebKitGTK and the Browser uses Electron. Test both.
Linux packages do not include the engine, and no Linux engine download exists yet. A package says that no engine is available for the platform. `pnpm tauri dev` starts the staged engine.
## Checks
Run the source checks in [Checks](development.md#checks) and the tests in [Browser smoke tests](development.md#browser-smoke-tests).
Then run `pnpm tauri dev` in the graphical session for the desktop checks below.
The source checks do not prove desktop compatibility.
Browser smoke tests use Chromium and simulated desktop calls. They do not test Linux file access or WebKitGTK.
## Desktop checks
Use a disposable workspace outside the installation folder.
Record each result, the source commit, and any error message.
Voice typing is not part of the Linux checks.
| Area | Pass criteria |
| --- | --- |
| Launch and windows | Open from the desktop. Move, resize, minimize, maximize, and close. Unsaved edits start the close guard. |
| Files and paths | Create, save, open again, rename, copy, and delete files. Check spaces, Unicode, and distinct `Note.md` and `note.md` files. |
| External edits | Edit a file in a different editor. RuneStone finds the change and does not silently replace conflicting edits. |
| Built-in Browser | In `pnpm tauri dev` with the staged engine, open a web page, type, scroll, open and close tabs, download a file, and restart the app. In a package, a browser tab says that no engine is available. |
| Editors | Edit Markdown, source code, tables, images, and diagrams. Check undo, keyboard shortcuts, and both themes. |
| Clipboard and dialogs | Copy and paste text, tables, and images. Check folder selection, external links, and file reveal. |
| Plugins | Install plugin ZIPs through Settings, enable them, restart, disable them, and remove them. Check that plugin data stays. |
| Terminal plugin | Install the Terminal ZIP. Bash starts in the workspace, accepts Unicode, resizes, and exits when its session closes. |
| Settings | Change preferences, restart, and make sure that they stay. Check separate workspace windows. |
For the Terminal ZIP, see [Build examples](plugin-development.md#build-examples) and the [plugin installation guide](plugins.md).
Check terminal profiles after a desktop launch too. A desktop launcher can have a different `PATH` from an interactive shell.
Known Linux limits:
- RuneStone rejects some names that Linux permits, for example names with `:` or `\`. Use portable filenames for baseline checks. Record a rejected name as a limit.
- On Linux, RuneStone uses the polling watcher only for paths that start with `//`. A share mounted at an ordinary path uses the native watcher, which can miss changes from other computers. Test network workspaces separately.
## Package builds
Use [Build Linux packages](builds.md#build-linux-packages) for Debian and AppImage builds, release files, and package checks.
For an example of a Linux test record, see the [Linux 0.1.44 validation](archive/linux-validation-0.1.44.md).
## Development help
| Problem | Action |
| --- | --- |
| Node.js, pnpm, or Cargo is missing | Load your toolchain environment. See [Prerequisites](#prerequisites). |
| The Browser runtime is missing | Package and stage it again. See [Browser runtime on Linux](#browser-runtime-on-linux). |
| Electron reports a sandbox or user-namespace error | Keep the sandbox on. Record the error and the distribution version. Run RuneStone as an ordinary desktop user. |
| A build stops | Record the first error, the command, the distribution version, and the free memory and disk space. |