]> git.lyx.org Git - lyx.git/blobdiff - development/MacOSX/lyxeditor
Update documentation
[lyx.git] / development / MacOSX / lyxeditor
index 670dea2228434cade48fbd88a3a7faf644737a1d..9d6aabe0629a51292bbffe2ad135fb0638eee747 100755 (executable)
@@ -59,6 +59,11 @@ do
        if [ -n "$LYXPIPE" -a -p "$LYXPIPE".in ]; then
                break
        fi
+       # now check for default pipe location
+       if [ -p "${ABS_USER_LYXDIR}"/.lyxpipe.in ]; then
+               LYXPIPE="${ABS_USER_LYXDIR}/.lyxpipe"
+               break
+       fi
 done
 
 # echo "preferences file sets lyxpipe as ${LYXPIPE}"
@@ -82,15 +87,13 @@ test -z "${LYXPIPE}" && {
 }
 
 if [ -n "$LYXPIPE" -a -p "$LYXPIPE".in ]; then
-       file=$(echo "$1" | sed 's|^/private||')
-
-       MAC_LYXPIPE_CONTENTS="LYXCMD:macdvix:server-goto-file-row:$file $2"
+       MAC_LYXPIPE_CONTENTS="LYXCMD:macdvix:server-goto-file-row:$1 $2"
        # echo "$MAC_LYXPIPE_CONTENTS"
        echo "$MAC_LYXPIPE_CONTENTS" > "${LYXPIPE}".in || { echo "Cannot write to lyxpipe." ; exit 2 ; }
        while read line ; do
                echo LyX said: $line
        done < "${LYXPIPE}".out || { echo "Cannot read from lyxpipe." ; exit 2 ; }
-       test -x /usr/bin/osascript && /usr/bin/osascript -e 'tell application "LyX" to activate'
+       test -x /usr/bin/osascript && /usr/bin/osascript -e 'tell application id "org.lyx.lyx" to activate'
 else
        echo "Our best guess sets lyxpipe as ${LYXPIPE}"
        echo "But the lyxpipe could not be found."