Support more easily switching default shells in Che workspaces #22009
Labels
area/udi
Issues and PRs related to the universal developer image https://github.com/devfile/developer-images
kind/enhancement
A feature request - must adhere to the feature request template.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
severity/P2
Has a minor but important impact to the usage or development of the system.
Is your enhancement related to a problem? Please describe
It would be useful to be able to select the shell used for workspace terminal sessions. From brief testing, it appears the Che Code editor will default to using the login shell for the current user in
/etc/passwd
, but this can be overridden by using the$SHELL
environment variable.Describe the solution you'd like
Assuming it doesn't bloat the image size too much, the UDI image should include multiple shells (bash, zsh at minimum) with basic configurations (
.bashrc
,.zshrc
, etc). Then, users could select their preferred shell by setting the$SHELL
environment variable in their devfile.A further step could be to enable selecting the shell prompt when creating the workspace, e.g. via factory parameter or dashboard UI element.
Note, in my testing,
zsh
requires a~/.zshrc
to exist on startup, or it will prompt the user to set one up on launch.Describe alternatives you've considered
It's not necessary to do anything here; if the development image includes the desired shell, it's sufficient to set the
$SHELL
environment variable. This issue is more about making it convenient in default workspaces.Additional context
To aid in testing, I've built
quay.io/amisevsk/web-terminal-tooling:zsh
as an image that includes bothbash
andzsh
. Switching shells for Che Code can be tested by applying the following DevWorkspace to a cluster with Che installed:The text was updated successfully, but these errors were encountered: