Skip to content

[BUG] Cannot find the Syncthing command/binary/executable on either Windows or Linux #254

@rubin110

Description

@rubin110

Describe the bug
I have Obsidian and Syncthing on both Windows and Linux. Obsidian is installed from the installer off of the Obsidian website, same with Syncthing. Under Debian linux Obsidian is a Snap package and Syncthing is installed from a deb off of Debian's repro (or at least that's what I remember doing).

Under Windows

After I've provided the API key to the local instance of Syncthing, and hit Check CLI Status I get the error of:

Command failed: syncthing --version 'syncthing' is not recognized as an internal or external command, operable program or batch file.

I've tried a few tricks to alias syncthing in PowerShell to point to the correct path of the executable, but I'm pretty sure that's all borked up in Windows 11. I eventually gave up and copied syncthing.exe into the same directory that Obsidian.exe exists in and that got it working. Not a great workaround.

I believe a good solution for Windows would be to allow the user to enter into the config the actual path to syncthing.exe, in addition to the plugin just attempting to hit the executable where it might exist either in %appdata%\Local\Programs\Syncthing or %programFiles%\Syncthing or %programFiles(x86)%\Syncthing.

Under Linux

Command failed: syncthing --version /bin/sh: line1: syncthing: command not found

I am absolutely no expert on how Flatpaks work. After some trial and mostly error with adding /usr/bin/syncthing to the allowed filesystems paths within the permissions of the Obsidian flatpak, I eventually as root copied syncthing to /var/lib/flatpak/app/md.obsidian.Obsidian/current/active/files/bin which is a really terrible workaround as I'm pretty sure it'll get wiped out whenever the package is updated next.

I'm assuming I would get a different result if I did a more native installation of Obsidian on Linux as PATHs should be respected and /usr/bin/syncthing is actually accessible by the Obsidian binary (and not sandboxed away due to how Flatpak works).

My recommendation is at the very least provide some documentation that CLI may not work if the user has installed Obsidian via Flatpak (or possible Snap). If someone else comes across this that can educate me on a better way of accomplishing my hack with Flatpak without it getting wiped out anytime there's an updated, that would be awesome!

Additionally, the documentation (at least to me) doesn't provide enough context as to what access to the binary provides as far as functionality goes. After digging through some bugs in the issue tracker that I believe the CLI is only really used to provide conflict resolution help, which I may still be wrong about.

Anyhow, thanks for listening to my TED talk!

Desktop (please complete the following information):

  • OS: Windows 11 Version 10.0.22631 Build 22631

  • Version: Obsidian 1.7.7, Syncthing Integration 2.3.0

  • OS: Debian Sid

  • Version: Obsidian 1.7.7 Flatpak, Syncthing Integration 2.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions