# LibTmux.NewSessionRequest.NewSessionRequest

- **Module:** LibTmux.NewSessionRequest
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Requests/NewSessionRequest.cs#L25
- **Page:** https://libtmux.org/reference/dotnet/libtmux-newsessionrequest-newsessionrequest/

```
LibTmux.NewSessionRequest.NewSessionRequest(name: string?, replaceExisting: bool, attach: bool, startDirectory: string?, windowName: string?, command: string?, width: string?, height: string?, environment: IReadOnlyDictionary<string, string>?, detachOthers: bool, noSize: bool, clientFlags: string?)
```

Initializes a session-creation request.

## Parameters

- `name` (string?) — The session name, or null to let tmux choose.
- `replaceExisting` (bool) — Whether a session of the same name is removed first.
- `attach` (bool) — Whether the new session is attached rather than detached.
- `startDirectory` (string?) — The working directory for the first pane.
- `windowName` (string?) — The name of the first window.
- `command` (string?) — The command the first pane runs.
- `width` (string?) — The requested width.
- `height` (string?) — The requested height.
- `environment` (IReadOnlyDictionary<string, string>?) — Environment entries set on the session.
- `detachOthers` (bool) — Whether other clients are detached on attach.
- `noSize` (bool) — Whether tmux may ignore the requested size.
- `clientFlags` (string?) — Comma-separated client flags passed with <c>-f</c>.
