p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/kbd-1.15.5/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/doc/kbd-1.15.5/kbd.FAQ-7.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>The Linux keyboard and console HOWTO: Console switching</TITLE>
 <LINK HREF="kbd.FAQ-8.html" REL=next>
 <LINK HREF="kbd.FAQ-6.html" REL=previous>
 <LINK HREF="kbd.FAQ.html#toc7" REL=contents>
</HEAD>
<BODY>
<A HREF="kbd.FAQ-8.html">Next</A>
<A HREF="kbd.FAQ-6.html">Previous</A>
<A HREF="kbd.FAQ.html#toc7">Contents</A>
<HR>
<H2><A NAME="s7">7. Console switching</A></H2>

<P>
<!--
console!switching
-->
<P>By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn.
Under <CODE>X</CODE> (or recent versions of <CODE>dosemu</CODE>), only Ctrl-Alt-Fn works.
Many keymaps will allow cyclic walks through all allocated consoles
using Alt-RightArrow and Alt-LeftArrow.
<P>XFree86 1.3 does not know that Alt is down when you switch to the X
window. Thus, you cannot switch immediately to some other VT again
but have to release Alt first.
In the other direction this should work: the kernel always keeps
track of the up/down status of all keys. (As far as possible: on some
keyboards some keys do not emit a scancode when pressed (e.g.: the PFn
keys of a FOCUS 9000) or released (e.g.: the Pause key of many keyboards).)
<P>XFree86 1.3 saves the fonts loaded in the character ROMs when started,
and restores it on a console switch. Thus, the result of <CODE>setfont</CODE> on
a VT is wiped out when you go to X and back.
Using <CODE>setfont</CODE> under X will lead to funny results.
<P>One can change VT under program control using the <CODE>chvt</CODE> command.
<P>
<H2><A NAME="ss7.1">7.1 Changing the number of Virtual Consoles</A>
</H2>

<P>
<!--
console!changing number of
-->
<P>This question still comes up from time to time, but the answer is:
you already have enough of them.
Since kernel version 1.1.54, there are between 1 and 63 virtual
consoles. A new one is created as soon as it is opened. It is
removed by the utility <CODE>deallocvt</CODE> (but it can be removed only when
no processes are associated to it anymore, and no text on it has been
selected by programs like <CODE>selection</CODE> or <CODE>gpm</CODE>).
<P>For older kernels, change the line
<BLOCKQUOTE><CODE>
<PRE>
        #define NR_CONSOLES     8
</PRE>
</CODE></BLOCKQUOTE>

in <CODE>include/linux/tty.h</CODE> (don't increase this number beyond 63),
and recompile the kernel.
<P>If they do not exist yet, create the tty devices with <CODE>MAKEDEV</CODE>
or <CODE>mknod tty</CODE>N <CODE>c 4</CODE> N where N denotes the tty number. For example,
<BLOCKQUOTE><CODE>
<PRE>
        for i in 9 10 11 12; do mknod /dev/tty$i c 4 $i; done
</PRE>
</CODE></BLOCKQUOTE>

or, better (since it also takes care of owner and permissions),
<BLOCKQUOTE><CODE>
<PRE>
        for i in 9 10 11 12; do /dev/MAKEDEV tty$i; done
</PRE>
</CODE></BLOCKQUOTE>
<P>If you want the new VCs to run <CODE>getty</CODE>, add lines in <CODE>/etc/inittab</CODE>.
(But it is much better to have only two <CODE>getty</CODE>'s running,
and to create more consoles dynamically as the need arises.
That way you'll have more memory when you don't use all these consoles,
and also more consoles, in case you really need them.
Edit <CODE>/etc/inittab</CODE> and comment out all <CODE>getty</CODE>'s except
for the first two.)
<P>When the consoles are allocated dynamically, it is usually easiest
to have only one or two running <CODE>getty</CODE>. More are opened by
<CODE>open -l -s bash</CODE>. Unused consoles (without associated processes)
are deallocated using <CODE>deallocvt</CODE> (formerly <CODE>disalloc</CODE>).
But, you say, I am involved in activities when I suddenly need more
consoles, and do not have a bash prompt available to give the <CODE>open</CODE>
command.
Fortunately it is possible to create a new console upon a single
keystroke, regardless of what is happening at the current console.
<P>If you have <CODE>spawn_login</CODE> from <CODE>kbd-1.04.tar.gz</CODE> and you put
<BLOCKQUOTE><CODE>
<PRE>
        loadkeys &lt;&lt; EOF
        alt keycode 103 = Spawn_Console
        EOF
        spawn_login &amp;
</PRE>
</CODE></BLOCKQUOTE>

in <CODE>/etc/rc.local</CODE>, then typing Alt-UpArrow will create a fresh VC
running <CODE>login</CODE> (and switch to it). With <CODE>spawn_console &amp;</CODE> instead of
<CODE>spawn_login &amp;</CODE> you'll have bash running there.
See also <CODE>open-1.4.tgz</CODE> and <CODE>dynamic-vc-1.1.tar.gz</CODE>.
<P>What action should be taken upon this Spawn_Console keypress
can also be set in <CODE>/etc/inittab</CODE> under <CODE>kbrequest</CODE>,
if you have a recent <CODE>init</CODE>. See inittab(5).
<P>(This action can be something entirely different - I just called
the key Spawn_Console because that is what I used it for.
When used for other purposes it is less confusing to use
its synonym KeyboardSignal.
For example, some people like to put the lines
<BLOCKQUOTE><CODE>
<PRE>
        kb::kbrequest:/sbin/shutdown -h now
</PRE>
</CODE></BLOCKQUOTE>

in <CODE>/etc/inittab</CODE>, and
<BLOCKQUOTE><CODE>
<PRE>
        control alt keycode 79 = KeyboardSignal
        control alt keycode 107 = KeyboardSignal
</PRE>
</CODE></BLOCKQUOTE>

in their keymap. Now Ctrl-Alt-End will do a system shutdown.)
<P>You can only login as "root" on terminals listed in <CODE>/etc/securetty</CODE>.
There exist programs that read terminal settings from files
<CODE>/etc/ttys</CODE> and <CODE>/etc/ttytype</CODE>. If you have such
files, and create additional consoles, then it might be a good idea
to also add entries for them in these files.
<P>
<HR>
<A HREF="kbd.FAQ-8.html">Next</A>
<A HREF="kbd.FAQ-6.html">Previous</A>
<A HREF="kbd.FAQ.html#toc7">Contents</A>
</BODY>
</HTML>
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
September 29 2025 07:01:39
0 / 0
0755
ANSI-dvorak.gif
3.719 KB
December 01 2012 21:41:38
0 / 0
0644
AUTHORS
0.724 KB
December 01 2012 21:41:38
0 / 0
0644
COPYING
1.947 KB
December 01 2012 21:41:38
0 / 0
0644
ChangeLog
15.691 KB
November 24 2021 16:32:22
0 / 0
0644
README
0.622 KB
December 01 2012 21:41:38
0 / 0
0644
dvorak-l.xmodmap
2.278 KB
December 01 2012 21:41:38
0 / 0
0644
dvorak-r.xmodmap
2.283 KB
December 01 2012 21:41:38
0 / 0
0644
dvorak.diffs
1.374 KB
December 01 2012 21:41:38
0 / 0
0644
dvorak.txt
1.137 KB
December 01 2012 21:41:38
0 / 0
0644
dvorak.xmodmap
2.106 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats-1.html
5.354 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats-2.html
1.444 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats-3.html
6.843 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats-4.html
2.146 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats-5.html
0.505 KB
December 01 2012 21:41:38
0 / 0
0644
font-formats.html
1.286 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-1.html
4.086 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-10.html
2.582 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-11.html
2.195 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-12.html
8.019 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-13.html
4.388 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-14.html
3.393 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-15.html
6.756 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-16.html
2.948 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-17.html
1.675 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-18.html
2.463 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-19.html
1.317 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-2.html
2.925 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-20.html
1.684 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-21.html
1.671 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-22.html
2.376 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-23.html
0.942 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-3.html
2.057 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-4.html
7.677 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-5.html
16.866 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-6.html
2.681 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-7.html
5.576 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-8.html
9.191 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ-9.html
2.545 KB
December 01 2012 21:41:38
0 / 0
0644
kbd.FAQ.html
5.105 KB
December 01 2012 21:41:38
0 / 0
0644
utfdemo
4.15 KB
December 01 2012 21:41:38
0 / 0
0644
utflist
25.096 KB
December 01 2012 21:41:38
0 / 0
0644