summaryrefslogtreecommitdiff
path: root/share_desktop.sh
diff options
context:
space:
mode:
Diffstat (limited to 'share_desktop.sh')
-rwxr-xr-xshare_desktop.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/share_desktop.sh b/share_desktop.sh
new file mode 100755
index 0000000..886751e
--- /dev/null
+++ b/share_desktop.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+#
+# This script is intended as a simple and quick substitude for proprietary
+# desktop sharing programs. It opens a VNC connection in viewonly mode for
+# readonly screen sharing over VNC.
+#
+# Requirements:
+# x11vnc
+
+
+# Check for x11vnc
+which x11vnc 2>/dev/null 1>/dev/null
+if [[ $? == 1 ]]; then
+ echo "x11vnc is not installed. Please install and run again."
+ exit 1
+fi
+
+password="${1}"
+if [[ -z ${password} ]]; then
+ echo -e "\nPlease enter a temporary session password.\n\n"\
+ "Note, do not use your user password.\n"\
+ "You will need to share this with everyone connecting."
+ read password
+fi
+
+echo "Starting screenshare"
+x11vnc -viewonly -ssl -passwd ${password} -forever -autoport 5900 -quiet
+

Generated by cgit