You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open code Amd64 Linux appimage fails to launch. #6168
./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"
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
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.
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.
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.
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.
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
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.
Activity
github-actions commentedon Dec 25, 2025
This issue might be a duplicate of or related to existing issues. Please check:
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.
lukelukes commentedon Dec 25, 2025
I'm getting the same
serve not founderror, albeit in a slightly different fashion:Running: Arch / Wayland / KDE / zsh
DevenBL commentedon Dec 27, 2025
Tested on v1.0.203 and v1.0.191 Results in the same behavior. It is not version specific.
plirof commentedon 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.
cravenceiling commentedon Dec 28, 2025
I'm getting this error too, on Arch (btw). I extracted the AppImage file and ran the
opencode-clibinary insquashfs-root/bin/and it seems that it's just a bun binary not the actual opencode cli binary.plirof commentedon 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.
DonKongPaPa commentedon Dec 31, 2025
I tried to port it on version 1.0.218 but was unsuccessful. What version is your AppImage?
plirof commentedon Dec 31, 2025
I did an --appimage-extract and then recreated the appimage with the modification above. I don't know appimage version.
cravenceiling commentedon Jan 2, 2026
@DonKongPaPa I was able to run the desktop app in Arch Linux doing this:
opencode-cliinAppDir/shared/binwith your own binaryYou could also download the latest binary and use it here
AppDir/shared/binI wasn't able to rebuild the appimage even after replacing both
opencode-clibinaries inAppDir/bin/andAppDir/shared/bin/.cc @rekram1-node
kmnnmk212-source commentedon Jan 4, 2026
NikiSkaarup commentedon 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
opencode-desktop-linux-amd64.AppImageopencode-desktop-linux-amd64.deband then extract appImage
now extract deb for desktop executable (
aris not a typo)copy binaries from deb to appImage
repackage the appImage
This should result in a working appImage
Brendonovich commentedon Jan 6, 2026
As has been mentioned it appears that the AppImage's
opencode-clibinary is Bun itself, rather than the CLI which is built with Bun. From what I can tell the deb and rpm packages are correct.lukelukes commentedon 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:
Samueru-sama commentedon 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
justinclift-prvidr commentedon Jan 30, 2026
With that, is my reading of that correct in that you're generating
kekas 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? 😄Samueru-sama commentedon Jan 30, 2026
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
kekvar is the random name, which at runtime it gets copied to/tmp.justinclift-prvidr commentedon Jan 30, 2026
I should have read it closer after getting a reasonable of coffee. 😉
DevenBL commentedon Mar 27, 2026
I tested https://github.com/anomalyco/opencode/releases/download/v1.3.3/opencode-electron-linux-x86_64.AppImage
it seems to work now. closing issue. Dunno when or if it was solved but it seems to have been solved.
Samueru-sama commentedon Mar 27, 2026
They switched to electron builds which no longer need
opencode-clito run the opencode server.#17803
Well that is one way of fixing it lol