Commit Graph

70 Commits

Author SHA1 Message Date
Ed Maste
1f4442f71f vidcontrol: be explicit that -p and -P are sc(4) only
PR:		263099
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2022-04-06 19:39:19 -04:00
Bruce Evans
d09131e044 Connect the restored dumb and sc terminal emulators to the kernel build.
Add or fix options to control static and dynamic configuration.  Keep
the default of scteken, but default to statically configuring all available
emulators (now 3 instead of 1).

The dumb emulator is almost usable.  libedit and libreadline handle
dumb terminals perfectly for at least shell history.  less(1) works
as well as possible except on exit.  But curses programs make messes.
The dumb emulator has strange color support, with 2 dumb colors for
normal output but fancy colorization for the cursor, mouse pointer and
(with a non-dumb initial emulator) for low-level console output.

Using the sc emulator instead of the default of scteken fixes at least
the following bugs:
- NUL is a printing character in cons25 but not in teken
- teken doesn't support fixed colors for "reverse" video.
- The best versions of sc are about 10 times faster than scteken (for
  printing to the frame buffer).  This version is only about 5 times
  faster.

Fix configuration features:
- make SC_DFLT_TERM (for setting the initial emulator) a normal option.

Add configuration features:
- negative options SC_NO_TERM_* for omitting emulators in the static config.
  Modules for emulators might work, but I don't know of any
- vidcontrol -e shows the available emulators
- vidcontrol -E <emulator> sets the active emulator.
2019-02-22 06:41:47 +00:00
Tobias Kortkamp
b287b40c49 vidcontrol(1): Fix a typo in the description of -f
While here:
- Fix markup in -c
- Fix mandoc -Tlint and igor warnings

Reviewed by:	0mp, bjk
Approved by:	bjk
Differential Revision:	https://reviews.freebsd.org/D17428
2018-10-20 16:59:43 +00:00
Bruce Evans
9bc7c36337 Support setting the colors of cursors for the VGA renderer.
Advertise this by changing the defaults to mostly red.  If you don't like
this, change them (almost) back using:
   vidcontrol -c charcolors,base=7,height=0
   vidcontrol -c mousecolors,base=0[,height=15]

The (graphics mode only) mouse cursor colors were hard-coded to a black
border and lightwhite interior.  Black for the border is the worst
possible default, since it is the same as the default black background
and not good for any dark background.  Reversing this gives the better
default of X Windows.  Coloring everything works better still.  Now
the coloring defaults to a lightwhite border and red interior.

Coloring for the character cursor is more complicated and mode
dependent.  The new coloring doesn't apply for hardware cursors.  For
non-block cursors, it only applies in graphics mode.  In text mode,
the cursor color was usually a hard-coded (dull)white for the background
only, unless the foreground was white when it was a hard-coded black
for the background only, unless the foreground was white and the
background was black it was reverse video.  In graphics mode, it was
always reverse video for the block cursor.  Reverse video is worse,
especially over cutmarking regions, since cutmarking still uses simple
reverse video (nothing better is possible in text mode) and double
reverse video for the cursor gives normal video.  Now, graphics mode
uses the same algorithm as the best case for text mode in all cases
for graphics mode.  The hard-coded sequence { white, black, } for the
background is now { red, white, blue, } where the first 2 colors can
be configured.  The blue color at the end is a sentinel which prevents
reverse video being used in most cases but breaks the compatibility
setting for white on black and black on white characters.  This will
be fixed later.  The compatibility setting is most needed for mono modes.

The previous commit to syscons.c changed sc_cnterm() to be more careful.
It followed null pointers in some cases.  But sc_cnterm() has been
unreachable for 15+ years since changes for multiple consoles turned
off calls to the the cnterm destructor for all console drivers.  Before
them, it was only called at boot time.  So no driver with an attached
console has ever been unloadable and not even the non-console destructors
have been tested much.
2017-08-25 07:04:41 +00:00
Bruce Evans
dd51fceb15 Reduce complexity and backwards compatibilty a little by removing new aliases
and repurposing "blink".  Improve accuracy of documentation of historical
mistakes and other bugs.

"blink" now means "set the blink attribute for the target(s)" instead of
"set the blink attribute and clear other attributes [and control flags]".
It was even more confusing to use "blinking" for the single attribute to
keep the old meaning for "blink".

"destructive" is not as historically broken or gone as the previous version
said.

The bugs involving resetting from defaults are now understood and partly
documented (the defaults are mis-initialized).
2017-08-19 12:14:46 +00:00
Bruce Evans
92dedf1b1b Update vidcontrol -c to support all cursor appearance setting
capabilities.

Most of the capabilities (all of the arcane ones) were in FreeBSD-2.0.5,
but were harder to use then, and vidcontrol didn't try.  FreeBSD-4.1.0
added per-vty support, fixed the destructivness of the "destructive"
cursor, and improved APIs.  Start using the new APIs, support all of
their capabilities, and document all of the capabilities and some of
the historical mistakes.

vt doesn't support any of this before or after the change.

Fix minor unrelated bitrot in the usage message for the syscons case.
2017-08-17 18:08:45 +00:00
Edward Tomasz Napierala
449d10e56e Add "vidcontrol -i active", to print out active vty number,
to be used with eg "vidcontrol -s".

Reviewed by:	emaste@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D4968
2016-01-19 13:09:20 +00:00
Jean-Sébastien Pédron
069f1c256a vt(4): Add PIO_VFONT_DEFAULT ioctl to restore the default builtin font
To restore the default font using vidcontrol(1), use the "-f" flag
without an argument:
    vidcontrol -f < /dev/ttyv0

PR:		193910
Differential Revision:	https://reviews.freebsd.org/D971
Submitted by:	Marcin Cieslak <saper@saper.info>
Reviewed by:	ray@, emaste@
Approved by:	ray@
MFC after:	1 week
2014-10-23 12:38:05 +00:00
Stefan Eßer
320098549a Add references to vt(4) to further man-pages.
MFC after:	3 days
2014-09-01 16:25:08 +00:00
Baptiste Daroussin
01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Ulrich Spörlein
0d9deed52c mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
2010-10-08 12:40:16 +00:00
Ed Schouten
c8f1c81702 Add a new flag to vidcontrol, -T, that allows terminal mode switching.
This will make it more easy for people to experiment with TERM=xterm.
Instead of echoing these strange escape sequences, I can just instruct
them to run `vidcontrol -T xterm'.
2009-11-11 08:39:57 +00:00
Ruslan Ermilov
6855a26320 Tweak some wording and markup. 2006-12-22 23:23:59 +00:00
Ruslan Ermilov
9d73fabda7 Markup fixes.
Approved by:	re (blanket)
2005-06-14 12:26:36 +00:00
Xin LI
f112120666 Add VESA mode support for syscons, which enables the support of 15, 16,
24, and 32 bit modes.  To use that, syscons(4) must be built with
the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a.
vesa.ko) must be either loaded, or be compiled into the kernel.

Do not return EINVAL when the mouse state is changed to what it already is,
which seems to cause problems when you have two mice attached, and
applications are not likely obtain useful information through the EINVAL
caused by showing the mouse pointer twice.

Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is
the video mode number from the vidcontrol -i mode output.  Also, revert the
video mode if something fails.

Obtained from:	DragonFlyBSD
Discussed at:	current@ with patch attached [1]
PR:		kern/71142 [2]
Submitted by:	Xuefeng DENG <dsnofe at msn com> [1],
		Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2]
2005-05-29 08:43:44 +00:00
Ruslan Ermilov
3892c30012 mdoc(7) police: Nits. 2003-03-02 21:04:21 +00:00
Maxime Henrion
356168f5cc Document the fact that VTY locking is easily bypassable when DDB
is compiled in the kernel.  Also add some useful xrefs to lock(1).
2003-02-27 18:25:26 +00:00
Maxim Sobolev
c449db6ab2 Add a new -H' modifier, which when combined with -p' or `-P' allows to dump
full console history.
2002-08-19 16:33:23 +00:00
Dima Dorfman
b471ed9e9d Add an -S option that allows the user to disable vty switching. It is
implemented using a new VT_LOCKSWITCH ioctl.  Although it is possible
to implement something like this by VT_SETMODEing to VT_PROCESS and
never releasing the vty, that method has a number of downsides, the
biggest of which is that some program has to stay resident for the
lock to be in effect.

Reviewed by:	roam, sheldonh
2002-07-10 03:31:25 +00:00
Philippe Charnier
7f94b8deee Use `The .Nm utility' 2002-04-20 12:27:18 +00:00
Bruce A. Mah
7a0933ca5d Fix typo: s/forth/fourth/ 2002-03-21 20:10:10 +00:00
Ruslan Ermilov
50dce955e4 Grammar nits. 2002-03-20 15:09:32 +00:00
Maxim Sobolev
3646fbdacb When loading a font allow suffix specifying its size be omited, in which
case use size of the currently displaying font as a suffix. For example,
when the when the size of the currently displayed font is 8x8 the
following command will load koi8-r-8x8.fnt.

# vidcontrol -f koi8-r

MFC after:	2 weeks
2002-03-16 23:35:51 +00:00
Ruslan Ermilov
d76e231677 mdoc(7) police: markup nits.
PR:		docs/30473
Submitted by:	Jonathan Hanna <jhanna@home.com>
2001-09-10 09:08:47 +00:00
Ruslan Ermilov
589b4db814 mdoc(7) police:
1)  Removed the low-level (unneeded in this context) details on
    escape sequences that are already documented in screen(4).

2)  Removed whitespace at EOL.

3)  Removed the garbage from previous revision.
2001-09-04 13:54:45 +00:00
Murray Stokely
c271258542 Add additional information about VGA attributes.
PR:		docs/28000
Submitted by:	Robert Drehmel <robert@zoot.quizbot.org>
2001-09-04 00:54:37 +00:00
Maxim Sobolev
8ddd49f697 The ports that convert screendumps into text or png called scr2*, not
shot2*.

PR:
Submitted by:   Olexander Kunytsa
2001-08-17 11:32:25 +00:00
Ruslan Ermilov
57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Dima Dorfman
b6064da2ab Add a comma between the two names in the CONTRIBUTERS section. 2001-06-10 00:23:05 +00:00
Maxim Sobolev
f67de64ba9 Add section "CONTRIBUTORS" and move nik and sobomax there, since we are not
really "AUTHORS".
2001-05-29 18:48:13 +00:00
Dag-Erling Smørgrav
031c57af94 Move the scrollback controls from kbdcontrol to vidcontrol.
Also fix some style bugs in the code and poor language in the man pages.

Reviewed by:	sobomax
2001-05-28 11:05:28 +00:00
Ruslan Ermilov
e5adc24bf8 Spell FreeBSD.org correctly. 2001-05-20 11:39:53 +00:00
Maxim Sobolev
fc4af89faf - Fix markup;
- add nik into Authors section.

Submitted by:	ru
2001-05-20 11:33:12 +00:00
Maxim Sobolev
d02ca551d3 Move scrshot(1) functionality into vidcontrol(1).
Suggested by:		many
Not objected to by:	nik (scrshot co-author)
2001-05-19 06:47:36 +00:00
Ruslan Ermilov
eb0838029f mdoc(7) police: normalize .Nd. 2001-04-18 15:54:10 +00:00
Dima Dorfman
062205a074 List the explanations of the command line arguments in the same order
as they're listed in the synopsis (alphabetical).
2001-04-18 07:21:58 +00:00
Ruslan Ermilov
dc1e426492 mdoc(7) police: Fixed markup. 2001-04-13 09:33:03 +00:00
Maxim Sobolev
5e0db936b5 Allow user to omit font size specification when loading a font. In addition
the following fixes had been made:

- check the size of the font being loaded and compare it with possible sizes
  to minimise possibility of loading something that is not a fontfile at all
  and turning console screen into garbage;

- prevent buffer overflow (and coredump as a result ) when loading valid
  uuencoded file with size that exceeds allocated buffer;

- correct and improve several error messages.

Approved by:	-audit, -hackers (silently)
2001-04-09 17:24:29 +00:00
Dima Dorfman
59f0a6b75e Mention that the vga(4) driver supports 90-column video modes.
PR:		26050
Submitted by:	Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
Approved by:	nik
2001-03-28 02:32:10 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Maxim Sobolev
acdb2839d6 New option `-g' to allow selecting custom text geometry in VESA_800x600 raster
text mode. For example `vidcontrol -g 100x37 VESA_800x600' will setup 100x37
text mode as opposed to default 80x25.

Reviewed by:	imp
2001-01-25 16:53:22 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Ruslan Ermilov
8e8536e1c2 Spell the sos's name correctly. 2000-11-14 13:09:12 +00:00
Ruslan Ermilov
82a63dc3c0 Avoid use of tbl(1). 2000-11-06 12:03:43 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00
Bill Swingle
187c0f1691 updates the vidcontrol man page to include mention of the new -M flag
PR:		16221
Submitted by:	Kelly Yancey <kbyanc@posi.net>
2000-02-17 03:00:38 +00:00
Alexey Zelkin
669faca4c4 Fix broken cross reference : kldload(1) -> kldload(8) 1999-10-30 14:25:55 +00:00
Alexey Zelkin
41abbceb8f Various style and visual changes.
VESA_132x30 is not available mode
SC_PIXLE_MODE -> SC_PIXEL_MODE
1999-09-24 20:39:24 +00:00