shell-pool / shpool

Think tmux, then aim... lower
Apache License 2.0
1.17k stars 20 forks source link

shpool hides the motd when immediately executed #5

Closed ethanpailes closed 7 months ago

ethanpailes commented 8 months ago

Right now, if you follow the advice in the README and configure shpool to immediately connect when you ssh into a remote machine, any MOTD (message of the day) will get hidden. To fix this, shpool should be able to read the MOTD and display it to users when first launching a shell or reconnecting.

I think this should be controlled with some new config options

mod_display_mode - { pager = "<cmd>" } | dump, controls how the MOTD is shown to the user. default { pager = "less" } motd - never | attach | new_session, controls when the MOTD is shown (never, whenever a user connects, or only for new shells). Initially will default to never, but will default to attach after a while.

This is a migration of the internal bug b/303261756

I've already started work on a tool to dump the motd over at github.com/shell-pool/motd

ethanpailes commented 7 months ago

https://github.com/shell-pool/shpool/pull/6 and https://github.com/shell-pool/shpool/pull/8 together resolve this issue.