Meshcentral: [xterm.js 0.4.7-s] scaling problem

Created on 24 Jan 2020  Â·  13Comments  Â·  Source: Ylianst/MeshCentral

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

bug

All 13 comments

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..

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.

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.

There is not only mc problem, also top, htop

изображение

изображение

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

Wow...

изображение

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

Ok I was going to implement this:
https://github.com/copy/v86/issues/172#issuecomment-397017560

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

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

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.

@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?

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.

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haxmachine picture haxmachine  Â·  3Comments

M1CK431 picture M1CK431  Â·  3Comments

Julien-asv picture Julien-asv  Â·  3Comments

unguzov picture unguzov  Â·  3Comments

robclay picture robclay  Â·  3Comments