Discussion:
Tmux control mode shrinks sessions, quits when attach -d
(too old to reply)
Tony Narlock
2015-04-29 19:14:09 UTC
Permalink
Tmux 1.9, Debian Jessie

Reproducing:


Control mode will resize / shrink session windows:

- Have no sessions running
- Start control mode: tmux -C
- Second terminal: tmux atta

Expected behavior:

tmux control mode shouldn't affect window sizes.


If attempting to detach with no other clients active, control mode quits:

- Run the above steps:
- instead of tmux attach, run tmux attach -d
- The control mode quits

Expected behavior:

tmux control mode shouldn't quit when another client runs 'tmux attach -d'
Nicholas Marriott
2015-04-29 19:32:03 UTC
Permalink
It's just another client. You can set the size somehow. switch-client -C maybe, or something with -C anyway

-------- Original message --------
From: Tony Narlock <***@git-pull.com>
Date:29/04/2015 20:14 (GMT+00:00)
To: tmux-users <tmux-***@lists.sourceforge.net>
Subject: Tmux control mode shrinks sessions, quits when attach -d

Tmux 1.9, Debian Jessie

Reproducing:


Control mode will resize / shrink session windows:

- Have no sessions running
- Start control mode: tmux -C
- Second terminal: tmux atta

Expected behavior:

tmux control mode shouldn't affect window sizes.


If attempting to detach with no other clients active, control mode quits:

- Run the above steps:
- instead of tmux attach, run tmux attach -d
- The control mode quits

Expected behavior:

tmux control mode shouldn't quit when another client runs 'tmux attach -d'
Tony Narlock
2015-04-29 20:43:27 UTC
Permalink
Yes,

However, this is preventing me from being able to use control mode reliably
to get session/window/pane information and orchestrate tmux. This is
actually why I ultimately abandoned using control mode in the first
iteration of my python wrapper.

I will give supporting this a shot in the wrapper. We back everything with
a pretty robust test suite - in fact it tests against multiple tmux
versions, with real tmux clients/sessions and live FORMATS data. The
flexibility / minimalism of FORMATS, -t target and list-* has been
especially helpful since 1.8+. So I'm in a better position see how swapping
those many shell commands with control mode affects things.

I may be able to handle the cases where control mode can quit.

I also believe I could encapsulate the tmux control mode into a separate
(temporary) session during the duration of a tmux.Server [2] object. It
does leave me the issue of sweeping them up and having my wrapper
potentially leave a zombie session.

However, as it stands, it would clean up *a lot* of logic in my wrapper if
future versions of tmux, control mode would have a flag / workaround for
what I mentioned.

[1] https://github.com/tony/tmuxp/blob/master/tmuxp/workspacebuilder.py
[2] https://github.com/tony/tmuxp/blob/master/.travis.yml
[3] https://github.com/tony/tmuxp/tree/master/tmuxp/testsuite

On Wed, Apr 29, 2015 at 2:32 PM, Nicholas Marriott <
Post by Nicholas Marriott
It's just another client. You can set the size somehow. switch-client -C
maybe, or something with -C anyway
If I rely on control mode to send commands, I may get bad FORMATS data back
for objects that could cause unexpected behavior when constructing /
freezing workspaces [1, above].

We use switch_client (
https://github.com/tony/tmuxp/search?utf8=%E2%9C%93&q=switch_client),
however, I've never seen it used with control mode. I'll dig into that
further , but I don't think it applies.
Post by Nicholas Marriott
-------- Original message --------
From: Tony Narlock
Date:29/04/2015 20:14 (GMT+00:00)
To: tmux-users
Subject: Tmux control mode shrinks sessions, quits when attach -d
Tmux 1.9, Debian Jessie
- Have no sessions running
- Start control mode: tmux -C
- Second terminal: tmux atta
tmux control mode shouldn't affect window sizes.
- instead of tmux attach, run tmux attach -d
- The control mode quits
tmux control mode shouldn't quit when another client runs 'tmux attach -d'
Loading...