Logitech G400 mouse, how to configure buttons or alternatives to btnx

Hello community,

I have a G400 logitech gaming mouse, which I used to configure with btnx. I configured the back button to resemble Ctrl., so I can easily zoom in and out without touching the keyboard.

Since the update to 12.2 I cannot use btnx any more, as it does not work and there is no package for it. (Also the tumbleweed package does not work anymore as it is for tumbleweed based on 12.1).

I am in search of an alternative that would work with my mouse (on 12.2 and TW, as I use the same mouse model on both).

Any constructive suggestions appreciated.

Nikos, since btnx worked ok, it could be that no more is needed than recompiling btnx on your machine. I downloaded the src rpms, btnx compiled fine, btnx-config gave an error. AFAICS some typo in three Makefiles, which I corrected. I changed that to what I thought it should be, then it compiled. I installed and it runs. If you want to I can help you to get this done on your machine.

That would be nice. I am at work right now, so I’ ll try compiling and post the output here in the evening. But in the meantime, could you maybe provide a link to the source?

OK, off we go:


mkdir ~/BNTXtmp
cd ~/BNTXtmp
wget http://download.opensuse.org/repositories/hardware/openSUSE_Tumbleweed/src/btnx-0.4.11-1.3.src.rpm
wget http://download.opensuse.org/repositories/hardware/openSUSE_Tumbleweed/src/btnx-config-0.4.9-1.5.src.rpm
su -c 'rpm -iUvh btnx*'
(enter rootpassword)

Now you have the source packages installed

Next step is to upack the sources


su
cd /usr/src/packages/SOURCES/
tar -xvf btnx-0.4.11.tar.bz2
tar -xvf btnx-config-0.4.9.tar.gz

You’ll now see 2 folders


drwxr-xr-x  6   33 video   4096 30 apr  2008 btnx-0.4.11
drwxr-xr-x 10   33 video   4096 28 apr  2008 btnx-config-0.4.9

First we go to the btnx program itself and run configure


cd btnx-0.4.11/
./configure

This may throw errors at you about missing packages. That means you need the corresponding -devel package. After doing so, rerun configure until it finishes succesfully. Post output if you can’t find what you’re missing
After succesful finish, we can build the btmx program from the configured sources:


make

After “make” has finished succesfully, you have to install the built program binaries:


make install

Repeat the same commands after changing to the btnx-config-0.4.9 folder, and it will throw a compile error. I fixed this by entering the /usr/src/packages/SOURCES/btnx-config-0.4.9/src/ folder and replacing


-Wl
(a minus sign followed by capital W followed by a lower case L)


by


-Wall
(an "a" and an extra lower case L inserted)

in the files


Makefile
Makefile.am
Makefile.in

then run make again in /usr/src/packages/SOURCES/btnx-config-0.4.9/ . After succesful compile run “make install” from the btnx-config-0.4.9 folder. Then run btnx-config and see if it works. If not, you should seek for another option, I don’t have a mouse to play with and test it atm.

Thank you very much! I did not get to check this yesterday. However, your instruction are quite elaborate, and I will check today.

I get

gcc: error: unrecognized command line option ‘-Wl’
make[2]: *** [btnx-config] Error 1
make[2]: Leaving directory `/usr/src/packages/SOURCES/btnx-config-0.4.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/SOURCES/btnx-config-0.4.9'
make: *** [all] Error 2

which probably is what you got too.
However, I cannot find Wl in the files Makefile, Makefile.am, or Makefile.im

Any guessess

OK, found it, sorry, I continue

Solved, thank you.

For the sake of completeness, if anybody else stumbles upon this thread. Since when the G400 is configured with btnx, it executes first the default forward and backward commands and then the custom ones, one has to disable the corresponding buttons with xinput first.

xinput set-button-map 11 1 2 3 4 5 6 7 0 0 10 11 12 13 14 15 16

where the first 11 is the device id. You can get this by executing

xinput