Many Users who likes to work as root and but in TeamViewer 5 there is restriction for Running as root.
Whenever you are trying to run TeamViewer as root from Terminal, You will get message like below:
TeamViewer must not be executed as root!
By Following very few steps you will be able to run TeamViewer as root.
Perform Following Steps to run TeamViewer As root.
- Of Course you have to be root to perform these all steps.
- Open Terminal on Fedora, Red Hat, CentOS ( Applications -> System Tools -> Terminal )
Please Open Terminal on Ubuntu ( Applications -> Accessories -> Terminal )
- Now Lets find where exactly teamviewer command is. Execute Following command to Find it out.
[root@mehrdust]# which teamviewer
/usr/bin/teamviewer <– You will get this kind of output on your terminal
- Be safe So First Lets take a backup of Original TeamViewer Command. Execute Following Command
cp /usr/bin/teamviewer /usr/bin/teamviewer-orig
- Let’s Open teamviewer file. Here in /usr/bin/teamviewer they have put the restriction for root user. So Lets Remove it. Open File By Executing vim /usr/bin/teamviewer and You will able to see following lines into /usr/bin/teamviewer :-
userid=$(id -u)if [ $userid = 0 ]
echo TeamViewer must not be executed as root!
CHANGE those line to
##if [ $userid = 0 ]
## echo TeamViewer must not be executed as root!
## exit 1
Save and Exit this file ( Press “ESC” then Press :wq! )
- To Open TeamViewer from GUI. Click on Applications –> Internet -> TeamViewer
- To Open TeamViewer from Terminal in Fedora, Red Hat and CentOS. Click on Applications -> System Tools -> Terminal. On Terminal Execute Command teamviewerTo Open TeamViewer from Terminal in Ubuntu. Click on Applications -> Accessories -> Terminal. On Terminal Execute Command teamviewer