embedded linux serial terminal multiplexer
I have built a custom embedded system using debian 6.0.
using /etc/inittab i have m开发者_JS百科ade several (8) processes running on different /dev/ttyX terminals, which i can switch between using Alt+FX key combination. the thing is using this setup i need to attach a keyboard/monitor to device and reboot it, to be able to operate on it, which is so undesirable. i know linux supports terminals through serial port and i have a couple of them on the device, but i need to have all these processes output in a single serial port terminal. i have found about screen utility for terminal multiplexing, but still not sure if this is the way to go, and the actual setup that needs to be done.
any experience or best practice on this scenario would be highly appreciated
I strongly recommend using screen(1)
's hardstatus
line; screen(1)
can be pretty confusing without it, at least when you're trying to learn.
Some examples stolen from https://serverfault.com/questions/3740/what-are-useful-screenrc-settings
hardstatus lastline
#hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
All those magic incantations might be a bit much to stomach; I had a nice set I used to love, but that hard drive is currently sitting on a shelf. Maybe hunt around a little bit to collect a few, and look for descriptions of them. :)
I recall needing both hardstatus lastline
and hardstatus string ...
, but I cannot recall the consequences of leaving off the lastline
line.
What about the new Unicode aware multiplexer called Tmux which can be found on sourceforge.
See http://tmux.sourceforge.net
Many years ago there was "mscreen", originally from SCO Unix. I don't know if it's still avilable. Today there is the "GNU Screen" project:
http://www.gnu.org/software/screen/
精彩评论