Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have root shell access to a server, but need to use graphical applications on it. How could I launch TeamViewer (that is already installed) on the linux server, so that I could get the ID and Password of the session?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Found this here. I would recommend following the link, however, as the author does explain a bit more.

Basically, the script starts Teamviewer automatically at startup, takes a screenshot of the Teamviewer screen (which includes the ID and password), and attaches it to an email composed in Thunderbird.

Pretty nifty if you ask me. Hopefully it works :)

[sourcecode language="bash"]
echo ‘Loading TeamViewer…’;
teamviewer &
echo ‘waiting 20 seconds’;
sleep 20;
echo ‘Taking screenshot’;
import -window root YOURSCREENSHOTNAME.png;
echo ‘Creating email’;
thunderbird -compose “to=’YOUR@EMAILADDRESS.HERE’,subject=’TV PWD’,attachment=’~/YOURSCREENSHOTNAME.png’,body=’login now’” &
echo ‘waiting 2 seconds’;
sleep 2;
xdotool key ‘ctrl+Return’;
[/sourcecode]
share|improve this answer
    
flukylogs.blogspot.com/2011/08/… link given at the bottom of the page might work better. –  Rob Aug 29 '12 at 19:15
    
@Rob I saw that as well, but requires having GUI access to get some of that set up. OP has only shell access. –  JoshP Aug 29 '12 at 19:19
    
Thanks, worked. –  Viderizer Aug 29 '12 at 19:52

If you have access to a headless server, or text-only server, this may not help you. However, if you can access the desktop of your Linux machine, you may create a bash script that will execute teamviewer upon login. You will have to check how to use your Linux machine's "autologin" process. Once the autologin is done, create another bash script that has to be part of the "auto started applications".

share|improve this answer

As easy as running this from the remote console:

export DISPLAY=:0
teamviewer

Teamviewer keeps the same ID between program reopenings, so you don't need to grab it.
About the password, you can set it to be always the same by following the steps here: Setting a fixed password in Teamviewer (server) in Linux without sending registration data
Tested working fine on TeamViewer v9.0.24147 with Ubuntu 12.04.4 LTS and Kali v1.0.6.

P.S: it seems somebody succeeded by runing this command that make things easier:

teamviewer --passwd [YourPassword]

Not me, saddly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.