Open code Amd64 Linux appimage fails to launch. #3866

Open
opened 2026-02-16 17:41:44 -05:00 by yindo · 17 comments
Owner

Originally created by @DevenBL on GitHub (Dec 25, 2025).

Originally assigned to: @adamdotdevin, @Brendonovich on GitHub.

Description

./opencode-desktop-linux-amd64.AppImage 
"Wayland session detected; forcing X11 backend to avoid compositor protocol errors. Set OC_ALLOW_WAYLAND=1 to keep native Wayland."
Gtk-Message: 14:53:43.126: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:53:43.127: Failed to load module "canberra-gtk-module"
error: Script not found "serve"
Image

Output from copy paste: [STDERR] error: Script not found "serve"

OpenCode version

v1.0.201

Steps to reproduce

run opencode from the terminal ./opencode-desktop-linux-amd64.AppImage

Screenshot and/or share link

Image

Operating System

Gentoo Linux

Terminal

GNOME Terminal

Originally created by @DevenBL on GitHub (Dec 25, 2025). Originally assigned to: @adamdotdevin, @Brendonovich on GitHub. ### Description ``` ./opencode-desktop-linux-amd64.AppImage "Wayland session detected; forcing X11 backend to avoid compositor protocol errors. Set OC_ALLOW_WAYLAND=1 to keep native Wayland." Gtk-Message: 14:53:43.126: Failed to load module "canberra-gtk-module" Gtk-Message: 14:53:43.127: Failed to load module "canberra-gtk-module" error: Script not found "serve" ``` <img width="1214" height="346" alt="Image" src="https://github.com/user-attachments/assets/015aa52f-f34d-4b23-b3cd-cf6bc12e0b2d" /> Output from copy paste: ``` [STDERR] error: Script not found "serve" ``` ### OpenCode version v1.0.201 ### Steps to reproduce run opencode from the terminal ./opencode-desktop-linux-amd64.AppImage ### Screenshot and/or share link <img width="1214" height="346" alt="Image" src="https://github.com/user-attachments/assets/015aa52f-f34d-4b23-b3cd-cf6bc12e0b2d" /> ### Operating System Gentoo Linux ### Terminal GNOME Terminal
yindo added the bugweb labels 2026-02-16 17:41:44 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 25, 2025):

This issue might be a duplicate of or related to existing issues. Please check:

  • #5461: Fedora 42 crash to desktop - Similar GTK module loading failure (canberra-gtk-module) and GTK backend initialization errors
  • #6163: Critical regression in OpenCode 1.0.201 - Same version (v1.0.201) with Wayland/X11 backend issues on Linux
  • #5683: Blank screen on opencode desktop on Linux - Desktop app launch failure on Ubuntu
  • #5613: Empty screen on launch - Desktop/TUI blank screen on startup

These issues all relate to Linux desktop/AppImage launch failures, GTK module loading, and Wayland/X11 integration problems. Given that multiple issues mention v1.0.201 as a regression point, this might be worth investigating as a version-specific regression.

Feel free to ignore if your specific case requires unique debugging.

@github-actions[bot] commented on GitHub (Dec 25, 2025): This issue might be a duplicate of or related to existing issues. Please check: - #5461: Fedora 42 crash to desktop - Similar GTK module loading failure (canberra-gtk-module) and GTK backend initialization errors - #6163: Critical regression in OpenCode 1.0.201 - Same version (v1.0.201) with Wayland/X11 backend issues on Linux - #5683: Blank screen on opencode desktop on Linux - Desktop app launch failure on Ubuntu - #5613: Empty screen on launch - Desktop/TUI blank screen on startup These issues all relate to Linux desktop/AppImage launch failures, GTK module loading, and Wayland/X11 integration problems. Given that multiple issues mention v1.0.201 as a regression point, this might be worth investigating as a version-specific regression. Feel free to ignore if your specific case requires unique debugging.
Author
Owner

@lukelukes commented on GitHub (Dec 25, 2025):

I'm getting the same serve not found error, albeit in a slightly different fashion:

[STDERR] (eval):1: can't change option: zle
[STDERR] (eval):1: can't change option: zle
[STDERR] error: Script not found "serve"

Running: Arch / Wayland / KDE / zsh

@lukelukes commented on GitHub (Dec 25, 2025): I'm getting the same `serve not found` error, albeit in a slightly different fashion: ``` [STDERR] (eval):1: can't change option: zle [STDERR] (eval):1: can't change option: zle [STDERR] error: Script not found "serve" ``` Running: Arch / Wayland / KDE / zsh
Author
Owner

@DevenBL commented on GitHub (Dec 26, 2025):

These issues all relate to Linux desktop/AppImage launch failures, GTK module loading, and Wayland/X11 integration problems. Given that multiple issues mention v1.0.201 as a regression point, this might be worth investigating as a version-specific regression.

Feel free to ignore if your specific case requires unique debugging.

Tested on v1.0.203 and v1.0.191 Results in the same behavior. It is not version specific.

@DevenBL commented on GitHub (Dec 26, 2025): > These issues all relate to Linux desktop/AppImage launch failures, GTK module loading, and Wayland/X11 integration problems. Given that multiple issues mention v1.0.201 as a regression point, this might be worth investigating as a version-specific regression. > > Feel free to ignore if your specific case requires unique debugging. Tested on [v1.0.203](https://github.com/sst/opencode/releases/tag/v1.0.203) and [v1.0.191](https://github.com/sst/opencode/releases/tag/v1.0.191) Results in the same behavior. It is not version specific.
Author
Owner

@plirof commented on GitHub (Dec 27, 2025):

This issue exists also on version 1.0.185.
The appimage created here for version 1.0.185 : https://github.com/pkgforge-dev/opencode-AppImage-Enhanced/releases/tag/1.0.185-1%402025-12-23_1766505110 does not have this problem and runs ok.

@plirof commented on GitHub (Dec 27, 2025): This issue exists also on version 1.0.185. The appimage created here for version 1.0.185 : https://github.com/pkgforge-dev/opencode-AppImage-Enhanced/releases/tag/1.0.185-1%402025-12-23_1766505110 does not have this problem and runs ok.
Author
Owner

@cravenceiling commented on GitHub (Dec 28, 2025):

I'm getting this error too, on Arch (btw). I extracted the AppImage file and ran the opencode-cli binary in squashfs-root/bin/ and it seems that it's just a bun binary not the actual opencode cli binary.

Image
@cravenceiling commented on GitHub (Dec 28, 2025): I'm getting this error too, on Arch (btw). I extracted the AppImage file and ran the `opencode-cli` binary in `squashfs-root/bin/` and it seems that it's just a bun binary not the actual opencode cli binary. <img width="792" height="666" alt="Image" src="https://github.com/user-attachments/assets/019fefed-e175-47b5-ae8a-3e8f5e244568" />
Author
Owner

@plirof commented on GitHub (Dec 29, 2025):

In the appimage I replaced /root/bin/OpenCode with the opencode that you can find in eg opencode-linux-x64-baseline_v1.0.204.tar.gz and it worked.

@plirof commented on GitHub (Dec 29, 2025): In the appimage I replaced /root/bin/OpenCode with the opencode that you can find in eg opencode-linux-x64-baseline_v1.0.204.tar.gz and it worked.
Author
Owner

@DonKongPaPa commented on GitHub (Dec 30, 2025):

In the appimage I replaced /root/bin/OpenCode with the opencode that you can find in eg opencode-linux-x64-baseline_v1.0.204.tar.gz and it worked.

I tried to port it on version 1.0.218 but was unsuccessful. What version is your AppImage?

@DonKongPaPa commented on GitHub (Dec 30, 2025): > In the appimage I replaced /root/bin/OpenCode with the opencode that you can find in eg opencode-linux-x64-baseline_v1.0.204.tar.gz and it worked. I tried to port it on version 1.0.218 but was unsuccessful. What version is your AppImage?
Author
Owner

@plirof commented on GitHub (Dec 31, 2025):

I did an --appimage-extract and then recreated the appimage with the modification above. I don't know appimage version.

@plirof commented on GitHub (Dec 31, 2025): I did an --appimage-extract and then recreated the appimage with the modification above. I don't know appimage version.
Author
Owner

@cravenceiling commented on GitHub (Jan 2, 2026):

@DonKongPaPa I was able to run the desktop app in Arch Linux doing this:

  1. Download the latest version of the appimage (v1.0.223 right now)
wget https://github.com/sst/opencode/releases/download/v1.0.223/opencode-desktop-linux-amd64.AppImage
  1. Extract the appimage
./opencode-desktop-linux-amd64.AppImage --appimage-extract
  1. Change the binary opencode-cli in AppDir/shared/bin with your own binary
cd AppDir/shared/bin
rm opencode-cli
ln -s ~/.opencode/bin/opencode opencode-cli

You could also download the latest binary and use it here

wget https://github.com/sst/opencode/releases/download/v1.0.223/opencode-linux-x64.tar.gz
  1. Run inside AppDir/shared/bin
./OpenCode

I wasn't able to rebuild the appimage even after replacing both opencode-cli binaries in AppDir/bin/ and AppDir/shared/bin/.

cc @rekram1-node

@cravenceiling commented on GitHub (Jan 2, 2026): @DonKongPaPa I was able to run the desktop app in Arch Linux doing this: 1. Download the latest version of the appimage (v1.0.223 right now) ```bash wget https://github.com/sst/opencode/releases/download/v1.0.223/opencode-desktop-linux-amd64.AppImage ``` 2. Extract the appimage ```bash ./opencode-desktop-linux-amd64.AppImage --appimage-extract ``` 3. Change the binary `opencode-cli` in `AppDir/shared/bin` with your own binary ```bash cd AppDir/shared/bin rm opencode-cli ln -s ~/.opencode/bin/opencode opencode-cli ``` You could also download the latest binary and use it here ```bash wget https://github.com/sst/opencode/releases/download/v1.0.223/opencode-linux-x64.tar.gz ``` 4. Run inside `AppDir/shared/bin` ```bash ./OpenCode ``` I wasn't able to rebuild the appimage even after replacing both `opencode-cli` binaries in `AppDir/bin/` and `AppDir/shared/bin/`. cc @rekram1-node
Author
Owner

@kmnnmk212-source commented on GitHub (Jan 4, 2026):

m@m-HP-Z440-Workstation:/Desktop/opencode/AppDir/shared/bin$ AppDir/shared/bin
bash: AppDir/shared/bin: No such file or directory
m@m-HP-Z440-Workstation:
/Desktop/opencode/AppDir/shared/bin$ cd AppDir/shared/bin
bash: cd: AppDir/shared/bin: No such file or directory
m@m-HP-Z440-Workstation:/Desktop/opencode/AppDir/shared/bin$ /OpenCode
bash: /OpenCode: No such file or directory
m@m-HP-Z440-Workstation:
/Desktop/opencode/AppDir/shared/bin$ ls
MiniBrowser opencode-cli WebKitGPUProcess WebKitWebProcess
OpenCode opencode-linux-x64.tar.gz WebKitNetworkProcess
m@m-HP-Z440-Workstation:/Desktop/opencode/AppDir/shared/bin$ .//OpenCode
bash: /home/m/Desktop/opencode/AppDir/shared/bin/opencode-cli: No such file or directory
Received Exit
Server not running
m@m-HP-Z440-Workstation:
/Desktop/opencode/AppDir/shared/bin$

@kmnnmk212-source commented on GitHub (Jan 4, 2026): m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$ AppDir/shared/bin bash: AppDir/shared/bin: No such file or directory m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$ cd AppDir/shared/bin bash: cd: AppDir/shared/bin: No such file or directory m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$ /OpenCode bash: /OpenCode: No such file or directory m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$ ls MiniBrowser opencode-cli WebKitGPUProcess WebKitWebProcess OpenCode opencode-linux-x64.tar.gz WebKitNetworkProcess m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$ .//OpenCode bash: /home/m/Desktop/opencode/AppDir/shared/bin/opencode-cli: No such file or directory Received Exit Server not running m@m-HP-Z440-Workstation:~/Desktop/opencode/AppDir/shared/bin$
Author
Owner

@NikiSkaarup commented on GitHub (Jan 5, 2026):

Mostly leaving this here for my future self, but in case anyone else runs into this, the solution to fix it yourself is to download

  • app image opencode-desktop-linux-amd64.AppImage
  • desktop app deb version opencode-desktop-linux-amd64.deb

and then extract appImage

chmod +x opencode-desktop-linux-amd64.AppImage

./opencode-desktop-linux-amd64.AppImage --appimage-extract

now extract deb for desktop executable (ar is not a typo)

ar -x ./opencode-desktop-linux-amd64.deb

tar -xzf data.tar.gz

copy binaries from deb to appImage

cp ./usr/bin/OpenCode ./AppDir/bin/OpenCode
cp ./usr/bin/OpenCode ./AppDir/shared/bin/OpenCode
cp ./usr/bin/opencode-cli ./AppDir/bin/opencode-cli
cp ./usr/bin/opencode-cli ./AppDir/shared/bin/opencode-cli

repackage the appImage

appimagetool ./AppDir

This should result in a working appImage

@NikiSkaarup commented on GitHub (Jan 5, 2026): Mostly leaving this here for my future self, but in case anyone else runs into this, the solution to fix it yourself is to download - app image `opencode-desktop-linux-amd64.AppImage` - desktop app deb version `opencode-desktop-linux-amd64.deb` and then extract appImage ```sh chmod +x opencode-desktop-linux-amd64.AppImage ./opencode-desktop-linux-amd64.AppImage --appimage-extract ``` now extract deb for desktop executable (`ar` is not a typo) ```sh ar -x ./opencode-desktop-linux-amd64.deb tar -xzf data.tar.gz ``` copy binaries from deb to appImage ```sh cp ./usr/bin/OpenCode ./AppDir/bin/OpenCode cp ./usr/bin/OpenCode ./AppDir/shared/bin/OpenCode cp ./usr/bin/opencode-cli ./AppDir/bin/opencode-cli cp ./usr/bin/opencode-cli ./AppDir/shared/bin/opencode-cli ``` repackage the appImage ```sh appimagetool ./AppDir ``` This should result in a working appImage
Author
Owner

@Brendonovich commented on GitHub (Jan 6, 2026):

As has been mentioned it appears that the AppImage's opencode-cli binary is Bun itself, rather than the CLI which is built with Bun. From what I can tell the deb and rpm packages are correct.

@Brendonovich commented on GitHub (Jan 6, 2026): As has been mentioned it appears that the AppImage's `opencode-cli` binary is Bun itself, rather than the CLI which is built with Bun. From what I can tell the deb and rpm packages are correct.
Author
Owner

@lukelukes commented on GitHub (Jan 6, 2026):

Yes, the ELF strip step removes the actual application code.
From my limited research this is the offending code: https://github.com/tauri-apps/tauri/blob/feat/truly-portable-appimage/crates/tauri-bundler/src/bundle/linux/appimage/sharun.rs#L172

Here was Opus 4.5's explanation:

Bun's `--compile` feature creates standalone executables by:
1. Building a standard ELF binary (the Bun runtime)
2. **Appending** compiled JavaScript bytecode after the ELF data
3. Adding a `---- Bun! ----` trailer signature

When `strip` runs, it:
1. Parses the ELF headers
2. Removes debug symbols
3. **Truncates the file** at the end of ELF sections
4. Destroys the appended Bun bytecode
@lukelukes commented on GitHub (Jan 6, 2026): Yes, the ELF strip step removes the actual application code. From my limited research this is the offending code: https://github.com/tauri-apps/tauri/blob/feat/truly-portable-appimage/crates/tauri-bundler/src/bundle/linux/appimage/sharun.rs#L172 Here was Opus 4.5's explanation: ``` Bun's `--compile` feature creates standalone executables by: 1. Building a standard ELF binary (the Bun runtime) 2. **Appending** compiled JavaScript bytecode after the ELF data 3. Adding a `---- Bun! ----` trailer signature When `strip` runs, it: 1. Parses the ELF headers 2. Removes debug symbols 3. **Truncates the file** at the end of ELF sections 4. Destroys the appended Bun bytecode ```
Author
Owner

@Samueru-sama commented on GitHub (Jan 9, 2026):

Hi, a few weeks ago I got requested to package opencode here

The server not found error is a bigger issue related to bun, which I had to fix this way

@Samueru-sama commented on GitHub (Jan 9, 2026): Hi, a few weeks ago I got requested to package opencode [here](https://github.com/pkgforge-dev/Anylinux-AppImages/issues/189) The server not found error is a bigger issue related to bun, [which I had to fix this way](https://github.com/pkgforge-dev/opencode-AppImage-Enhanced/blob/13a63aeaed223a1fd5e8f4e061117999fea855d0/make-appimage.sh#L21-L34)
Author
Owner

@justinclift-prvidr commented on GitHub (Jan 29, 2026):

The server not found error is a bigger issue related to bun, which I had to fix this way

With that, is my reading of that correct in that you're generating kek as a way to create a random temporary file?

If that's the case, wouldn't mktemp (ie https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html) be the more standard approach for doing that bit instead? 😄

@justinclift-prvidr commented on GitHub (Jan 29, 2026): > The server not found error is a bigger issue related to bun, [which I had to fix this way](https://github.com/pkgforge-dev/opencode-AppImage-Enhanced/blob/13a63aeaed223a1fd5e8f4e061117999fea855d0/make-appimage.sh#L21-L34) With that, is my reading of that correct in that you're generating `kek` as a way to create a random temporary file? If that's the case, wouldn't `mktemp` (ie https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html) be the more standard approach for doing that bit instead? :smile:
Author
Owner

@Samueru-sama commented on GitHub (Jan 30, 2026):

The server not found error is a bigger issue related to bun, which I had to fix this way

With that, is my reading of that correct in that you're generating kek as a way to create a random temporary file?

If that's the case, wouldn't mktemp (ie https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html) be the more standard approach for doing that bit instead? 😄

I'm not making a temp file, I'm generating 10 random characters for the name of the dynamic linker of the bun binary.

This would not be needed if it was possible to invoke the bun binary with the dynamic linker as mentioned here

So the second best choice is a random dynamic linker in tmp that is going to be unique for each appimage, the kek var is the random name, which at runtime it gets copied to /tmp.

@Samueru-sama commented on GitHub (Jan 30, 2026): > > The server not found error is a bigger issue related to bun, [which I had to fix this way](https://github.com/pkgforge-dev/opencode-AppImage-Enhanced/blob/13a63aeaed223a1fd5e8f4e061117999fea855d0/make-appimage.sh#L21-L34) > > With that, is my reading of that correct in that you're generating `kek` as a way to create a random temporary file? > > If that's the case, wouldn't `mktemp` (ie https://www.gnu.org/software/coreutils/manual/html_node/mktemp-invocation.html) be the more standard approach for doing that bit instead? 😄 I'm not making a temp file, I'm generating 10 random characters for the name of the dynamic linker of the bun binary. This would not be needed if it was possible to invoke the bun binary with the dynamic linker as mentioned [here](https://github.com/pkgforge-dev/Anylinux-AppImages/issues/189#issuecomment-3686716218) So the second best choice is a random dynamic linker in tmp that is going to be unique for each appimage, the `kek` var is the random name, which at runtime it gets copied to `/tmp`.
Author
Owner

@justinclift-prvidr commented on GitHub (Jan 30, 2026):

I should have read it closer after getting a reasonable of coffee. 😉

@justinclift-prvidr commented on GitHub (Jan 30, 2026): I should have read it closer after getting a reasonable of coffee. :wink:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3866