Automatically restart TeamViever via e-mail
Recently we found team viewer convenient for remote work. However, there is a problem: it needs to be restarted from time to time.
Below you may find how to make team-viewer atomatically started, stopped or re-started when you send a e-mail with special subject to your e-mail address.
1. Install Team Viewer
On our local machines open terminal and type:
cp /net/v215-2/data4/fedorov-group/TeamViewerPack.zip .
unzip TeamViewerPack.zip
cd TeamViewerPack
tzr –xzf teamviewer_linux.tar.gz
2. Start TeamViewer
~/TeamViewerPack/teamviewer5/teamviewer &
3. Change Password to permanent user defined one
3.a) Select Extras->Options in menu
3.b) Select Sequirity and type twice the desired password.
4. Create local folder TeamViewer in Thunderbird
In Mozilla Thunderbird, click right mouse button on the Local Folders, and select New Folder. Type the name:TeamViewer
5. Create Message Filter in Thunderbird
5a) In menu select Tools->Message Filters
5b) Create a new filter with name TeamViewer
5c) In the filter window select Match all the following checkbox and add two rules:
1) From contains <your e-mail address> and
2) Subject contains TeamViewer (to improve sequirity, you may also change the subject to some password, which only you know)
In actions select Move Message to TeamViewer on Local Folders
6) Change you profile settings to check mail every minute
6.a) Right click on you mail-box and select Settings…
6.b) Check
7) Install TeamViewer Scripts
mkdir ~/TeamViewerScript
cp /net/v215-2/data4/fedorov-group/TeamViewerMail.zip ~/TeamViewerScript
cd ~/TeamViewerScript
7.a)
If necessary, change the file startTeamViever, which should run the TeamViewer program as a background process (do not forget sign in the end of the command).
cd ~/TeamViewerScript
gedit startTeamViewer
7.b) Open new terminal, go to TeamViewerScript folder and run file ./mailReader
cd ~/TeamViewerScript
./mailReader
8) How to use
8.a)
To operate with Team Viewer, send from your institute mail-box to yourself the message with the subject TeamViewer (or other password, which you have chosen in the section 5c(2) ).
Outside the institute you may send the message to yourself using the mail web interface ( https://gate2.mis.mpg.de/webmail )
To start the team viewer send the message with the single word: start
To stop the team viewer send the message with the single word: stop
To restart the team viewer send the message with the single word: restart