Hello. I do have a problem that i would really love to solve. I can reproduce it with current ArchLinux (Screen version 4.06.01 (GNU) 10-Jul-17) and FreeBSD 11.1 (iirc 4.05 Dec 16; i cannot compile screen on FreeBSD easily, utmp still fails there and i have no time to get over that).
First though i want to thank Thomas Dickey and "jdw" which got me going[1] on first glance on FreeBSD. I.e., i have used -A -D -R since "ever" but now wanted to turn to -a -D -m for a constellation where i cannot forward ssh-agent from some point, yet wanted it as the parent of a screen session on target. This turned out to be an Odysee, but finally searched the internet and luckily found the mentioned [1]. Because -T and "term xz" and "TERM=XY screen" did not mean a thing. Anyway, the solution to get me going on/to FreeBSD now is, thanks to jdw, if command -v screen >/dev/null 2>&1; then if screen -list >/dev/null 2>&1; then :; else ( eval "$(tset - -s screen | tail -n+2)" exec env SYSSCREENRC=/dev/null TERM=xterm-256color \ SCREENCAP="${TERMCAP}" LC_ALL=en_US.UTF-8 \ ssh-agent screen -a -D -m ) </dev/null >/dev/null 2>&1 & fi fi exec /usr/bin/login -f steffen tset(1) outputs $TERMCAP on FreeBSD. (And this is different to Linux target(s), where login is .. not usable for my case) .. LC_ALL=en_US.UTF-8 ssh-agent screen -a -D -m .. exec mksh -l Ok, so i can now attach via "screen -r" and have my three color vim(1), and it seems good enough to work in a startup script. [1] https://unix.stackexchange.com/questions/67450/gnu-screen-strange-termcap-when-using-d-m/273936 However, we, that is my mailer, for which i have written the termcap/terminfo etc. interface, and me, still do not get all the key-bindings that we would get with -A -D -R (-kLFT kRIT kUP kDN), but what i really do not get is that ^S (a.k.a. $'\cS') does not work in this context, neither on FreeBSD nor on Linux! The Mailx Line Editor does (tty.c, line ~942): /* Enable ^\, ^Q and ^S to be used for key bindings */ tiosp->c_cc[VQUIT] = tiosp->c_cc[VSTART] = tiosp->c_cc[VSTOP] = '\0'; tiosp->c_iflag &= ~(ISTRIP | IGNCR); tiosp->c_lflag &= ~(ECHO /*| ECHOE | ECHONL */| ICANON | IEXTEN); so VSTOP is explicitly disabled. stty(1) shows "stop = ^S;". Can i improve that some more? Why *does* screen not look at $TERM when starting in detached mode, nor react upon -T / "term" when set explicitly? Anything is just as it should in -A -D -R mode! Thanks in advance, and have a nice (rest) weekend! Ciao! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) _______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users