What is the âcontrol modeâ in tmux?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
According to man tmux
to check the launch option:
-C: Start in control mode (see the CONTROL MODE section). Given
twice (-CC) disables echo.
Then in the control mode section of the man tmux
, there is the following description:
CONTROL MODE
tmux offers a textual interface called control mode. This allows
applications to communicate with tmux using a simple text-only protocol.
In control mode, a client sends tmux commands or command sequences
terminated by newlines on standard input. Each command will produce one
block of output on standard output. An output block consists of a %begin
line followed by the output (which may be empty). The output block ends
with a %end or %error. %begin and matching %end or %error have two
arguments: an integer time (as seconds from epoch) and command number.
For example:
%begin 1363006971 2
0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
%end 1363006971 2
The refresh-client -C command may be used to set the size of a client in
control mode.
In control mode, tmux outputs notifications. A notification will never
occur inside an output block.
I'm not sure what it means, but at least as far as I try a few commands and try to see the looks and feels of it via (tmux -CC
), it looks like the same as when I launch via tmux new-session
.
So what is the "control mode" and what makes it different from the normal mode?
EDIT
I found that the session and the window that was launched via the control mode (-CC
) does not react to the keyboard shortcut of the tmux commands, such as window split. So what is the point of using the control mode in the first place?
tmux
 |Â
show 4 more comments
up vote
0
down vote
favorite
According to man tmux
to check the launch option:
-C: Start in control mode (see the CONTROL MODE section). Given
twice (-CC) disables echo.
Then in the control mode section of the man tmux
, there is the following description:
CONTROL MODE
tmux offers a textual interface called control mode. This allows
applications to communicate with tmux using a simple text-only protocol.
In control mode, a client sends tmux commands or command sequences
terminated by newlines on standard input. Each command will produce one
block of output on standard output. An output block consists of a %begin
line followed by the output (which may be empty). The output block ends
with a %end or %error. %begin and matching %end or %error have two
arguments: an integer time (as seconds from epoch) and command number.
For example:
%begin 1363006971 2
0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
%end 1363006971 2
The refresh-client -C command may be used to set the size of a client in
control mode.
In control mode, tmux outputs notifications. A notification will never
occur inside an output block.
I'm not sure what it means, but at least as far as I try a few commands and try to see the looks and feels of it via (tmux -CC
), it looks like the same as when I launch via tmux new-session
.
So what is the "control mode" and what makes it different from the normal mode?
EDIT
I found that the session and the window that was launched via the control mode (-CC
) does not react to the keyboard shortcut of the tmux commands, such as window split. So what is the point of using the control mode in the first place?
tmux
1
tmux does support copy and paste, seecapture-pane
andsave-buffer
and related commands
â thrig
Jul 4 at 13:44
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins liketmux-yank
, though I have not tried it yet.
â Blaszard
Jul 4 at 13:54
Do you already have atmux
session running when you trytmux -C
ortmux -CC
?
â JigglyNaga
Jul 4 at 17:07
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08
 |Â
show 4 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
According to man tmux
to check the launch option:
-C: Start in control mode (see the CONTROL MODE section). Given
twice (-CC) disables echo.
Then in the control mode section of the man tmux
, there is the following description:
CONTROL MODE
tmux offers a textual interface called control mode. This allows
applications to communicate with tmux using a simple text-only protocol.
In control mode, a client sends tmux commands or command sequences
terminated by newlines on standard input. Each command will produce one
block of output on standard output. An output block consists of a %begin
line followed by the output (which may be empty). The output block ends
with a %end or %error. %begin and matching %end or %error have two
arguments: an integer time (as seconds from epoch) and command number.
For example:
%begin 1363006971 2
0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
%end 1363006971 2
The refresh-client -C command may be used to set the size of a client in
control mode.
In control mode, tmux outputs notifications. A notification will never
occur inside an output block.
I'm not sure what it means, but at least as far as I try a few commands and try to see the looks and feels of it via (tmux -CC
), it looks like the same as when I launch via tmux new-session
.
So what is the "control mode" and what makes it different from the normal mode?
EDIT
I found that the session and the window that was launched via the control mode (-CC
) does not react to the keyboard shortcut of the tmux commands, such as window split. So what is the point of using the control mode in the first place?
tmux
According to man tmux
to check the launch option:
-C: Start in control mode (see the CONTROL MODE section). Given
twice (-CC) disables echo.
Then in the control mode section of the man tmux
, there is the following description:
CONTROL MODE
tmux offers a textual interface called control mode. This allows
applications to communicate with tmux using a simple text-only protocol.
In control mode, a client sends tmux commands or command sequences
terminated by newlines on standard input. Each command will produce one
block of output on standard output. An output block consists of a %begin
line followed by the output (which may be empty). The output block ends
with a %end or %error. %begin and matching %end or %error have two
arguments: an integer time (as seconds from epoch) and command number.
For example:
%begin 1363006971 2
0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
%end 1363006971 2
The refresh-client -C command may be used to set the size of a client in
control mode.
In control mode, tmux outputs notifications. A notification will never
occur inside an output block.
I'm not sure what it means, but at least as far as I try a few commands and try to see the looks and feels of it via (tmux -CC
), it looks like the same as when I launch via tmux new-session
.
So what is the "control mode" and what makes it different from the normal mode?
EDIT
I found that the session and the window that was launched via the control mode (-CC
) does not react to the keyboard shortcut of the tmux commands, such as window split. So what is the point of using the control mode in the first place?
tmux
edited Jul 5 at 9:50
asked Jul 4 at 13:34
Blaszard
121117
121117
1
tmux does support copy and paste, seecapture-pane
andsave-buffer
and related commands
â thrig
Jul 4 at 13:44
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins liketmux-yank
, though I have not tried it yet.
â Blaszard
Jul 4 at 13:54
Do you already have atmux
session running when you trytmux -C
ortmux -CC
?
â JigglyNaga
Jul 4 at 17:07
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08
 |Â
show 4 more comments
1
tmux does support copy and paste, seecapture-pane
andsave-buffer
and related commands
â thrig
Jul 4 at 13:44
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins liketmux-yank
, though I have not tried it yet.
â Blaszard
Jul 4 at 13:54
Do you already have atmux
session running when you trytmux -C
ortmux -CC
?
â JigglyNaga
Jul 4 at 17:07
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08
1
1
tmux does support copy and paste, see
capture-pane
and save-buffer
and related commandsâ thrig
Jul 4 at 13:44
tmux does support copy and paste, see
capture-pane
and save-buffer
and related commandsâ thrig
Jul 4 at 13:44
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins like
tmux-yank
, though I have not tried it yet.â Blaszard
Jul 4 at 13:54
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins like
tmux-yank
, though I have not tried it yet.â Blaszard
Jul 4 at 13:54
Do you already have a
tmux
session running when you try tmux -C
or tmux -CC
?â JigglyNaga
Jul 4 at 17:07
Do you already have a
tmux
session running when you try tmux -C
or tmux -CC
?â JigglyNaga
Jul 4 at 17:07
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08
 |Â
show 4 more comments
2 Answers
2
active
oldest
votes
up vote
1
down vote
The interesting aspect of control mode is that
you can write a background process that listens to a real tmux process. It gets notifications of
things happening in the real tmux, and it can then send
commands. If you use 2
terminals and run a normal session in one
tmux new -s mysession
and in the other
tmux -C attach -t mysession
then when you split windows, add new ones, or close them in the normal tmux
you will get lines like
%layout-change @2 91a8,80x23,0,0[80x11,0,0,5,80x11,0,12,7]
%window-add @3
%window-close @1
in the control tmux, to which you can react by writing a program. To help
there is a python library to exploit
this mechanism. See the examples there.
add a comment |Â
up vote
0
down vote
You are seeing similar results from tmux -CC
as you would from tmux new-session
because you didn't specify a command, so tmux
uses the default, which is new-session
:
command [flags]
This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is assumed.
Adding -CC
doesn't appear to change that. To control the existing session, you should attach to it in control mode:
tmux -C attach
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The interesting aspect of control mode is that
you can write a background process that listens to a real tmux process. It gets notifications of
things happening in the real tmux, and it can then send
commands. If you use 2
terminals and run a normal session in one
tmux new -s mysession
and in the other
tmux -C attach -t mysession
then when you split windows, add new ones, or close them in the normal tmux
you will get lines like
%layout-change @2 91a8,80x23,0,0[80x11,0,0,5,80x11,0,12,7]
%window-add @3
%window-close @1
in the control tmux, to which you can react by writing a program. To help
there is a python library to exploit
this mechanism. See the examples there.
add a comment |Â
up vote
1
down vote
The interesting aspect of control mode is that
you can write a background process that listens to a real tmux process. It gets notifications of
things happening in the real tmux, and it can then send
commands. If you use 2
terminals and run a normal session in one
tmux new -s mysession
and in the other
tmux -C attach -t mysession
then when you split windows, add new ones, or close them in the normal tmux
you will get lines like
%layout-change @2 91a8,80x23,0,0[80x11,0,0,5,80x11,0,12,7]
%window-add @3
%window-close @1
in the control tmux, to which you can react by writing a program. To help
there is a python library to exploit
this mechanism. See the examples there.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The interesting aspect of control mode is that
you can write a background process that listens to a real tmux process. It gets notifications of
things happening in the real tmux, and it can then send
commands. If you use 2
terminals and run a normal session in one
tmux new -s mysession
and in the other
tmux -C attach -t mysession
then when you split windows, add new ones, or close them in the normal tmux
you will get lines like
%layout-change @2 91a8,80x23,0,0[80x11,0,0,5,80x11,0,12,7]
%window-add @3
%window-close @1
in the control tmux, to which you can react by writing a program. To help
there is a python library to exploit
this mechanism. See the examples there.
The interesting aspect of control mode is that
you can write a background process that listens to a real tmux process. It gets notifications of
things happening in the real tmux, and it can then send
commands. If you use 2
terminals and run a normal session in one
tmux new -s mysession
and in the other
tmux -C attach -t mysession
then when you split windows, add new ones, or close them in the normal tmux
you will get lines like
%layout-change @2 91a8,80x23,0,0[80x11,0,0,5,80x11,0,12,7]
%window-add @3
%window-close @1
in the control tmux, to which you can react by writing a program. To help
there is a python library to exploit
this mechanism. See the examples there.
answered Jul 4 at 17:59
meuh
29k11648
29k11648
add a comment |Â
add a comment |Â
up vote
0
down vote
You are seeing similar results from tmux -CC
as you would from tmux new-session
because you didn't specify a command, so tmux
uses the default, which is new-session
:
command [flags]
This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is assumed.
Adding -CC
doesn't appear to change that. To control the existing session, you should attach to it in control mode:
tmux -C attach
add a comment |Â
up vote
0
down vote
You are seeing similar results from tmux -CC
as you would from tmux new-session
because you didn't specify a command, so tmux
uses the default, which is new-session
:
command [flags]
This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is assumed.
Adding -CC
doesn't appear to change that. To control the existing session, you should attach to it in control mode:
tmux -C attach
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You are seeing similar results from tmux -CC
as you would from tmux new-session
because you didn't specify a command, so tmux
uses the default, which is new-session
:
command [flags]
This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is assumed.
Adding -CC
doesn't appear to change that. To control the existing session, you should attach to it in control mode:
tmux -C attach
You are seeing similar results from tmux -CC
as you would from tmux new-session
because you didn't specify a command, so tmux
uses the default, which is new-session
:
command [flags]
This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is assumed.
Adding -CC
doesn't appear to change that. To control the existing session, you should attach to it in control mode:
tmux -C attach
answered Jul 4 at 18:05
JigglyNaga
2,556623
2,556623
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453436%2fwhat-is-the-control-mode-in-tmux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
tmux does support copy and paste, see
capture-pane
andsave-buffer
and related commandsâ thrig
Jul 4 at 13:44
@thrig Sorry what I read was wrong; tmux does support it but does not the mouse-based copy & paste. It seems feasible via third-party plugins like
tmux-yank
, though I have not tried it yet.â Blaszard
Jul 4 at 13:54
Do you already have a
tmux
session running when you trytmux -C
ortmux -CC
?â JigglyNaga
Jul 4 at 17:07
@JigglyNaga I tried both situations but the result was consistent.
â Blaszard
Jul 4 at 17:31
@Blaszard if you enable mouse support, you can enable copy by highlighting with your mouse.
â rovr138
Jul 4 at 18:08