0

I'm implementing a web-based, shared Linux terminal (using term.js), and one issue I'm facing is the potential screen size differences of various connected users. For e.g. if I set export COLUMNS=160, then people with small screens have badly formatted output when they do a ls etc.

I know screen allows you to share terminals - how does screen account for change in resolutions of individual users?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129

1 Answers1

1

On terminals with more lines than screen's current height, the "logical" bottom of the screen is marked with a line of dashes. On terminals with less characters than screen's current width, lines are truncated or also badly formatted. Having users have different terminal sizes is always a mess. screen fortunately has the command

Ctrl-A F (fit): Resize the window to the current region size.

This allows a user to override a previous user's insane setting.

Armali
  • 18,255
  • 14
  • 57
  • 171