Skip to content

Compiling Websockify as Windows Executable (not working nowadays)

Cuningan edited this page Mar 20, 2018 · 1 revision

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.

NOTE: If you get the error: 'module' object has no attribute 'SIGCHLD', the fix for issue 108 hasn't been included yet.

  1. Clone websockify (.zip)

  2. Install Portable Python 2.7

  3. Modify setup.py:

    from setuptools import setup, find_packages
    # add (line 2):
    import py2exe
    

    ...

    setup(name=name,
    # add (line 10):
          console=['run'],
    
  4. Compile websockify including numpy using following command in command prompt (navigate to websockify folder first)

    [full path of Portable Python install]\App\python.exe setup.py py2exe --includes numpy

  5. In the websockify folder you will now have a new folder 'dist' which contains the compiled exe, eg.

    run.exe 5901 localhost:5900

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

Clone this wiki locally