Skip to content

Compiling Websockify as Windows Executable

jfluhmann edited this page May 11, 2012 · 2 revisions

This quick guide provides instructions on how to compile websockify as a Windows application which does not require Python and associated modules to be installed to run. I found this is quite useful as we wished to deploy noVNC to a large number of PC's. To spread the load of running websocket servers we identified running the websocket server on the same PC as the VNC would provide better performance.

On the PC you are using to compile websockify.

  1. Download and install Python 2.7 (python.org).

  2. Download and install Numpy module for Python 2.7 (http://numpy.scipy.org/).

  3. Download and install py2exe (http://www.py2exe.org).

  4. Download noVNC and extract to folder. Navigate to noVNC root folder/utils/.

  5. Create a new file: setup.py

  6. Add the following to setup.py:

from distutils.core import setup import py2exe

setup(console=['websockify'])

  1. Compile websockify including numpy using following command in command prompt (navigate to noVNC utils folder first).

C:\Python27\python.exe setup.py py2exe --includes numpy

  1. In the utils folder you will now have a new folder 'dist' which contains the compiled exe which you can run exactly as you would run the websockify eg.:

websockify.exe 172.16.0.1:5901 172.16.0.5900

Optionally you might also wan't to run compiled websockify executable as Windows service. If so see this guide: Windows Websockify Service Readme

Clone this wiki locally