============================ Java VNC: VNC Viewer in Java ============================ About ===== Java VNC is a fork of tigerVNC. The most noteable difference is support for extended key events (supported by KVM). Extended key events is a lossless way of sending key events over the wire. That means only the keyboard language of the host OS has an effect on the resulting key character. Installation ============ To run Java VNC you must have the follow installed: * Java * Python 2.5+ (for devel. server that serves applet) There are two basic ways to run Java VNC: 1. Run the applet $ make runserver Point browser to localhost:8000 2. Run the viewer as a standalone application. $ make $ java -jar vnc.jar HOST localhost PORT 5900 Keyboard Handling ================ VNC is notoriously bad at providing the same keyboard output at the server that was input at the client when using non-US keyboard languages. This is because keyboard events are sent in a lossy encoding. See http://berrange.com/posts/2010/07/04/more-than-you-or-i-ever-wanted-to-know-about-virtual-keyboard-handling/ for a thorough probe of this, go read that post if you want to understand the following part. When the server and client support lossless key events, known as extended key events, the key code has effect, and not symbols. That means it's the keyboard language of the virtual machine OS that decides which symbols to output, and neither the host OS nor client OS! A VNC server which incorporate lossless key events, known as, extended key events, is incorporated into qemu/kvm. The Java VNC client supports extended key events when available at the server. That means, when the server supports it, it's possible to output all special characters at the virtual server. *Mac:* The special Alt Gr modifier is not available on Mac keyboards. That key is mapped to Alt + Ctrl. In addition, many special characters are placed entirely different on Mac keyboards compared to anything else. To get these special characters you need to type on the keyboard as if it were a keyboard on the virtual machine OS. For instance if you run VNC client on the MAC is connected to a linux server with danish keyboard layout: | = Alt + Ctrl + ' \ = Alt + Ctrl + < @ = Alt + Ctrl + 2 Snow Leopard contains a bug that makes it impossible to type backslash with Alt + Ctrl + < In that case: \ = Alt + < *All:* The client OS might intercept Ctrl + Alt + Delete. Instead type Ctrl + Alt + Backspace. key code/event mappings for local keyboard layouts ------------------------------------------------- In brief: A vm, running inside qemu/kvm, has access to a standard IBM PC (US layout) emulated keyboard. Local keyboard layouts can be emulated by setting desired layout in guest OS (which does the mapping from standard US-layout). Now, depending on what physical keyboard is used on the client side: * us/us-international - keycodes can be mapped directly to the emulated keyboard. Us-international layout supports AltGr, so it should work just fine with most local layouts mapped in the guest OS. * local-layout - key codes do not match IBM PC/US-layout keyboard emulated by kvm and have to be mapped to US-layout first (and yes - then mapped back by the guest OS...) The vnc client contains mappings for several popular keyboard layouts. Please note that these mappings are only useful when physical keyboard with given layout is attached (ie. not when the layout is only emulated in higher layers).