The Jumpy Terminal
When you open the GNOME Terminal in Ubuntu and run certain command-line applications — such as htop, vim, nano, or SSH sessions to remote servers — the terminal window may unexpectedly resize itself. This automatic resizing often occurs because the remote application or TUI (text user interface) program sends escape sequences that request a specific number of columns and rows. When you resize the terminal manually afterward, the running application may not adapt correctly, leaving garbled output, misaligned tables, or a cursor that jumps to the wrong position. On tiling window managers, this automatic resizing conflicts with the tiling layout, causing cascading reflows of adjacent windows.
Preventing Automatic Terminal Resizing
To stop Ubuntu’s GNOME Terminal from automatically resizing its window when applications request specific dimensions, you must adjust the terminal profile’s size behaviour.
Open GNOME Terminal. Click the hamburger menu (three horizontal lines) in the top-right corner and select Preferences. In the Preferences window, click on your active profile (usually “Unnamed” or “Default”) in the left sidebar. Navigate to the settings area and look for size-related options. Unfortunately, GNOME Terminal does not expose a direct “prevent resizing” toggle. The most effective workaround is to set a fixed initial size: set the Columns and Rows fields to your preferred dimensions (e.g., 120 columns, 35 rows). Then, ensure you launch applications with the COLUMNS and LINES environment variables unset, or run stty cols 120 rows 35 at the start of your session to override any remote resize requests. For a more robust solution, switch to a terminal emulator that explicitly supports resize locking, such as Alacritty (configured via window.dimensions in its YAML config) or Kitty (using remember_window_size yes and initial_window_width/height).