noVNC icon indicating copy to clipboard operation
noVNC copied to clipboard

How can I run noVNC without frontend / webpack server

Open vkWeb opened this issue 9 months ago • 1 comments

I am building my frontend entirely on Django templates (pure HTML, CSS, JS). I want to use noVNC. I am unwilling to bring in webpack just to use noVNC. Here's how I converted noVNC to be used via browser's script tag --

  1. Did npm install to get the lib.
  2. Then did browserify rfb.js -o bundle.js .
  3. Included bundle.js in script tag via <script src="{% static 'bundle.js' %}"></script>.
  4. Now, I am unable to use RFB on my other script tags. Is there any other object that I should use?

I can see a lot of potential people wanting to do what I am trying to achieve. There must be a way out, let's figure it out together. Thanks for your work on noVNC guys!

vkWeb avatar May 08 '24 13:05 vkWeb

noVNC does not need to be converted to be used in a browser as it is natively written for that. So my first suggestion would be to use the normal noVNC code from here, rather than the CommonJS version from npm.

That said, what you are doing should work. What error are you getting?

CendioOssman avatar May 16 '24 15:05 CendioOssman

@CendioOssman I embedded the noVNC application itself using an iframe into my web app. I'm liking the noVNC application itself. So, for now I am moving forward with using the noVNC application.

Thanks for your reply and your work on noVNC and VNC in general since 2000s era (tiger-vnc era days)!

<3

vkWeb avatar May 24 '24 02:05 vkWeb