This ArcOS wiki is still under active development, and contains errors and unfinished pages.

The terminal window

Starting in ArcOS 7.0.6, you can easily create a terminal window to display text to the user dynamically. ArcOS' TerminalWindow is also used internally to display ArcTerm in a window.

To create a terminal window, call the user daemon method:

const terminal = await this.userDaemon?.TerminalWindow();

This can return undefined if something went wrong, so be sure to check it. This function normally returns an expanded instance of xtermjs, including the process of the terminal window as the process property. To learn how to use the Terminal interface, reference the xtermjs documentation: https://xtermjs.org/docs/api/terminal/classes/terminal/

The process

As mentioned earlier, the TerminalWindow method returns the process as a property. This is just a regular AppProcess, an instance of TerminalWindowRuntime to be exact. So, to close the terminal, just call terminal.process?.closeWindow() as you would anywhere else. This will properly dispose of the process.

Last updated