Jump to content
xisto Community

intrepid

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by intrepid

  1. I first submitted this tutorial a couple of months ago over at http://forums.xisto.com/no_longer_exists/ as user adpsimpson. Having spent ages wishing the hotkeys on my laptop would work, I spent most of an afternoon looking into it. Since no site I found explained it satisfactorily, here's my method... The first step is to find out which of the keys are registered by the kernel, and what their keycodes are (the unique event number that they cause). To do this you need a program called xev, (in Mandrake this is part of X11R6-contrib, is installed by default in Slack, and should be easy to find for other distros). From the terminal, in a graphical interface, type xev to launch it, move the mouse over the new window and press the hotkeys. What appears in the terminal is something like KeyPress event, serial 28, synthetic NO, window 0x2c00001, root 0xb5, subw 0x2c00002, time 3593153, (55,38), root:(730,82), state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 bytes: "" The "keycode" (in this case 64) is the important part. The next is to make the keycode actually do something when X registers it. For this you need to run xmodmap to modify the keyboard map. A small script in the ~/.kde/Autostart folder (or similar for other desktops) means this will be done each time KDE is stated. I wanted key 176 to increase the system volume, and 174 to decrease it, so the script reads xmodmap -e 'keycode 174=F21' #voldownxmodmap -e 'keycode 176=F22' #volup Don't forget to make this executable. Run this script, re-run xev and you should now see, for example, F22 or F21 in the even notification. The final step is to make F21 or F22 (or whatever you called your keys) actually do something useful. You can do this using the existing shortcut options (if you wish it to start an application), or you can use the program xbindkeys, here - http://hocwp.free.fr/xbindkeys/xbindkeys.html . This program links key events to bash commands, very easily. The script in the KDE Autostart folder can then be modified to launch xbindkeys when KDE is launched, and the file ~/.xbindkeysrc modified to link the key events to the desired bash commands. I used dcop (the inter-program communication process) to tell kmix (the default KDE mixer) to increase/decrease the master volume (channel 0) whenever the relevant keys were pressed. Below is the complete file ~/.kde/Autostart/keycodes (MUST be executable): #!/bin/sh#file to map special keys.#File location: ~/.kde/Autostart#File Name:keycodesxmodmap -e 'keycode 174=F21' #voldownxmodmap -e 'keycode 176=F22' #volup#Open kmix to allow xbindkeys to work:kmix#Open xbindkeys to link keys to applications:xbindkeysand the few lines I had to add to ~/.xbindkeysrc:Code:#Volume decrease"dcop kmix Mixer0 decreaseVolume 0" F21#Volume increase"dcop kmix Mixer0 increaseVolume 0" F22 Hopefully this will help people make their keyboards more useful. If anyone has any further suggestions, or knows of obvious or important differences between desktop environments, please post them below. However it should be relatively distro/desktop independent.
  2. This thread isn't to be about the pros and cons of Linux versus Windows, but a guide to the different broad categories of Linux around. Further I'm not trying to list every known distro - that's already been attempted at http://forums.xisto.com/no_longer_exists/ There are, currently, 2 main groups of Linux distributions (or distros), separated by their software installation and handling. The first are .rpm based, the second .deb based. rpm stands for Red Hat Package Management, .deb is short for Debian. As the names imply, rpm based distros are, somewhere along the line, either forked from Red Hat or based on large sections of Red Hat code. Included are Red Hat itself, Fedora Core (the Community release of Red Hat), Mandrake, Suse, and various others. Most "user-friendly" distros fall in this group. Debian, which has one of the most regimented and fundamentally "free" philosophies of any distribution, has equally been used as the base for many other distros. The most commonly known is Knoppix, the famous live CD (which can run on a machine with no hard drive). There are many others, including Mepis, Ubuntu, and various other live CDs based around Knoppix. Although Debian is not easy to install, there are various methods (including the live CD Knoppix) around to make it simpler, and the enormous quantities of software waiting on internet repositories is mind boggling. Then there distros which fit into neither group. Mepis actually accepts both .rpm and .deb files for installing new software, so is an in between case. Slackware, the oldest maintained Linux-based OS, has its own package management system, essentially a compressed folder with pre-compiled software in it. Many other systems have sprung up from Slack, due to it's age and dedicated following - Collage Linux is perhaps the most prominent. Gentoo employs the philosophy of "the source code is available, let's use it" and compiles every program from scratch (including the kernel, if you let it, during installation). Thus it doesn't use a "package management" system as such, but a carefully maintained repository of source code, for virtually any program you can imagine. Similarly Linux from Scratch is a set of tools allowing a user to build a home-grown OS, using only source code. If I've missed any groups, post below. If you think this is a stupid way of classifying Linux distros, tell why.
  3. There is a good site here which allows users who have previously only used Windows to see which programs perform roughly the same tasks as those they are used to in Windows. Still, this should simply be seen as a help for users trying to understand Linux, when they haven't used it before. As hashbang said, the Linux apps are predominantly complete, fully featured apps, not just clones of Windows programs. Linux itself is vastly more flexible than Windows as an operating system. It is 100% customisable, can run any one of dozens of desktops (simultaneously), virtually never crashes (even when individual programs do), etc. However this doesn't neccessarily make it a better system for all purposes. There are a vast number of people who just want something that works- they don't care about how it works, how to make it work better, how to make it different, etc. For those who enjoy understanding computers and the way they tick, Open Source (whether BSD, Linux, Hurd or any other) is a good idea. As the most widely used, Linux has the greatest support, and is therefore a good starting place. For those who want to play Half Life 2 and Doom 3, stick in Windows.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.