I'm on Ubuntu 8.10
The script runs when called from the command line with sudo /etc/init.d/xbindkeys start
. Here's how it looks:
#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
case "$1" in
start)
xbindkeys
;;
stop)
ps aux | grep xbindkeys | head -n1 | awk '{print $2}' | xargs kill
;;
restart)
$0 stop
$0 start
;;
esac
I had run sudo update-rc.d xbindkeys defaults
earlier to create the symlinks. To make sure it was linked correctly, I tried chkconfig | grep xbindkeys
, which returns:
xbindkeys 2345
However, after restarting, I don't see the process with ps aux | grep xbindkeys
.
Ideas?
xbindkeys
needs a running X server to work which isn't available at that stage of starting your system. You should addxbindkeys
to your.xinitrc
(see man pagexinit(1)
) or.Xsession
(see man pageXsession(5)
) instead.