---
title: external / terminal_pty_start
---

# terminal_pty_start

### Synopsis

```c
int terminal_pty_start(int external_index, string *arguments);
```

Starts an allowlisted external command on the current interactive object's
terminal. The command is selected by `external_cmd_N`; arguments are passed
directly without shell interpretation.

The connection enters a terminal-busy state while the application runs.
Network input and output are proxied through a pseudo-terminal without
entering LPC. Window-size changes are forwarded to the application. The
driver restores normal MUD input and prints the prompt when the application
exits. Normal LPC output to that interactive is discarded while the
application owns the terminal, preventing game text from corrupting a
full-screen application.

Returns 1 when startup was queued, or 0 if the object is not a supported
interactive, is already busy, uses an MCCP-compressed connection, or the
terminal queue rejected the request. PTY applications currently require the
connection's default UTF-8 encoding.

This efun is subject to the master's `valid_socket()` policy.

### See Also

`terminal_pty_busy()`, `terminal_pty_signal()`, `terminal_pty_stop()`,
`external_start()`
