Route all launches through the CLI script (bin/bin/code) - #7
Conversation
Rename the executable to avoid conflicts with quick-sharun and update references in the desktop entry.
Added protection for the CLI script to prevent overwriting.
Add CLI router to ensure commands route through the official launcher.
Updated comments for clarity and improved understanding of script functionality.
|
@Shikakiben Lets say I install the VSCode How would I normally launch the |
|
AI answer: With the # postinst
rm -f /usr/bin/codium
ln -s /usr/share/codium/bin/codium /usr/bin/codiumSo running |
|
Wtf You remove |
|
Anyways if |
AI answer: It's just a symlink — the real script is never touched or moved. Here's what the two lines do: rm -f /usr/bin/codium — removes any previous symlink left from an older install (cleanup, standard in packaging). It does NOT touch /usr/share/codium/bin/codium.
in my understanding bin/bin/codium is a script and when it doesn't detect cli arguments it run the electron binary |
ai answer: The GUI is launched the exact same way — that's the point of the script. The script is a universal entry point, not CLI-only. It always ends with: ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" where $CLI = resources/app/out/cli.js. cli.js dispatches on the arguments: no args / file paths → spawns the real Electron GUI (normal desktop launch) One caveat worth noting honestly: in the .deb, the .desktop actually points directly to the ELF (Exec=/usr/share/codium/codium) to skip the script for desktop launches. We route everything through the script for simplicity — it adds a negligible step and guarantees CLI commands always work. |
|
@Shikakiben I'm investigating, the fact that the script in |
|
@Samueru-sama oki thanks 🙂 |
|
@Shikakiben the bug has been fixed. We still have the problem that the appimage will launch the Since the TLDR: Rebase your PR and tell your AI to implement the |
Implement CLI script as a hook for VS Code launches, handling remote CLI and WSL prompts.
|
@Samueru-sama i changed it |
Yes, because:
If anything, the script will likely disappear in the future instead of changing. Now I will do some edits to improve the script. |
|
@Shikakiben let me know if everything is in working order now, including the GUI launching normally. |
|
hoho! you can directly modify in my repo 😯😎 ! its building i let you know!👍 |
|
@Samueru-sama yes everything is working 👍🙂, at least for this problem (CLI, GUI) for the rest i am not a "Hard" user so i can not tel 😅 |
im working on a vscodium anylinux-appimage using this repo as exemple but i find that we can not use the terminal:
If we want to install an extension with the terminal (vscode --install-extension [extension]) it doesn't work because the apprun point to the electron binary (bin/code) so i made a hook for launch all the time the cli script (bin/bin/code) if no cli arguments it launch the binary
it work but i don't know if its the best solution 🤔 i couldn't find a way to make quik-sharun point the apprun directly to bin/bin/code or a way to make it detecting when we use the cli and make it launch the cli script... so... what do you think ?
@Link4Electronics @Samueru-sama