Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-go latest

Server.NewSessionConnection

NewSessionConnection creates a session and an owned connection on tmux 3.7 or newer. With a live daemon, its creating control client is the first lane. Cold startup first creates a detached session, then pins and attaches to its qualified socket. An attachment failure can return that partial session. Cleanup closes owned clients; tmux policy decides whether the session lives. KillExisting is rejected because removal cannot be rolled back after a later connection failure.

Source and package
Qualified name
tmux.Server.NewSessionConnection
Package
tmux
Declared in
Server
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/connection.go

tmux command#

The tmux commands behind NewSessionConnection.

new-session list-sessions (a name is given)

tmux C API#

The C declarations in tmux that implement these commands.

Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.

Create a session and its first pane

  1. 1 cmd_new_session_exec
  2. calls → 2 spawn_window
  3. calls → 3 spawn_pane
  4. calls → 4 window_add_pane
  5. calls → 5 window_pane_create
Esc

Type to search.

Reference previewOpen reference