[Solved] TeamViewer 15.38.3 (DEB) GUI failing to launch

BFTV
BFTV Posts: 1
edited February 2023 in Linux only

I've been struggling with this on my Lubuntu 18.04 LTS machine for weeks:

Every attempt to launch the TeamViewer GUI from the start menu entry or the desktop icon (both being equivalent to running /opt/teamviewer/tv_bin/script/teamviewer) immediately turns the mouse cursor into a waiting clock. After roughly 25 s of idle time, the cursor returns to its previous shape. That's it. No TeamViewer GUI shows up anywhere.

If you're not interested in all the details, you may skip to SOLUTION/CONCLUSION at the end.


SOME DETAILS TO THIS PROBLEM


Running 'teamviewer' in xterm prints this:

$ teamviewer

Init...

CheckCPU: SSE2 support: yes

Checking setup...

Launching TeamViewer ...

Launching TeamViewer GUI ...

but then fails to actually launch the GUI and terminates roughly 25 s later.


To better understand what's going on, I've tried

$ teamviewer ziplog

but that command stalls - when ^C-ed the next day, there's still no /tmp/tvlog*.zip.


So, teamviewer info gives:

$ teamviewteamviewer info

TeamViewer 15.38.3 (DEB)

grep: /opt/teamviewer/config/global.conf: Permission denied

TeamViewer ID:

Try restarting the TeamViewer daemon (e.g. teamviewer --daemon restart)

teamviewerd status * teamviewerd.service - TeamViewer remote control daemon

Loaded: loaded (/etc/systemd/system/teamviewerd.service; enabled; vendor preset: enabled)

Active: active (running) since Sat 2023-01-28 16:05:42 CET; 3 days ago

Main PID: 31832 (teamviewerd)

Tasks: 14 (limit: 4915)

CGroup: /system.slice/teamviewerd.service

`-31832 /opt/teamviewer/tv_bin/teamviewerd -d

Jan 28 16:05:42 Lubuntu systemd[1]: Starting TeamViewer remote control daemon...

Jan 28 16:05:42 Lubuntu systemd[1]: teamviewerd.service: Can't open PID file /var/run/teamviewerd.pid (yet?) after start: No such file or directory

Jan 28 16:05:42 Lubuntu systemd[1]: Started TeamViewer remote control daemon.

However, this output is NOT indicative of the particular error state we are in, see below.


MOOT SOLUTION ATTEMPTS


Searching online for teamviewerd.service: Can't open PID file gives countless results, from 2010 onwards to very recently, but only very few ideas of (proposed) solutions.

Things that I have tried include:

  • reinstalling teamviewer by aptitude reinstall teamviewer
  • configuring teamviewer setup, followed by systemctl daemon-reload and systemctl stop teamviewerd and systemctl start teamviewerd to restart the daemon
  • fiddling around with $DISPLAY, as suggested by https://community.teamviewer.com/English/discussion/comment/75420#Comment_75420
  • tweaking /etc/systemd/system/teamviewerd.service, as suggested by https://github.com/NixOS/nixpkgs/issues/44307
  • as well as the suggestions from https://stackoverflow.com/questions/63590521/cant-open-pid-file-var-run-teamviewerd-pid-yet-after-start-no-such-file-or (by the way, this particular question was asked just 2,5 years ago and has been "Viewed 15k times" - go figure!).

NONE of them worked for me.

After all, I've come to understand that the PID file opening error might not be the actual culprit, see https://community.teamviewer.com/English/discussion/100804/teamviewerd-service-cant-open-pid-file-var-run-teamviewerd-pid .


SOLUTION


Digging a bit deeper on my own, I've finally found the (simple!) problem here:

Aside from the daemon /opt/bin/tv_bin/teamviewerd -d, one instance of /opt/bin/tv_bin/TeamViewer was already running all the time, without showing any GUI or status bar icon!

My attempts to launch the GUI then started a second /opt/bin/tv_bin/TeamViewer process that consistently disappeared ca. 25 s later. I guess that's due to a timeout of trying to access some resource blocked by the first /opt/bin/tv_bin/TeamViewer process.

I've yet to find out how that dysfunctional state was triggered, but killing the stray TeamViewer process (which required -9) has made TeamViewer fully functional again.

I can now launch the GUI from the start menu or desktop icon, and actually use it, just fine.


CONCLUSION


Should your TeamViewer 15.38.3 (DEB) ever get stuck in the dysfunctional state described above, I hope this post helps you to skip all those dead end journeys, do killall -9 TeamViewer and get back to normal in a minute!


p. s. Alas, I'm not allowed to post links, so I've unlinked the reference URLs. Make sure to copy them accross possible linebreaks.

Comments

  • utz_tcl
    utz_tcl Posts: 1

    Thanks a lot.

    it seems that teamviewer --daemon restartworks too (at least it did on mine)