Print this page
10563 Convert vt(7I) to mandoc
   1 '\" te
   2 .\" Copyright (c) 2008 Sun Microsystems, Inc.  All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH VT 7I "Sep 22, 2008"
   7 .SH NAME
   8 vt \- Solaris virtual console interface
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fB#include <sys/kd.h> \fR
  13 .fi
  14 
  15 .LP
  16 .nf
  17 \fB#include <sys/vt.h> \fR
  18 .fi
  19 
  20 .SH DESCRIPTION
  21 .sp
  22 .LP




  23 The virtual console device driver \(em also known as virtual terminal
  24 (\fBVT\fR) \(em is a layer of management functions that provides facilities to

  25 support and switch between multiple screen faces on a single physical device.
  26 .sp
  27 .LP
  28 VT's are accessed in the same way as other devices. The \fBopen\fR(2) system
  29 call is used to open the virtual console and \fBread\fR(2), \fBwrite\fR(2) and
  30 \fBioctl\fR(2) are used in the normal way and support the functionality of the
  31 underlying device.  In addition, some virtual console-specific ioctls are







  32 provided and described below.
  33 .sp
  34 .LP
  35 The VT provides a link between different screen faces and the device. The
  36 \fBactive virtual console\fR corresponds to the currently visible screen face.

  37 Device input is directed to the active console and any device-specific modes
  38 that change on a per virtual terminal basis are set to the characteristics
  39 associated with the active console.
  40 .sp
  41 .LP
  42 You manage VT's by intercepting keyboard sequences ("hot key"). To maintain
  43 consistency with Xserver, the virtual console device driver supports the Ctrl,
  44 Alt, F# and arrow keys.
  45 .sp
  46 .LP
  47 The sequence \fBAltL + F#\fR (where AltL represents the Alt key and F#
  48 represents function keys 1 through 12) is used to select virtual console 1-12.
  49 The sequence \fBAltGraph + F#\fR (where AltGraph represents the right Alt key
  50 and F# represent function keys 1 through 12) is for virtual console 13-24.
  51 \fBAlt + F1\fR chooses the system console (also known as virtual console 1).
  52 The sequence \fBAlt + ->\fR (where ">" represents the right directional arrow)
  53 selects the next  VT in a circular ring fashion and  \fBAlt + <-\fR ( where "<"
  54 represents the left directional arrow) changes to the previous console in a
  55 circular  fashion. The sequence \fBAlt + ^\fR (where "^" represents the up
  56 directional arrow) is for the last used console.
  57 .sp
  58 .LP
  59 Virtual console switching can be done automatically (\fBVT_AUTO\fR) on receipt
  60 of a ``hot-key'' or by the process owning the VT (\fBVT_PROCESS\fR). When
  61 performed automatically, the process associated with the virtual console is
  62 unaware of the switch. Saving and restoring the device are handled by the
  63 underlying device driver and the virtual console manager.  Note that automatic
  64 switching is the default mode.
  65 .sp
  66 .LP
  67 When a ``hot-key'' is sent when in process-controlled switch mode, the process














  68 owning the VT is sent a signal (relsig) it has specified to the virtual console
  69 manager (see \fBsignal\fR(3C)) requesting the process to release the physical
  70 device. At this point, the virtual console manager awaits the \fBVT_RELDISP\fR
  71 ioctl from the process. If the process refuses to release the device (meaning
  72 the switch does not occur), it performs a \fBVT_RELDISP\fR ioctl with an
  73 argument of 0 (zero).  If the process desires to release the device, it saves






  74 the device state (keyboard, display, and I/O registers) and then performs a
  75 \fBVT_RELDISP\fR with an argument of 1 to complete the switch.
  76 .sp
  77 .LP
  78 A ring of VT's can contain intermixed auto mode and process control mode
  79 consoles.  When an auto mode process becomes active, the underlying device

  80 driver and the virtual console manager handle the restoring of the device.
  81 Process control mode processes are sent a specified signal (acqsig) when they
  82 become the active console.  The process then restores the device state
  83 (keyboard, display, and I/O registers) and performs \fBVT_RELDISP\fR ioctl with
  84 an argument of \fBVT_ACKACQ\fR to complete the switching protocol.
  85 .sp
  86 .LP
  87 The modify-operations ioctls (\fBVT_SETMODE\fR, \fBVT_RELDISP\fR,
  88 \fBVT_WAITACTIVE\fR, \fBKDSETMODE\fR) check if the VT is the controlling tty of
  89 the calling process. If not, the sys_devices privilege is enforced.
  90 \fBVT_ACTIVATE\fR requires the sys_devices privilege. Note that there is no












  91 controlling tty and privilege check for query/view operations.
  92 .SH IOCTLS
  93 .sp
  94 .LP
  95 The following ioctls apply to devices that support virtual consoles:
  96 .sp
  97 .ne 2
  98 .na
  99 \fB\fBVT_ENABLED\fR\fR
 100 .ad
 101 .sp .6
 102 .RS 4n
 103 Queries to determine if VT functionality is available on the system. The
 104 argument is a pointer to an integer. If VT functionality is available, the
 105 integer is 1, otherwise it is 0.
 106 .RE
 107 
 108 .sp
 109 .ne 2
 110 .na
 111 \fB\fBVT_OPENQRY\fR\fR
 112 .ad
 113 .sp .6
 114 .RS 4n
 115 Finds an available VT. The argument is a pointer to an integer. The integer is
 116 filled in with the number of the first available console that no other process
 117 has open (and hence, is available to be opened).  If there are no available

 118 VT's, -1 is filled in.
 119 .RE
 120 
 121 .sp
 122 .ne 2
 123 .na
 124 \fB\fBVT_GETMODE\fR\fR
 125 .ad
 126 .sp .6
 127 .RS 4n
 128 Determines the VT's current mode, either \fBVT_AUTO\fR or \fBVT_PROCESS\fR. The
 129 argument is the address of the following structure, as defined in
 130 <\fBsys/vt.h\fR>
 131 .sp
 132 .in +2
 133 .nf
 134 struct vt_mode {
 135               char mode;  /* VT mode */
 136               char waitv; /* not used */
 137               short relsig;/* signal to use for release request */
 138               short acqsig;/* signal to use for display acquired */
 139               short frsig;/* not used */
 140             }
 141 
 142             /* Virtual console Modes */
 143             #define     VT_AUTO         0 /* automatic VT switching     */
 144             #define     VT_PROCESS      1 /* process controls switching */
 145 
 146 
 147             The structure will be filled in with the current value
 148             for each field.
 149 .fi
 150 .in -2
 151 
 152 .RE
 153 
 154 .sp
 155 .ne 2
 156 .na
 157 \fB\fBVT_SETMODE\fR\fR
 158 .ad
 159 .sp .6
 160 .RS 4n
 161 Sets the VT mode. The argument is a pointer to a vt_mode structure as defined
 162 above. The structure should be filled in with the desired mode.  If
 163 process-control mode is specified, the signals used to communicate with the
 164 process should be specified.  If any signals are not specified (value is zero),
 165 the signal default is \fBSIGUSR1\fR (for relsig and acqsig).
 166 .RE
 167 
 168 .sp
 169 .ne 2
 170 .na
 171 \fB\fBVT_RELDISP\fR\fR
 172 .ad
 173 .sp .6
 174 .RS 4n
 175 Tells the VT manager if the process releases (or refuses to release) the
 176 display. An argument of 1 indicates the VT is released. An argument of 0
 177 indicates refusal to release. The \fBVT_ACKACQ\fR argument indicates if
 178 acquisition of the VT has been completed.
 179 .RE
 180 
 181 .sp
 182 .ne 2
 183 .na
 184 \fB\fBVT_ACTIVATE\fR\fR
 185 .ad
 186 .sp .6
 187 .RS 4n
 188 Makes the VT specified in the argument the active VT (in the same manner as if
 189 a hotkey initiated the switch).  If the specified VT is not open or does not
 190 exist, the call fails and errno is set to \fBENXIO\fR.
 191 .RE
 192 
 193 .sp
 194 .ne 2
 195 .na
 196 \fB\fBVT_WAITACTIVE\fR\fR
 197 .ad
 198 .sp .6
 199 .RS 4n
 200 If the specified VT is currently active, this call returns immediately.
 201 Otherwise, it sleeps until the specified VT becomes active, at which point it
 202 returns.
 203 .RE
 204 
 205 .sp
 206 .ne 2
 207 .na
 208 \fB\fBVT_GETSTATE\fR\fR
 209 .ad
 210 .sp .6
 211 .RS 4n
 212 Obtains the active VT number and a list of open VTs. The argument is an address
 213 to the following structure:
 214 .sp
 215 .in +2
 216 .nf
 217 struct vt_stat {
 218             unsigned short      v_active, /* number of the active VT */
 219                         v_signal, /* not used */
 220                         v_state;  /* count of open VTs.  For every 1 in this
 221                                      field, there is an open VT */
 222             }
 223 .fi
 224 .in -2
 225 
 226 With \fBVT_GETSTATE\fR, the VT manager first gets the number of the active VT,




 227 then determines the number of open VTs in the system and sets a 1 for each open
 228 VT in v_state. Next, the VT manager transfers the information in structure
 229 \fBvt_stat\fR passed by the user process.
 230 .RE
 231 
 232 .sp
 233 .ne 2
 234 .na
 235 \fB\fBKDGETMODE\fR\fR
 236 .ad
 237 .sp .6
 238 .RS 4n
 239 Obtains the text/graphics mode associated with the VT.
 240 .sp
 241 .in +2
 242 .nf
 243             #define KD_TEXT         0
 244             #define KD_GRAPHICS     1
 245 .fi
 246 .in -2
 247 
 248 .RE
 249 
 250 .sp
 251 .ne 2
 252 .na
 253 \fB\fBKDSETMODE\fR\fR
 254 .ad
 255 .sp .6
 256 .RS 4n
 257 Sets the text/graphics mode to the VT.
 258 .sp
 259 \fBKD_TEXT\fR indicates that console text is displayed on the screen. Normally
 260 \fBKD_TEXT\fR is combined with \fBVT_AUTO\fR mode for text console terminals,




 261 so that the console text display automatically is saved and restored on the hot
 262 key screen switches.
 263 .sp
 264 \fBKD_GRAPHICS\fR indicates that the user/application (usually Xserver) has
 265 direct control of the display for this VT in graphics mode. Normally
 266 \fBKD_GRAPHICS\fR is combined with \fBVT_PROCESS\fR mode for this VT indicating
 267 direct control of the display in graphics mode. In this mode, all writes to the






 268 VT using the write system call are ignored, and you must save and restore the
 269 display on the hot key screen switches.
 270 .sp
 271 When the mode of the active VT is changed from \fBKD_TEXT\fR to
 272 \fBKD_GRAPHICS\fR or a VT of \fBKD_GRAPHICS\fR mode is made active from a
 273 previous active VT of \fBKD_TEXT\fR mode, the virtual console manager initiates
 274 a \fBKDSETMODE\fR ioctl with \fBKD_GRAPHICS\fR as the argument to the
 275 underlying console frame buffer device indicating that current display is
 276 running into graphics mode.
 277 .sp
 278 When the mode of the active VT is changed from \fBKD_GRAPHICS\fR to
 279 \fBKD_TEXT\fR or a VT of \fBKD_TEXT\fR mode is actived from a previous active
 280 VT of \fBKD_GRAPHICS\fR mode, the virtual console manager initiates a
 281 \fBKDSETMODE\fR ioctl with \fBKD_TEXT\fR as the argument to the underlying
 282 console frame buffer device indicating that current display is running into
 283 console text mode.
 284 .RE
 285 
 286 .SH FILES
 287 .sp
 288 .ne 2
 289 .na
 290 \fB\fB/dev/vt/#\fR \fR
 291 .ad
 292 .RS 14n












 293 VT devices.
 294 .RE
 295 
 296 .SH SEE ALSO
 297 .sp
 298 .LP
 299 \fBioctl\fR(2), \fBsignal\fR(3C), \fBwscons\fR(7D)
 300 .SH NOTES
 301 .sp
 302 .LP
 303 By default, there are only five virtual console instance login prompts running
 304 on \fB/dev/vt/#\fR (where "#" represents 2 to 6) in addition to the system
 305 console running on \fB/dev/console\fR. Normally Xorg uses the seventh virtual
 306 console (\fB/dev/vt/7\fR.) To switch from consoles to Xserver (which normally





 307 picks up the first available virtual console), use [ Ctrl + ] Alt + F7 .
 308 .sp
 309 .in +2
 310 .nf
 311        # svcs  | grep login
 312        online         17:49:11 svc:/system/console-login:default
 313        online         17:49:11 svc:/system/console-login:vt2
 314        online         17:49:11 svc:/system/console-login:vt3
 315        online         17:49:11 svc:/system/console-login:vt4
 316        online         17:49:11 svc:/system/console-login:vt5
 317        online         17:49:11 svc:/system/console-login:vt6
 318 
 319        console-login:default is for the system console, others for
 320        virtual consoles.
 321 
 322        You can modify properties/disable/enable and remove/add
 323        virtual consoles using smf(5):
 324 
 325        # svccfg -s console-login add vt8
 326        # svccfg -s console-login:vt8 setprop ttymon/device=astring: "/dev/vt/8"
 327        # svcadm enable console-login:vt8
 328 .fi
 329 .in -2
 330 
   1 .\" Copyright (c) 2017, Joyent, Inc.
   2 .\" Copyright (c) 2008 Sun Microsystems, Inc.  All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the
   4 .\" Common Development and Distribution License (the "License").
   5 .\" You may not use this file except in compliance with the License.
   6 .\"
   7 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   8 .\" or http://www.opensolaris.org/os/licensing.
   9 .\" See the License for the specific language governing permissions
  10 .\" and limitations under the License.
  11 .\"
  12 .\" When distributing Covered Code, include this CDDL HEADER in each
  13 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  14 .\" If applicable, add the following below this CDDL HEADER, with the
  15 .\" fields enclosed by brackets "[]" replaced with your own identifying
  16 .\" information: Portions Copyright [yyyy] [name of copyright owner]
  17 .Dd October 29, 2017
  18 .Dt VT 7I
  19 .Os
  20 .Sh NAME
  21 .Nm vt
  22 .Nd Solaris virtual console interface
  23 .Sh SYNOPSIS
  24 .In sys/kd.h
  25 .In sys/vt.h
  26 .Sh DESCRIPTION
  27 The virtual console device driver \(em also known as virtual terminal
  28 .Pq Sy VT
  29 \(em is a layer of management functions that provides facilities to
  30 support and switch between multiple screen faces on a single physical device.
  31 .Pp
  32 VT's are accessed in the same way as other devices.
  33 The
  34 .Xr open 2
  35 system
  36 call is used to open the virtual console and
  37 .Xr read 2 ,
  38 .Xr write 2
  39 and
  40 .Xr ioctl 2
  41 are used in the normal way and support the functionality of the
  42 underlying device.
  43 In addition, some virtual console-specific ioctls are
  44 provided and described below.
  45 .Pp
  46 The VT provides a link between different screen faces and the device.
  47 The
  48 .Sy "active virtual console"
  49 corresponds to the currently visible screen face.
  50 Device input is directed to the active console and any device-specific modes
  51 that change on a per virtual terminal basis are set to the characteristics
  52 associated with the active console.
  53 .Pp
  54 You manage VT's by intercepting keyboard sequences
  55 .Pq Dq "hot key" .
  56 To maintain consistency with Xserver, the virtual console device driver
  57 supports the Ctrl, Alt, F# and arrow keys.
  58 .Pp
  59 The sequence
  60 .Sy "AltL + F#"
  61 (where AltL represents the left Alt key and F# represents function keys 1
  62 through 12) is used to select virtual console 1-12.
  63 The sequence
  64 .Sy "AltGraph + F#"
  65 (where AltGraph represents the right Alt key and F# represent function keys 1
  66 through 12) is for virtual console 13-24.
  67 .Sy "Alt + F1"
  68 chooses the system console (also known as virtual console 1).
  69 The sequence
  70 .Sy "Alt + \(->"
  71 (where "\(->" represents the right directional arrow)
  72 selects the next VT in a circular ring fashion and
  73 .Sy "Alt + \(<-"
  74 (where "\(<-" represents the left directional arrow) changes to the previous
  75 console in a circular fashion.
  76 The sequence
  77 .Sy "Alt + \(ua"
  78 (where "\(ua" represents the up directional arrow) is for the last used console.
  79 .Pp
  80 Virtual console switching can be done automatically
  81 .Pq Dv VT_AUTO
  82 on receipt of a
  83 .Dq hot-key
  84 or by the process owning the VT
  85 .Pq Dv VT_PROCESS .
  86 When performed automatically, the process associated with the virtual console is
  87 unaware of the switch.
  88 Saving and restoring the device are handled by the
  89 underlying device driver and the virtual console manager.
  90 Note that automatic switching is the default mode.
  91 .Pp
  92 When a
  93 .Dq hot-key
  94 is sent when in process-controlled switch mode, the process
  95 owning the VT is sent a signal (relsig) it has specified to the virtual console
  96 manager (see
  97 .Xr signal 3C )
  98 requesting the process to release the physical device.
  99 At this point, the virtual console manager awaits the
 100 .Dv VT_RELDISP
 101 ioctl from the process.
 102 If the process refuses to release the device (meaning
 103 the switch does not occur), it performs a
 104 .Dv VT_RELDISP
 105 ioctl with an argument of 0 (zero).
 106 If the process desires to release the device, it saves
 107 the device state (keyboard, display, and I/O registers) and then performs a
 108 .Dv VT_RELDISP
 109 with an argument of 1 to complete the switch.
 110 .Pp
 111 A ring of VT's can contain intermixed auto mode and process control mode
 112 consoles.
 113 When an auto mode process becomes active, the underlying device
 114 driver and the virtual console manager handle the restoring of the device.
 115 Process control mode processes are sent a specified signal (acqsig) when they
 116 become the active console.
 117 The process then restores the device state
 118 (keyboard, display, and I/O registers) and performs
 119 .Dv VT_RELDISP
 120 ioctl with an argument of
 121 .Dv VT_ACKACQ
 122 to complete the switching protocol.
 123 .Pp
 124 The modify-operations ioctls
 125 .Po
 126 .Dv VT_SETMODE ,
 127 .Dv VT_RELDISP ,
 128 .Dv VT_WAITACTIVE ,
 129 .Dv KDSETMODE
 130 .Pc
 131 check if the VT is the controlling tty of
 132 the calling process.
 133 If not, the sys_devices privilege is enforced.
 134 .Dv VT_ACTIVATE
 135 requires the sys_devices privilege.
 136 Note that there is no
 137 controlling tty and privilege check for query/view operations.
 138 .Sh IOCTLS


 139 The following ioctls apply to devices that support virtual consoles:
 140 .Bl -tag -width VT_ENABLED
 141 .It Dv VT_ENABLED
 142 Queries to determine if VT functionality is available on the system.
 143 The argument is a pointer to an integer.
 144 If VT functionality is available, the




 145 integer is 1, otherwise it is 0.
 146 .It Dv VT_OPENQRY
 147 Finds an available VT.
 148 The argument is a pointer to an integer.
 149 The integer is






 150 filled in with the number of the first available console that no other process
 151 has open (and hence, is available to be opened).
 152 If there are no available
 153 VT's, -1 is filled in.
 154 .It Dv VT_GETMODE
 155 Determines the VT's current mode, either
 156 .Dv VT_AUTO
 157 or
 158 .Dv VT_PROCESS .
 159 The




 160 argument is the address of the following structure, as defined in
 161 .In sys/vt.h
 162 .Bd -literal -offset 2n


 163 struct vt_mode {
 164       char mode;     /* VT mode */
 165       char waitv;    /* not used */
 166       short relsig;  /* signal to use for release request */
 167       short acqsig;  /* signal to use for display acquired */
 168       short frsig;   /* not used */
 169 }
 170 
 171 /* Virtual console Modes */
 172 #define VT_AUTO         0 /* automatic VT switching     */
 173 #define VT_PROCESS      1 /* process controls switching */
 174 .Ed
 175 .Pp
 176 The structure will be filled in with the current value for each field.
 177 .It Dv VT_SETMODE
 178 Sets the VT mode.
 179 The argument is a pointer to a vt_mode structure as defined above.
 180 The structure should be filled in with the desired mode.
 181 If process-control mode is specified, the signals used to communicate with the
 182 process should be specified.
 183 If any signals are not specified (value is zero), the signal default is
 184 .Dv SIGUSR1
 185 (for relsig and acqsig).
 186 .It Dv VT_RELDISP

















 187 Tells the VT manager if the process releases (or refuses to release) the
 188 display.
 189 An argument of 1 indicates the VT is released.
 190 An argument of 0 indicates refusal to release.
 191 The
 192 .Dv VT_ACKACQ
 193 argument indicates if acquisition of the VT has been completed.
 194 .It Dv VT_ACTIVATE





 195 Makes the VT specified in the argument the active VT (in the same manner as if
 196 a hotkey initiated the switch).
 197 If the specified VT is not open or does not exist, the call fails and errno is
 198 set to
 199 .Er ENXIO .
 200 .It Dv VT_WAITACTIVE






 201 If the specified VT is currently active, this call returns immediately.
 202 Otherwise, it sleeps until the specified VT becomes active, at which point it
 203 returns.
 204 .It Dv VT_GETSTATE
 205 Obtains the active VT number and a list of open VTs.
 206 The argument is an address to the following structure:
 207 .Bd -literal -offset 2n










 208 struct vt_stat {
 209     unsigned short v_active, /* number of the active VT */
 210                    v_signal, /* not used */
 211                    /*
 212                     * count of open VTs.  For every 1 in this
 213                     * field, there is an open VT
 214                     */
 215                    v_state;
 216 }
 217 .Ed
 218 .Pp
 219 With
 220 .Dv VT_GETSTATE ,
 221 the VT manager first gets the number of the active VT,
 222 then determines the number of open VTs in the system and sets a 1 for each open
 223 VT in v_state.
 224 Next, the VT manager transfers the information in structure
 225 .Vt vt_stat
 226 passed by the user process.
 227 .It Dv KDGETMODE






 228 Obtains the text/graphics mode associated with the VT.
 229 .Bd -literal -offset 2n
 230 #define KD_TEXT         0
 231 #define KD_GRAPHICS     1
 232 .Ed
 233 .It Dv KDSETMODE












 234 Sets the text/graphics mode to the VT.
 235 .It Dv KD_TEXT
 236 indicates that console text is displayed on the screen.
 237 Normally
 238 .Dv KD_TEXT
 239 is combined with
 240 .Dv VT_AUTO
 241 mode for text console terminals,
 242 so that the console text display automatically is saved and restored on the hot
 243 key screen switches.
 244 .Pp
 245 .Dv KD_GRAPHICS
 246 indicates that the user/application (usually Xserver) has
 247 direct control of the display for this VT in graphics mode.
 248 Normally
 249 .Dv KD_GRAPHICS
 250 is combined with
 251 .Dv VT_PROCESS
 252 mode for this VT indicating
 253 direct control of the display in graphics mode.
 254 In this mode, all writes to the
 255 VT using the write system call are ignored, and you must save and restore the
 256 display on the hot key screen switches.
 257 .Pp
 258 When the mode of the active VT is changed from
 259 .Dv KD_TEXT
 260 to
 261 .Dv KD_GRAPHICS
 262 or a VT of
 263 .Dv KD_GRAPHICS
 264 mode is made active from a
 265 previous active VT of
 266 .Dv KD_TEXT
 267 mode, the virtual console manager initiates a
 268 .Dv KDSETMODE
 269 ioctl with
 270 .Dv KD_GRAPHICS
 271 as the argument to the underlying console frame buffer device indicating that
 272 current display is running into graphics mode.
 273 .Pp
 274 When the mode of the active VT is changed from
 275 .Dv KD_GRAPHICS
 276 to
 277 .Dv KD_TEXT
 278 or a VT of
 279 .Dv KD_TEXT
 280 mode is actived from a previous active VT of
 281 .Dv KD_GRAPHICS
 282 mode, the virtual console manager initiates a
 283 .Dv KDSETMODE
 284 ioctl with
 285 .Dv KD_TEXT
 286 as the argument to the underlying console frame buffer device indicating that
 287 current display is running into console text mode.
 288 .El
 289 .Sh FILES
 290 .Bl -tag -width xxxxxxxxx
 291 .It Pa /dev/vt/#
 292 VT devices.
 293 .El
 294 .Sh SEE ALSO
 295 .Xr ioctl 2 ,
 296 .Xr signal 3C ,
 297 .Xr wscons 7D
 298 .Sh NOTES



 299 By default, there are only five virtual console instance login prompts running
 300 on
 301 .Pa /dev/vt/#
 302 (where "#" represents 2 to 6) in addition to the system
 303 console running on
 304 .Pa /dev/console .
 305 Normally Xorg uses the seventh virtual console
 306 .Pq Pa /dev/vt/7 .
 307 To switch from consoles to Xserver (which normally
 308 picks up the first available virtual console), use [ Ctrl + ] Alt + F7 .
 309 .Bd -literal -offset indent
 310 # svcs  | grep login
 311 online         17:49:11 svc:/system/console-login:default
 312 online         17:49:11 svc:/system/console-login:vt2
 313 online         17:49:11 svc:/system/console-login:vt3
 314 online         17:49:11 svc:/system/console-login:vt4
 315 online         17:49:11 svc:/system/console-login:vt5
 316 online         17:49:11 svc:/system/console-login:vt6
 317 .Ed
 318 .Pp
 319 .Sy console-login:default
 320 is for the system console, others for virtual consoles.
 321 .Pp
 322 You can modify properties/disable/enable and remove/add virtual consoles using
 323 .Xr smf 5 :
 324 .Bd -literal -offset indent
 325 # svccfg -s console-login add vt8
 326 # svccfg -s console-login:vt8 setprop \e
 327   ttymon/device=astring: "/dev/vt/8"
 328 # svcadm enable console-login:vt8
 329 .Ed