English | 简体中文
tty = "teletype",pty = "pseudo-teletype"
In UNIX, /dev/tty* is any device that acts like a "teletype"
A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, but is managed by something else. They first appeared for X Window and screen and the like, where you needed something that acted like a terminal but could be used from another program.
Start a PTY and set window size.
[\"java\",\"-jar\",\"ser.jar\",\"nogui\"]
go build
./pty -dir "." -cmd [\"bash\"] -size 50,50
You can execute any command, just like the SSH terminal.
ping google.com
top
htop
-cmd string
command
-coder string
Coder (default "UTF-8")
-dir string
command work path (default ".")
-size string
Initialize pty size, stdin will be forwarded directly (default "50,50")
MCSManager is a Distributed, Docker-supported, Multilingual, and Lightweight control panel for Minecraft server and all console programs.
This application will provide PTY functionality for MCSManager, it is specifically designed for MCSManager, you can also try porting to your own application.
More info: https://github.com/mcsmanager/mcsmanager
Interested in getting involved?
Released under the MIT License.
Copyright 2022 zijiren233 and contributors.