The Best Without X
The Linux keyboard is fully customizable (could you doubt it?) and can be tailored for smart text-only usage. The idea is to reduce context-switch time to get more performance out of your multitasking brain. This is the basic idea behind virtual consoles.
Here are some suggestions for improving your keyboard. I will describe some of the useful changes to make, and then give the appropriate lines for the loadkeys program to effect the change.
Caps_Lock: Why have a “Caps Lock” key near the “a” key? When caps lock was useful to write silly BASIC programs they put it far from alphabetic keys; now that it is not so useful, they turned it to a trap for your little finger. Just get rid of it and turn it into a Control key.
alt-CapsLock will still yield CapsLock keycode 58 = Control control keycode 58 = Control
Control: The Control key on the bottom-left corner is a duplicate of the one we put by the “a”. You can turn it into Last_Console and thus have a fast editor/compiler context switch. Moreover, this makes your wrist useful in typing. Last_Console switches to the previous console you visited, and is one of the several exotic capabilities of the Linux keyboard.
keycode 29 = Last_Console
The Numeric Keypad Unless you're used to desktop calculators, the numeric keypad is too far in the right to be useful in typing digits, and can be turned to a console-switch scratchpad: hitting Alt-F8 takes a whole hand, and Alt-F1 isn't easy, either, at least on keyboards with the function keys at the top. Similarly, X-Windows users can configure the keypad as a map to their virtual desktop, provided that the Num_Lock key is left alone: xmodmap can't differentiate a non-Num_Locked keypad from the arrow keys. The “0” key then is suitable to be another Last_Console, useful if you didn't get rid of Caps_Lock.
keycode 29 = Last_Console # KP_0 keycode 79 = Console_1 # KP_1 keycode 80 = Console_2 # KP_2 keycode 81 = Console_3 # KP_3 keycode 75 = Console_4 # KP_4 keycode 76 = Console_5 # KP_5 keycode 77 = Console_6 # KP_6 keycode 71 = Console_7 # KP_7 keycode 72 = Console_8 # KP_8 keycode 73 = Console_9 # KP_9 keycode 98 = Console_10 # KP_Divide keycode 55 = Console_11 # KP_Multiply keycode 96 = Console_12 # KP_Enter keycode 78 = Console_13 # KP_Add keycode 74 = Console_14 # KP_Subtract
Home and End It can be useful to configure Home as Control -a and End as Control-e. This works with bash, tcsh and Emacs, without any other fiddling.
keycode 102 = Control_a keycode 107 = Control_e
Escape: If you are used to Sparc2s, old PCs, or the old faithful Apple II you'll enjoy putting the Esc key near the “1”. This change forces you to reposition the backtick/tilde pair as well. The exact change made here may not work on your keyboard, you'd better check your keycodes with showkeys.
keycode 41 = Escape # Escape alt keycode 1 = Meta_Escape # recycle grave/asciitilde near the Enter key keycode 43 = grave # asciitilde control keycode 41 = nul alt keycode 41 = Meta_grave
Backslash: The backslash/bar pair should be near “Z”, where the default keyboard configuration puts a duplicate of less/greater.
keycode 86 = backslash bar control keycode 43 = Control_backslash alt keycode 43 = Meta_backslash
The modifications listed above work with my keyboard. Check your actual keycodes using showkeys before applying these changes. showkeys is part of the kbd package. If you're a real typist, you can make something really useful out of the twelve function keys. Read the keytables(5) man page to probe further. For more information on how to modify the keyboard, see Kernel Korner in Linux Journal #14.
“Why should I use the numeric keypad to switch between 15 consoles when I only have 6?” I hear you say. Linux can handle a s many as 63 virtual console, and 6 (or whatever else) is only the number of “login prompts” configured in your system. Actually, consoles are dynamically created and destroyed during your system's lifetime.
The different login: prompts are spawned by the init process, which knows what to do by reading the file /etc/inittab; this very file specifies where getty should be invoked. You can play with inittab even if you don't completely understand it: to open more (or fewer) than 6 consoles for login, you can simply duplicate (or remove) lines. You must be careful, however, about the first field in the line—it is a unique “key” for the line, and it must be exactly two letters long.
My choice for console login sessions above 9 is cA, cB and so on, with the first nine entries c1 through c9.
A more interesting, and memory-saving, approach to your Linux session is to spawn only one or two gettys using /etc/inittab, and dynamically allocate other as you need them. There are a number of ways to spawn a new console:
gpm-root: This tool can spawn a new getty on the lowest-numbered free console in your system: just press control-mouse to wake the program, then press the mouse button again on the correct menu entry, and you will soon be presented with a newly-created login: prompt—it's that easy. When you log out from that console, everything is cleaned up automatically. This way of spawning consoles has the advantage that the /etc/utmp file is kept up to date, and thus the who command tells you the truth.
open: The tiny open utility spawns a new console and executes a program in it. You can use loadkeys to create a hot key which invokes open. Thus a single keypress (or meta-key) can log you in. This approach doesn't update the utmp database and works only when the hotkey is fed to a shell prompt.
spawn_console: The daemon spawn_console is part of the kbd package. It creates a console in response to a signal sent by the kernel in response to a Spawn_Console keysym. This approach works even if there isn't a shell to get your key, and doesn't update the utmp database.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Developer Poll
- What's the tweeting protocol?
- Dart: a New Web Programming Experience
- New Products
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




1 hour 13 min ago
3 hours 11 min ago
3 hours 28 min ago
3 hours 58 min ago
3 hours 58 min ago
3 hours 59 min ago
7 hours 8 sec ago
15 hours 26 min ago
15 hours 32 min ago
16 hours 1 min ago