HowTo: Install lcdproc for Logitech G15 keyboard on Ubuntu 8.04 Hardy Heron

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:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    #! /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.

2022 Reading Challenge

2022 Reading Challenge

books of read!

Social Icons

About

I am a technology professional, husband and father striving to balance many interests in my life. Occasionally, I write about technical hobbies, my career, travel (mostly in our RV) and other things important in my life.

Post Tags

Featured Photos