"The Linux Gazette...making Linux just a little more fun!"

(?) The Answer Guy (!)

By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/

(?) Some Magic Keys for the Linux Console

From Anthony Gabrielson, on Mon, 02 Nov 1998


One of my co-workers runs sco unixware 7. Under X he can switch off between the GUI and GUI by alt F1 F2 etc ... he can also startx in thos terms if he wants. Can this be done under Linux right now. If not is any one working on it?

Anthony Gabrielson

(!)This is a fairly common source of confusion for new Linux users.
You can use [Ctrl]+[Alt]+[Fx] to do this using XFree86 (the free X server for Linux, FreeBSD, etc). I presume you could also remap your [Alt]+[Fx] keys to do it, probably using 'xmodmap'
You can also use an 'xterm' command, menu entry or icon to do this --- using the 'chvt' command that's included with most distributions.
Note: You can usually also "back out of" XFree86 using [Ctrl]+[Alt]+[BackSpace]. This basically provides a "vulcan nerve pinch" or "three finger salute" for the X windowing system, without having to reset the rest of the OS.
Speaking of "three finger salutes" there are some neat options in the 2.1 kernels if you enable the "Magic SysRq" option when you build you new kernels. These give you various commands using [Alt]+[SysRq/Print Screen]+? options.
For example you can use "Magic SysRq"+[s] to "Sync all filesystems." There are other combinations to restore you keyboard from "raw" mode, kill all processes that are attached to the current virtual console, remount your filesystems in "read-only" mode, dump tasklists, and register or memory status to your console, and to set various signals to all processes below 'init.'
These is supposed to work no matter what else the kernel is doing. You can read more about these in: /usr/src/linux/Documentation/sysrq.txt
(It's a fairly obscure fact that the 2.0 kernels had some similar console keyboard features. You could invoke register, memory, and task list dumps using [Alt]+[ScrollLock], [Shift]+[ScrollLock], and [Ctrl]+[ScrollLock] respectively).
In addition most versions of the Linux kernel (back to 1.2 or earlier) would allow you to use [Shift]+[PgUp] to view a small backscroll buffer for the current VC. This buffer gets wiped on a virtual console switch (unlike the FreeBSD [ScrollLock] feature which is maintained for every VC).
Another key binding that many Linux users don't know about is the [Alt]+[Left Cursor] and [Alt]+[Right Cursor] bindings, which will cycle among your virtual consoles (VC's). In other words if you are on VC4 and you use [Alt]+[Left Cursor] you'll be switched to VC3 while [Alt]+[Left Cursor] would move you to VC5.
If you reconfigure your system to provide logins on more than 12 virtual consoles (just edit /etc/inittab in the obvious way --- and make sure you have the corresponding /dev/tty* nodes) --- you can get to the second "bank" of VCs using the other [Alt] key (the right one). If you had more than 24 you'd presumably have to use the [Alt]+{cursor keys} to get at them.
Of course you can customize most of these to your heart's content. Look for the following man pages for more details:
		loadkeys (1)
		dumpkeys (1)
		showkey (1)
		keytables (5)
... and look through the whole "kbd" package for 'chvt' and other commands. There's also supposed to be an improved set of console tools (the "console" package?) which should be at Sunsite (http://sunsite.unc.edu/pub/Linux) somewhere.
So you can customize your console's keyboard bindings without even having to patch a kernel.
Incidentally, I get around the lack of real console backscroll buffers by just running 'screen' --- which also allows me to detach my processes from one terminal and re-attach to them in another. This is very handy when I'm working on a VC (as I usually do) and I need to look something up in Netscape --- if I think that Lynx just isn't getting what I need. I detach my 'screen' session, switch to my X session (which stays on VC13 for me, and VC14 for my wife's session), then I re-attach from any available 'xterm' I can then cut and paste between my X applications and the emacs that I've been running all along.
'screen' also give me keyboard driven cut-and-paste between console/text/curses applications. I personally prefer this to 'gpm' old 'selection' features --- though I tend to use both occasionally.
So, does that list of options block the sockets off of SCO?

(?) Anthony Replies...

From Anthony Gabrielson, on Wed, 04 Nov 1998


Thank You for the help - I don't care for sco, however that co-worker kept coming at me w\ can it do this and that. I was stumped on this one.

Thanks Again,

(!) I figured. About the only things the SCOldies can hold over us right now are "journal file support" and "Tarantella."
Just SCOld him with an observation that engineers from SCO were making much ado about their recent addition of Linux binary compability support --- the ability of SCO to run Linux binaries; at last years USENIX in Louisiana. Then ask if Microsoft has sold off the last of their SCO stock yet <g>.

Copyright © 1998, James T. Dennis
Published in The Linux Gazette Issue 35 December 1998

[ Answer Guy Index ] office largedisk links yamaha magickeys
passwd ftproot pvtmail netware crypto
relay project bootmethod sysadmin ipscript
loopfs mrtg slimscan rpm modutil libc dell remoteroot

[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]