xref: /openbsd-src/usr.sbin/wsconscfg/wsconscfg.8 (revision c18ef1e4e9d4cf9588c3b31c2433844f3f1d6f55)
1.\"	$OpenBSD: wsconscfg.8,v 1.21 2024/11/06 17:14:03 miod Exp $
2.\"	$NetBSD: wsconscfg.8,v 1.5 1999/05/15 14:45:06 drochner Exp $
3.\"
4.\" Copyright (c) 1999
5.\" 	Matthias Drochner.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.Dd $Mdocdate: November 6 2024 $
29.Dt WSCONSCFG 8
30.Os
31.Sh NAME
32.Nm wsconscfg
33.Nd configure virtual terminals on a wscons display
34.Sh SYNOPSIS
35.Nm wsconscfg
36.Op Fl dFgkm
37.Op Fl e Ar emul
38.Op Fl f Ar ctldev
39.Op Fl t Ar type
40.Ar index
41.Sh DESCRIPTION
42The
43.Nm
44tool allows for the viewing, creation and removal of virtual terminals
45on display devices controlled by the wscons terminal framework,
46as long as the underlying display hardware driver supports multiple screens.
47Furthermore, it controls the assignment of keyboards to displays.
48.Pp
49The
50.Ar index
51argument specifies which virtual terminal is to be configured.
52Valid numbers range from 0 to an implementation-specified value
53(currently 11, allowing for 12 virtual terminals on a display).
54In keyboard configuration mode
55(see
56.Fl k ,
57below),
58it specifies the
59.Xr wskbd 4
60device to attach or detach.
61Without further option arguments, a virtual terminal is created with
62implementation specific properties and a default terminal emulation variant
63selected at kernel compile time.
64.Pp
65The options are as follows:
66.Bl -tag -width Ds
67.It Fl d
68Delete the specified terminal.
69Any specified terminal that is currently open by a program will not be deleted
70unless the
71.Fl F
72option is also given.
73Terminals used by the operating system console or a graphics program (X server)
74cannot be deleted.
75With the
76.Fl k
77flag, the keyboard specified by
78.Ar index
79will be detached from the wscons display.
80With the
81.Fl m
82flag, the multiplexor specified by
83.Ar index
84will be detached from the wscons display.
85.It Fl e Ar emul
86Specify the terminal emulation to use for the virtual terminal.
87The set of available terminal emulations is determined at kernel compile time.
88See
89.Xr wscons 4
90for details.
91.It Fl F
92Force deletion of a terminal, keyboard, or multiplexor,
93even if it is in use by a userspace program.
94.It Fl f Ar ctldev
95Specify the control device of the wscons display to operate on.
96The default is
97.Pa /dev/ttyCcfg .
98.It Fl g
99Print the index of the virtual terminal specified by
100.Ar index .
101If the
102.Ar index
103argument is omitted, the index of the current virtual terminal is printed.
104.It Fl k
105Do keyboard related operations instead of virtual screen configuration.
106Without other flags, a keyboard will be attached to the display device.
107The
108.Ar index
109argument can be omitted: in that case the first free keyboard will be used.
110.It Fl m
111Do multiplexor related operations instead of virtual screen configuration.
112Without other flags, a multiplexor will be attached to the display device.
113.It Fl t Ar type
114Specify a screen type to use.
115Screen types refer to display format, color depth, and other low-level
116display properties.
117Valid
118.Ar type
119arguments are defined by the underlying display device driver.
120.El
121.\" .Pp
122.\" Typically, the
123.\" .Nm
124.\" utility will be invoked in system startup by the
125.\" .Pa /etc/rc.wscons
126.\" script, controlled by the
127.\" .Pa /etc/wscons.conf
128.\" configuration file.
129.Sh EXAMPLES
130Configure screen 1 (i.e., the second) for type
131.Dq 80x50
132and VT100 terminal emulation.
133(Note:
134.Dq 80x50
135is a screen type offered by the
136.Xr vga 4
137display driver.
138In this particular case, an 8x8-font must be loaded beforehand to make the
139screen useful.
140See
141.Xr wsfontload 8 . )
142.Pp
143.D1 # wsconscfg -t 80x50 -e vt100 1
144.Pp
145Connect the first unconnected keyboard to the display:
146.Pp
147.Dl # wsconscfg -k
148.\" .Sh FILES
149.\" .Bl -tag -width /etc/wscons.conf -compact
150.\" .It Pa /etc/wscons.conf
151.\" wscons configuration file
152.\" .El
153.Sh SEE ALSO
154.Xr wscons 4 ,
155.Xr wskbd 4 ,
156.Xr wsconsctl 8 ,
157.Xr wsfontload 8
158.Sh HISTORY
159The
160.Nm
161program first appeared in
162.Ox 2.8 .
163