Skip to content
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 more easily switching default shells in Che workspaces #22009

Closed
amisevsk opened this issue Feb 17, 2023 · 4 comments
Closed

Support more easily switching default shells in Che workspaces #22009

amisevsk opened this issue Feb 17, 2023 · 4 comments
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.

Comments

@amisevsk
Copy link
Contributor

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 both bash and zsh. Switching shells for Che Code can be tested by applying the following DevWorkspace to a cluster with Che installed:

kubectl apply -f https://gist.githubusercontent.com/amisevsk/986b628d26a61427fd2f679ddd414ee1/raw/8ee302f8ee4cece8787809e82229b289257c4521/shell-test.devworkspace.yaml
@amisevsk amisevsk added kind/enhancement A feature request - must adhere to the feature request template. area/udi Issues and PRs related to the universal developer image https://github.com/devfile/developer-images labels Feb 17, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 17, 2023
@amisevsk amisevsk added severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 17, 2023
@l0rd
Copy link
Contributor

l0rd commented Mar 3, 2023

Added to #20799

@che-bot
Copy link
Contributor

che-bot commented Aug 30, 2023

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 30, 2023
@l0rd
Copy link
Contributor

l0rd commented Aug 30, 2023

/remove-lifecycle stale

@che-bot che-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 30, 2023
@che-bot
Copy link
Contributor

che-bot commented Feb 26, 2024

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 26, 2024
@che-bot che-bot closed this as completed Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants