Index: usr.sbin/sade/termcap.c =================================================================== --- usr.sbin/sade/termcap.c (revision 199196) +++ usr.sbin/sade/termcap.c (working copy) @@ -83,7 +83,11 @@ #else if (ColorDisplay) { if (!term) { +#ifdef __i386__ if (setenv("TERM", "cons25", 1) < 0) +#else + if (setenv("TERM", "xterm", 1) < 0) +#endif return -1; } } Index: usr.sbin/sysinstall/termcap.c =================================================================== --- usr.sbin/sysinstall/termcap.c (revision 199196) +++ usr.sbin/sysinstall/termcap.c (working copy) @@ -125,10 +125,17 @@ #else if (ColorDisplay) { if (!term) { +#ifdef __i386__ if (setenv("TERM", "cons25", 1) < 0) return -1; if (setenv("TERMCAP", termcap_cons25, 1) < 0) return -1; +#else + if (setenv("TERM", "xterm", 1) < 0) + return -1; + if (setenv("TERMCAP", termcap_xterm, 1) < 0) + return -1; +#endif } } else { Index: etc/etc.mips/ttys =================================================================== --- etc/etc.mips/ttys (revision 199196) +++ etc/etc.mips/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. Index: etc/etc.amd64/ttys =================================================================== --- etc/etc.amd64/ttys (revision 199196) +++ etc/etc.amd64/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. @@ -30,15 +30,15 @@ # when going to single-user mode. console none unknown off secure # -ttyv0 "/usr/libexec/getty Pc" cons25 on secure +ttyv0 "/usr/libexec/getty Pc" xterm on secure # Virtual terminals -ttyv1 "/usr/libexec/getty Pc" cons25 on secure -ttyv2 "/usr/libexec/getty Pc" cons25 on secure -ttyv3 "/usr/libexec/getty Pc" cons25 on secure -ttyv4 "/usr/libexec/getty Pc" cons25 on secure -ttyv5 "/usr/libexec/getty Pc" cons25 on secure -ttyv6 "/usr/libexec/getty Pc" cons25 on secure -ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv1 "/usr/libexec/getty Pc" xterm on secure +ttyv2 "/usr/libexec/getty Pc" xterm on secure +ttyv3 "/usr/libexec/getty Pc" xterm on secure +ttyv4 "/usr/libexec/getty Pc" xterm on secure +ttyv5 "/usr/libexec/getty Pc" xterm on secure +ttyv6 "/usr/libexec/getty Pc" xterm on secure +ttyv7 "/usr/libexec/getty Pc" xterm on secure ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. Index: etc/etc.powerpc/ttys =================================================================== --- etc/etc.powerpc/ttys (revision 199196) +++ etc/etc.powerpc/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. @@ -30,15 +30,15 @@ # when going to single-user mode. console none unknown off secure # -ttyv0 "/usr/libexec/getty Pc" cons25 on secure +ttyv0 "/usr/libexec/getty Pc" xterm on secure # Virtual terminals -ttyv1 "/usr/libexec/getty Pc" cons25 on secure -ttyv2 "/usr/libexec/getty Pc" cons25 on secure -ttyv3 "/usr/libexec/getty Pc" cons25 on secure -ttyv4 "/usr/libexec/getty Pc" cons25 on secure -ttyv5 "/usr/libexec/getty Pc" cons25 on secure -ttyv6 "/usr/libexec/getty Pc" cons25 on secure -ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv1 "/usr/libexec/getty Pc" xterm on secure +ttyv2 "/usr/libexec/getty Pc" xterm on secure +ttyv3 "/usr/libexec/getty Pc" xterm on secure +ttyv4 "/usr/libexec/getty Pc" xterm on secure +ttyv5 "/usr/libexec/getty Pc" xterm on secure +ttyv6 "/usr/libexec/getty Pc" xterm on secure +ttyv7 "/usr/libexec/getty Pc" xterm on secure #ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. Index: etc/etc.arm/ttys =================================================================== --- etc/etc.arm/ttys (revision 199196) +++ etc/etc.arm/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. @@ -30,15 +30,15 @@ # when going to single-user mode. console none unknown off secure # -ttyv0 "/usr/libexec/getty Pc" cons25 off secure +ttyv0 "/usr/libexec/getty Pc" xterm off secure # Virtual terminals -ttyv1 "/usr/libexec/getty Pc" cons25 off secure -ttyv2 "/usr/libexec/getty Pc" cons25 off secure -ttyv3 "/usr/libexec/getty Pc" cons25 off secure -ttyv4 "/usr/libexec/getty Pc" cons25 off secure -ttyv5 "/usr/libexec/getty Pc" cons25 off secure -ttyv6 "/usr/libexec/getty Pc" cons25 off secure -ttyv7 "/usr/libexec/getty Pc" cons25 off secure +ttyv1 "/usr/libexec/getty Pc" xterm off secure +ttyv2 "/usr/libexec/getty Pc" xterm off secure +ttyv3 "/usr/libexec/getty Pc" xterm off secure +ttyv4 "/usr/libexec/getty Pc" xterm off secure +ttyv5 "/usr/libexec/getty Pc" xterm off secure +ttyv6 "/usr/libexec/getty Pc" xterm off secure +ttyv7 "/usr/libexec/getty Pc" xterm off secure #ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. Index: etc/etc.ia64/ttys =================================================================== --- etc/etc.ia64/ttys (revision 199196) +++ etc/etc.ia64/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. @@ -30,15 +30,15 @@ # when going to single-user mode. console none unknown off secure # -ttyv0 "/usr/libexec/getty Pc" cons25 off secure -# Virtual terminals. -ttyv1 "/usr/libexec/getty Pc" cons25 off secure -ttyv2 "/usr/libexec/getty Pc" cons25 off secure -ttyv3 "/usr/libexec/getty Pc" cons25 off secure -ttyv4 "/usr/libexec/getty Pc" cons25 off secure -ttyv5 "/usr/libexec/getty Pc" cons25 off secure -ttyv6 "/usr/libexec/getty Pc" cons25 off secure -ttyv7 "/usr/libexec/getty Pc" cons25 off secure +ttyv0 "/usr/libexec/getty Pc" xterm off secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" xterm off secure +ttyv2 "/usr/libexec/getty Pc" xterm off secure +ttyv3 "/usr/libexec/getty Pc" xterm off secure +ttyv4 "/usr/libexec/getty Pc" xterm off secure +ttyv5 "/usr/libexec/getty Pc" xterm off secure +ttyv6 "/usr/libexec/getty Pc" xterm off secure +ttyv7 "/usr/libexec/getty Pc" xterm off secure ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals. The 'dialup' keyword identifies dialin lines to login, # fingerd etc. Index: etc/etc.sparc64/ttys =================================================================== --- etc/etc.sparc64/ttys (revision 199196) +++ etc/etc.sparc64/ttys (working copy) @@ -15,7 +15,7 @@ # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. -# For virtual consoles, the correct type is typically cons25. +# For virtual consoles, the correct type is typically xterm. # Other common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. @@ -34,15 +34,15 @@ ttya "/usr/libexec/getty 3wire.9600" vt100 off secure ttyb "/usr/libexec/getty 3wire.9600" vt100 off secure # syscons(4) -ttyv0 "/usr/libexec/getty Pc" cons25 on secure +ttyv0 "/usr/libexec/getty Pc" xterm on secure # Virtual terminals -ttyv1 "/usr/libexec/getty Pc" cons25 on secure -ttyv2 "/usr/libexec/getty Pc" cons25 on secure -ttyv3 "/usr/libexec/getty Pc" cons25 on secure -ttyv4 "/usr/libexec/getty Pc" cons25 on secure -ttyv5 "/usr/libexec/getty Pc" cons25 on secure -ttyv6 "/usr/libexec/getty Pc" cons25 on secure -ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv1 "/usr/libexec/getty Pc" xterm on secure +ttyv2 "/usr/libexec/getty Pc" xterm on secure +ttyv3 "/usr/libexec/getty Pc" xterm on secure +ttyv4 "/usr/libexec/getty Pc" xterm on secure +ttyv5 "/usr/libexec/getty Pc" xterm on secure +ttyv6 "/usr/libexec/getty Pc" xterm on secure +ttyv7 "/usr/libexec/getty Pc" xterm on secure ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. Index: UPDATING =================================================================== --- UPDATING (revision 199196) +++ UPDATING (working copy) @@ -22,6 +22,21 @@ machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20091113: + The default terminal emulation for syscons(4) has been changed + from cons25 to xterm on all platforms except i386 and pc98. + This means that the /etc/ttys file needs to be updated to ensure + correct operation of applications on the console. + + The terminal emulation style can be toggled per window by using + vidcontrol(1)'s -T flag. The TEKEN_XTERM and TEKEN_CONS25 + kernel configuration options can be used to change the + compile-time default. + + To prevent graphical artifacts, make sure the TERM environment + variable is set to match the terminal emulation that is being + performed by syscons(4). + 20091109: The layout of the structure ieee80211req_scan_result has changed. Applications that require wireless scan results (e.g. ifconfig(8)) Index: sys/conf/NOTES =================================================================== --- sys/conf/NOTES (revision 199196) +++ sys/conf/NOTES (working copy) @@ -1410,6 +1410,7 @@ # 0x100 Probe for a keyboard device periodically if one is not present # Enable experimental features of the syscons terminal emulator (teken). +options TEKEN_CONS25 # cons25-style terminal emulation options TEKEN_UTF8 # UTF-8 output handling options TEKEN_XTERM # xterm-style terminal emulation Index: sys/conf/options =================================================================== --- sys/conf/options (revision 199196) +++ sys/conf/options (working copy) @@ -732,6 +732,7 @@ SC_TWOBUTTON_MOUSE opt_syscons.h # teken terminal emulator options +TEKEN_CONS25 opt_teken.h TEKEN_UTF8 opt_teken.h TEKEN_XTERM opt_teken.h Index: sys/dev/syscons/scterm-teken.c =================================================================== --- sys/dev/syscons/scterm-teken.c (revision 199196) +++ sys/dev/syscons/scterm-teken.c (working copy) @@ -50,6 +50,15 @@ #include +#if defined(TEKEN_XTERM) && defined(TEKEN_CONS25) +#error "xterm and cons25 are mutually exclusive." +#endif + +/* XXX: Use cons25 on i386, for compatibility with pc98. */ +#if defined(__i386__) && !defined(TEKEN_XTERM) && !defined(TEKEN_CONS25) +#define TEKEN_CONS25 +#endif + static void scteken_revattr(unsigned char, teken_attr_t *); static unsigned int scteken_attr(const teken_attr_t *); @@ -132,9 +141,9 @@ #ifndef TEKEN_UTF8 teken_set_8bit(&ts->ts_teken); #endif /* !TEKEN_UTF8 */ -#ifndef TEKEN_XTERM +#ifdef TEKEN_CONS25 teken_set_cons25(&ts->ts_teken); -#endif /* !TEKEN_XTERM */ +#endif /* TEKEN_CONS25 */ tp.tp_row = scp->ysize; tp.tp_col = scp->xsize;