Convert syscons on i386 to TERM=xterm.

TEKEN_XTERM is now gone. Because we always use xterm mode now, we only
need a TEKEN_CONS25 switch to go back to cons25.
This commit is contained in:
Ed Schouten 2009-11-13 11:28:54 +00:00
parent d29a98f47f
commit 4b2361f811
7 changed files with 18 additions and 40 deletions

View File

@ -24,14 +24,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9.x IS SLOW:
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.
from cons25 to xterm on all platforms except 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.
vidcontrol(1)'s -T flag. The TEKEN_CONS25 kernel configuration
options can be used to change the compile-time default back to
cons25.
To prevent graphical artifacts, make sure the TERM environment
variable is set to match the terminal emulation that is being

View File

@ -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.

View File

@ -1412,7 +1412,6 @@ options SC_NO_SUSPEND_VTYSWITCH
# 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
#
# Optional devices:

View File

@ -734,7 +734,6 @@ 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
# options for printf
PRINTF_BUFR_SIZE opt_printf.h

View File

@ -50,15 +50,6 @@ __FBSDID("$FreeBSD$");
#include <teken/teken.h>
#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 *);

View File

@ -83,17 +83,13 @@ set_termcap(void)
#else
if (ColorDisplay) {
if (!term) {
#ifdef __i386__
if (setenv("TERM", "cons25", 1) < 0)
#else
if (setenv("TERM", "xterm", 1) < 0)
#endif
return -1;
}
}
else {
if (!term) {
if (setenv("TERM", "cons25-m", 1) < 0)
if (setenv("TERM", "vt100", 1) < 0)
return -1;
}
}

View File

@ -125,24 +125,17 @@ set_termcap(void)
#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 {
if (!term) {
if (setenv("TERM", "cons25-m", 1) < 0)
if (setenv("TERM", "vt100", 1) < 0)
return -1;
if (setenv("TERMCAP", termcap_cons25_m, 1) < 0)
if (setenv("TERMCAP", termcap_vt100, 1) < 0)
return -1;
}
}