How to run TeamViewer as root – CentOS / RHEL / Ubuntu / Linux Mint / Fedora

3

As already you know TeamViewer is a most widely used application for remote control, desktop sharing, online meetings, web conferencing and file transfer between computers. It operates on Microsoft Windows, Mac OS X, Linux, iOS, and Android operating systems.

It is also possible to access a machine running TeamViewer with a web browser. TeamViewer is mainly used for remote control of computers, collaboration and presentation features are included.

If you have installed Team Viewer on CentOS / RHEL / Ubuntu / Fedora, you might have faced the problem in running TeamViewer under root privileges because TeamViewer designed to run as a normal user for security reason. If you want to run it on your own risk, follow the step to run as root.

Let’s try to run TeamViewer as root

[root@geeksite Desktop]# teamviewer
TeamViewer: 7.0.9310
Profile: /root (raj)
Desktop: gnome
/etc/centos-release /etc/redhat-release /etc/system-release
CentOS Linux release 6.0 (Final)

Error: TeamViewer must not be executed as root!

It’s not running under root user; Now the solution to resolve the issue.

Edit the following file.

[root@geeksite Desktop]# vi /opt/teamviewer/teamviewer/7/bin/wrapper

Comment out the following lines.

Line Number: 65

 #validate_user                                # die if root

Line Number: 210

 #function validate_user()
 #{
 #  local userid=$(id -u)
 #
 #  if [ $userid = 0 ] ; then
 #    die "TeamViewer must not be executed as root!"
 #  fi
 #}

Once done, start TeamViewer as root.

[root@localhost Desktop]# teamviewer
TeamViewer: 7.0.9310
Profile: /root (raj)
Desktop: gnome
/etc/centos-release /etc/redhat-release /etc/system-release
CentOS Linux release 6.0 (Final)

Checking setup...
Launching c:\Program Files\TeamViewer\Version7\TeamViewer.exe...

Now the TeamViewer running as root without any error.

Run TeamViewer as root - Teamviewer
Run TeamViewer as root – Teamviewer

That’s All.

You might also like