#!/usr/bin/env sh
# Starting script for RustDesk.
#
ico="/usr/share/pixmaps/rustdesk.png"
msg=$(cat <<E_O_F
WARN: To use this program, you need to get a third-party
shared library - libsciter-gtk.so. Run the "libsciter-install"
command as root to download and install it.
E_O_F
)

if [ -e "/usr/lib/rustdesk/libsciter-gtk.so" ]; then
  pushd /usr/lib/rustdesk/ > /dev/null
  env GDK_BACKEND=x11 ./rustdesk "$@"
else
  zenity --window-icon=$ico --width=400 --height=200 --info --text="$msg" --title="RustDesk"
fi

exit 0
