I figured this out, but the FAQ didn't seem to work, because it says you don't need an environment.plist any more, but I had to create a .MacOSX/environment.plist to set the environment variables for PATH and DISPLAY (don't know which one was needed as I set them both up at once and it worked).

Also, in researching this I found a way to get X11 to execute if it's not already running. Since the QT version of LyX doesn't require X11 to be running, but gv and xdvi do, it's nice to have them start when you need them, rather than having to remember whether you've started X11.

There may be other ways of doing this, but here's how I did it. Use a shell script to call gv rather than execute gv directly (so call the script rather than gv in preferneces, outputs, file formats). My script is this:

#!/bin/sh

# make sure X11 is running
osascript <<EOF
tell app "X11"
  activate
end tell
EOF

#start gv
gv "$1"

This runs a short applescript that activates X11 (meaning, launches it if it's not running, but if it is running simply give it the focus) and then starts gv. I have a similar script for xdvi. One nice thing about this is that your gv window is active, so you don't have to click it to make it active.

Just thought I'd share this with anyone following along.

Still can't get reverse DVI to work, however.

--Dave

On Nov 12, 2004, at 9:47 PM, Bennett Helm wrote:

On Nov 12, 2004, at 5:18 PM, dcbns wrote:

I'm having problems getting LyX (1.3.5, precompiled QT) on Mac OS X (10.3.6) to work with X11 programs like xdvi and gv. Those viewers simply don't run when I start LyX by double clicking from the applications folder. However, I have the paths and display correctly set for when I open terminals (both Apple's terminal and xterm in X11). Further, if I use "open /Applications/LyX.app" from a terminal (either xterm or apple's terminal) to start LyX then everything works fine and gv and xdvi run from LyX. But I simply can't get them to run if I simply double click LyX.

I've clarified the instructions somewhat on the wiki (<http://wiki.lyx.org/pmwiki.php/LyX/Mac>). That should help you.


Bennett




Reply via email to