novnc / noVNC

VNC client web application
https://novnc.com
Other
11.67k stars 2.31k forks source link

No keyboard input accepted #1160

Closed sjau closed 5 years ago

sjau commented 6 years ago

Describe the bug No keyboard input accepted and passed on from host to the VM using the vnc.html.

To Reproduce Steps to reproduce the behavior:

  1. I did add vnc to my xml file by using virsh edit VM

    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'>
      <listen type='address'/>
    </graphics>
  2. I downloaded newest version of noVNc and put it on the same machine as the VM

  3. I did edit the utils.sh to proxy forward to the proper port (5901 in my case)

  4. I open webbrowser and access noVNC and then I connect

  5. I do see the VM running just fine, I can open programs, close them, move them around etc.

  6. However, no keyboard input is transmitted from the browser to the VM.

Expected behavior I expected that keyboard is also transmitted to the vm.

Screenshots

Client (please complete the following information):

Server (please complete the following information):

Additional context Also, how to have the VM autoresize to the browser canvas?

samhed commented 6 years ago

Why are you using such an old version of Firefox?

Can you enable debug logging in noVNC and see if you get any output in the browser console when you press buttons on your keyboard?

Also, how to have the VM autoresize to the browser canvas?

There's a setting called 'Scaling Mode' which has the option of remote resize, if this works however will depend on your VNC server. I don't know if QEMU supports client initiated resize.

sjau commented 5 years ago

Company policy.

How to enable debug?

With the SPICE-HTML5 client the auto-resizing works.

samhed commented 5 years ago

Settings for scaling mode and log level is available in the controlbar. It should appear as a blue little handle on the left side by default.

sjau commented 5 years ago

Weird, now I can't properly connect anymore.

Started it using:

./utils/launch.sh
Using installed websockify at /run/current-ystem/sw/bin/websockify
Starting webserver and WebSockets proxy on port 6080
WebSocket server settings:
  - Listen on :6080
  - Flash security policy server
  - Web server. Web root: /var/www/web/noVNC
  - SSL/TLS support
  - proxying from :6080 to localhost:5901

Navigate to this URL:

    http://subi:6080/vnc.html?host=subi&port=6080

I navigate to https://xxxx:6080/vnc.html?host=xxxx&port=6080

I do get the noVNC Interface.

But when I try to connect, I get in the browser [x] Failed to connect to server and in the terminal I get [myip] - - [19/Nov/2018 14:37:27] code 404, message File not found

I tried to replace host=xxxx with localhost, hostname, and the fqdn. Only when I use the fqdn the above message appears.

samhed commented 5 years ago

perhaps you turned your VNC server off?

sjau commented 5 years ago

What VNC server?

The qemu VM does listen the port, I checked with netstat.

CendioOssman commented 5 years ago

If it's a 404, then it shouldn't have something to do with the VNC server. Something is getting screwed up with the web server portion of websockify.

Do you have the file /var/www/web/noVNC/vnc.html?

samhed commented 5 years ago

No response.