# tmux.Session.OpenControl

- **Module:** tmux.Session
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/connection.go#L87
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-session-opencontrol/

```
tmux.Session.OpenControl(ctx: context.Context, options: ConnectionOptions) -> (*Connection, error)
```

OpenControl opens terminal control-mode transport to the receiver's daemon. The returned connection owns its lanes and must be closed. A receiver already bound to a connection cannot be rebound. Before tmux 3.6, destroying the attached session follows that session's detach-on-destroy policy and may end the connection.
