Triple VNC

Cyrille Lefevre clefevre-lists at 9online.fr
Mon Jul 12 09:09:30 PDT 2004


"Tom McLaughlin" <tmclaugh at sdf.lonestar.org> wrote:
> On Sun, 2004-07-11 at 17:04, Bruno Czekay wrote:
[snip]
> The first problem I see is you install the tightvnc package and it
> creates bin/vncviewer which is a symlink to bin/vncviewer-tight and then
> you install realvnc.  I believe that if you overwrite the existing
> symlink you will overwrite the symlink target.  So by installing
> realvnc's bin/vncviewer you will overwrite tightvnc's
> bin/vncviewer-tight.  I haven't tried this with any ports, simply
> copying files around and copying to the symlink overwrote the target
> file.

a well done package could easily handle this issue by first removing the
symlink and by installing its own one. a better way would be to install
all of them using a separate name and to have a separate startup script
for each of them w/ separate startup variables for the server side, and
to have a wrapper for the client side as for mozilla.

> The second problem I see is which package owns bin/vncviewer?  Both
> would own bin/vncviewer according to their package lists and both would
> want to remove the file.  You could do away with the symlink and have
> tightvnc simply install just bin/vncviewer-tight but that creates a
> problem for frontends like tsclient which look for a vncviewer binary. 
> Now someone is forced to install realvnc to use tsclient when they
> already have tightvnc.

something like :

#!/bin/sh

if [ -f ${HOME}/.Xvncviewer ]; then
    . ${HOME}/.Xvncviewer
fi
if [ -z "${VNCVIEWER}" ] || [ ! -x ${VNCVIEWER} ]; then
    vncviewers="tight tridia real"
    unset VNCVIEWER
    for vncviewer in ${vncviewers}; do
        VNCVIEWER=%%PREFIX%%/bin/vncviewer-${vncviewer}
        if [ -x ${VNCVIEWER} ]; then
            echo VNCVIEWER=${VNCVIEWER} > ${HOME}/.Xvncviewer
            break;
        fi
    done
fi
if [ -z "${VNCVIEWER}" ] || [ ! -x ${VNCVIEWER} ]; then
    echo >&2 "$0: unable to find a valid VNC viewer!"
    echo >&2 "$0: please, install one of the following VNC package first:"
    echo >&2 "$0: tridiavnc, tightvnc or (real) vnc using pkg_add -r"
    exit 1
fi
exec ${VNCVIEWER} "$@"

> I think leaving them the way they are is probably the best way to go. 

Cyrille Lefevre.
-- 
home: mailto:cyrille.lefevre at laposte.net


More information about the freebsd-ports mailing list