Feature Request Tracker item #3482254, was opened at 2012-01-31 08:47 Message generated for change (Comment added) made by afluegel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126849&aid=3482254&group_id=254363
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Albert Fluegel (afluegel) Assigned to: Brian Hinz (bphinz) Summary: Several enhancements of the Java Viewer of 1.1.0 Initial Comment: The attached patch implements several enhancements to the Java Viewer * Fullscreen mode (real fullscreen in the root window, not just maximize the managed window) * Keepalive mode (to work around certain firewall issues when idle) * Mouse Wheel events supported * Copy/Paste from / to the host system without needing the clipboard window * Handle different keycode sequences on windows 7 correctly * Some rework of the Makefile to really build a working jar by running make in the vncviewer directory The patched version will be incorporated into the webtop software http://sourceforge.net/projects/weblogin soon. ---------------------------------------------------------------------- >Comment By: Albert Fluegel (afluegel) Date: 2012-02-15 07:41 Message: So here comes the jumbo patch to avoid the dead keyboard after deiconify on X11. It adds a call to setVisible in an added deiconifyWindow handler. Built with this superfluous thing i never experienced ignored keyboard strokes. BTW i'd appreciate the Shift-Ctrl-F12 patch for fullscreen toggle be included. Equipped with all the modifications from this tracker thread i'm gonna give this java viewer a try in production. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-14 14:02 Message: Applied the keepalive patch, too, some days ago. As far as i traced, it does, what it should and compiles with both gcj-4.4 and jdk 1.6.0_30 . So the swing timer class should be ok. As said, i don't remember, what the problem was, now it's gone. Made more experiments regarding the lost keyboard, but all measures only change the probability, that the keyboard gets lost. When recreating the window on deiconify it is quite likely, that the keyboard works, but still sometimes it does not ... anyway thanks alot so far ! ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-14 10:45 Message: I agree with the kbd patch and will go ahead and apply it to the trunk. Have you had a chance to test the keepAlives patch? If you're satisfied that it meets your needs I will apply that as well. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-09 07:39 Message: Played a bit with KeyboardListeners but no success. I tried to explicitely re-register the KeyListener method on an uniconify event in a respective method, that was actually executed, but it did not change anything. Iconifying and uniconifying several times activates the keyboard again sometimes. It seems random, whether after an uniconify the keyboard works or not. Found also, that the problem also happens with the older and unpatched Java viewer, but only rarely. Furthermore it does not depend on the java version or whether building with javac or gcj. I remember, that i've seen a very similar problem with the tarantella web login service from Sun, earlier, when it was still usable in the company. Could not reproduce the keyboard deactivation on window resize. So in the end of the day i'd really suspect a still unfixed java runtime problem. If only a workaround could be found ... Another note: the Compose key (or Multi_key) does not work in the Viewer. This also seems to be a general java problem. Neither is the Multi_key event visible in a java program, nor can the resulting character be evaluated (in a KeyTyped event) properly. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-09 04:47 Message: The keyboard gets lost with the unmodified version, too. It does NOT happen when switching fullscreen on and off, but when resizing or uniconifying. Agree, the listener seems to get disabled. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-09 04:35 Message: Yeah, I tried it yesterday and saw both of those issues as well. I'll have to take a nother look at the new patch. The keyboard issue sounds like maybe the keylistener was removed. I don't know if this is an artifact of fullscreen exclusive mode or what. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-09 03:14 Message: sorry there was a bug in the patch always switching to fullscreen. Uploaded again. New problem: on windows-7 having switched to fullscreen then pressing F8 the menu is not visible because in the background behind the viewer window. i have no idea how to fix this. Probably some hotkey combination should be implemented to leave fullscreen mode or in general leave fullscreen when pressing F8. In my patch to 1.1.0 i had implemented Shift+Ctrl+F12. I don't know, whether commenting out the toggleFullscreen like explained in the previous posting is really appropriate and i can hardly judge. So please feel free to decide. Main thing is imo, that it just works. Still no idea regarding the problem with the keyboard. When resizing or iconifying and restoring the viewer window, no key has an effect in the window anymore on Linux or Solaris ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-08 08:35 Message: So with that change, full screen mode works in Linux even without changing the compiz setting? That would be great... Thanks! ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-08 08:20 Message: Found the reason, why i've always seen a decorated and managed window in Linux: In the listener for frame events componentResized the method cc.toggleFullScreen is called. The problem seems to be, that when issuing the switch to full screen, this method is called and immediately reverts the switch to full screen mode. I'm a bit surprised, that this does not end up in an endless loop. However, i commented this line out (contained in the uplaoded file) and now fullscreen mode on LInux worked like expected. Additionally i added the calls to switch to exclusive mode like shown in the Java programming documentation. Nonetheless certain keyboard combinations are still bypassed unlike with the binary vncviewer. Strange. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-07 08:41 Message: Full screen mode works on Linux as well, but only of you set compiz to allow legacy full screen mode. Annoying... Google "java compiz fullscreen" and you can find instructions for changing the setting. I'll look at those other issues tonight, thanks for the feedback. Also, DRC changed my role yesterday so that I can attach files now. I'll attach the keepAlives patch when I get home tonight. I guess by default only the original submitter and admins have that permission? ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-07 07:43 Message: Forgot to mention: On w2k3 i saw a java.lang.IllegalArgumentException after authentication. In the recent uploaded file this exception is caught just ignoring the result (last patch section). Works on windows-7 and w2k3. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-07 07:39 Message: I'm impressed. Most of the patches are actually obsolete. Fullscreen mode works mostly like expected, but only on windows (2k3 or 7). However i verified, that e.g. Alt-Tab is failing. On X11 the full screen mode implementation still remains a managed window. The new uploaded file fixes the problems with the AltGr key on windows with German keyboards. One thing is strange: the KeyPress event contains Shift + { to make { , but the KeyRelease event contains Shift release and [ release on windows 7 (on w2k3 it's consistent). Probably a windows-7 quirk. And i observed another strange thing: After iconifying on X11 and restoring the window, the keyboard is dead. The mouse still works, the keyboard does not. Any keystroke is ignored !?! Will try to find out, what's wrong here when i find the time. Suspect a Java issue. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-06 10:03 Message: > As far as i remember i ran into issues with the swing timer class with > older Java. However, if it works now ... All the more reason to hold it back from 1.2 I guess. I did not see any issues in the (limited) testing that I performed however. The timer was clearly sending the dummy framebuffer update requests at the specified interval in the absence of application data, and the dummy requests did not seem to present any issues for the server. > e.g. Alt-F3 or Alt-Tab. It requires exclusive mode to get them effective Are you sure? ALT+TAB works for me. There are keycodes that do get grabbed by the window manager (like the one in WindowsXP that opens the windows desktop manager, or whatever it's called). I was under the impression that some of those could not be bypassed, but if exclusive mode does that it would be great. I will try to look at this some more ASAP but it probably won't be for a few days. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-06 08:41 Message: As far as i remember i ran into issues with the swing timer class with older Java. However, if it works now ... Full screen: the unconvenient thing is, that keyboard shortcuts regarding window management are caught by the outside window manager and processed e.g. Alt-F3 or Alt-Tab. It requires exclusive mode to get them effective inside the viewer Applet Code: Ok it works. The Server parameter must be set and the port parameter left unset. Thanks so far !!! Hope i find the time to check the keyboard related stuff tomorrow. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-05 20:56 Message: I patched the trunk version to add keepalives support, but I'm going to hold on committing it until 1.2 is branched (I would attach a patch file here if I could...). It's a slightly different implementation using a javax.swing.Timer and restarting the timer whenever a framebufferUpdate, keyEvent, or mouseEvent occurs. I tested it out and it seems to work as expected. The timing here is somewhat unfortunate because it's probably just a little too late for this to make it into the 1.2 release and the trunk may be a little too unstable for your purposes. So you might have to back-port into 1.2 or continue on with 1.1 and your original patch, at least for the short term. As for the remaining issues: * Mouse wheel events and cut/copy/paste are already supported in the 1.2+ viewer * CMake is our build system of choice, so I don't anticipate changes in that regard. * Please try out fullscreen mode with the new viewer. I realize that it's not true fullscreen-exclusive mode, but it may be sufficient for now. * Applet mode - I have not had a chance to look at this yet, but have you tried the -server parameter specified as server::port? * Key modifiers - AFAIK the CTRL+SHIFT+... modifiers are all working, although I cannot say either way about the German keyboard issue. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-03 05:00 Message: It's no problem. Thanks. The keepalives should be very easy to implement and I'll try to get to that this weekend. I only use applet mode very rarely, but it should honor the parameters supplied via the html request. I will try to duplicate the problem and correct as necessary. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-03 03:09 Message: Sorry sorry sorry Mr. Hinz i misunderstood you. Please forgive me, i'm not a native speaker. And of course there's no problem that things take time when volunteering. Same happens to me now: won't find the time this week to merge into 1.1.90. The changes seem to be bigger then to 1.1.0. I'd really like to know, whether the impossibility to change the VNC server when running as applet is my fault or some kind of bug. ---------------------------------------------------------------------- Comment By: D. R. Commander (dcommander) Date: 2012-02-02 20:44 Message: I'm having the same problem with downloading SourceForge tracker attachments. I think it's a SF bug, as it magically started happening a week or so ago, and I haven't changed anything in my browser. The same bug seems to happen whenever I try to wget the attachment as well. However, for me, it works when I use Safari rather than Firefox. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-02 20:40 Message: > ... I smell what > this is going to be again as usual: Maintainer: "Why is that needed ? I > think it's not needed. I won't implement that". So i'll have to apply my > local patch forever or let the implementation die ... Huh? I said that I have no problem with it at all. I don't get paid to do this. If it takes me a couple days to get it done then that's the price of free software. I would think that as a FOSS project maintainer yourself that you would understand. As for the patch file, I tried downloading it three times last night and got nothing but some kind of html as well. If you want, you can email it to my sourceforge users account (bphinz). ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-02 19:07 Message: Keepalives: Sure it should be optional and is a parameter "Keepalive" to be given in seconds. The rate of the normal TCP keepalive is afaik a system wide setting and by default once in 2 hours, what is far too long for our case and normally one does not want to change such a system wide setting. So i did not see an alternative to an application level keepalive. I smell what this is going to be again as usual: Maintainer: "Why is that needed ? I think it's not needed. I won't implement that". So i'll have to apply my local patch forever or let the implementation die ... Regarding 1.1.90: When running it as applet in a browser, i did not manage to change the VNC server. It's seems to be always the loopback address. Neither the parameter "host" nor "server" did help. Shortly looking at the code it seems to me (not sure), that after evaluating the parameter, the server is later unconditionally set. When trying to download the uploaded file i observed a strange thing: Had to do it several times to receive the correct file contents. Most times i get some HTML data containing java script to download statistics or what. Clicking the checkbox on the left seems to help somewhat, but not sure. I guess this is a sourceforge bug. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-02-01 07:48 Message: I haven't looked at the patch yet but will do so tonight. Thanks. Regarding keepalive: Shouldn't be a problem, we're already disabling Nagle's algorithm and keepalive is set the same way. Unlike TcpNoDelay, I'd like keepalives to be a runtime option rather than the default. Regarding the keycodes: I don't think this is the case with the new viewer, I use CTRL+SHIFT+t to open tabs in Gnome all the time. However, I think that internationalization in general is a major deficiency with the java client. Unfortunately I have zero experience with it and tend to allocate my time towards issues that directly affect me, so all that I can say for now is that it's on the radar... (I'll gladly accept patches though) ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-02-01 02:00 Message: Uploaded the patch again. Looks better now. Regarding keepalive: We have partners working through a web proxy, firewall and DMZ with the mentioned weblogin implementation. Their firewall drops a connection after few minutes of inactivity. This is not crucial as the session persists, but annoying and can be avoided switching on the keepalive. It regularly sends requests for almost empty screen updates, so the additional overhead is small. Regarding the keycodes: Unlike on older windows versions it turned out, that with combinations of Ctrl + Shift + a character key on windows 7 a lowercase VNC key event is sent to the VNC server. The server sees the lowercase character and thus adds a key release event of the shift key before sending the character key event to the X11 client application. So the Shift key has no effect (bad e.g. for gnome-terminal to open a new tab with Ctrl+Shift+t or paste using Ctrl+Shift+v). The solution is to send an uppercase character VNC key event to the VNC server. And the ill AltGr combinations on German keyboards did not work. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-01-31 14:32 Message: The 1.1.90 client does build on RHEL4 and RHEL5, but probably not with gcj. It should build fine against openjdk or Sun jdk, but as you mention, it does require a JDK version >= 1.5. The primary reason for the generics arrays is simply for code symmetry between the java and C clients, so no they are almost certainly not required, but with the emergence of openjdk I would question the value of changing things just to support gcj. The command line arguments have changed, ideally they are all consistent with the new FLTK viewer. Can you elaborate on the keepalive and keycode issues? Please do post the patch, I would definitely be interested in true fullscreen exclusive mode support. ---------------------------------------------------------------------- Comment By: Albert Fluegel (afluegel) Date: 2012-01-31 12:32 Message: I plan to do the merge into 1.1.90 later this week. Unfortunately i don't have access to the patch right now, have to re-post it tomorrow when at work. I shortly looked into the 1.1.90 and found, that the mouse wheel is working now. On the other side, a special make (cmake) is required, so i built manually. I plan to add a standard makefile to be able to build on vanilla Linux with javac or GNU gcj. gcc-4.4 is required, so at least Redhat-6. On Redhat-5 it does not build and surely not on other a bit older linuxes. I'd like to check, whether it's really necessary to use a generics list array, cause this is the blocking point to compile with gcc-4.1. Fullscreen mode in 1.1.90 is as far as i've seen, when running the program, actually just a maximize of the window and not really fullscreen mode with global focus. Furthermore the commandline arguments have changed. I hope that when calling from HTML things work like before. I haven't seen a hint, that keepalives are supported in 1.1.90. I guess the problems with the keycodes on windows 7 are fixed, but i did not try yet. Will upload the 1.1.0 patch tomorrow. Anyway thanks for your support ! Though i'm posting changes since years regarding many programs this is the first time, that i get the feedback, that someone is willing to incorporate a change. Thank you ! ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-01-31 12:02 Message: I didn't notice at first that this is against 1.1. Have you looked at the new viewer in trunk? I think many of these features are implemented, but I'd still be interested in seeing your patch and merging what we can. ---------------------------------------------------------------------- Comment By: Brian Hinz (bphinz) Date: 2012-01-31 09:05 Message: Can you re-attach that patch file, it doesn't seem to have uploaded correctly. Thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126849&aid=3482254&group_id=254363 ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Tigervnc-devel mailing list Tigervnc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-devel