[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#605065: ncurses-base: backspace key deletes forwards on the kFreeBSD console



On Thu, Dec 23, 2010 at 05:10:28PM +0100, Sven Joachim wrote:
> I don't see how this follows.  People having an xterm-like terminal that
> is not compatible with Debian's xterm terminfo entry can easily work
> around it by setting TERM=xterm-r6 or similar when they connect to a
> Debian machine.  What are FreeBSD users going to do when we introduce an
> incompatible cons25 entry?  And what should GNU/kFreeBSD users do when
> they connect to a non-Debian machine?

If we push the new entry upstream, it will be picked up by the majority
of Linux distributions, since it will go into ncurses.  FreeBSD has an
ncurses port and so does NetBSD.  I believe it is likely that we can get
the definition pushed to FreeBSD if we can convert it to termcap.  If it
can be converted to termcap, I'll be happy to push it to FreeBSD,
NetBSD, and OpenBSD, assuming they'll accept it.

I've attached the necessary patches to create the cons25-debian terminfo
entry and the patch for sysvinit, which seem to work for me in a fresh
kfreebsd-amd64 installation in kvm (patching /etc/inittab is necessary,
though).  If they're useful, great; if not, that's okay, too.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff -ur ncurses.old/debian/rules ncurses-5.7+20100313/debian/rules
--- ncurses.old/debian/rules	2010-12-22 00:12:49.000000000 +0000
+++ ncurses-5.7+20100313/debian/rules	2010-12-22 01:42:26.000000000 +0000
@@ -114,7 +114,7 @@
 	v/vt220 v/vt52 x/xterm x/xterm-debian x/xterm-xfree86 x/xterm-color \
 	x/xterm-mono x/xterm-r5 x/xterm-r6 x/xterm-vt220 \
 	x/xterm-256color s/screen-256color s/screen-256color-bce \
-	w/wsvt25 w/wsvt25m E/Eterm E/Eterm-color
+	w/wsvt25 w/wsvt25m E/Eterm E/Eterm-color c/cons25-debian
 
 # Blacklist terminfo entries shipped by other Debian packages so that we do
 # not begin shipping them by accident.
diff -ur ncurses.old/misc/terminfo.src ncurses-5.7+20100313/misc/terminfo.src
--- ncurses.old/misc/terminfo.src	2010-12-22 00:12:49.000000000 +0000
+++ ncurses-5.7+20100313/misc/terminfo.src	2010-12-22 01:48:59.000000000 +0000
@@ -1774,6 +1774,9 @@
 cons25|ansis|ansi80x25|freebsd console (25-line ansi mode),
 	acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~\371,
 	use=cons25w,
+cons25-debian|freebsd console with debian backspace (25-line ansi mode),
+	kbs=\177, kdch1=\E[3~,
+	use=cons25,
 cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode),
 	colors@, pairs@,
 	bold@, dim@, op@, rmul=\E[m, setab@, setaf@,
diff -ur sysvinit.old/debian/share/inittab.kfreebsd-gnu sysvinit-2.88dsf/debian/share/inittab.kfreebsd-gnu
--- sysvinit.old/debian/share/inittab.kfreebsd-gnu	2010-12-22 16:27:27.000000000 +0000
+++ sysvinit-2.88dsf/debian/share/inittab.kfreebsd-gnu	2010-12-22 16:28:06.000000000 +0000
@@ -51,12 +51,12 @@
 # Note that on most Debian systems ttyv6 is used by the X Window System,
 # so if you want to add more getty's go ahead but skip ttyv6 if you run X.
 #
-1:2345:respawn:/sbin/getty 38400 ttyv0 cons25
-2:23:respawn:/sbin/getty 38400 ttyv1 cons25
-3:23:respawn:/sbin/getty 38400 ttyv2 cons25
-4:23:respawn:/sbin/getty 38400 ttyv3 cons25
-5:23:respawn:/sbin/getty 38400 ttyv4 cons25
-6:23:respawn:/sbin/getty 38400 ttyv5 cons25
+1:2345:respawn:/sbin/getty 38400 ttyv0 cons25-debian
+2:23:respawn:/sbin/getty 38400 ttyv1 cons25-debian
+3:23:respawn:/sbin/getty 38400 ttyv2 cons25-debian
+4:23:respawn:/sbin/getty 38400 ttyv3 cons25-debian
+5:23:respawn:/sbin/getty 38400 ttyv4 cons25-debian
+6:23:respawn:/sbin/getty 38400 ttyv5 cons25-debian
 
 # Example how to put a getty on a serial line (for a terminal)
 #
diff -ur sysvinit.old/src/init.c sysvinit-2.88dsf/src/init.c
--- sysvinit.old/src/init.c	2010-12-22 16:27:27.000000000 +0000
+++ sysvinit-2.88dsf/src/init.c	2010-12-22 16:29:02.000000000 +0000
@@ -751,11 +751,11 @@
 #ifdef __FreeBSD_kernel__
 	/*
 	 * The kernel of FreeBSD expects userland to set TERM.  Usually, we want
-	 * "cons25".  Later, gettys might disagree on this (i.e. we're not using
-	 * syscons) but some boot scripts, like /etc/init.d/xserver-xorg, still
-	 * need a non-dumb terminal.
+	 * "cons25-debian".  Later, gettys might disagree on this (i.e. we're not
+	 * using syscons) but some boot scripts, like /etc/init.d/xserver-xorg,
+	 * still need a non-dumb terminal.
 	 */
-	putenv ("TERM=cons25");
+	putenv ("TERM=cons25-debian");
 #endif
 
 	(void) tcgetattr(fd, &tty);

Attachment: signature.asc
Description: Digital signature


Reply to: