#!/bin/sh

if [ "${DISPLAY%:*}" = "" ]; then
  vncdisplay=$(ps -eo args |grep Xvnc | grep -v grep | awk '{ print $2 }')
  if [ "${vncdisplay#:}" != "${DISPLAY#:*}" ]; then
    export NO_GAIL=1; export NO_AT_BRIDGE=1; /opt/Synaptics/bin/SynTPEnh&
  fi
fi
