The WibuKey people provide a deb, but it sets some rather scary permissions. Install it in an Ubuntu VM to play with the GUI config tools and figure out the right config file settings… then:

  • aptitude install libglib2.0-0 (for libgthread-2.0.so.0 and libglib-2.0.so.0) – but not libglib2.0-data
  • aptitude install libsm6 (for libSM.so.6 and libICE.so.6)
  • aptitude install libxrender1 (for libXrender.so.1 and libX11.so.6)
  • aptitude install libxrandr2 (for libXrandr.so.2 and libXext.so.6)
  • aptitude install libxfixes3 (for libXfixes.so.3)
  • aptitude install libxcursor1 (for libXcursor.so.1)
  • aptitude install libfreetype6 (for libfreetype.so.6)
  • aptitude install libfontconfig1 (for libfontconfig.so.1)
  • copy WkSvLin into /opt/wibukey
  • copy libwklin.so.6.0.501 into /opt/wibukey/lib, then pushd /opt/wibukey/lib && ln -s libwklin.so.6.0.501 libwklin.so && popd
  • we'll start this using LD_LIBRARY_PATH="/opt/wibukey/lib" /opt/wibukey/WkSvLin -d

strace looking for usb looks like this:

stat64("/proc/bus/usb/devices", 0xbfdc8014) = -1 ENOENT (No such file or directory)
stat64("/dev/bus/usb", 0xbfdc8014)      = -1 ENOENT (No such file or directory)
stat64("/proc/bus/usb/devices_please-use-sysfs-instead", 0xbfdc8014) = -1 ENOENT (No such file or directory)
stat64("/sys/bus/usb/devices", 0xbfdc80e4) = -1 ENOENT (No such file or directory)

…it appears that we need to care about /dev/bus/usb and /sys/bus/usb since those are the ones that actually exist on a working setup

strace also reveals that it appears to look for /etc/wibu/WIBU-KEY/Server.ini and /etc/wibu/WIBU-KEY/WIBUKEY.INI and tries to write to /var/log/WkServer.log (maybe hard-coded)

  • put Server.ini and WIBUKEY.INI in /opt/wibukey/etc, then mkdir /etc/wibu && ln -s /opt/wibukey/etc /etc/wibu/WIBU-KEY
  • make sure there's a wibukey user
  • touch /var/log/WkServer.log && chown wibukey:adm /var/log/WkServer.log && chmod 640 /var/log/WkServer.log
  • pushd /var/log ; ln -s WkServer.log wibukey.log ; popd
  • to set the appropriate permissions using udev, make a file called /etc/udev/rules.d/54-wibukey.rules containing:
# change owner for /dev/bus/usb node:
SYSFS{idVendor}=="064f", SYSFS{idProduct}=="0bd7", OWNER="wibukey"
# change owner for /proc/bus/usb file:
SUBSYSTEM=="usb", ATTRS{idVendor}=="064f", ATTRS{idProduct}=="0bd7", RUN+="/bin/chown wibukey /proc/bus/usb/$env{BUSNUM}/$env{DEVNUM}"
  • /etc/init.d/wibukey looks like this:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          wibukey
# Required-Start:    $remote_fs $network
# Required-Stop:     $remote_fs $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the WibuKey server.
### END INIT INFO

# Author: Tom Dobes <tomdobes@purdue.edu>

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DAEMON=/opt/wibukey/WkSvLin
DAEMON_OPTS="-d"
NAME=wibukey
DESC="WibuKey server"
SCRIPTNAME=/etc/init.d/$NAME
USER=wibukey
LD_LIBRARY_PATH="/opt/wibukey/lib" ; export LD_LIBRARY_PATH

test -x $DAEMON || exit 0

set -e

. /lib/lsb/init-functions

case "$1" in
    start)
        log_daemon_msg "Starting $DESC" $NAME
        if ! start-stop-daemon --start --quiet --oknodo \
            --chuid $USER --exec $DAEMON -- $DAEMON_OPTS
        then
            log_end_msg 1
        else
            log_end_msg 0
        fi
        ;;
    stop)
        log_daemon_msg "Stopping $DESC" $NAME
        if start-stop-daemon --quiet --stop --oknodo --retry 30 --oknodo \
            --exec $DAEMON
        then
            log_end_msg 0
        else
            log_end_msg 1
        fi
        ;;
    restart|force-reload)
        $0 stop
        sleep 5
        $0 start
        ;;
    *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0
computer/wibukey_properly_installed_in_debian.txt · Last modified: 2011/01/14 20:46 by tdobes
Recent changes RSS feed Driven by DokuWiki Valid XHTML 1.0 Valid CSS