Skip to content

docs(cli): note that auto-launch does not apply on WSL2#1090

Open
max-nothacker wants to merge 1 commit into
obsidianmd:masterfrom
max-nothacker:docs/cli-wsl2-no-auto-launch
Open

docs(cli): note that auto-launch does not apply on WSL2#1090
max-nothacker wants to merge 1 commit into
obsidianmd:masterfrom
max-nothacker:docs/cli-wsl2-no-auto-launch

Conversation

@max-nothacker
Copy link
Copy Markdown

What

Adds a WSL2-specific note to the Get started auto-launch sentence and a new #### WSL2 (Windows Subsystem for Linux) subsection inside the existing ### Linux troubleshooting block. No existing text is removed; the auto-launch claim is preserved verbatim and only annotated with a forward reference to the new subsection.

Why

While running Obsidian on WSL2, the documented behavior

If Obsidian is not running, the first command you run launches Obsidian.

does not occur. Invoking the CLI from a terminal when the GUI is not running returns the error:

The CLI is unable to find Obsidian. Please make sure Obsidian is running and try again.

Investigation:

  • The CLI binary installed at ~/.local/bin/obsidian by the in-app "Command line interface" toggle is small (~67 KB ELF, aarch64). Running strings on it reveals only the unix-socket-related literals (XDG_RUNTIME_DIR, %s/.obsidian-cli.sock) and the error message above — no PATH lookups for a GUI binary, no .desktop discovery, no AppImage scanning. The binary appears to be CLI-socket-only.
  • wsl --shutdown, wsl --update, and a full Windows reboot did not change the behavior — it is reproducible on every cold launch.
  • Behavior is confirmed to differ from macOS, where the CLI's auto-launch path uses a symlink into the application bundle.

Scope

This PR only documents the WSL2 case, because that is the only environment in which the failure was reproduced. The wording is intentionally not generalized to "Linux" — desktop Linux installs via deb/rpm/snap may behave differently and were not tested.

Reproduce

  1. Install Obsidian 1.12.7 ARM64 AppImage on WSL2 (Ubuntu 24.04 aarch64, WSLg active) by extracting via --appimage-extract.
  2. Toggle Settings → General → "Command line interface" ON.
  3. Close the Obsidian GUI.
  4. From a terminal (in a vault directory), run obsidian.

Expected per docs: GUI launches.
Actual: prints "The CLI is unable to find Obsidian. Please make sure Obsidian is running and try again." and exits.

Files changed

  • en/Extending Obsidian/Obsidian CLI.md — two additive edits described above.

The "Get started" section claims the CLI auto-launches the GUI when
Obsidian is not running. This holds on macOS (and presumably Windows
and Linux with a deb/rpm/snap install) but not on WSL2, where the
CLI's binary contains no GUI-discovery logic and invocation cold-
prints the "unable to find Obsidian" error.

Two additive edits:
- A note in the Get started info-callout pointing to the new section.
- A `#### WSL2` subsection under the existing `### Linux`
  troubleshooting block.

No existing text is removed; the auto-launch claim is preserved
verbatim.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> in the session with id 47723288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant