Skip to content

SteadBytes/termecho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

termecho

Send commands and write data to terminals (/dev/tty and /dev/pts devices).

Examples

cd multiple terminals at once when switching to a different project:

$ sudo termecho /dev/pts/2 /dev/pts/3 -- cd ~/path/to/my/project

Write text to a vim buffer open on another terminal:

$ sudo termecho -n /dev/pts/2 -- Hello from $(tty)

Close vim on another terminal:

$ sudo termecho /dev/pts/2 -- :wq

Security

There are known security risks with the TIOCSTI ioctl syscall and caution is advised. This is intended for personal use and not for automated production use cases. Please do not run arbitrary commands through termecho without inspection (this is generally good practice anyway).

Building

termecho is written in Rust, so a Rust installation is required for compilation.

$ git clone https://github.com/SteadBytes/termecho
$ cd termecho
$ cargo build --release
$ ./target/release/termecho --version
termecho 0.1.0

Compatibility

termecho uses the TIOCSTI ioctl and as such is only available on platforms that support this syscall.

About

Send commands and write data to terminals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published