3

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?

joschi
  • 21,387
  • 3
  • 47
  • 50
ehsanul
  • 427
  • 1
  • 8
  • 19

1 Answers1

7

xbindkeys needs a running X server to work which isn't available at that stage of starting your system. You should add xbindkeys to your .xinitrc (see man page xinit(1)) or .Xsession (see man page Xsession(5)) instead.

joschi
  • 21,387
  • 3
  • 47
  • 50