Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teamviewer 13 doesn't accept connections on NixOS on 18.09 with KDE Plasma/sddm while logged in #51320

Closed
johnalotoski opened this issue Dec 1, 2018 · 9 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@johnalotoski
Copy link

johnalotoski commented Dec 1, 2018

Issue description

After upgrading from 18.03 to 18.09 on NixOS, Teamviewer no longer functions properly when trying to make an incoming connection to NixOS with Teamviewer 13.1.3026 installed.

Steps to reproduce

Upgraded to NixOS 18.09 from 18.03, installed Teamviewer on NixOS 18.09 via having the following in the /etc/nixos/configuration.nix file (this config was the same for both 18.03 and 18.09):

  services.teamviewer.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.enable = true;

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 4.14.79, NixOS, 18.09.1228.a4c4cbb613c (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(root): "nixos-18.09.1228.a4c4cbb613c"
  • channels(user): "nixosuser-18.09.1228.a4c4cbb613c, nixpkgs-19.03pre158005.32340793aaf"
  • nixpkgs: /home/user/.nix-defexpr/channels/nixpkgs

Other Notes

  • Connections from NixOS to other Teamviewer computers works as expected. Only incoming connections to NixOS are a problem.

  • When connecting from another computer to NixOS 18.09 with Teamviewer with the user being logged in already on the NixOS box, the connection doesn't error out, but just shows an on-going "Connecting message" or spinning activity icon without ever showing anything else or completing the connection. During the "Connecting message" or spinning activity icon from the box trying to make the inbound connection to the NixOS system, the logfiles of Teamview 13 on NixOS don't show anything of particular interest. For example, this is all I observed during an inbound connection attempt:

2018/12/01 10:32:46.903  4835 139905296475904 GX0   Connection incoming, sessionID = -818000232
2018/12/01 10:32:58.269  4835 139903579100928 GX0   XClipboard: RequestClipboard as TARGETS (320)
2018/12/01 10:32:58.272  4835 139903579100928 GX0   XClipboard: RequestClipboard as text/html (547)
2018/12/01 10:32:58.272  4835 139903579100928 GX0   XClipboard: RequestClipboard as UTF8_STRING (385)
2018/12/01 10:32:58.273  4835 139903579100928 GX0   XClipboard: Got clipboard as 'text/html', size (n=134, c=134)
2018/12/01 10:32:58.274  4835 139903579100928 GX0   XClipboard: Got clipboard as 'UTF8_STRING', size (n=25, c=50)
  • When connecting from another computer to NixOS 18.09 with Teamviewer with no users being logged in already on the NixOS box (just the sddm login prompt screen showing), the connection does complete and the login screen can be observed remotely, but nothing can be typed into the login box to login remotely.

  • Using either Teamviewer 13 or 14 on the system trying to remote connect inbound to the NixOS box with Teamviewer 13 makes no difference in the outcome.

@Mic92
Copy link
Member

Mic92 commented Dec 2, 2018

Not sure what goes wrong with teamviewer and it should be probably better fixed. However as a alternative I can also recommend xrdp: https://github.com/Mic92/dotfiles/blob/master/nixos/vms/eddie.nix#L95 and using some remote desktop software such as remmina. This does not work well with firewalls without additional setup. However one can use a vpn, ngrok or even Tor.

Still teamviewer is quiet helpful when supporting friends and family on their windows machines so hopefully someone finds a fix.

@johnalotoski
Copy link
Author

Thanks for the comment @Mic92 -- I'll take a look into those alternatives!

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@tobiasBora
Copy link
Contributor

tobiasBora commented Jul 2, 2020

Any news on that bug? I cannot even get an ID number and it is quite annoying.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 2, 2020
@tobiasBora
Copy link
Contributor

Hum, for some reasons it seems to depend on which network I am, and it is not very deterministic. Yesterday I tried on a first network, and it took on average maybe 1mn to pick an ID (and another teamviewer on xubuntu 20.04 was also having troubles to get an ID). I tried today on another network and it gets an ID directly, so I guess in my case it is more an upstream issue. I however don't know why it was working directly when teamviewer was running inside a VM, maybe teamviewer was disturbed by my VPN...

@Mic92
Copy link
Member

Mic92 commented Aug 26, 2020

It at least seems to work in the other direction. I am able to connect to windows machines from NixOS.

@tobiasBora
Copy link
Contributor

tobiasBora commented Aug 26, 2020

Hum, I think I understood what happend in my case. Indeed, I just installed latest teamviewer from nixos unstable, and it was not able to get any ID. So I tried to kill all process with:

sudo pkill teamviewer*
sudo pkill Team*

and restart, still same issue. I then uninstalled teamviewer, and reinstalled the stable version (5.1)... and now it was broken! I then realized that there is a teamviewer service that was dead:

systemctl status teamviewerd.service 
● teamviewerd.service - TeamViewer remote control daemon
   Loaded: loaded (/nix/store/yb24vfhlksjigihk46w5qchqzivp58p7-unit-teamviewerd.service/teamviewerd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2020-08-26 21:57:15 CEST; 5min ago
 Main PID: 4017 (code=exited, status=0/SUCCESS)
       IP: 832.3K in, 916.8K out
      CPU: 47.531s

août 25 09:28:10 bestos systemd[1]: Starting TeamViewer remote control daemon...
août 25 09:28:10 bestos systemd[1]: teamviewerd.service: Can't open PID file /run/teamviewerd.pid (yet?) after start: No such file or directory
août 25 09:28:10 bestos systemd[1]: Started TeamViewer remote control daemon.
août 26 21:57:15 bestos systemd[1]: teamviewerd.service: Succeeded.
août 26 21:57:15 bestos systemd[1]: teamviewerd.service: Consumed 47.531s CPU time, received 832.3K IP traffic, sent 916.8K IP traffic.

so I tried to restart that service, and I ran again the stable teamviewer:

$ sudo systemctl start teamviewerd.service 
$ sudo systemctl status teamviewerd.service 
● teamviewerd.service - TeamViewer remote control daemon
   Loaded: loaded (/nix/store/yb24vfhlksjigihk46w5qchqzivp58p7-unit-teamviewerd.service/teamviewerd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-08-26 22:09:36 CEST; 2s ago
  Process: 25468 ExecStartPre=/nix/store/h5v8dz4w0pd01sqll0sb6nf295661p15-unit-script-teamviewerd-pre-start (code=exited, status=0/SUCCESS)
  Process: 25470 ExecStart=/nix/store/g3w0kh288xpcznpqn23by06s2zvzrd9r-teamviewer-15.1.3937/bin/teamviewerd -d (code=exited, status=0/SUCCESS)
 Main PID: 25472 (.teamviewerd-wr)
       IP: 0B in, 0B out
    Tasks: 19 (limit: 4915)
   Memory: 3.8M
      CPU: 100ms
   CGroup: /system.slice/teamviewerd.service
           └─25472 /nix/store/g3w0kh288xpcznpqn23by06s2zvzrd9r-teamviewer-15.1.3937/bin/teamviewerd -d

août 26 22:09:36 bestos systemd[1]: Starting TeamViewer remote control daemon...
août 26 22:09:36 bestos systemd[1]: teamviewerd.service: Can't open PID file /run/teamviewerd.pid (yet?) after start: No such file or directory
août 26 22:09:36 bestos systemd[1]: Started TeamViewer remote control daemon.

and after a few seconds, teamviewer 5.1 connects!

Now, if I try to run teamviewer 15.5.6 (from unstable) when the service that targets teamviewer 15.1 is run (or if no service at all is run), I can't get any ID. But, if I kill the service and manually start the teamviewer daemon as root (if I don't run it as root, the daemon just stops directly, I don't know if it's normal or not), it works:

nix-env -iA nixos-unstable.teamviewer
sudo pkill teamviewer*
sudo pkill Team*
sudo teamviewerd -d
teamviewer
# It can connect!

So maybe my initial issue was that for some reasons the teamviewer daemon was not started, no idea why (maybe I killed it, or maybe it's not started during the first install?).

But there is still one issue: when we install teamviewer directly as a normal user with nix-env -iA nixpkgs.teamviewer and run teamviewer, I don't think it starts any daemon, so it means that the user need to manually run it with sudo teamviewerd -d (by the way, does anyone knows why on ubuntu/... you don't need to type the root password when starting teamviewer?). Maybe we should put in the wrapper a line that checks if the daemon for the current teamviewer version is started, and if not start it?

-- EDIT --
At least, I just realized that it's documented in the wiki that nix-env won't provide a working teamviewer. Maybe it could be a good idea to fix it?

@stale
Copy link

stale bot commented Feb 23, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Feb 23, 2021
@Artturin
Copy link
Member

Closing teamviewer related issues due to #140076 likely fixing most of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

4 participants