Skip to content

Instantly share code, notes, and snippets.

@dragonauta
Created April 20, 2015 13:50
Show Gist options
  • Save dragonauta/58b1c321664de416ed63 to your computer and use it in GitHub Desktop.
Save dragonauta/58b1c321664de416ed63 to your computer and use it in GitHub Desktop.
Teamviewer from command line
#!/bin/bash
id=(your-id1 your-id2)
pass=(your-pass1 your-pass2)
tv=('Your PC1' 'Your PC2')
ITEMS=""
for item in {0..17}; do
ITEMS=$ITEMS" $item ${tv[$item]}"
echo $ITEMS
done
OPTION=$(dialog --title "List file of directory /home" --menu "Chose one" 24 80 17 $ITEMS 3>&2 2>&1 1>&3) # show dialog and store output
clear
if [ $? -eq 0 ]; then # Exit with OK
echo ${id[$OPTION]}
echo ${pass[$OPTION]}
./teamviewer -i ${id[$OPTION]} --Password ${pass[$OPTION]}
fi
OPTION=""
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment