# io.github.libtmux.SessionSpec.SessionSpec.detached

- **Module:** io.github.libtmux.SessionSpec.SessionSpec
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/SessionSpec.java#L82
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-sessionspec-sessionspec-detached/

```
io.github.libtmux.SessionSpec.SessionSpec.detached() -> boolean
```

Always true, and not a choice.

<p>{@code new-session} attaches unless told not to, and attaching needs a terminal — from a
process without one it fails with {@code open terminal failed}. A library is usually called
from something that has no tty, so the session is always created detached. {@link WindowSpec}
and {@link SplitSpec} default the other way, because their commands need no terminal.
