David542
David542

Reputation: 110163

Tmux window size locked

I have an old tmux session that when I open it via tmux a -t MySession it has a frozen width:

enter image description here

However, whenever I create a new tmux session, the width can be resized and such 'normally' -- the size only 'freezes' after exiting and re-entering:

enter image description here

Is there a way to prevent this, or to enable resizing the window once again, or do I literally have to delete the tmux session and re-create it to 'recapture' a flexible width?

Upvotes: 3

Views: 1712

Answers (1)

jeremysprofile
jeremysprofile

Reputation: 11435

Based on your <prefix>:list-clients output, you have other clients connected. These sessions can be other users on the system, or clients you accidentally kept active.

These others clients are what's causing tmux to be stuck in a smaller window size. tmux only allows the window size to match the smallest connected client, so that multiple users can access the client at the same time (which is a super useful feature that most people don't take advantage of).

If you don't care about sharing your sessions, you should switch the way you connect to tmux from -t <Session> to -dt <Session>. the -d will disconnect all other clients from your session, allowing your current client to be the only one setting the maximum dimensions.

If you want to disconnect individual clients, use <prefix> D (that's ShiftD, not just d), to view clients, and hit enter when you've highlighted the one you wish to disconnect.

Upvotes: 5

Related Questions