Blob Blame History Raw
#!/bin/bash

if [ -f /etc/lyx/lyx.conf ]; then
 source /etc/lyx/lyx.conf
fi

if [ -f ${HOME}/.lyx/lyx.conf ]; then
 source ${HOME}/.lyx/lyx.conf
fi

if [ -z "${LYX_FRONTEND}" ]; then
  LYX_FRONTEND=qt
fi

# Try LYX_FRONTEND
which lyx-${LYX_FRONTEND} >& /dev/null && \
  exec lyx-${LYX_FRONTEND} ${1+"$@"}

# Fall back to trying lyx-qt, lyx-xforms
for frontend in qt xforms ; do
  which lyx-$frontend >& /dev/null && exec lyx-$frontend ${1+"$@"} ||:
done

# ERROR should not reach this point
exit 1