jeanp413 / open-remote-ssh

VSCode Remote Development: Open any folder on a remote machine using SSH.
MIT License
309 stars 43 forks source link

Implement custom remote script support for Linux remotes #132

Open StarLederer opened 10 months ago

StarLederer commented 10 months ago

This PR makes it so that server setup scans the remote for known remote installer locations before attempting to use built in scripts.

This allows users to:

StarLederer commented 10 months ago

If this is welcome, we possibly need to document how to write custom scripts or make the default one work the same as custom

jeanp413 commented 9 months ago

Thanks for the PR @StarLederer :pray: , can we add a extension setting like remote.SSH.customServerInstallScriptPath and use that instead of harcoding it, also a new command like Customize Server Installation Script and then open a vscode document and initialize it with the default script content that the user can edit and save.

StarLederer commented 9 months ago

I figured using conventional paths would be best for users so they don't have to think how each remote is configured, just whether it explicitly supports open-remote-ssh or not. It is possibly a good idea allow users to override this per host so that their host providers are able to escape the conventional structure if they really need to but I imagine this being more the exception than the rule.

As per hard-coded paths vs configurable defaults, I see how in the future the MS extension might also adopt this and use different paths than us but I would add an option to change the default paths only when that happens. I think if users identify missing but expected paths, like something for windows hosts, it is better to add these paths to the extension to help users find the conventional way to organize this and use this extension seamlessly across many remotes. Let me know if you agree.

I really like your Customize Server Installation Script idea though, it will give users an example that they can start messing with right away and make it very easy to find where to put the config avoiding the need for extra documentation, but I have no idea how to implement this. VS Code extensions are far from my expertise. Perhaps that could be a separate PR that we collaborate on?