Dear Axel,

On Mon, Apr 11, 2016 at 11:34 PM, Roger Shimizu <rogershim...@gmail.com> wrote:
> On Mon, Apr 11, 2016 at 9:38 PM, Axel Beckert <a...@debian.org> wrote:
>>> I'm preparing a new patch that resolve the terminfocap setting for
>>> debian-installer.
>>>
>>> It's almost ready, but I want to have more tests, before submitting to you.
>>> Thank for your understanding!

Enclosed the verified patch.

> BTW. I have a few minor issues pending. I'd appreciate If you have any clue.
> - screen will report a error message when starting in d-i:
>   /var/run/utmp: No such file or directory
>   I tried to set "deflogin off" and "login off" in /etc/screenrc, but
> seems it doesn't help.
> - window 4 of screen is for log: tail -f /var/log/syslog
>   it's better if it can be set as "respawn" as in /etc/inittab [0]

no clue yet for these 2 issues.

> - as you can see I make title for each window
>   And I start screen by "screen -t installer /sbin/debian-installer",
> so window 1 is titled as "installer"
>   But using "C-a c" to create a new window also will be titled as
> "installer", which is better to be able to change the default title.

Above issue gets resolved by appending "shelltitle shell" to /etc/screenrc.
But I met a minor bug(?) that title of 1st window started by screen
command is not correctly set.
Though I find workaround that set again by shell command:
- printf "\033k%s\033\\" installer

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 17B3ACB1
From 4ed2b27bebe2e8ebb4eba403cc77ef02a9dea83f Mon Sep 17 00:00:00 2001
From: Roger Shimizu <rogershim...@gmail.com>
Date: Sat, 9 Apr 2016 01:03:36 +0900
Subject: [PATCH] Update udeb/screenrc to emulate windows on common d-i

Remove unnecessary termcapinfo setting, and create 4 windows as below:
 - window 0: maps to window 1
 - window 1: debian installer
 - window 2: shell
 - window 3: shell
 - window 4: syslog

Title of new window will be "shell", and default shell is /bin/sh
---
 debian/changelog     |  1 +
 debian/udeb/screenrc | 58 ++++++++++++++++++++++------------------------------
 2 files changed, 25 insertions(+), 34 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0e8abcf..1d25621 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,7 @@ screen (4.3.1-3) UNRELEASED; urgency=medium
     Thanks to Laurent Bigonville and Sven Joachim for providing ideas
     on build screen-udeb with less dependency.
     See discussion in #819358 and #819397.
+  * Update udeb/screenrc to emulate windows on console d-i
 
  -- Axel Beckert <a...@debian.org>  Thu, 03 Sep 2015 14:29:29 +0200
 
diff --git a/debian/udeb/screenrc b/debian/udeb/screenrc
index 3806819..a043f48 100644
--- a/debian/udeb/screenrc
+++ b/debian/udeb/screenrc
@@ -37,44 +37,34 @@ bind I login on
 bind O login off
 bind } history
 
-# An example of a "screen scraper" which will launch urlview on the current
-# screen window
-#
-#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
-
 # ------------------------------------------------------------------------------
 # TERMINAL SETTINGS
 # ------------------------------------------------------------------------------
 
-# The vt100 description does not mention "dl". *sigh*
-termcapinfo vt100 dl=5\E[M
-
-# turn sending of screen messages to hardstatus off
-hardstatus off
-# Set the hardstatus prop on gui terms to set the titlebar/icon title
-termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
-# use this for the hard status string
-hardstatus string "%h%? users: %u%?"
-
-# An alternative hardstatus to display a bar at the bottom listing the
-# windownames and highlighting the current windowname in blue. (This is only
-# enabled if there is no hardstatus setting for your terminal)
-#
-#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
-
-# set these terminals up to be 'optimal' instead of vt100
-termcapinfo xterm*|linux*|rxvt*|Eterm* OP
-
-# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
-# (This fixes the "Aborted because of window size change" konsole symptoms found
-#  in bug #134198)
-termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
-
-# To get screen to add lines to xterm's scrollback buffer, uncomment the
-# following termcapinfo line which tells xterm to use the normal screen buffer
-# (which has scrollback), not the alternate screen buffer.
-#
-#termcapinfo xterm|xterms|xs|rxvt ti@:te@
+# sending of screen messages to hardstatus
+hardstatus alwaysfirstline "%{= kG}[%= %{= kw}%?%-Lw%?%{r} (%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %M %d %{W}%c %{g}]"
 
 # Enable non-blocking mode to better cope with flaky ssh connections.
 defnonblock 5
+
+# ------------------------------------------------------------------------------
+# STARTUP SCREENS
+# ------------------------------------------------------------------------------
+# window 0: maps to window 1
+# window 1: debian installer
+# window 2: shell
+# window 3: shell
+# window 4: syslog
+
+shell /bin/sh
+defutf8 on
+
+bind c screen 1
+bind ^c screen 1
+bind 0 select 1
+
+screen -t start	0 sleep 1
+screen -t shell	2 /bin/sh
+screen -t shell	3 /bin/sh
+screen -t log	4 tail -f /var/log/syslog
+shelltitle shell
-- 
2.8.0.rc3

Reply via email to