vncshare

#!/bin/sh
# script to change your vnc password temporary in order to share the vnc session with
# a colleague

# for how long should the password be changed (seconds)
PWTIMEOUT=30

# backup password
mv ~/.vnc/passwd ~/.vnc/oldvncpasswd

# make sure the password is restored when the program exits
trap 'mv ~/.vnc/oldvncpasswd ~/.vnc/passwd; echo vncpassword restored...' EXIT

# write temporary password 'helpme'
for OCTALBYTE in 145 151 142 201 056 243 032 130
do
	echo -n -e \\$OCTALBYTE
done > ~/.vnc/passwd

# wait and show a gauge dialog before we restore the original password
COUNT=$PWTIMEOUT
(
while test $COUNT != 0
do
	echo `expr 100 \* $COUNT / $PWTIMEOUT`
	echo "XXX"
	echo "For the following $COUNT seconds, your VNC password will be 'helpme'. Please instruct your colleague to use this password to connect to your vncserver session. Just wait or abort (using ctrl+c) to revert back to your original password.\nYour colleage can share the vnc session until he or she closes his / her vncviewer window."
	echo "XXX"
	COUNT=`expr $COUNT - 1`
	sleep 1
done
) | dialog --title "VNCSHARE" --gauge "this is some text" 13 70 0

3 Responses to “vncshare”

  1. resor says:

    Continue with the the nice work on the site. Do like it! :p Could use some more frequent updates, but i’m quite sure you got more or better things to do , hehe. =)

  2. resa says:

    Continue with the the nice work on the blog. I kinda like it! :) Could use some more frequent updates, but i’m quite sure that you have got better or other stuff to do like we all do. :)

  3. resorna says:

    I precisely wished to thank you so much again. I’m not certain the things that I could possibly have accomplished without the pointers shown by you about my subject matter. It has been a real frustrating matter in my position, but considering a new skilled strategy you managed the issue forced me to cry over joy. I’m just grateful for this service and as well , expect you recognize what an amazing job you’re putting in educating many others using your web page. Most probably you’ve never encountered any of us.

Leave a Reply