Fight for the Internet 1!

Showing posts with label Logitech. Show all posts
Showing posts with label Logitech. Show all posts

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.

Sunday, October 23, 2011

Ubuntu Logitech diNovo Edge Bluetooth Wireless Keyboard (Part 2)

I reported on problems with Ubuntu Logitech diNovo Edge Bluetooth Wireless Keyboard, and now in Ubuntu 11.10 Oneiric and Ubuntu 12.04 Precise the problem resurfaces each time you do a fresh install or Distribution Upgrade. But the solution is slightly different than before.

Update: The problem appears in Ubuntu/Kubuntu 12.04 Precise also, but the solution is the same.

This solution is using for the Logitech diNovo Edge in Ubuntu/Kubuntu. Symptoms are the bluetooth-device-manager kept prompting me to connect to the device but nothing I did ever worked.

Here is the solution / fix for getting the keyword to work. The source for this information is here.

The problem is in the udev rules. In 11.04 there was a special line in '/lib/udev/rules.d/70-hid2hci.rules' for Logitech devices that started with KERNEL=="hidraw*".
These seem to be missing in default configurations. This fix adds this line into another file instead which makes things work.

Edit the file: /lib/udev/rules.d/##-bluez-hid2hci.rules (where the ## is the number on your system. Just search for the keywords 'bluez-hid2hci.rules' in the /lib/udev/rules.d/ directory. For example, on my system in Ubuntu 11.10 it was number 62 and on Ubuntu 12.04 is was 97.)

(If you need help editing a file, see bottom section.)

Change this line:
# Logitech devices
KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"
to
KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"
I have made the changed sections BOLD. Save the changes to the file. I also turned bluetooth off from the icon in the system tray.
After making this change, I turned on my wireless keyboard, unplugged it's bluetooth dongle, plugged it back in, paired the keyword with the dongle, and a few seconds later it worked. I did not even have to reboot.
IF YOU NEED HELP EDITING CONFIGURATION FILES UNDER LINUX, please see this link: http://awesomelinux.blogspot.com/2010/09/how-to-edit-configuration-file.html

Sunday, May 2, 2010

Ubuntu Logitech diNovo Edge Bluetooth Wireless Keyboard

I use the Logitech diNovo Edge in Ubuntu/Kubuntu and I love it. When I installed Kubuntu 10.04 Lucid, this wireless keyboard failed to work. The bluetooth device manager kept prompting me to connect and pair the device with a PIN but nothing I did ever worked.

UPDATE/EDIT: This problem has been reported in version dating from 10.04 to 11.04. This solution works for those, but there is a slightly different solution for 11.10.

Here is the solution / fix for getting the keyword to work. The source for this information is here.

Edit the file: /lib/udev/rules.d/70-hid2hci.rules

(If you need help editing a file, see bottom section.)

Change this line:

# Logitech devices
KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"

to

KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"

I have made the changed sections BOLD. I also turned bluetooth off from the icon in the system tray.

After making this change, I turned on my wireless keyboard, unplugged it's bluetooth dongle, plugged it back in, paired the keyword with the dongle, and a few seconds later it worked. I did not even have to reboot.

HOW TO EDIT THE FILE (for those who need help with this stage)

New users to Linux may have trouble editing text files at first. I'll try to be simple, and this guide is for people using Gnome or KDE.

The simplest way is using a user friendly program. In Gnome (which is normal Ubuntu), the default text editor is gedit. In KDE (in Kubuntu) it is Kate. Also, this is a protected system file, so you need to use special Administrator privileges before you can edit it. Don't worry. This is simply.

KDE

In KDE, you need to find the "Run Command" option the Application menu. (The App menu is usually in the lower left-hand corner, with a colorful K-button.) In KDE4's new menu style, the "Run Command" is (currently) under the 'Computer' section, near the top of the small list. Find the option and click it.

In the input box that displays, copy/paste the this command into it and press enter:
kdesu kate /lib/udev/rules.d/70-hid2hci.rules

The 'kdesu' program tells the system you want to run the text editor (kate) with Admin access. You will be prompted for your individual user password, which you enter. Then kate should open with a file ready for you. (This is the /lib/udev/rules.d/70-hid2hci.rules file which we told kate to open for us.) If this file does not open, you can open it manually by going to menu File -> Open... and then navigating to the '/' root directory, down to 'lib' and so on until you find the file ' 70-hid2hci.rules'.

Edit the file as directed earlier in this article. Save the file, close the file (menu File -> Close), and then finally exit Kate.

GNOME

In Gnome, first open the Terminal through the Application menu. (The App menu is usually in the upper left-hand corner, labeled as Applications.) On my system, it is under Applications -> Accessories -> Terminal.

In the input command window that displays, copy/paste the this command into it and press enter:
gksu gedit /lib/udev/rules.d/70-hid2hci.rules

The 'gksu' tells the system you want to run the text editor (gedit) with Admin access. You will be prompted for your individual user password, which you enter. Then gedit should open with a file ready for you. (This is the /lib/udev/rules.d/70-hid2hci.rules file which we told gedit to open for us.) If this file does not open, you can open it manually by going to menu File -> Open... and then navigating to the '/' root directory, down to 'lib' and so on until you find the file ' 70-hid2hci.rules'.

Edit the file as directed earlier in this article. Save the file, close the file (menu File -> Close), and then finally exit gedit. You can close the Terminal also.

Hope that helps.

Friday, February 5, 2010

Modify / Disable Logitech Mouse Search Button

Overview
On some computer mice with extra buttons, some buttons will trigger a search commend. In Ubuntu, clicking this button will just open your browser to your default search engine. Here are details on how to make sure you have control of your mouse button, so it does not bug the hell out of you.

Background Details
Until recently, I was never plagued by this truly abysmal feature. I had remapped this little button my Logitech MX to be "go up a directory" which I frequently used in my file manager and image viewer. It was very handy.

But on a fresh install of Ubuntu 9.10 Karmic, suddenly my wonderful mouse was cursed with this abysmal feature. The source is your Desktop environment.

Disabling The Feature
In KDE 4.4.2, go to System Settings -> Keyboard & Mouse -> Global Keyboard Settings -> khotkeys.

Find the option for Search and disable whatever key is set.

I hope that helps all of you.

Finding the Button Key Code (Optional)
Sometimes it useful to determine what your mouse-button's keycode is. For this, we use the program 'xev.' ('xev' is part of the X-Windows system under Linux, so chances are you probably already have it on your Linux machine and do not need to install it).

Open a console, and enter the xev command. It will dump a lot of information to your terminal. Simply click the button you are curious about, and then carefully close the small graphical window that popped up. (Do this by only moving your mouse over the window-manager boards of the window, not the content area of the window, if you can. If you do move your mouse over the content area, you will see a lot more info output to your terminal, which will be slightly more work to comb through.)

Here is some sample output (from my system):
.....
FocusIn event, serial 36, synthetic NO, window 0x1800001,
mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 36, synthetic NO, window 0x0,
keys: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0

KeyPress event, serial 36, synthetic NO, window 0x1800001,
root 0x13c, subw 0x0, time 25847246, (258,7), root:(264,28),
state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 36, synthetic NO, window 0x1800001,
root 0x13c, subw 0x0, time 25847246, (258,7), root:(264,28),
state 0x8, keycode 111 (keysym 0xff52, Up), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

MappingNotify event, serial 36, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

MappingNotify event, serial 36, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 247

KeyRelease event, serial 36, synthetic NO, window 0x1800001,
root 0x13c, subw 0x0, time 25847332, (258,7), root:(264,28),
state 0x0, keycode 225 (keysym 0x1008ff1b, XF86Search), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

PropertyNotify event, serial 38, synthetic NO, window 0x1800001,
atom 0x187 (_NET_WM_ICON_GEOMETRY), time 25847344, state PropertyNewValue

PropertyNotify event, serial 38, synthetic NO, window 0x1800001,
atom 0x187 (_NET_WM_ICON_GEOMETRY), time 25847693, state PropertyNewValue

ClientMessage event, serial 38, synthetic YES, window 0x1800001,
message_type 0xfe (WM_PROTOCOLS), format 32, message 0xff (WM_DELETE_WINDOW)
... # This was the end of the output.

In this case, my system was seeing that pressing this small button triggered approximately three key sequences. The two I had program (Alt+Up in this case), and also something called XF86Search. This is the dreaded name for this abysmal feature.

Saturday, June 13, 2009

Logitech diNovo Edge bluetooth connectivity issues

Sort of like USB support years ago, BlueTooth still has some bugs under Linux. Currently I'm referencing just connectivity issues. From what I can tell, this particular issue has been around in Linux since July 2007 at least according to some bug reports.

I use the Logitech diNovo Edge. This keyboard is awesome and I love it. When the dongle is not initialized as a bluetooth device - ie in bios, boot, install etc it simply emulates a usb keyboard / mouse and works (without any fancy features) perfectly. Hence, it works in text mode great. This happens during during System Startup, BIOS access or during the actually Linux console startup sequence.

However, as soon as it is initialized as a bluetooth device it forces you to use bluetooth pairing to work (this applies to Windows too). So, as you can imagine, by the time I reach KDE the keyboard doesn't work.

A solutions I have found to this problem (Source http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=355497):

Edit with sudo (text-editor) /etc/default/bluetooth

Then look for the line that says:
HID2HCI_ENABLED=1

and change it to this:
HID2HCI_ENABLED=0