Cockpit: allow to resize the terminal widget

Created on 24 Mar 2015  路  23Comments  路  Source: cockpit-project/cockpit

The default size of the terminal widget is too small for me to be useful. There is currently no way to enlarge it. It would be nice to make the size customizable.

enhancement

Most helpful comment

Any updates on merging @larskarlitski 's changes? The small terminal size is almost unusable.

I've just updated the pull request.

All 23 comments

In it's very simplest form, I would suggest adding a maximize button. This would simply fill the frame from left to right, top to bottom.

Mockup

Yes, that sounds useful to me.

I started to work on this. Unfortunately, the terminal implementation is behaving weird. The size of terminal is 80x24 by default and this is the only working resolution. Other sizes do not respect number of columns/rows and act like 80x24 when displaying a content. The implementation is pretty confusing in some cases. Is this issue known?

image

I think a particular unix signal that needs to be sent to the process when the window size changes. Maybe this isn't so simple after all.

Maybe this isn't so simple after all.

But it would be very cool. :-)

I think a particular unix signal that needs to be sent to the process when the window size changes. Maybe this isn't so simple after all.

It looks like handling rows/columns is incorrectly implemented. Sending ^L or instantiating terminal with different size than 80x24 does not effect bogus behavior.

It looks like handling rows/columns is incorrectly implemented. Sending ^L or instantiating terminal with different size than 80x24 does not effect bogus behavior.

If you've identified a bug, then the upstream for the terminal code is _term.js_ here: https://github.com/chjj/term.js

This is not a starter issue. It involves ioctl().

According to : https://github.com/chjj/term.js/issues/117, term.js seems to be quite dead, or becoming so, and people are talking about xterm.js as the next iteration.

@Pazns Interesting. If you're interested in porting to xterm.js I'd be happy to help review code and help with setup and testing.

Why don't we just have the terminal be full size all the time? I can't think of a good reason why anyone would want a small terminal rather than one that fills the entire space.

Wouldn't need an extra button then, either.

@larsu I'd be fine with that as long as it doesn't break common terminal based apps. Although it's worth noting that typically terminals start with 80x25 and then are resizeable. @andreasn What do you think?

But either way, @larsu if you're interested in working on this, the cockpit stream channel needs a new control message that is sent from frontend -> bridge and does a ioctl(fd, TIOCGWINSZ, &ws) or equivalent.

But either way, @larsu if you're interested in working on this, the cockpit stream channel needs a new control message that is sent from frontend -> bridge and does a ioctl(fd, TIOCGWINSZ, &ws) or equivalent.

Would love to. Assigning to myself.

@larsu Without the correct Terminal Resize event handling, what will happen if the terminal is created when the window is large at first, and then shrinked ?

@larsu Without the correct Terminal Resize event handling, what will happen if the terminal is created when the window is large at first, and then shrinked ?

Without correct resizing, resizing won't work ;) I'll have to fix this correctly either way.

@larsu I'd be fine with that as long as it doesn't break common terminal based apps. Although it's worth noting that typically terminals start with 80x25 and then are resizeable. @andreasn What do you think?

Yeah, apps breaking is what would worry me as well.

For things like embedded terminals for things like the docker page is another case where they need to stay the same size as now.

I would also worry about a terminal being bigger than the window, and the actual promt being hidden below the fold.

If those are taken care of, I think I'm fine with a bigger terminal.

I've put up a branch at #4633 which makes the terminal fullscreen.

I'd appreciate some testing and design input for that.

Any updates on merging @larskarlitski 's changes? The small terminal size is almost unusable.

Any updates on merging @larskarlitski 's changes? The small terminal size is almost unusable.

I've just updated the pull request.

Nice - Thanks you Lars.

Hi,

Why do no do the same thing on the terminals of Docker containers ?
That can be pretty helpful, this terminal is actually little and seem not most comfortable to use

Why do no do the same thing on the terminals of Docker containers ?

None just did it. But also now docker plugin is being replaced by podman plugin where terminal resizes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cedroid09 picture cedroid09  路  5Comments

vazquezrodjoel picture vazquezrodjoel  路  8Comments

851d229 picture 851d229  路  6Comments

digitalformula picture digitalformula  路  3Comments

mehdiMj-ir picture mehdiMj-ir  路  5Comments