How to start the teamviewer service before login?

Solution 1:

After trying and investigating the situation you have described in your post, the issue seems to be that this version of TeamViewer is unable to start an X server session which is needed for TeamViewer to work.

So you can enable automatic login on pc-A and it will work. Have a look at Automated login and screen lock If you need privacy and want the screen locked.

However, you do need to enable Start TeamViewer with system and set Personal Password under options in TeamViewer on pc-A then reboot first for that to work.


An alternative solution to remotely login and start X server session for TeamViewer to work is to install xrdp on pc-A like so:

sudo apt install xrdp

Then, make sure the xrdp service is enabled and started ( it usually is ).

After that from pc-B run remmina like so:

remmina

Then, enter the pc-A's IP in the remmina GUI and press Enter

remmina is most likely already installed on your system but if you need, install it like so:

sudo apt install remmina

Notice:

You can connect to xrdp by IP / Host-name only and if the two PCs are not on the same local network, you might find free dynamic DNS services like no-ip and others helpful.