/usr/bin/dtemacs is in gnuserv 3.12.8-7.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/bin/sh
# $Id: dtemacs,v 1.2 2004/02/16 11:23:59 benj Exp $
# Try to contact Emacs with gnuclient, starting Emacs if no answer.
# Pass all options to gnuclient. This version is standalone and doesn't
# need any fancy elisp.
GNUCLIENT=gnuclient
GNUCLIENTPINGOPTIONS="-batch -eval t"
EMACS=emacs
TIMEOUT=20
# If Emacs doesn't seem to be running then make it so.
if ${GNUCLIENT} ${GNUCLIENTPINGOPTIONS} >/dev/null 2>&1 ; then
:
else
${EMACS} -iconic -eval "(setq gnuserv-kill-quietly t)" -f gnuserv-start 2>&1 >/dev/null &
fi
# Try for TIMEOUT seconds to talk to the Emacs process.
count=0
until ${GNUCLIENT} ${GNUCLIENTPINGOPTIONS} >/dev/null 2>&1 ; do
if [ ${count} -gt ${TIMEOUT} ] ; then
echo "dtemacs: error starting Emacs" 1>&2
exit 1
fi
sleep 1
count=`expr ${count} + 1`
done
exec ${GNUCLIENT} ${1+"$@"}
|