The documentation indicating that the serverInstallPath setting is "a map of remote host to absolute path" could use some clarification on a few points:
- I'm not familiar with other vscode settings whose values are expected to be a map, it'd be nice to have an example of how this is supposed to look.
- I'd like to know exactly how the map lookup works:
- Can make the setting conditional upon whether the remote host name contains a substring matching a pattern or something like that, or do you need to specify the full remote name?
- I'd like clarification on what counts as the remote's "name" that is looked up in the map: do I have to specify the remote's the FQDN or if it's based on the alias I have in my ~/.ssh/config that I'm using to SSH to the remote, or if the vscode remote just checks the value of $HOST or $HOSTNAME after reaching the remote?
It's not ideal to need to figure this out by trial and error, when SSH-ing to a shared remote server that the user may have little control over, where failures result in accidentally installing the vscode remote server in unwanted places that need to be manually cleaned up.
I'd expect $HOSTNAME and others to work as well.
That variable substitution doesn't address the problem I share with LiveFreeAndRoam for two reasons:
- I desire is to use the remote host name not as part of the server install path but as part of some condition, so that I can apply a particular
serverInstallPath setting only when SSH-ing to a particular remote.
- I'm not sure if variables are substituted based on values on the client side, or if it's based on environment variables found after connecting to the remote.
Originally posted by Victor A. Ying (@VictorYing) in #472 (comment)
In particular, I am interested in the first bullet of point 2: is it possible to make the setting conditional on whether the remote hostname contains a substring or some pattern? My specific use case is that I would like to be able to attach my vscode editor to remote SLURM allocations, which do not necessarily give me the same compute node each time (different hostnames) but I would still like to reference the same .vscode-server directory for all of them.
The documentation indicating that the
serverInstallPathsetting is "a map of remote host to absolute path" could use some clarification on a few points:It's not ideal to need to figure this out by trial and error, when SSH-ing to a shared remote server that the user may have little control over, where failures result in accidentally installing the vscode remote server in unwanted places that need to be manually cleaned up.
That variable substitution doesn't address the problem I share with LiveFreeAndRoam for two reasons:
serverInstallPathsetting only when SSH-ing to a particular remote.Originally posted by Victor A. Ying (@VictorYing) in #472 (comment)
In particular, I am interested in the first bullet of point 2: is it possible to make the setting conditional on whether the remote hostname contains a substring or some pattern? My specific use case is that I would like to be able to attach my vscode editor to remote SLURM allocations, which do not necessarily give me the same compute node each time (different hostnames) but I would still like to reference the same
.vscode-serverdirectory for all of them.