# server.NewSessionOptions.environment

- **Module:** server.NewSessionOptions
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server.rs#L2226
- **Page:** https://libtmux.org/en/rs/latest/reference/server-newsessionoptions-environment/

```
server.NewSessionOptions.environment(mut, name: impl Into<OsString>, value: impl Into<OsString>) -> Self
```

Set an environment variable for the process the new session starts.

Call this more than once for more than one variable. tmux applies
these to the new process only, not to the session. The value is not
format-expanded, so it needs no escaping.
