> The setting \screen_zoom is stored in .lyx/preferences
>
> So, you can keep two such preference files and have scripts called
> lyx14 and lyx21 that copies one or the other into .lyx/preferences
> before starting lyx.
>
> Of course this solution makes changing any other preferences
> more difficult, as you have to update the two other files
> afterwards. A better option is to write a script that modifies
> the \screen_zoom setting in .lyx/preferences directly before
> starting lyx. This script may be a little harder to write though.
Ah, great thanks! 'perl -pi -e' for in place editing sounds like
the tool. Something like:
cat > mylyx <<EOF
#!/bin/sh
case $DISPLAY in
mon1) ZOOM=200 ;;
mon2) ZOOM=100 ;;
esac
perl -pi -e "s/(\\screen_zoom )\d+/\$1 $ZOOM/" $HOME/.lyx/preferences
exec lyx "$@"
EOF
should do it. Thanks for the idea!
Alexis