diff --git a/README.md b/README.md index b793359..605710c 100644 --- a/README.md +++ b/README.md @@ -740,7 +740,6 @@ and only VSCodium has official server-side builds, so you'll need to use custom Steps to get it running, assuming that you already have keyring and key-based SSH auth (with non-RSA key) configured: - In container (one of the sources: https://github.com/microsoft/vscode-remote-release/issues/6347): ``` doas apk add gcompat libstdc++ curl bash git procps @@ -752,16 +751,46 @@ On host (where you intend to run IDE client): `doas apk add code-oss` Run `code-oss`, add "Open Remote - SSH" extension by jeanp413. -Go to its settings, and set "Server Download Url Template" to + +Go to its settings, and: +* Set "Server Download Url Template" to `https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v${version}/openvscode-server-v${version}-${os}-${arch}.tar.gz` (otherwise it will download VSCodium server-side builds by default). +* Set "Experimental: Server Binary Name" to `openvscode-server` (otherwise it will try to launch remote `code-server-oss` which does not exist and never will, taking its name from Code OSS `product.json`). + Exit `code-oss`. Add `"enable-proposed-api": ["jeanp413.open-remote-ssh"]` at the root level of `~/.vscode-oss/argv.json`. +> ##### Patch code-oss manifests +> +> (TODO: figure how to optimize this step without having to manually patch them after every update) +> +> In /usr/lib/code-uss/resources/app: +> +> * Update `package.json`: update `version` and `distro` fields to refer to the compatible version https://github.com/gitpod-io/openvscode-server/releases (for example, latest code-oss in aports at the moment of this writing is 1.83.1, but openvscode-server is only released for 1.83.0); +> * Update `product.json`: update `version` field and add `commit` field as needed; change `serverApplicationName` from `code-server-oss` (which does not exist and never will) to `openvscode-server` () + Run `code-oss` again, you'll get remote button under the marketplace button. Go there, add your host, right-click it, connect. Connection should be successful, and you should see "connected to remote" on Code OSS main screen. + +> ##### Work around certain musl incompatibilities +> +> Some openvscode-server versions cannot start on Alpine (https://github.com/gitpod-io/openvscode-server/issues/534). +> +> In order to solve this, after Open Remote - SSH extension downloaded and unpacked REH binaries and displayed an error saying that it could not start the remote server: +> +> SSH into the container, go to `~/.vscode-server-oss/bin/COMMIT_NAME/`, +> ``` +> doas apk add ouch +> wget https://unofficial-builds.nodejs.org/download/release/v18.15.0/node-v18.15.0-linux-x64-musl.tar.xz +> ouch decompress https://unofficial-builds.nodejs.org/download/release/v18.15.0/node-v18.15.0-linux-x64-musl.tar.xz +> rm node +> cp node-v18.15.0-linux-x64-musl/bin/node . +> ``` +> and tell Code OSS to try again. + "Open folder" should take you to the remote directory structure, allowing you to open projects hosted in container. All code-related extensions will also work in remote context, isolated from the parent system and unable to affect it, no matter what malicious npm packages get installed into container.