A couple of years ago I obtained a Logitech G15 gaming keyboard. It is one of my prized possessions, primarily because of the key feel. However, I also love the extra keys and the lcd display. Unfortunately, as megaboz points out, the drivers that come with it are only for Windows. Of course, some capable programmers have put together a suite of tools to operate the lcd display under Linux.
I used these tools to put together my own lcd script using information from Ryan’s post in my Ubuntu 7.10 desktop environment, but there were a copule of things that bugged me a little about it. After I recently upgraded to Ubuntu 8.04, I decided to look around a little before setting things up that way again. Megaboz turned me on to the fact that lcdproc supported integration with g15render from the G15 tools. What follows are the steps I took to get things up and running:
Phase 1
Starting with a pretty fresh install of Ubuntu 8.04 Desktop, I installed the g15 tools from the Ubuntu repositories:
sudo apt-get install g15daemon g15composer
This installs the g15 tools necessary for the rest of the project. Once it finishes installing, it fires up the g15 daemon and you get a clock on the G15 lcd display.
I poked around the repositories and found that audacious also includes some g15 scripts, so I threw those in the mix as well.
sudo apt-get install audacious g15daemon-audacious
I fired up the Mamma Mia soundtrack from the recent movie and watched the spectrum and progress bars flow to the music. (So shoot me. I enjoyed the movie with my wife. It’s fun. I’m listening to it now.)
All is well so far with this little project, but it was time to turn in for the night. I would tackle the next step tomorrow.
Phase 2
I knew after reading this I would have to compile lcdproc on my own. Of course this was after I tried to just install it:
sudo apt-get install lcdproc
I decided the package to keep the repository package installed to hang on to the startup scripts. However, the repository does not support the g15 driver. So, we need to get some dev packages:
sudo apt-get install libg15render-dev \ libg15daemon-client-dev libg15-dev
We also need the lcdproc source:
cd /usr/src sudo apt-get source lcdproc
Once this download completes, switch into the source directory and configure. We need to change the prefix, so it will install over the copy from the lcdproc repository. We also need to enable the g15 drivers. The commands to do this:
cd lcdproc-0.5.2 configure --prefix=/usr --enable-drivers=g15
You should get no warnings or errors in the output from the configure command. If you do, go back and make sure you followed all the steps. If you don’t, good. Time to make and install:
sudo make sudo make install
We need to setup a startup script for lcdproc to follow the lcd daemon installed with the lcdproc repository. This will prove to be easy and you can do it one of two ways:
1) Copy /etc/init.d/LCDd to /etc/init.d/lcdproc and make these edits:
- Change LCDd to lcdproc globally
- Change the DAEMON variable from /usr/sbin/lcdproc to /usr/bin/lcdproc
- Change the DAEMON_OPTS to include just the config file
2) Create /etc/init.d/lcdproc with the following contents
#! /bin/sh
#
# lcdproc initscript for lcdproc
# by Jose Luis Tallon <jltallon@adv-solutions.net>
#
### BEGIN INIT INFO
# Provides: lcdd
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: LCD daemon
# Description: Control LCD displays connected to the computer
### END INIT INFO
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for lcdproc by Jonathan Oxer <jon@debian.org>
#
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/lcdproc
NAME="lcdproc"
DESC="lcdproc"
DAEMON_OPTS="-c /etc/lcdproc.conf"
test -x $DAEMON || exit 0
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --background \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --oknodo --quiet \
--exec $DAEMON
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
$0 stop
sleep 1
$0 start
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
Once you’ve created the file, make sure it’s executable:
sudo chmod +x /etc/init.d/lcdproc
Assuming your LCDd is running from when you installed the lcdproc package, you should be able to fire up lcdproc right away:
sudo /etc/init.d/lcdproc start
lcdproc should now start cycling through the default options defined in /etc/lcdproc.conf. Open up the file and play around with the options to fine tune it to display those things you are interested in.
If this post helped you out, or if it didn’t, please post a comment and let me know.
7 Comments
Hi!
I have a fresh new installed hardy box (kubuntu 8.041)… And this howto doesnt seem to work for me. I just see the time instead of the G15 on the lcd… Does i need to configure something in the lcdproc.conf ? You only use hardy repositories ?
@Patrick,
lcdproc.conf contains some default configuration that should cycle through about 5 different views if everything happened correctly.
Note that I did this on 2 different days with a machine shutdown in between. The ubuntu forums post I linked to in phase 2 (http://www.uluga.ubuntuforums.org/showthread.php?t=267118&page=18) discusses some issues a fellow Kubuntu user ran into. Check to see if the g15daemon issues he encountered might be the cause.
i think the problem came from my logitech g15 v2… lcdproc doesnt seem to support it yet…
Doesn’t work for me either. I’m on hardy and followed the steps closely.
I get the clock but no lcdproc cycling, any ideas?
logitech g15 v1 with 18 G keys btw.
The following needs to be added to this guide (from my point of view) to get this working:
1) Also install libg15-dev, or else I wasn’t able to compile
2) Update the LCDd.conf file. Replace Driver=… with Driver=g15
3) Execute ’sudo update-rc.d lcdproc defaults’, to start the script automatically during each reboot
Goto /etc/rc0 … /etc/rc6, and change each S20 to S60 and each K20 to K60 for each file with lcdproc in it’s contents, like so:
cd rc4.d
sudo mv S20lcdproc S60lcdproc
Thanks a heaps for this guide. I’ve been looking for means to get my G15 to work for ages.
Hello from Canary Island. Very good post.
Since I update to Jaunty, g15macro not work in my x64 machine (g15 daemon only). I did all instructions of your post, but not work. Return to hardy and ext3?
One Trackback/Pingback
[...] for reference everything above I found on this blog. Below however I will deviate a bit to make it a bit easier. We’ll get the source the same as [...]