X11 forwarding and LBX

Darren Tucker dtucker at zip.com.au
Wed May 8 12:17:31 EST 2002


John Hardin wrote:
> So I fire off lbxproxy and try to run an xterm to see if it works. No
> dice, authentication denied.
> 
> Does anybody have any experience with this? Is it possible to run
> lbxproxy and ssh X11 forwarding simultaneously? If so, does it result in
> any noticable performance gains over basic ssh compressing?

I've used it with a network management product over a WAN link. To open
a map with compressing ssh took ~12sec. With LBX, it took ~9sec, but to
re-open a map that had previously been opened took <1sec.

The script I used to sort out xauth stuff is attached. The caveats are:
you need to source it (ie ". ./lbx") and various versions of LBX behave
differently so you may need to adjust it to local conditions. I also
found that some versions of LBX running on Solaris wouldn't bind()
unless they ran as root, although I never figured out why.

		-Daz.
-------------- next part --------------
#!/bin/sh

LIBPATH=/usr/X11R6.4/lib:$LIBPATH
export LIBPATH

PATH=/usr/openwin/bin:$PATH
export PATH

if [ "$DISPLAY" = "" ]
then
        echo "No DISPLAY variable set, LBX cannot start."
        exit 1
fi

echo Starting Low Bandwidth X proxy.
>$HOME/.lbxproxy
lbxproxy :10 2> $HOME/.lbxproxy &

until egrep "Using port number .[0-9]*." $HOME/.lbxproxy
do
  sleep 1
done

lbxport=`awk '/Using port number/{print $4}' $HOME/.lbxproxy | tr -d "'"`

LBXDISPLAY="`hostname`:$lbxport.0"

authtype=`xauth list $DISPLAY | awk '{print $2}'`
authkey=`xauth list $DISPLAY | awk '{print $3}'`

if [ ! -z "$authtype" ]
then
  echo "Adding Xauthority for lbxproxy"
  xauth add $LBXDISPLAY $authtype $authkey
else
  echo "No Xauthority found for display $DISPLAY."
  echo "You may have authorization problems (especially via SSH!)"
fi

echo Standard X11 display: $DISPLAY
echo LBX proxy display: $LBXDISPLAY

ps -eaf |grep [l]bxproxy

DISPLAY=$LBXDISPLAY
export DISPLAY


More information about the openssh-unix-dev mailing list