7

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?

3 Answers 3

4

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=’[email protected]’,subject=’TV PWD’,attachment=’~/YOURSCREENSHOTNAME.png’,body=’login now’” &
echo ‘waiting 2 seconds’;
sleep 2;
xdotool key ‘ctrl+Return’;
[/sourcecode]
2
  • flukylogs.blogspot.com/2011/08/… link given at the bottom of the page might work better.
    – Rob
    Aug 29, 2012 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, 2012 at 19:19
1

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".

0

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: How can I set a fixed custom password in Teamviewer (server) 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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .