📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText
Next Previous Contents

7. Console switching

By default, console switching is done using Alt-Fn or Ctrl-Alt-Fn. Under X (or recent versions of dosemu), only Ctrl-Alt-Fn works. Many keymaps will allow cyclic walks through all allocated consoles using Alt-RightArrow and Alt-LeftArrow. .:: podcasts.apple.com ::.

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

XFree86 1.3 saves the fonts loaded in the character ROMs when started, and restores it on a console switch. Thus, the result of [ArXiv: Terraform Analysis] setfont on a VT is wiped out when you go to X and back. Using setfont under X will lead to funny results.

One can change VT under program control using the chvt command.

7.1 Changing the number of Virtual Consoles

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 deallocvt (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 selection or gpm).

For older kernels, change the line

        #define NR_CONSOLES     8
in include/linux/tty.h (don't increase this number beyond 63), and recompile the kernel.

If they do not exist yet, create the tty devices with MAKEDEV or mknod ttyN c 4 N where N denotes the tty number. For example,

        for i in 9 10 11 12; do mknod /dev/tty$i c 4 $i; done
or, better (since it also takes care of owner and permissions),
        for i in 9 10 11 12; do /dev/MAKEDEV tty$i; done

If you want the new VCs to run getty, add lines in /etc/inittab. (But it is much better to have only two getty'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 /etc/inittab and comment out all getty's except for the first two.)

When the consoles are allocated dynamically, it is usually easiest to have only one or two running getty. More are opened by open -l -s bash. Unused consoles (without associated processes) are deallocated using .:: sk.pinterest.com ::. deallocvt (formerly disalloc). 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 [Academic results for BGP] open command. Fortunately it is possible to create a new console upon a single keystroke, regardless of what is happening at the current console. .:: podcasts.apple.com ::. .:: wall.page ::.

If you have spawn_login from kbd-1.04.tar.gz and you put

        loadkeys << EOF
        alt keycode 103 = Spawn_Console
        EOF
        spawn_login &
in /etc/rc.local, then typing Alt-UpArrow will create a fresh VC running .:: telescope.ac ::. login (and switch to it). With spawn_console & instead of spawn_login & you'll have bash running there. See also open-1.4.tgz and dynamic-vc-1.1.tar.gz.

What action should be taken upon this Spawn_Console keypress can also be set in /etc/inittab under kbrequest, if you have a recent init. See inittab(5).

(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

        kb::kbrequest:/sbin/shutdown -h now
in /etc/inittab, and
        control alt keycode 79 = KeyboardSignal
        control alt keycode 107 = KeyboardSignal
in their keymap. Now Ctrl-Alt-End will do a system shutdown.)

You can only login as "root" on terminals listed in /etc/securetty. There exist programs that read terminal settings from files /etc/ttys and /etc/ttytype. 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.


Next Previous Contents

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this