Here is a modification of Peter Rexigel's script that can handle the situation of a lyxpipe left around after a LyX crash. Seems to work fine, and with the newest version of OroborOSX for MacOSX, it lets you double-click on LyX files and have them pop open in the running LyX.

#!/bin/sh
# lyx-remote
# [EMAIL PROTECTED], 27 Nov 2002

running=`ps -aux | grep "$LOGNAME.*lyx" | grep -v grep`
if [ "X$running" = "X" ]
then
rm -f ~/.lyx/.lyxpipe.in ~/.lyx/.lyxpipe.out
lyx $1 &
else
if [ -e ~/.lyx/.lyxpipe.in ]
then
echo "LYXCMD:test:file-open:$1" >~/.lyx/.lyxpipe.in
read a <~/.lyx/.lyxpipe.out
echo $a
else
echo "Hmmm. LyX is running but there is no server pipe."
fi
fi

--

Ronald Florence www.18james.com



Reply via email to