# server.Server.resolved_tmux_executable

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

```
server.Server.resolved_tmux_executable(self) -> Option<PathBuf>
```

Resolve the configured tmux executable from the captured launch context.

Bare names use the `PATH` captured by [`ServerBuilder::build`]. Relative
paths use its captured working directory. The returned path preserves a
configured wrapper or symlink rather than canonicalizing it.

Returns `None` when the configured executable is not on the captured
`PATH`, so a caller can tell "tmux is missing" from "tmux failed".

## Example

```rust
// Any absolute path is resolved only if it is a runnable file, so this
// example names one POSIX guarantees rather than tmux's own location,
// which varies by platform.
let server = libtmux::Server::builder()
    .tmux_executable("/bin/sh")
    .build()?;
assert_eq!(
    server.resolved_tmux_executable(),
    Some(std::path::PathBuf::from("/bin/sh")),
);

let missing = libtmux::Server::builder()
    .tmux_executable("tmux-that-is-not-installed")
    .build()?;
assert_eq!(missing.resolved_tmux_executable(), None);
```
