Fight for the Internet 1!

Showing posts with label btnx. Show all posts
Showing posts with label btnx. Show all posts

Friday, December 28, 2012

Compiling btnx for Ubuntu 12.04 and 12.10 and beyond (and Fedora too)

This is a quick and dirty guide how to compile btnx for yourself to get it to work on your Ubuntu or Kubuntu or Fedora systems.

You will need to compile both the program btnx and the program btnx-config.

This guide isn't necessarily for beginners but I will try to keep it simple.

UPDATE: I have found someone who is taking stewardship of the btnx project. He has moved the code from the derelict bazaar repos on Launchpad (one of which has permanently disappeared) and created a github repository for the project(s). He has also mainlined my patches and is tracking down other bugfixes on forks. I tested his code on Fedora 18, 19, Ubuntu 12.04, 13.04 and 13.10. All worked.

https://github.com/cdobrich/btnx
https://github.com/cdobrich/btnx-config

The instructions have been simplfied accordingly.

Compiling on Ubuntu

The compilation process for Ubuntu is almost exactly the same as for Fedora.

(0) In general, you will need to be able to compile programs on your Ubuntu machine. You should have the package "build-essential" installed already.

(1) Grab the program source files.

For the btnx-config page, you want to download
https://github.com/cdobrich/btnx-config

For the btnx page, you want to download
https://github.com/cdobrich/btnx

(2) Open up your favorite terminal. To install the btnx dependencies, do the following:
sudo apt-get install libdaemon-dev libgtk2.0-dev libglade2-dev
(3)  Navigate there and run './configure' (without quotes), and then 'make' (without quotes) and finally 'make install' (without quotes).

(4) Now both programs of btnx and btnx-config are installed on your system.

Compiling on Fedora

The compilation process for Fedora is almost exactly the same as for Ubuntu.

(0) In general, you will need to be able to compile programs on your Ubuntu machine. You should have the packages to compile and build programs installed already. To this in Fedora, run the following command:
sudo yum groupinstall "Development Tools" "Development Libraries"
This might be a bit overkill since it installs a lot, and you can remove this group when you are done.

(1) Grab the program source files.

For the btnx-config page, you want to download
https://github.com/cdobrich/btnx-config
For the btnx page, you want to download
https://github.com/cdobrich/btnx
(2) Open up your favorite terminal. To install the btnx dependencies, do the following:
sudo yum install libdaemon-devel gtk2-devel libglade2-devel
(3)  Navigate there and run './configure' (without quotes), and then 'make' (without quotes) and finally 'make install' (without quotes).

(4) Now both programs of btnx and btnx-config are installed on your system.


Errors

Error message:
failed to execute command /etc/init.d/btnx restart
Cause: You probably don't have the little dongle for the USB mouse plugged in. At least I always get this error if I try to use the btnx-config program and don't have my mouse plugged in yet.

Warning

It may appear in your applications-menus, but I have noticed a problem with using inside KDE. It asks for the ROOT password, not my user password with elevated privileges. I'm not sure how to fix this, but I'd love to find out. It's not a big deal for me though.

Hope that helps anyone.

Friday, August 17, 2012

BTNX for Ubuntu 12.04 Precise

I thought that the wonderful mouse button configuration programs, btnx and btnx-config, were both available in the Ubuntu 12.04 repositories. Well, apparently they aren't? [But they were for a time, and I don't know why they were removed.]

UPDATE: For those running 12.10, I have posted a slightly dirty but workable solution here. Hopefully someone will take my patches and make a PPA of btnx. I'm looking it myself but it feels like a lot of work.

btnx is the best mouse-button configuration program I have found, bar-non, in any operating system so far. (I've tried others but they are either too complicated OR don't do the simple things I wanted.)

To install btnx in Ubuntu 12.04 (assuming Ubuntu doesn't fix this glaring error themselves), just download the appropriate version for yourself:
Look under the "Downloadable files" section. Don't grab the file for Oneiric, because that's the wrong version for 12.04 precise.

For example, you would want to download this sort of file (if you were running 64-bit): btnx_0.4.11-3ubuntu2_amd64.deb (19.3 KiB)

Make sure to get both the main program and the gui. After you have downloaded them, you need to install them. You may be able to install them using a graphical program, and then resolving the dependencies later. My approach was a little different and slightly more advanced but I knew exactly what was going on.

I opened a command console window, changed directories to where I had downloaded the btnx *.deb files, and ran the following command:

sudo dpkg -i btnx*

It proceeded to partially install the programs, but had a dependency error. I then ran this command to fix the dependency problem:

sudo apt-get install -f

In my case, this installed the dependency package 'menu'. Then btnx was successfully unpacked and installed. Now, btnx tried to auto-start its service after this but had an error. However when I manually ran the program manually through the applications menu, it opened just fine. I fed it my previously saved config files and everything worked.