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

tigervnc references /usr/bin/ssh for launching tunnel #29003

Closed
jasom opened this issue Sep 4, 2017 · 6 comments · Fixed by #29084
Closed

tigervnc references /usr/bin/ssh for launching tunnel #29003

jasom opened this issue Sep 4, 2017 · 6 comments · Fixed by #29084
Milestone

Comments

@jasom
Copy link
Contributor

jasom commented Sep 4, 2017

Issue description

The tigerVNC vnc client can tunnel over ssh, but does so defaulting to /usr/bin/ssh as the path to the ssh client

Steps to reproduce

tigervnc -via user@host localhost:0

Will display sh: /usr/bin/ssh: No such file or directory

Technical details

  • System: NixOS 17.03.1775.56da88a298 (Gorilla)
  • Nix version: nix-env (Nix) 1.11.13
  • Nixpkgs version:17.03.1775.56da88a298
  • Sandboxing enabled: false
@vyp
Copy link
Member

vyp commented Sep 4, 2017

Does adding either -SSHClient /run/current-system/sw/bin/ssh or -extSSHClient /run/current-system/sw/bin/ssh to the command work?

@jasom
Copy link
Contributor Author

jasom commented Sep 5, 2017

@vyp I didn't try that, but VNC_VIA_CMD='/run/current-system/sw/bin/ssh -f -L "$L":"$H":"$R" "$G" sleep 20 does work, which is the documented way of handling this.

@vyp
Copy link
Member

vyp commented Sep 5, 2017

I see, where is that documented?

The reason I asked that is because it seemed like /usr/bin/ssh was set as a default parameter value here, so I thought this could just be patched in nixpkgs.

@Mic92
Copy link
Member

Mic92 commented Sep 5, 2017

Just add to the package and make a pull request:

postPatch = ''
  substituteInPlace ava/com/tigervnc/vncviewer/Parameters.java \
   --replace '/usr/bin/ssh' '${ssh}/bin/ssh'
''

@jasom
Copy link
Contributor Author

jasom commented Sep 5, 2017

@vyp It's documented in the tigervnc manpage for vncviewer.

I'm 99% certain it's not in that Java file, but in this C++ file:

https://github.com/TigerVNC/tigervnc/blob/82e753d4e1928342c82cc7b82e854aa2666d1145/vncviewer/vncviewer.cxx#L422

@vyp
Copy link
Member

vyp commented Sep 6, 2017

@jasom import openssh and try the following:

postPatch = ''
  substituteInPlace vncviewer/vncviewer.cxx \
   --replace '"/usr/bin/ssh' '"${openssh}/bin/ssh'
''

@globin globin added this to the 17.09 milestone Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants