And then export PATH=<path-where-you-put-that-wrapper>:$PATH in .bashrc (or into vscode's ssh-config, if you dislike polluting your shell environment). Now vscode will launch the remote-server without enabling the annoying idle-shutdown.
Could you explain this a bit more? `
* How do we put this into vscode's ssh-config?
* Should this be on host or client?
The simpler way of doing this is modify your server's ~/.bashrc, add that line of exporting PATH, so that its bash shell automatically uses your modified version of sh.
However, if you mind modifying that global bash profile, you may also configure the client so that it loads the specified .bashrc you want. you may utilise the RemoteCommand option, changing it to like (generated by copilot, haven't tried out myself yet.)
Host myserver
HostName example.com
User myusername
RemoteCommand bash --rcfile /path/to/.bashrc
check microsoft/vscode-remote-release#4474 for reference about utilising RemoteCommand.
Originally posted by @AgFlore in microsoft/vscode-remote-release#3096 (comment)