Am Tue, 26 Nov 2002 14:51:20 -0500 schrieb Ronald Florence <[EMAIL PROTECTED]>:
> Is there a helper application that will check for a running LyX, open > the file there if it is available, or start LyX if there is none > running? Gimp-remote, which does the same for gimp, is the model I'm > thinking of. Use the LyxServer-pipe: 1) in the menu-entry "Bearbeiten-Einstellungen-Eingabe-Pfade-LyXServer pipe"(I use the german translation) put something like "/home-xx/.lyx/lypipe" (replace /home-xx with your $HOME -path). 2) write a litte script like: --------------------------------- #!/bin/sh if [ -e ~/.lyx/.lyxpipe.in ] then echo "LYXCMD:test:file-open:$1" >~/.lyx/.lyxpipe.in read a <~/.lyx/.lyxpipe.out echo $a else lyx -geometry 690x715+0+0 $1 fi ------------------------------------- 3) name the script as you like (perhaps lyxremote) and put it in a path where it will be found (like /usr/local/bin). Now you can load every lyx-file in an existing running LyX. If it's not started, the script will start a new one. Of course you have to call your *.lyx- files with lyxremote file.lyx 4) a little problem occurs, when lyx crashes: the files $HOME/.lyx/lyxpipe.* will not be deleted so that "lyxremote" thinks there exists a running lyx -- you will have to delete $HOME/.lyx/lyxpipe.* by yourself. This procedure works for me (lyx1.2.1): there is also help about the lyx Server-pipe in the helpfiles included with the lyx-package. hope it helps Peter