Centos - connect via teamviewer without logging on to physical computer
I have TeamViewer installed on my server running Centos7 as well as on a mac that I hope to use to control the server. Both computers are linked to my Teamviewer account. I have my teamviewer parameters on the server set to automatically start teamviewer upon login. And, indeed, when I start up my server I get a notification that it is now online view the Teamviewer app running on my mac. But, when I try connecting, the connection just stalls on the screen that says that teamviewer is trying to connect.
I am able to resolve this problem easily if I sign in physically with my username and password on my linux server (i.e. using a keyboard and monitor hooked up directly to the server). After doing that, I am able to connect just fine via Teamviewer. But, doing so rather defeats the purpose of Teamviewer as I would like to be able to make this connection remotely without needing to physically sign in to the server. In particular, the issue is that I'd like to store the server in an out of the way place and not need to hook up a monitor, keyboard, etc. to it. My goal is to be able to just turn the server on and then do everything I need remotely via Teamviewer.
I can ssh perfectly well to my server, even without physically logging on to it. When I do so, I have also tried manually entering the teamviewer command to launch it. Doing this results in the following appearing and then just sitting with no further progress:
Init... xprop: unable to open display '' CheckCPU: SSE2 support: yes XRandRWait: No value set. Using default. XRandRWait: Started by user. Checking setup... Launching TeamViewer ... Launching TeamViewer GUI ...
Re: Centos - connect via teamviewer without logging on to physical computer
Thank you for contacting TeamViewer.
The reason for this is that you're having this issue is because gdm the default Display Manager on CentOS, is not letting TeamViewer start before the login.
That's why you need to log in then TeamViewer will start automatically.
If you like to start TeamViewer before the log in some changes needs to be performed.
For example, instead of using gdm, you need to use lightdm or sddm.
I will explain how to use lightdm to start TeamViewer as you want to.
#lightdm is not included in the default repositories. Epel repository is needed to get it.
sudo yum install epel-release
sudo yum install lightdm
sudo systemctl disable gdm.service
sudo systemctl enable lightdm.service
Hope this solution works for you.
Did my reply answer your question? Accept it as a solution to help others, Thanks.