4 # Required-Start: $local_fs $remote_fs
5 # Required-Stop: $local_fs $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: Automatically start X as a user
11 # Author: Andres Salomon <dilinger@debian.org>
16 PATH=/sbin:/bin:/usr/sbin:/usr/bin
17 DAEMON=/usr/sbin/autox
18 PIDFILE=/var/run/autox.pid
22 test -x $DAEMON || exit 0
24 . /lib/lsb/init-functions
27 if [ -f /etc/default/$NAME ] ; then
31 if [ -z "$AUTOX_USER" ]; then
32 log_failure_msg "No user specified in /etc/default/${NAME}."
37 log_daemon_msg "Starting $DESC" "$NAME"
38 #x=$(readlink -f /dev/stdin)
39 #echo "stdin: $x" > /tmp/blah
42 #start-stop-daemon --start --chuid olpc --verbose --background --make-pidfile --pidfile $PIDFILE --user olpc --exec $DAEMON -- /dev/tty7
43 #start-stop-daemon --start --verbose --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- /dev/tty7
44 start-stop-daemon --start --background --pidfile $PIDFILE --exec $DAEMON
46 #start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS &
50 log_daemon_msg "Stopping $DESC" "$NAME"
51 start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
61 echo "Usage: $N {start|stop|restart|force-reload}" >&2