The Logitech VX Nano mouse makes a great companion for the Eee PC. It's small, wireless, and the USB dongle is barely bigger than the plug. This makes it practical to just leave it in one of the Eee's USB ports all the time.
The main left and right buttons and the vertical scroll wheel work well with the factory Asus/xandros linux and Ubuntu right out of the box. This how-to will help you get the other buttons: middle (magnifier icon), horizontal scroll (wheel left/right tilt), and the two small ones on the left (forward/backward) working properly.
These instructions have been tested in the “easy” and “advanced desktop” mode of the Asus/xandros linux OS and Ubuntu, but they will probably work with other linux distros. Please update this section if you've tested other distros.
Most of this information was posted by tek43 in this forum thread. Additional info came from detyabozhye in http://ubuntuforums.org/showthread.php?t=219894.
Note: These instructions do not work with eeeXubuntu as the evdev causes problems with directional arrows. “btnx”, an excellent tool for getting all 9 mouse buttons usable and mappable is found here. — jay.chen 2008/03/19 22:21
There's a lot of text in this how-to, but it's really only 4 steps:
xorg.conf
Hang in there and it won't take too long!
Three software packages are necessary for getting the full functionality of this mouse:
Note: You will not need to install any packages if you only want horizontal scrolling. In this case, skip to Modify the xorg.conf File
If you've never added any repositories, you'll need to do so now. See: Adding Additional Software Repositories. I personally only added the ones from debian. (there's already enough xandros “stuff” in the Asus repos)
The first package should already be installed. Unless you've already created some X key bindings then you'll need to get the other two. You can use the Synaptic GUI program if you like, but here's how to do it from the console:
sudo apt-get update sudo apt-get install xbindkeys xvkbd
(You can open a console window by pressing Ctrl+Alt+t)
Here's the part where I give you good advice, please take it!
Back up your computer! Do it now! Yes, NOW!
At the very minimum, before following the instructions in this how-to, back up the xorg.conf file. You can do this by opening a console window and entering:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
WARNING: Editing the xorg.conf file on the Asus/xandros linux OS improperly can cause your Eee PC to go into an infinite loop when rebooting!!!
This will not brick your computer, but it will require you to do one of the following to recover:
The first option is the least painful, and I recommend you prepare for it just in case.
For the first 2 options, once you've booted from the command line you can revert back to the original version of xorg.conf by copying the backup you made. You did make a backup first, right?
If you decide to perform the restore, reboot the computer and press the F9 key when the Asus screen appears, then choose Restore Factory Settings.
These files are for those who are using Asus/xandros linux, want something “ready to use”, and are willing to take the risk that they might not work. If you're using a different linux distro or just want to make the changes yourself, skip to the next section.
The following tar file contains versions of xorg.conf and .xbindkeysrc that worked for me, on my machine. They might not work for you. Please update this wiki page or post on the forum if you have any feedback. In particular, heed the warnings in the prior section if you decide to use this xorg.conf.
You can extract the two files by opening a console window, changing to the directory where you downloaded the tar file, and entering this command:
tar -xvf vxnanoconf.tar
If you want to use this xorg.conf file, enter the following commands:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup sudo mv xorg.conf /etc/X11/xorg.conf
To use the key bindings for the two tiny left buttons, enter this:
mv .xbindkeysrc ~/
If you used the files from the tar above, you can skip this section.
If you prefer to edit the xorg.conf file yourself, or you're just curious, here are the parts that need to be changed (type sudo kwrite /etc/X11/xorg.conf to open):
Section "ServerLayout" Identifier "Xandros" Screen 0 "Screen1" InputDevice "keyboard" InputDevice "mouse" InputDevice "synaptics" InputDevice "VX Nano" EndSection
The InputDevice “VX Nano” line was added
Section "InputDevice" Identifier "VX Nano" Driver "evdev" Option "Name" "Logitech USB Receiver" Option "Protocol" "evdev" Option "Buttons" "9" Option "SendCoreEvents" Option "HWHEELRelativeAxisButtons" "7 6" EndSection
This entire section was added
Your horizontal scrolling should work now. To use it in Firefox, see Mozilla/Opera Horizontal Scrolling.
You can either use the .xbindkeysrc file in the vxnanoconf.tar file above, or use any text editor to add the following code to ~/.xbindkeysrc:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:9
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:8
Note: all of the double quotes must be in the file exactly as shown!
The first two lines cause an Alt+Left arrow key to be “typed” whenever the front-left tiny button is pressed. In Firefox (and some other programs) this is the shortcut for the Back command.
You can probably now guess that the last two lines map the rear-left tiny button to an Alt+Right arrow key, which in Firefox is the Forward command.
I like this mapping because I use Back more often than Forward, and I find the front-left button to be easier to press. You can reverse this if desired by swapping the b:8 and b:9. You can also map the button presses to other keys if desired, but that's beyond the scope of this how-to.
Just a quick note about mapping other keys: You can use [Control_L] instead of [Alt_L] for control key presses, and you can replace the [Left] or [Right] with other things like [c] for letter c or [v] for letter v. Doing so might be useful if you wish to map the buttons for copy and paste...
To make the key bindings actually work, the xbindkeys program needs to be running. You could open a console window and enter xbindkeys every time you reboot, but there's an easier way.
Follow the instructions on Running a script at startup and add the xbindkeys command to the startup script.
There's a hidden directory called .kde/Autostart in your home directory. Any programs or links to programs in this directory are run when the X Windows KDE desktop environment starts. Open a console window and enter the following command:
ln -s /usr/bin/xbindkeys ~/.kde/Autostart/xbindkeys
TIP: you can also add links this way for any other programs you want to run every time your Eee reboots
Add an entry for /usr/bin/xbindkeys to the startup programs using the System→Preferences→Sessions program.
For the changes to take effect, you'll need to either reboot your Eee PC, or just restart x windows by pressing Ctrl+Alt+Backspace.
Enjoy!
Warning: Please note that after modification of the xorg.conf file as described above, it is no longer possible to configure the Nano mouse as left-handed (at least not with the Control Center). rio b and you sfr rio sosh bouygues