#!/bin/bash # $Id: es,v 1.4 2006/12/11 20:18:56 jerry Exp $ exec 2>>/tmp/es.errors term=linux pipe_dir='$HOME/.emacspeak/pipes' host= pipe_suffix= synth=eflite server='$HOME/bin/emacspeak_pipe' emacspeak=emacspeak delay=2 profile_dir=~/bin/es.profiles rcfile='/etc/profile; . $HOME/.bash_profile' user=$USER while getopts e:s:t:p:u: opt; do case $opt in e) emacspeak=$OPTARG ;; p) . $profile_dir/$OPTARG ;; s) pipe_suffix=$OPTARG ;; t) term=$OPTARG ;; u) user=$OPTARG ;; esac done shift $((OPTIND - 1)) : ${host:=$1} pipe=$(hostname).${pipe_suffix:-default} trace=/tmp/es.$host.$pipe ( ssh -n $user@$host " mkdir -p $pipe_dir cd $pipe_dir rm -f $pipe mknod $pipe p cat $pipe rm $pipe " | tee $trace | $synth ) & sleep $delay ssh -t $user@$host ". $rcfile; TERM=$term DTK_PROGRAM=$server DTK_PIPE=$pipe_dir/$pipe $emacspeak" rm $trace