Skip to content

Default shell should be set using chsh #70

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

Closed
danlamanna opened this issue May 13, 2025 · 1 comment
Closed

Default shell should be set using chsh #70

danlamanna opened this issue May 13, 2025 · 1 comment

Comments

@danlamanna
Copy link

As of #17 the default shell is set using a VSCode setting instead of changing the shell of the user via chsh (e.g. https://github.com/nils-geistmann/devcontainers-features/blob/712d8a4fc8ad1557eee806864ce726a55da3ed65/src/zsh/install.sh#L17). This makes it difficult for downstream users to override in an automated fashion with something like https://code.visualstudio.com/docs/devcontainers/containers#_personalizing-with-dotfile-repositories.

The context for this is larger projects with multiple developers with different shell preferences. I think this should be resolved via:

  1. Adding an option for if fish should be set to the default shell (defaulting to true to preserve backward compatibility)
  2. Remove the setting customization
  3. Run chsh inside install.sh if the option is set to true

Does this sound reasonable? If so I can file a PR.

@eitsupi
Copy link
Collaborator

eitsupi commented May 13, 2025

I am not sure of your use case.
What tool are you trying to use the Dev Container Feature from?

This setting only affects vscode, and I believe the setting in settings.json at the project level takes precedence.

"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "fish"
}
}
},

IIUC, fish is not POSIX shell compatible and may cause problems if set as the default shell.
So I don't think such a change is allowed here.

I would recommend removing the fish Feature for such a large project where only certain users use fish.
Instead, set it to dev.containers.defaultFeatures in VS Code's personal settings so that fish will always be installed.
(You may want to see https://github.com/orgs/devcontainers/discussions/60)

@eitsupi eitsupi closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants