Skip to content

Autostart on Windows: Add note about broken --no-console when using the Startup folder methodΒ #945

@o-alquimista

Description

@o-alquimista

This is about the issue syncthing/syncthing#8046 and microsoft/terminal#12464.

In essence: using the Startup folder method to automatically start Syncthing on Windows 11 makes it run in the foreground (despite having --no-console).

This is because of a bug in Windows Terminal, which is the default terminal in Windows 11. The bug report was created in 2022, and it seems to be stalled. πŸ₯²

To reproduce:

  1. On a Windows 11 installation, go to the settings "For Developers" and make sure the default terminal is set to "Let Windows decide". This is the default nowadays, and it effectively makes Windows Terminal the default terminal for many tasks.
  2. Download the Syncthing tarball built for Windows and extract it somewhere.
  3. Configure Syncthing to start itself using the Startup shortcut method (with --no-console --no-browser), and test it.

What happens

On login, Syncthing starts in a Windows Terminal window, and it keeps running in the foreground displaying its logs.

What I propose

Put a note in the page autostart.html#autostart-windows-startup warning the reader about this issue, and link it to the bug trackers. Document the alternatives and workarounds in it.

Workarounds

  1. The conhost.exe solution. Probably safer; only affects Syncthing.
  2. Override the Syncthing shortcut to use the legacy console instead of the system default. This one does not appear to work any more, since the option was disabled by default on a fresh install; it says that the "legacy console" is not installed, and the link it provides does not tell you how to install it β€” I didn't bother to dig deeper.
  3. Set the traditional Console app as the default terminal (instead of the new Windows Terminal) in the "For Developers" system settings. Pros: easy. Cons: wide scope β€” affects the whole environment, just because of Syncthing.
  4. Skip the Startup folder completely and use the Task Scheduler instead. The setup is a bit more lengthy, but it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions