# 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/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/connection.go#L76
- **Page:** https://libtmux.org/reference/go/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.
