#!/bin/bash
[ -z "$1" ] && echo "usage: $0 <unix-socket>" && exit 1
SOCK=$1
if [ -z "$2"]; then
    PORT=5900
else
    PORT=$2
fi
socat TCP-LISTEN:$PORT UNIX-CONNECT:$SOCK &
exec vncviewer localhost:$PORT
