Skip to content

Commit a42b660

Browse files
committed
[supervisor] welcome message for ssh conn
1 parent cc9696d commit a42b660

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

components/supervisor/pkg/supervisor/supervisor.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ func Run(options ...RunOption) {
283283
// TODO(cw): provide better feedback if the IDE start fails because of the dotfiles (provide any feedback at all).
284284
installDotfiles(ctx, cfg, tokenService, childProcEnvvars)
285285
configureSSHDefaultDir(cfg)
286+
configureSSHMessageOfTheDay()
286287
}
287288

288289
var ideWG sync.WaitGroup
@@ -1587,6 +1588,24 @@ func configureSSHDefaultDir(cfg *Config) {
15871588
}
15881589
}
15891590

1591+
func configureSSHMessageOfTheDay() {
1592+
msg := []byte(`Welcome to Gitpod - Always ready to code. You can use commands below to be more productive.
1593+
1594+
gp tasks list List all your defined tasks in .gitpod.yml
1595+
gp tasks attach Attach to a workspace task
1596+
1597+
gp ports list Lists workspace ports and their states
1598+
gp timeout extend Extend timeout of current workspace
1599+
gp top Display usage of workspace resources (CPU and memory)
1600+
gp stop Stop current workspace
1601+
1602+
Use gp help to learn more about gp CLI. Visit also https://gitpod.io/docs`)
1603+
1604+
if err := ioutil.WriteFile("/etc/motd", msg, 0o644); err != nil {
1605+
log.WithError(err).Error("write /etc/motd failed")
1606+
}
1607+
}
1608+
15901609
func runAsGitpodUser(cmd *exec.Cmd) *exec.Cmd {
15911610
if cmd.SysProcAttr == nil {
15921611
cmd.SysProcAttr = &syscall.SysProcAttr{}

0 commit comments

Comments
 (0)