aker-gateway / Aker

SSH bastion/jump host/jumpserver
Other
566 stars 81 forks source link

Window resize #90

Open brosky opened 5 years ago

brosky commented 5 years ago

Steps to reproduce:

  1. Start a session with a window at a random size, login to a terminal via Aker
  2. Resizing the window will cause the terminal boundaries to be fixed - even if you make the window larger, the terminal will stay at the login-time-coordinates. If I log-out / log-in to that box, the window size is ok, according to the new dimensions.
anazmy commented 5 years ago

What ssh client do you use? What is your terminal environment variable, "env|grep -i term" ? Can you attach a screenshot of the messed screen please?

brosky commented 5 years ago

I see this in logs:

Apr 16 18:32:17 sshgw-cj Aker: SSHClient ERROR - global name 'get_console_dimensions' is not defined

I'll attach later a screenshot too. I've recorded with asciinema a sample wrong wrapping, but on the screen looks wrong and the recording is fine :)

anazmy commented 5 years ago

Hmm, interesting. Please share all data above to check.

EoleDev commented 3 years ago

Hi @anazmy, I had the same issue with the terminal resize on i3. It seems you are using a signal (SIGWINCH) to catch a window resize. It seems this signal is not always sent, or working. As I saw on this example : https://github.com/sirosen/paramiko-shell/blob/master/interactive_shell.py you could check the terminal size on each iteration without much over cost (it seems). I implemented it on my aker version and all seems to work well since then.