summaryrefslogtreecommitdiff
path: root/share_desktop.sh
blob: 886751ef18ee90805e6e80bb9b27adddb38ef3a8 (plain)
    1 #!/usr/bin/env bash
    2 #
    3 # This script is intended as a simple and quick substitude for proprietary
    4 # desktop sharing programs. It opens a VNC connection in viewonly mode for
    5 # readonly screen sharing over VNC.
    6 #
    7 # Requirements:
    8 #   x11vnc
    9 
   10 
   11 # Check for x11vnc
   12 which x11vnc 2>/dev/null 1>/dev/null
   13 if [[ $? == 1 ]]; then
   14   echo "x11vnc is not installed. Please install and run again."
   15   exit 1
   16 fi
   17 
   18 password="${1}"
   19 if [[ -z ${password} ]]; then
   20   echo -e "\nPlease enter a temporary session password.\n\n"\
   21           "Note, do not use your user password.\n"\
   22           "You will need to share this with everyone connecting."
   23   read password
   24 fi
   25 
   26 echo "Starting screenshare"
   27 x11vnc -viewonly -ssl -passwd ${password} -forever -autoport 5900 -quiet

Generated by cgit