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

[xterm.js 0.4.7-s] scaling problem #859

Closed
GusevVictor opened this issue Jan 24, 2020 · 13 comments · Fixed by #868
Closed

[xterm.js 0.4.7-s] scaling problem #859

GusevVictor opened this issue Jan 24, 2020 · 13 comments · Fixed by #868
Assignees
Labels

Comments

@GusevVictor
Copy link

Step to reproduce:

  • use Windows as client (firefox ESR 68)
  • upgrade to v 0.4.7-s
  • connect to any linux host by xterm.js
  • just see screens

изображение

изображение

THE GOOD NEWS: MC WORKS in xterm.js. YES! YES YES

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

Do you mind explaining how you got to that screen? I'll try fixing the issue if I can find out how to get there..

@GusevVictor
Copy link
Author

GusevVictor commented Jan 24, 2020

Do you mind explaining how you got to that screen? I'll try fixing the issue if I can find out how to get there..

Just open and noting else. Please see screens:

изображение

I have type mc command (for example):

изображение

See the result
изображение

I didn't resize a browser window.

p.s. sorry for russian lang screens.

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

Yes I see the problem. MC doesn't send stty resize commands to set the amount of rows and columns. I'm not sure how one would go about dynamically resizing the terminal without spamming the terminal with stty commands.

@GusevVictor
Copy link
Author

GusevVictor commented Jan 24, 2020

There is not only mc problem, also top, htop

изображение

изображение

WOW bash eats 100% CPU... Hm... Very strange.

@GusevVictor
Copy link
Author

Wow...

изображение

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

I have a fix, I'll implement it when I have time (20 minutes maybe?)

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

Ok I was going to implement this:
copy/v86#172 (comment)

But this significantly slows down running of commands. My second thought is making the agent send a signal to the terminal client.

@GusevVictor
Copy link
Author

Wow..! How I can to test it? I need just wite for a new release of mesh? :)

@Ylianst Ylianst self-assigned this Jan 24, 2020
@Ylianst Ylianst added the bug label Jan 24, 2020
@Ylianst
Copy link
Owner

Ylianst commented Jan 24, 2020

I know about this problem, I just started working with XTerm yesterday morning and released it in the afternoon, so not everything is well yet. I was going to fix this by sending a signal to the terminal (not by using stty), it will take a while to fix.

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

@Ylianst that was how I was going to do it, I can do that for you if you want. How would you like me to send the data/identifier to send the signal? Just send it over the existing connection?

@Ylianst
Copy link
Owner

Ylianst commented Jan 24, 2020

Just published MeshCentral v0.4.7-t that will now set the right terminal size at the start and send the resize events to the agent. Bryan is working on getting the agent to resize the terminal now, you can search for 'termsize' in meshcore.js for the "TODO" lines.

We have an agreement that when sending data on the websockets, "binary" type is data and "string" data type is control. So we can easily multiplex the terminal and control data.

@JustTNE
Copy link
Contributor

JustTNE commented Jan 24, 2020

@Ylianst Well dammit I'm basically done doing this myself...

@Ylianst
Copy link
Owner

Ylianst commented Jan 24, 2020

If you have code for the 'termsize' in meshcore.js for the "TODO" lines, we would like that. Bryan and I are stumped as to how to reside the terminal once it's running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants