Logitech G15

'''The information on this page is taken from and was copied ver batim to this page. Text formatting was changed to be wiki compatible.'''

This content is quite old and may not be applicable to current versions of Ubuntu. (please remove this note if the page is updated)

= Introduction =

This will walk you through the process of installing and configuring your Logitech G15 keyboard in Ubuntu. After doing this, you will be able to use the LCD display and all of the special keys will work just like normal keys that you can bind shortcuts to. To do this, you will need to do three things: download and install drivers so that Ubuntu recognizes the LCD and extra keys, add symbols to X so that the extra keys exist in X, and bind the extra keys on the G15 to the symbols you created.

= Installing G15 drivers with G15tools =


 * If you are running a newer version of Ubuntu (Intrepid+) G15Daemon is in the repos so you can just sudo apt-get install g15daemon and skip to the modprobe uinput further down. Otherwise continue below*

First, install the required libraries: libusb and libdaemon, and if not allready installed the build-essentials package. sudo apt-get install libusb-dev libdaemon-dev build-essential

Download libg15, G15Composer, and libG15Render from http://g15tools.sourceforge.net/, and http://sourceforge.net/projects/g15daemon|G15Daemon. Extract the packages to their own directory, change to that directory, compile and install the files. You must install libg15 and libG15Render first. In each directory, run the following to compile and install the files. To do this, run the following in the directory that you put the files you downloaded:

tar -xjvf cd  ./configure make sudo make install

''If you see an error while running ./configure, make a note of what it said was missing before it failed. This is most likely the name of a program or library that you need to install. You can open up the Synaptic Package Manager in the System->Administration menu and search for that file. You will most likely want to install the one that ends in -dev.''

Repeat this for every package that you want to install, making sure to go in the order specified above. Once you have done this, it is safe to delete the .tar.bz2 files as well as the directories you made; the programs have been installed and you do not need the source anymore.

Now load the uinput module and set it to load when you start the computer:

sudo modprobe uinput

Run gksudo gedit /etc/modules and add uinput to the list.

After you've done this, run sudo g15daemon. If you see a clock appear on the LCD screen, it is working properly. If not, refer to the Troubleshooting section below. To set g15daemon to run automatically at startup, edit the sudoers file by running the following: sudo visudo

Add the following line to the bottom of the file - ALL ALL= NOPASSWD: /usr/sbin/g15daemon Warning: If visudo complains about syntax errors when you exit the program, do not ignore them! Go back and look at the file and see what went wrong. If you mess up the sudoers file you might not be able to run sudo at all, which you'll need a LiveCD to fix.

After you have done this, add g15daemon to your session by going to menus System -> Preferences -> Sessions, selecting New under the Startup Programs tab, and adding one with the name G15Daemon and the command sudo /usr/sbin/g15daemon.

Troubleshooting
If you get an error that says: g15daemon: error while loading shared libraries: libg15.so.1: cannot open shared object file: No such file or directory

You need to run gksudo gedit /etc/ld.so.conf and add /usr/local/lib at the top of the file. Then run sudo ldconfig

That should fix the problem, try running the daemon again.

= Adding key symbols to X = It is possible to use your newly accessible G15 keys in Ubuntu by going to:

System>Preferences>Keyboard>Layouts

and selecting "Logitech G15 extra keys via G15daemon" under "keyboard model".

An alternative method follows: To add the symbols required to represent the special keys, run gksudo gedit /usr/share/X11/XKeysymDB and add the following lines after the comment at the beginning -

 G1                     :15000001 G2                     :15000002 G3                     :15000003 G4                     :15000004 G5                     :15000005 G6                     :15000006 G7                     :15000007 G8                     :15000008 G9                     :15000009 G10                    :15000010 G11                    :15000011 G12                    :15000012 G13                    :15000013 G14                    :15000014 G15                    :15000015 G16                    :15000016 G17                    :15000017 G18                    :15000018 M1                     :15000019 M2                     :1500001A M3                     :1500001B LCD0                   :1500001D LCD1                   :1500001E LCD2                   :1500001F LCD3                   :15000020 LCD4                   :15000021 MR                     :15000022 </tt> ''Request - Can someone who is more experienced with this file tell me if these hex codes are good? I don't know if there's a list of reserved codes somewhere.''

Save this file, and move on to the next section. If you upgrade your X server, you may have to re-insert these codes.

= Binding the keys to the symbols =

To use your newly created symbols, you'll need to create an .Xmodmap file in your home directory (or edit the one you already have). If you do not have one, run xmodmap -pke > .Xmodmap in your home directory (using a terminal). Open this file (run gedit ~/.Xmodmap</tt>) and add or change the following lines (you can determine keycodes running the "xev" application at a terminal):  keycode 93 = M2 keycode 129 = G5 keycode 130 = G6 keycode 131 = M3 keycode 132 = LCD0 keycode 133 = G12 keycode 136 = G10 keycode 137 = G15 keycode 138 = G16 keycode 143 = G12 keycode 146 = G10 keycode 152 = G2 keycode 170 = LCD1 keycode 177 = G1 keycode 182 = G17 keycode 183 = G18 keycode 184 = M1 keycode 190 = G3 keycode 205 = LCD4 keycode 208 = G4 keycode 209 = G8 keycode 210 = G9 keycode 219 = LCD2 keycode 220 = G11 keycode 231 = G7 keycode 246 = G13 keycode 247 = MR keycode 249 = LCD3 keycode 251 = G14 </tt>

Now log out and back in, and your extra keys will work just like any other. You may get a message when you log in asking if you want to load .Xmodmap. Add .Xmodmap to the load list and check the box that says 'Do not warn again'. Congrats!