# 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/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/SessionSpec.java#L87
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-sessionspec-sessionspec-detached/

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

Always true, and not a choice.

{@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.
