Archive for the ‘Hardware’ category

Re-Map Default Mouse Buttons in Ubuntu Karmic

November 9th, 2009

While setting up a new installation of Ubuntu 9.10 for a friend, I ran into a small issue: she was using a 4 button Kensington trackball mouse, and the default key mappings made little sense.  Naturally, there were no drivers or software available, but after some research I was able to figure out how to manually remap the mouse buttons.

Step 1. Find the name of your device.
This step is pretty simple.  Open up a terminal and type in the command:

xinput list

This will list all of the input devices recognized by the X window system.  The names are in quotes, and should be pretty self-explanatory; any external mice should be near the bottom.

xinput list

Step 2. Find your button numbers
Each mouse button has a unique number to the system, and your next job is to find out what they are.  In your termal window type:

xev

This will open a new smaller window.  Whenever your mouse is over the new window, the terminal will print any input it receives.  This includes both movement and button presses.  For each button on the mouse, press it, and write down what button number it displays.  Don’t forget that scroll up, down, left, and right and wheel click are all treated as different “buttons”.

xev

Step 3. Re-Map the buttons
You can modify your your mappings with the following command (substituting your device name from step 1)

xinput set-button-map "Device Name" 1 2 3 4 5

Running the above command will most likely change nothing, it will map all the buttons to their default functions.  Let’s say your left and right click map to 1 & 3 respectively.  If you wanted to switch them (perhaps for a left-handed user) the command would be:

xinput set-button-map "Device Name" 3 2 1 4 5

In the case of my friend (with a Kensington pro mouse) we needed to swap the 1 & 3 with the 8 & 9 buttons.  That looked like this:

xinput set-button-map "Kensington Pro PS/2" 8 2 9 4 5 6 7 1 3

Note that you can enter as many numbers as you like, up to the number of mouse buttons.  Any numbers you don’t enter will be assumed to be the sequential default.  Thus the following command is equivalent to the one above:

xinput set-button-map "Kensington Pro PS/2" 8 2 9 4 5 6 7 1 3 10 11 12 13

Step 4. Saving your mappings
Once you’ve found the correct sequence of numbers, you can have it load automatically by creating a startup item.  Navigate to the following menu:

System > Preferences > Startup Applications > Add

and enter the following:

Name: Mouse Button Remap
Command: xinput “Device Name” 1 2 3 4 5
Comment: “Swapped the left and right click”

Add Startup

Ta Da! You’re Done!

3.6 Ghz Dual Core Uber-Computer: $600

May 27th, 2009

I recently put together a new server, and as preparation, spent a few hours on Newegg.  I’m quite suprised at some of the deals that can be found right now, and thought I would pass the summation of my research on.  Behold: The Best Computer for your Money (as of May 2009).

Case: Antec 300
Power Supply: Antec Basiq 500
(Buy these together on Newegg & Save $20)

Motherboard:Gigabyte GA-EP45C-UD3R
CPU: Intel E8400 3.0 Ghz Core2Duo (Wolfdale)
(Buy these together on Newegg & Save $15)

CPU Cooler: Zalman 9500

Memory: 4GB Corsair XMS

Video Card: BFG 9800 GT OC 1GB

Hard Drive: Seagate 500GB SATA

There you have it folks.  All told, the total in my newegg cart for all of the above is $651.88.  There’s also another $35 off in Mail-in Rebates, bringing the total to $626.88.  Now here’s the beautiful thing.  The combination of the 45nm CPU and the beefy cooler allow even a newb to overclock the CPU to 3.6 Ghz without trouble.

Here’s are some of the highlights:
3.6Ghz Dual Core Processor
6MB L2 CPU Cache
1333 Mhz Front Side Bus
4 GB Ram with super-fast 5-5-5 timings
1GB Video card

Try to find those specs with any pre-built machine; you won’t.  And if you do, it won’t be with the quality, name-brand guts you see here.  That’s all for now, I’m off to play UT3.

Turning off the Terminal Beep

December 5th, 2008

I use the VIM editor.  Alot.  That means that I get beeped at.  Alot.  As a note to those who haven’t used VIM, it beeps through the system speaker, not your normal speakers.  The system beeper is an especially annoying relic, leftover from two decades ago when a system beep was actually useful. I’d finally had enough, so I figured out how to turn it off.  It turns out that (like everything else) it’s extremely easy in Ubuntu.

System -> Preferences -> Sound -> System Beep -> Enable System Beep

I unchecked that puppy, and now my computer my computer doesn’t make a sound (except of course, the hum of 8 fans pushing 1,000cfm of air across my OC’d mobo).

Backing Up is the Cool Thing to Do

November 30th, 2008
External Backup Drive

External Backup Drive

Backups saved my life yesterday. No, seriously. I upgraded an installation of Drupal, and forgot to copy the files for my Email client before I wrote over the root directory. After trying to check my mail (and getting an empty folder), I had about 30 seconds of complete terror, before I realized I had implemented an automated daily backup system about two months ago. Whew! I found a recent version in my backup files, and bingo, there were my mail client files. So, I’d like to talk a bit about backing up.

Every single person who uses a computer should create an automated backup system. Period. And let me give you a few guidelines: Burning CDs doesn’t cut it. Burning DVDs doesn’t cut it. Both take way too much time and energy, and you will quickly forget to keep up. You need to buy a spare hard drive, and dedicate it to backups. Hard drives are cheap. You can find some excellent options here.

Next, create a system to AUTOMATE the process. You don’t want to have to remember. If you have OSX 10.5, that means setting up Time Machine. I commend Apple on their push for automatic user backups. If you’re using XP, look here. If you’re using Vista, look here. If you’re using Linux. Look here and here.

The last link above is what I use to backup my server, although I use a slightly modified version. I have it set up to backup all my files every night. I keep 6 days of nightly backups at all times. Then, once a week, I do a weekly backup, of which I keep 4 at all times. Finally, on the first of every month, I do a monthly backup, of which I keep the last 12 at all times. The advantages of keeping many versions of your files are two-fold. First, your hard drive may crash slowly. In this case, it will start corrupting files before it outright dies. If you’re only keeping one copy of files on you backup drive, you could end up writing over your good files with corrupted ones. Keeping multiple, redundant versions of your data ensures there will always be healthy versions available. Second, your backup solution now serves as an archive, where you can recover files you may have lost or accidentally deleted (see first paragraph).

After reading this, you have no reason not to have an automated, dedicated backup solution. Please, I urge you, go set one up. The $100-$200 you will spend on an external hard drive is NOTHING compared to the value of your non-replaceable pictures, music, and files.