-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support configuring the local terminal launched in remote windows #145642
Comments
I feel like the essence of this issue is to allow the For some historical context, originally it wasn't possible to create local terminals in remotes at all (excluding your workaround), this was a quick command added to allow the bare minimum of a "default" local terminal to get launched.
The reason was because many of the keys in a profile like the args/env/etc. would not apply to task terminals. It replaced the older |
Alright, that all seems reasonable. |
Same case here. I need open a window terminal with GitBash/WSL profile from a linux container. The terminal is always opened with Powershell profile and I can't change it. Why GitBash/WSL? Becase when a path appears in the local terminal, if I try click it (Open file in editor) the path separator will be converted to win32 style. |
I wanted my local terminal to be WSL when opening from Codespaces as well. I thought setting |
@Tyriar want to confirm my issue is the same as this issue because I don't use WSL just dev containers. When I'm in a dev container and try to I tried all the shell settings, but they are ignored- this is the same issue as this ticket right? Currently these are my only shell settings and when I open a non dev container project I get my default shell from
On Macos its even worse because I can't even throw a symlink in Is there currently no way to fix this and change the path of |
@Tyriar @red8888 I have the same issue. When I try to do My setup: I am running a docker container on a MacBook. When I do not open the project in a container, creating a terminal correctly connects to my local MacBook shell. When I open the project in a container, it connects to a shell within the docker container. But I want to open a terminal which connects to my MacBook shell even when I open a project in a container using dev containers. |
My workflow requires compilation in Linux, but running the produced artefact in Windows. This requires me constantly jumping between a whole variety of terminals, and is very inconvenient.
Currently there are numerous bits of disparate support for host shells and terminals when using remotes, but none of the solutions seem to actually work properly. This is especially evident when it comes to tasks.
My current approach involves using the WSL remote, with the following configuration.
Local terminals seem to have been added to the terminal dropdown with the WSL extension, due to the following being automatically added to my user settings;
Since WSL automatically mounts all windows drives, these paths seem to work correctly. These terminals seem to be running from the host, so any commands run are executed as the host PC rather than the WSL instance. This is useful, and allows running commands from both the WSL instance and the host. However, this seems to be a workaround exclusive to WSL due to it's automatic mounting of the windows drives and doesn't work for container remotes.
When opening the command palette, there are two interesting commands -
Terminal: Create New Terminal (In Active Workspace)
andTerminal: Create New Terminal (Local)
.The first seems to open a new terminal in the same manner as
Ctrl+Shift+'
, however the second is extremely weird and I can't find much documentation on it. It seems to open a local powershell on windows, but there's no configuration for it.It's not possible to add this terminal to
terminal.integrated.profiles.linux
to add it to the terminal choice dropdown, since it seems to be entirely separate to the rest of the terminal functionality and settings.It's also not possible to use this shell in any sort of tasks, since again it doesn't exist as a terminal profile and seems to be it's own separate thing.
Ultimately, there seems to be extremely inconsistent and unintuitive support for using the host shell, and it varies by the type of remote you're using. In addition, there seems to be little documentation on this, so what is actually possible is extremely vague.
To try and make this a bit more consistent, I suggest the following;
Terminal: Create New Terminal (Local)
as a source to add toterminal.integrated.profiles.*
, allowing it to be added to the shell dropdown and selected as the default.Terminal: Create New Terminal (Local)
.This should ultimately allow something like;
settings.json
This would make using local shells as easy as using remote shells. This would greatly improve the usability of Container remotes, and get rid of the hacky workarounds that are necessary for WSL remotes.
The text was updated successfully, but these errors were encountered: