Comments (26)
@sonicnkt: I managed to create an exe (from the Node.js version) so you don't need to install Node.js and the components.
These are the steps (I never used Node.js before, so I am pretty sure there is a shorter solution):
-
Install NodeJS (the default global installation path is: %AppData%\npm, %AppData%\npm-cache)
-
Install required components, run:
- npm install -g express
- npm install -g optimist
- npm install -g policyfile
- npm install -g ws
- npm install -g http-server
- npm install -g mime-types
- npm install -g pkg
-
Create a folder named "websockify" under "%AppData%\npm\node_modules" and copy the contents of folder "websockify\other\js" in it.
-
Run (documentation of arguments -> https://www.npmjs.com/package/pkg): pkg "%AppData%\npm\node_modules\websockify\websockify.js" --targets "latest-win-x86,latest-win-x64" --out-path "your output folder"
from websockify.
That works well for me too. Tested on Windows 10 and with noVNC + TigerVNC Windows server.
from websockify.
@doriwal I notice you closed the issue. Does that mean you figured it out?
from websockify.
No its an open issue
On 2013 2 18 00:34, "Joel Martin" [email protected] wrote:
@doriwal https://github.com/doriwal I notice you closed the issue. Does
that mean you figured it out?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-13698686.
from websockify.
I reopened the issue as it wasnt solved
from websockify.
looks like my local novnc is working ,
I just run the tests like http://localhost:6080/tests/base64.html
and the response is
onload
PASS: 'window.btoa("hello world")' returned expected 'aGVsbG8gd29ybGQ='
PASS: 'window.btoa("a")' returned expected 'YQ=='
PASS: 'window.btoa("ab")' returned expected 'YWI='
PASS: 'window.btoa("abc")' returned expected 'YWJj'
PASS: 'window.btoa("abcd")' returned expected 'YWJjZA=='
PASS: 'window.btoa("abcde")' returned expected 'YWJjZGU='
PASS: 'window.btoa("abcdef")' returned expected 'YWJjZGVm'
PASS: 'window.btoa("abcdefg")' returned expected 'YWJjZGVmZw=='
PASS: 'window.btoa("abcdefgh")' returned expected 'YWJjZGVmZ2g='
PASS: 'window.atob("aGVsbG8gd29ybGQ=")' returned expected 'hello world'
PASS: 'Base64_decode("aGVsbG8gd29ybGQ=")' returned expected 'hello world'
PASS: 'window.atob("YQ==")' returned expected 'a'
PASS: 'Base64_decode("YQ==")' returned expected 'a'
PASS: 'window.atob("YWI=")' returned expected 'ab'
PASS: 'Base64_decode("YWI=")' returned expected 'ab'
PASS: 'window.atob("YWJj")' returned expected 'abc'
PASS: 'Base64_decode("YWJj")' returned expected 'abc'
PASS: 'window.atob("YWJjZA==")' returned expected 'abcd'
PASS: 'Base64_decode("YWJjZA==")' returned expected 'abcd'
PASS: 'window.atob("YWJjZGU=")' returned expected 'abcde'
PASS: 'Base64_decode("YWJjZGU=")' returned expected 'abcde'
PASS: 'window.atob("YWJjZGVm")' returned expected 'abcdef'
PASS: 'Base64_decode("YWJjZGVm")' returned expected 'abcdef'
PASS: 'typeof window.btoa' returned expected 'function'
PASS: 'window.btoa("")' returned expected ''
PASS: 'window.btoa(null)' returned expected ''
PASS: 'window.atob(window.btoa(window))' returned expected '[object Window]'
PASS: 'window.btoa("\u0080\u0081")' returned expected 'gIE='
Tests failed: 0
Tests passed: 28
So I guess that i did installed novnc locally ,
I dont know why
http://localhost:6080/vnc_auto.html?host=localhost&port=5901&true_color=1
or
http://localhost:6080/vnc_auto.html?host=localhost&port=6080&true_color=1
returned "noVNC ready: native WebSockets, canvas rendering" and after 2 seconds i get "Connect timeout"
from websockify.
I was having the same issue with the websockify.exe that came with noVNC.
I'm not sure if it's the same problem, but when I tried to run the websocketproxy.py file directly with Python 2.7, I get this error:
WARNING: no 'resource' module, daemonizing is slower or disabled
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 374, in main
self = load(from_parent)
File "C:\Python27\lib\pickle.py", line 1378, in load
return Unpickler(file).load()
File "C:\Python27\lib\pickle.py", line 858, in load
dispatch[key](self)
File "C:\Python27\lib\pickle.py", line 1133, in load_reduce
value = func(*args)
File "C:\Python27\lib\multiprocessing\reduction.py", line 193, in rebuild_socket
_sock = fromfd(fd, family, type_, proto)
File "C:\Python27\lib\multiprocessing\reduction.py", line 182, in fromfd
s = socket.fromfd(fd, family, type_, proto)
AttributeError: 'module' object has no attribute 'fromfd'
Apparently that's because socket.fromfd
isn't implemented on Python 2.x for Windows: http://bugs.python.org/issue1378.
When I try to run websockify with Python 3.3, I get a different error message:
1: handler exception: Cannot serialize socket object
WARNING: no 'resource' module, daemonizing is slower or disabled
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python33\lib\multiprocessing\forking.py", line 344, in main
self = load(from_parent)
EOFError
from websockify.
@doriwal , @smithkl42 : are you still experiencing this issue?
from websockify.
I was able to get websockify running on Windows if I used Python 3.2. Neither 2.7 nor 3.3 seem to have the necessary support for pseudo-forking processes on Windows. I haven't tried it with any other versions.
from websockify.
@smithkl42 : it would appear that Python pickles and then unpickles the Process in order to do a fork, and something in websockify isn't pickleable. It's strange, though, that it works on 3.2 and not 3.3. Can you get a more extended stack trace for Python 3.3? I think it's at least worth trying to fix the issue for Python 3.3+ if we can.
from websockify.
I agree that it'd be worth fixing. I'm not a Python coder, so I'm not sure how to get a more detailed stack trace - that's just what shows up on my console when I try to run it under Python 3.3. Any suggestions?
from websockify.
Whoops, didn't mean to close this. Must have clicked the wrong button.
Bah! Python 3.3 just out and out refuses to serialize sockets:
from /usr/lib64/python3.3/socket.py
:
def __getstate__(self):
raise TypeError("Cannot serialize socket object")
While Python 3.2 doesn't specify a __getstate__
method at all. Were you able to confirm that things actually worked properly under Python 3.2? I can't see the Python devs arbitrarily disabling pickling of sockets in Python 3.3 unless there was actually something wrong with the way things worked in 3.2...
from websockify.
Yeah, 3.2 is working fine for me. I haven't tested it under load, but under the limited load I've thrown at it, it's been working just fine. Whatever serialization problems there might be, I suspect they must be of the sort that (for whatever reason) aren't affecting websockify.
from websockify.
@kanaka : I am trying to run the websockify on Windows 2012 R2 Standard (64 bit).
I have installed Python 2.7.11 version.
Installed compatible 64 bit versions of "py2exe" and "numpy".
Went through all of the issues mentioned for running novnc on Windows (especially #108 and #233)
Issue : When I try to connect via the web url (http://localhost/vnc.html?host=localhost&port=6080), I am getting handler exception : "can't pickle thread.lock objects"
"Import error: No module named run" from the forking.py
Please suggest a resolution. I get a feeling that there has not been robust successful running experience of this tool in Windows. Please let me know if it is not intended to run on Windows. Or am I missing something from my side? Appreciate your response
from websockify.
@kabilraj1979 websockify does not work on Windows using python 2.X. There has been some success using python 3.X. However, the node.js version of websockify apparently (I don't have a Windows system to test with) works pretty well on Windows so I suggest you use the node.js version if it that is an option for you.
from websockify.
@kanaka : Thanks for the response. The websockify.js allowed me to connect. Thanks. Need to explore what code is there in the web content. The js file was more or less doing the send and receive part of the web socket connection (kind of a reverse proxy)?
from websockify.
Is there a way to build the nodejs version in a simple script/exe version that is easy to deploy?
I saw the Powershell script here: https://github.com/aberbegall/novnc-launch-powershell/blob/master/README.md
But it has a lot of dependencies (installing full nodejs, then download additional packages etc), so there is no way to easily deploy this for me on multiple clients.
My goal was to put together a free, open and independent remote solution that wont rely on any additional servers.
from websockify.
@kanaka: Every time I have to proxy to a VNC server, I need to have different instances of the websockify.js. Is there a way to run it as a listener that can allow multiple connections on the fly? WebSocketConnections can be opened from one instance of the websockify.js on the fly right?
from websockify.
@kabilraj1979 multiple clients can connect to the same instance of websockify.js at the same time. However, you need to have one instance of websockify.js per target that you want to connect to. The python version of websockify supports target plugins which allow the target to be selected by an opaque token provided by the client. However, this functionality has not been ported to the websockify.js yet.
from websockify.
I tested the SIGCHLD thing, but as you've noticed there are a lot of issues remaining with multiprocessing
. For now I've put an active block in the code so it refuses to start on Windows. Should make our handling of issues a bit smoother at least.
from websockify.
@gdan101 Could you tell me what version of node you had when you got this to run? I'm running into an issue with nodejs 10.1.0 and websockify: https://github.com/novnc/websockify/issues/307#issuecomment-391125660
from websockify.
@mliudev I had node-v6.11.4 on a Windows 7 x64 machine!
from websockify.
@kanaka @CendioOssman Does NOVNC support Reverse VNC connection the way it is supported by tightvnc.
Reference: https://kempniu.wordpress.com/2009/03/21/reverse-connections-in-tightvnc/
How can we open novnc viewer in listening mode if answer is yes for above question.
We are using novnc to capture devices inside network however we want to use same web application for capturing(vnc) devices outside the network over the internet. This is because web server can not reach devices with private ip behind the router. We would like to use reverse vnc feature that should allow devices with private ip to share screen to novnc client on web server
from websockify.
@SiddharthJyoti Please stop spamming the same question in mutliple places
from websockify.
@samhed Your prompt response on the question will be appreciated.
from websockify.
noVNC does not support reverse connections like the one described in that blog.
from websockify.
Related Issues (20)
- Logging and monitor HOT 1
- How to Revoking a Certificate of VNCServer? HOT 1
- TypeError: 'str' object cannot be interpreted as an integer
- noVNC & websockify in Docker Compose on Raspberry Pi 4 using RealVNC Server HOT 1
- Installation fails HOT 1
- wss: via ssl on linux debian board HOT 1
- Readme is missing examples HOT 1
- Failed when connecting: Connection closed (code: 1005) HOT 2
- soft reload possibility HOT 1
- novnc session getting disconnected after 30 min if left idle HOT 5
- Server disconnected (code: 1015). Open developer tools (F12/Ctrl+Shift+I on Windows, Option+Command+I on Mac OS) and switch to "Console" for details HOT 1
- Exception when use JSONTokenApi as token plugin
- how to connect to tls vnc server HOT 4
- Extra parameters HOT 2
- Connection pooling HOT 1
- which option disabling directory listings HOT 1
- Websockify: Integrate xterm.js HOT 1
- add support for accept-ranges in http server HOT 5
- TypeError: can't concat int to bytes HOT 1
- Python 3.12 seems to break websockify HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websockify.