-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Turbovnc 3.0 and session manager problems #211
Comments
That's the first problem. The session manager works through SSH, so it has to know the location of TurboVNC on the server. If TurboVNC isn't installed in the default location (/opt/TurboVNC) on the server, then you have to inform the viewer where it is installed. You can do that by setting the
The pre-release page contains a link to the pre-release documentation:
Confirmed but not sure why. Maybe the GitHub search isn't searching the dev branch. It clearly shows up when doing
It works for me. If I pass that argument to vncviewer.bat along with
See above. Not sure why GitHub searches aren't finding the dev branch.
Passing
Yikes. Not sure why that's happening. I'll double check some stuff. Can you try again with the
Oops. The viewer should already do that, but apparently it doesn't. I'll look into it.
That's good feedback. I'll add a system property for this.
You can do that by passing
See above RE: Thanks for the valuable feedback. I'll look into the issues you described. |
More notes:
|
Referring to the com.jcraft.jsch.KnownHosts.add() method, JSch will not prompt to create the known_hosts file unless that path was previously set using com.jcraft.jsch.KnownHosts.setKnownHosts(). The Java TurboVNC Viewer did not call setKnownHosts() unless the known_hosts file existed and was readable. That was an oversight that has apparently existed in our Java viewer code ever since it was ported from TigerVNC, and the TigerVNC code still contains the same oversight. Refer to #211
This has been fixed in both master (2.2.x stable) and dev (3.0 evolving.) It was a legitimate bug.
Added a new Java system property ( |
...but i think i understood why it happened; it depends on the commands every user executes by default in his login script.
-EDIT2- |
I'll look into that, now that I have a way to reproduce the issue.
We already have such a configuration file-- /etc/turbovncserver-security.conf (the TurboVNC Security Configuration File.) It should be possible to implement your suggestion by using the proc API on Linux, which would allow Xvnc to determine how many instances of itself are already running under the current user account. The only hitch is that it may not be possible to distinguish between a TurboVNC session and other VNC sessions (TigerVNC, RealVNC, etc.) I've added a new feature request for this (#213), which is marked "funding needed". |
I tried several things in order to work around the parsing error:
I am at a loss for how to proceed. It does appear as if the final solution will require either:
|
I think I found a way to do it, by remotely invoking Bash with |
SSH executes the user's shell startup script (e.g. .bashrc) before executing any other commands on the host, and if the shell startup script outputs anything to stdout or stderr, the Session Manager parser cannot distinguish that output from the expected output of the TurboVNC Server. There are only two possible solutions to this problem, AFAICT: (1) Execute remote commands via SSH without executing the shell startup script. Unfortunately, this does not seem possible, since Bash ignores the --norc argument if the shell is non-interactive. (2) Separate the output of the TurboVNC Server commands from other output. This commit implements (2) by (a) filtering all remote TurboVNC Server commands through a sed script that prepends every line of the output with "[TURBOVNC] ", thus providing a way for the Session Manager parser to clearly distinguish between TurboVNC Server output and other output (b) executing all remote TurboVNC Server commands using 'bash' with 'set -o pipefail', which ensures that the exit status will be set based on the exit status of the TurboVNC Server command, not the exit status of sed. Refer to #211
As far as I can tell, all issues described in this bug report have been fixed. Unfortunately, Travis seems to have eaten my synced repositories, so there is no pre-release build with these changes yet, but they have been checked into the dev branch. I'll post up here when a PR build is available. When it is feasible to do so, please re-test and let me know if something is still broken. I also welcome any further feedback regarding the intuitiveness of the interface, as well as any further ideas regarding how to filter the output of .bashrc when invoking commands via SSH. |
Pre-release build is up |
All seems to work flawlessly. |
The Session Manager, in its current form, is intended to automate the existing TurboVNC workflow, and the existing workflow provides no way to distinguish sessions other than by their display numbers. Thus, your ideas are all very useful, and I've added them to #148, but they probably won't make it into the initial release of the Session Manager. However, you bring up a good point, which is that the |
To continue this: #210
This is my attempt:
went to: https://turbovnc.org/DeveloperInfo/PreReleases.
downloaded:
TurboVNC-2.2.80-x64.exe
turbovnc-2.2.80-jws.zip
turbovnc_2.2.80_amd64.deb
1 Linux side (debian 9)
uncompressed .deb archive in the test user home folder
started ./opt/TurboVNC/bin/vncserver and set password as requested
2 Windows side:
install TurboVNC-2.2.80-x64.exe as domain administrator
logged in via test user
started turbovnc and connected to the server
he asked me abouy rsa key trust, hitted yes
got the familiar ssh banner in a Window, hit ok, asked me for a password
said me he cannot execute /opt/TurboVNC/vncserver -sessionlist
3 Linux side
stopped vncserver execution
modified vncserver script to echoing the exedir and it said opt/TurboVNC/vncserver (no leading slash)
noticed the hadrcoded: $vncClasses = "/opt/TurboVNC/java"
modified to the hardcoded $vncClasses = "/home/BIOLOGIA/iostudente/tvnc/deb/opt/TurboVNC/java"
4 Windows side
Tried again as in #2, same error.
I'd rather prefer to not touch what is working now on the server and i think that "/opt/TurboVNC/vncserver -sessionlist" is hardcoded in the viewer (?)
4 Windows side
tried to get some help from the documentation, found nothing.
searched for "sessionlist" in github repo, found nothing (?)
tried to pass -nosessmgrauto to vncviewer.bat, seems to have no effect
searched for "nosessmgrauto" in github repo, found nothing again (?)
modified the .bat, last line ->
-> start /b "" "%JAVAW%" -Dsun.java2d.d3d=false -Djava.library.path="%~d0%~p0java" -jar "%~d0%~p0java\VncViewer.jar" -nosessmgrauto -reqarch amd64 %*
tried again: same message.
Where am i supposed to pass args? and where to get a list of supported ones?
5 Linux side
root:
# mv /opt/TurboVNC /opt/TurboVNC.backup
# cp /home/BIOLOGIA/iostudente/tvnc/deb/opt/TurboVNC /opt/ -a
test user (iostudente):
/opt/TurboVNC/bin/vncserver
6 Windows side:
Tried again and finally got something new, but not what i expected:
Seems an error in parsing something to me.
Apart from the obvious:
If i start: /opt/TurboVNC/bin/vncserver -sessionlist
i get what seems correct, just /opt/TurboVNC/bin/:1
The text was updated successfully, but these errors were encountered: