↓ Twitter is updated more often, so read it! ↓

HOWTO Add btnx repository to sources

Olli Salonen made a PPA on Launchpad yesterday, following my request for btnx in a PPA.

There are two ways to get the repository configured: the GUI way and the command line way. I think the command line way is a little quicker, but I’ll give you both. Remember, if you are not running Hardy, you will need to change all instances of hardy throughout these instructions to feisty or gutsy, whichever you are using. Olli did packages for all three versions. If you don’t know which you’re running, go to System > About Ubuntu and read the window that spawns. Your version will be in there somewhere.

First the command line way.

echo -e "deb http://ppa.launchpad.net/daou/ubuntu hardy main\ndeb-src http://ppa.launchpad.net/daou/ubuntu hardy main" | sudo tee /etc/apt/sources.list.d/btnx.list
sudo apt-get update && sudo apt-get install btnx btnx-config

Then, I’d recommend using btnx-config from Applications > System Tools > btnx to configure the tool. You could also do gksu btnx-config at the command line to bring it up.

Next, the GUI way.

If you already have btnx installed, go to System > Administration > Software Sources. Go to the Third Party Software tab. Click +Add and paste the line for each of the two APT lines: deb http://ppa.launchpad.net/daou/ubuntu hardy main and deb-src http://ppa.launchpad.net/daou/ubuntu hardy main. When you click Close, it will ask if you want to reload the sources. Confirm the reload.

If you do not already have btnx installed, go to System > Administration > Synaptic Package Manager. Go to Settings > Repositories and follow the above instructions. One the list finishes reloading, Search for “btnx” and the two packages will be shown in the main screen. Click each to mark it for installation, then click Apply. When it’s finished, you can access btnx-config through Applications > System Tools > btnx from the top panel.

Check out my prior updates on btnx for more information, including how to compile btnx and btnx-config from source.

Update on btnx HOWTO

Olli Salonen, author of btnx, has released new versions of btnx and btnx-config, along with debs for Ubuntu 64-bit. While they’ve been officially tested on Gutsy, I’m using them on Hardy without a problem. Now, Olli or someone just needs to get these into a PPA on Launchpad or get them added to the repos for 8.04.1.

Se vi parolas esperantan linvgon, bonvolu helpas traduki btnx-on ĉe Launchpad! Iru kaj traduku btnx-config! Mi komencis traduki, sed ĝi estas granda projekto por unu persono.

I originally posted instructions on how to compile from source in the article HOWTO Install btnx for better mouse control in Ubuntu Hardy. If you want to continue to compile it yourself, simply switch to the newest tag using subversion and recompile.

cd btnx-0.4.9
svn sw http://svn.ollisalonen.com/btnx/tags/btnx-0.4.10/
./configure && make && sudo make install
cd ../btnx-config-0.4.8
svn sw http://svn.ollisalonen.com/btnx-config/tags/btnx-config-0.4.9/
./configure && make && sudo make install

Now might be a good time to rename those directories, dropping the version numbers, or check out the source to a different directory.

HOWTO Install btnx for better mouse control in Ubuntu Hardy

When I installed Hardy, I forgot to copy my awesome xorg.conf which held the configuration to enable all 12 buttons of my Logitech MX1000.

Lo and behold, a new method of configuring it has come about, albeit it was around prior to Gutsy.

btnx is the work of Olli Salonen. The program runs as a daemon, catching mouse events and turning them into either key presses or proper mouse events which the system can interpret. This eases the configuration one must do in order to enjoy the full potential of the high-end Logitech mice—a potential which, in my opinion, Windows cannot reach.

The installation process for btnx is pretty easy.

First, I replaced the mouse section of my /etc/X11/xorg.conf with this section. This may not be necessary, but I did it before discovering btnx.

Section "InputDevice"
        Identifier      "Logitech MX1000"
        Driver          "evdev"
        Option          "Name"          "Logitech USB RECEIVER"
        Option          "HWHEELRelativeAxisButtons" "7 6"
EndSection

Next, open a terminal and cd to the location where you keep your sources. I keep mine in ~/Source. This next section prepares the libraries required to build btnx and its support program, btnx-config, as well as subversion if you don’t already have it installed. I prefer to use subversion and checkout tags if they are available. It makes switching to a new version just a svn sw away. Last, it checks out the source for the two programs.

sudo apt-get install subversion libgtk2.0-dev libglade2-dev libdaemon-dev
svn co http://svn.ollisalonen.com/btnx/tags/btnx-0.4.9/
svn co http://svn.ollisalonen.com/btnx-config/tags/btnx-config-0.4.8/

Next, do a simple cm&smi for each program.

cd btnx-0.4.9
./configure && make && sudo make install
cd ../btnx-config-0.4.8
./configure && make && sudo make install

Now that both programs are installed, you must first configure btnx using btnx-config. Start it as root using the command below or go to Applications > System Tools > btnx. Click “Detect Mouse and Buttons”. You’ll probably be able to figure it out from there.

gksu btnx-config

I have the middle thumb button on my MX1000 configured to activate the Rotate Cube plugin of Compiz. I have it configured as Button10 in Compiz and BUTTON_9 in btnx. Remeber: Compiz and many other programs start counting buttons at 1, but btnx starts at 0.

Update: There is a post on Ubuntu Forums about building btnx, too.

Update 2008-04-29 01:18: I’ve posted an update. New versions of btnx and btnx-config are available and so are debs for both 32-bit and 64-bit Ubuntu.

Update 2008-11-05 20:56: As Christopher pointed out, Btnx is useless in Intrepid. Olli, the author of btnx, remarks that the way btnx interacted with the kernel is no longer available, so all development on btnx has ceased. However, he says, evdev is able to recognize all of the buttons on the Logitech MX Revolution. Folks who might be willing to decode the cryptic xevents system and figure out how to assign mouse events to other keypresses and such should contact him.