Klaus-Peter Wegge wrote: > It's in the PATH and full path spec doesn't make a difference. > But the change in .mailcap is a work arround. > audio/mpeg; mpg123 -v %s > > The VIEWER definition seems to check for the > DISPLAY env. It's set to DISPLAY=0 > May be there is something wrong with the VIEWER defintion.
As a general troubleshooting technique for this sort of thing, run: $ strace -e trace=file -s250 -f -o lynx.strace lynx [url] ... then Do The Thing which ends up in running the wrong viewer. Then look inside lynx.strace. Start by truncating it at the point where it runs the wrong viewer, since it has with 100% certainty already picked up the wrong info before that point. Then look for it accessing other files with names like 'mime.types' or 'mailcap', anywhere in the filesystem. You may see ENOENT -- attempts to open files which turn out not to exist. These might seem like useless noise, but in fact show you the exact path of files it *tried* to use. These will of course include the one with the unwanted viewer info; they may also point out other points of leverage -- files it fails to open, but which you could create so that next time it succeeds and gets the settings you want. Overall, you should learn of (1) system files which you as admin could edit, (2) own files which you could edit, (3) possibly, other places it looks, which you could create to give you additional points of leverage. Trying on my system, I got (heavily truncated trace output): open("/etc/mailcap") lstat("~/.mailcap") open("~/.mailcap") open("~/.mailcap") (yes, twice) open("/etc/mime.types") lstat("~/.mime.types") = -1 ENOENT -- showing that I could add a personal .mime.types if needed for override purposes. >Bela< PS: there is also `lynx -trace`, which very likely would lead to the same discoveries. But is program-specific, so less generally helpful to learn. It would certainly be the right thing to look at if you were e.g. trying to understand some mis-parsing of HTML; but for questions about what files it accesses, probably not the best tool.