-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[supervisor] improve ssh connected behaviors #10736
Conversation
66ccb42
to
2b3f40f
Compare
msg := []byte(` | ||
|
||
|
||
Welcome to Gitpod - Always ready to code. You use commands below to be more productive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions for this message 🙏? @loujaybee
} | ||
|
||
func configureSSHMessageOfTheDay() { | ||
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find a proper char to scroll terminal content to next page without clear history, (tried chars in this page on my computer)
} | ||
|
||
func configureSSHMessageOfTheDay() { | ||
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@loujaybee Please review text. 🙏
look into now |
9fbb0d1
to
16ee2b4
Compare
log.Error("cannot configure ssh default dir with empty repo root") | ||
return | ||
} | ||
file, err := os.OpenFile("/home/gitpod/.bashrc", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o644) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~/.ssh/rc
with -oPermitUserRC
not works, don't know why, so we choose .bashrc
to do it
} | ||
|
||
func configureSSHMessageOfTheDay() { | ||
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive. | |
msg := []byte(`Welcome to Gitpod: Always ready to code. Try the following commands to get started: |
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive. | ||
|
||
gp tasks list List all your defined tasks in .gitpod.yml | ||
gp tasks attach Attach to a workspace task |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gp tasks attach Attach to a workspace task | |
gp tasks attach Attach your terminal to a workspace task |
Thanks for fixing this one @mustard-mh ! :) This should help a few of our Vim users out 😝 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM, This is indeed an obvious change for the user, who won't see a bunch of weird env output anymore
/hold
in case you want to change welcome text
/werft run 👍 started the job as gitpod-build-hw-ssh-dir.9 |
started the job as gitpod-build-hw-ssh-dir.10 because the annotations in the pull request description changed |
feel free to unhold |
/unhold |
Description
When we connect to a workspace via SSH, the default folder is
~
, this PR change the default directory to$GITPOD_REPO_ROOT
, so that user can reach their code folder after conn succeedAfter ssh connected, it'll print environment vars in terminal, this PR will remove the log behavior.
After ssh connected, we will print a graceful welcome message for users to tell them useful commands
Related Issue(s)
Fixes #9377
How to test
See if print message as expected after ssh connected
Test if it works
Test if not change original behavior
cd
into any folderSplit
button (orcommand+\
on MacOS)pwd
with previous terminalRelease Notes
Documentation
Werft options: