13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C H A P T E R 10■ ■ ■Things Going In,Things Going OutThis chapter looks at changing your keymapping to match your keyboard, or using special keys; atautomating printer setup and useful tricks for printing text files; and at remote graphical login, whichcan be very useful for certain sorts of debugging. As the title says, it’s a collection of things that go into,and things that go out of, your machines.10-1. Changing Keymaps in XIf you have a fancy brand-name keyboard, you may well have various nonstandard keys on it that aren’tas a rule mapped to anything useful under <strong>Linux</strong>, which is a bit of a waste of a potentially nice feature.It’s possible to write additions to your keymap to change that.■ Note There is a difference between the console keymap and the xorg/XFree86 keymap. Changing the consolekeymap will change the xorg keymap as well, so it’s often useful to change the console keymap. See recipe 10-2for a situation where you just change the xorg keymap using xmodmap and xbindkeys, and see recipe 9-5a formore discussion of how xmodmap works and how you can change it.The first task is to find out what keycode is being sent by the key you want to remap. For example,here I’ll show how to remap Shift-2 to send " (like a British keyboard) rather than @ (like a U.S. keyboard),and I’ll show how to remap Shift-' to send @ instead of " to match it. Look for your existing keymap file in/usr/share/keymaps/i386. In some systems, you’ll find a keymap set in /etc/console/boottime.kmap.gz,and you could take a look at that file to see which keymap it says it is. In Ubuntu, try looking at/etc/default/console-setup or in the /etc/console-setup/ directory. Otherwise, you will probablyknow which keymap you’re using already!203Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!