Skip to main content
added 15 characters in body
Source Link
Eduardo Trápani
  • 14.2k
  • 1
  • 21
  • 38

What you can do is create two virtual terminals, back to back, with socat:

$ socat pty,link=/tmp/lua_end pty,link=/tmp/screen_end

Now, from lua, you just read to and write from a single file: /tmp/lua_end.

In another shell you do:

$ screen `/tmp/lua_end`screen_end

And that's it, they're going to be connected, through socat.

What you can do is create two virtual terminals, back to back, with socat:

$ socat pty,link=/tmp/lua_end pty,link=/tmp/screen_end

Now, from lua, you just read to and write from /tmp/lua_end.

In another shell you do:

$ screen `/tmp/lua_end`

And that's it, they're going to be connected, through socat.

What you can do is create two virtual terminals, back to back, with socat:

$ socat pty,link=/tmp/lua_end pty,link=/tmp/screen_end

Now, from lua, you just read to and write from a single file: /tmp/lua_end

In another shell you do:

$ screen /tmp/screen_end

And that's it, they're going to be connected, through socat.

Source Link
Eduardo Trápani
  • 14.2k
  • 1
  • 21
  • 38

What you can do is create two virtual terminals, back to back, with socat:

$ socat pty,link=/tmp/lua_end pty,link=/tmp/screen_end

Now, from lua, you just read to and write from /tmp/lua_end.

In another shell you do:

$ screen `/tmp/lua_end`

And that's it, they're going to be connected, through socat.