Disable Window Resizing in PuTTY
Lock your terminal window size for consistent layouts and better alignment
Why Restrict Terminal Resizing?
Disabling window resizing in PuTTY can be beneficial in several scenarios:
- Fixed layouts: Some applications expect a specific terminal size (80x24, 132x24)
- Alignment issues: Prevent text misalignment when window size changes
- TUI applications: Text-based interfaces (ncurses, tmux, htop) work better with fixed dimensions
- Consistent screenshots: Maintain uniform dimensions for documentation
- Prevent accidents: Avoid accidentally dragging window edges
- Legacy systems: Old systems may not handle dynamic resizing well
Note: While disabling resizing gives you a fixed window, you can still adjust the initial window size before connecting.
Configuration Steps
Method 1: PuTTY GUI Configuration (Recommended)
- Launch PuTTY:
- Open
putty.exe
- Load an existing session or create a new one
- Open
- Navigate to Window Settings:
- In the left panel, click on Window
- You'll see "Set various options for PuTTY's window"
- Configure Resize Behavior:
- Find the section titled "When window is resized:"
- You'll see three radio button options
- Select Forbid Resizing:
- Click on "Forbid resizing completely"
- This prevents all window resizing via mouse or programmatically
- Set Initial Window Size (Optional):
- In the same Window category, set "Rows" and "Columns"
- Common sizes:
- 80 columns × 24 rows (standard)
- 132 columns × 24 rows (wide)
- 80 columns × 43 rows (tall)
- Save Your Configuration:
- Return to the Session category
- Select your session name from the list
- Click "Save"
- Test the Configuration:
- Click "Open" to connect
- Try to resize the window by dragging edges
- The window should remain fixed in size
Understanding Resize Options
PuTTY offers three resize behaviors:
Option | Behavior |
---|---|
Change the number of rows and columns | Window can be resized freely; terminal dimensions adjust accordingly (default) |
Change the size of the font | Window can be resized; terminal dimensions stay fixed, font size changes |
Forbid resizing completely | Window cannot be resized by dragging; terminal dimensions are locked |
Method 2: Command-Line Settings
You can launch PuTTY with specific window dimensions from the command line:
# Windows Command Prompt
putty.exe -load "SessionName"
# Or specify dimensions directly
putty.exe user@hostname -rows 24 -cols 80
Note: Command-line options don't prevent resizing; you still need to configure "Forbid resizing completely" in the saved session settings.
Method 3: Registry Settings (Advanced)
For advanced users, you can modify PuTTY settings directly in the Windows Registry:
⚠️ Warning: Editing the registry can cause system instability if done incorrectly. Always backup the registry before making changes.
- Open Registry Editor:
- Press
Win + R
- Type
regedit
and press Enter
- Press
- Navigate to PuTTY Sessions:
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
- Find your session name folder
- Modify Resize Setting:
- Find the key:
WindowDefResize
- Set value to
0
(forbid resizing) - Values: 0 = forbid, 1 = change font, 2 = change rows/cols
- Find the key:
- Set Window Dimensions:
TermWidth
= 80 (columns)TermHeight
= 24 (rows)
Impact of Disabling Resize
Benefits
- Consistent layouts: Applications like htop, vim, emacs maintain proper alignment
- No reflow issues: Text doesn't wrap unexpectedly when window changes
- Better for tmux/screen: Terminal multiplexers work more predictably
- Professional appearance: Uniform window sizes for presentations
- Prevents confusion: No need to adjust terminal after accidental resize
Potential Drawbacks
- Less flexibility: Can't adjust on the fly for different tasks
- May need multiple sessions: Different sizes for different purposes
- Fixed font size: Can't zoom in/out by resizing
- Screen space: May not utilize available screen real estate efficiently
Tip: Create multiple saved sessions with different fixed sizes for different use cases (80x24 for logs, 132x43 for coding, etc.).
Common Use Cases
1. Database Administrators
Scenario: Running MySQL or PostgreSQL CLI tools
- Fixed 132 columns for wide table output
- 24-30 rows for viewing query results
- Prevents column misalignment when tables are displayed
2. System Monitoring
Scenario: Running htop, top, or glances
- Fixed dimensions prevent UI corruption
- Consistent view across multiple servers
- Easier to compare metrics side-by-side
3. Text Editors (vim, nano, emacs)
Scenario: Editing configuration files or code
- 80 columns for code style guidelines
- 40+ rows for viewing more context
- No line rewrapping during editing
4. Log Viewing
Scenario: Monitoring log files with tail -f
- Wide columns (120-132) for full log lines
- Tall window (40+ rows) for more history
- Prevents log line wrapping
Advanced Configuration
Setting Custom Dimensions
Standard terminal sizes:
- 80×24: Classic VT100/VT220 terminal size
- 80×43: EGA text mode
- 132×24: VT100 wide mode
- 132×43: Wide and tall
- 120×40: Modern widescreen compromise
- Custom: Set any value based on your needs
Combining with Other Window Settings
Enhance your fixed-size window configuration:
Window → Appearance:
- Set font size appropriately for your fixed dimensions
- Larger font = fewer visible characters per row/column
- Courier New 10pt is a good default
Window → Behaviour:
- Disable "System menu appears on ALT alone" for cleaner interface
- Set "Window title" to identify different fixed-size sessions
Scripting and Automation
Launch multiple fixed-size windows programmatically:
@echo off
REM Launch multiple monitoring windows
start "DB Server" putty.exe -load "Database-132x30"
start "Web Server 1" putty.exe -load "WebServer1-80x24"
start "Web Server 2" putty.exe -load "WebServer2-80x24"
start "Log Monitor" putty.exe -load "Logs-160x50"
Troubleshooting
Window Still Resizes
Possible causes:
- Setting wasn't saved to the session
- Loading a different session that allows resizing
- Using PuTTY alternatives (KiTTY, SuperPuTTY) with different behavior
Solutions:
- Verify you saved the session after changing settings
- Reload the session: select it and click "Load"
- Check that "Forbid resizing completely" is selected
- Try creating a new session from scratch
Application Doesn't Fit in Fixed Window
Solutions:
- Increase rows/columns to accommodate the application
- Use a smaller font size to fit more content
- Configure the application to use fewer columns (if supported)
- Consider creating a larger fixed-size session specifically for that app
Text Appears Cut Off
Causes:
- Terminal dimensions don't match actual window size
- Font size too large for the set dimensions
Solutions:
- Window → Appearance: Reduce font size
- Window: Increase rows/columns
- Connection → Data: Check terminal-type string is correct
Best Practices
- ✅ Create separate sessions for different window size needs
- ✅ Use descriptive session names that include dimensions (e.g., "Server-132x43")
- ✅ Test your fixed size with common applications before committing
- ✅ Match terminal dimensions to your most-used applications
- ✅ Consider using 132 columns for modern widescreen monitors
- ✅ Save a "Default-Flexible" session that allows resizing for general use
- ❌ Don't use fixed sizing for interactive shells where flexibility is needed
- ❌ Don't set dimensions too small (minimum 80x24 recommended)
Alternatives to Disabling Resize
Option 1: Resize Changes Font Size
Instead of forbidding resize, you can keep terminal dimensions fixed while allowing window resize to change the font size. This gives you zoom functionality while maintaining layout.
Option 2: Use Terminal Multiplexers
Tools like tmux or GNU Screen manage terminal dimensions independently:
- Allow window resizing while keeping session dimensions consistent
- Provides viewport into fixed-size terminal
- Better for complex workflows