Skip to content

Certificate and key paths cannot have spaces in them #1859

@fabianhartmann2

Description

@fabianhartmann2

Describe the bug
As soon as I use the --cert --key as arguments and the path to the cert contains spaces, I get the following error.

/Library/websockify/websockify/websocket.py:31: UserWarning: no 'numpy' module, HyBi protocol will be slower
warnings.warn("no 'numpy' module, HyBi protocol will be slower")
Usage:
main.py [options] [source_addr:]source_port target_addr:target_port
main.py [options] --token-plugin=CLASS [source_addr:]source_port
main.py [options] --unix-target=FILE [source_addr:]source_port
main.py [options] [source_addr:]source_port -- WRAP_COMMAND_LINE

main.py: error: Error parsing listen port

Failed to start WebSockets proxy

To Reproduce
Steps to reproduce the behavior:

  1. Generate a self-signed cert and store it in a path with spaces.
  2. start novnc_proxy

Expected behavior
websockify should launch and noVNC accessible.

Screenshots
If applicable, add screenshots to help explain your problem.

Client (please complete the following information):

  • OS: macOS 15.4
  • Browser: Safari, Microsoft Edge
  • Browser version: n/a

Server (please complete the following information):

  • noVNC version: latest
  • VNC server: macOS built in
  • WebSocket proxy: websockify

Additional context
Solution
Changing line 195 of novnc_proxy to the following, solves the issue: ${WEBSOCKIFY} ${SYSLOG_ARG} ${SSLONLY} ${FILEONLY_ARG} --web "${WEB}" ${CERT:+--cert "${CERT}"} ${KEY:+--key "${KEY}"} ${PORT} ${VNC_DEST} ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD_ARG} ${TIMEOUT_ARG} ${WEBAUTH_ARG} ${AUTHPLUGIN_ARG} ${AUTHSOURCE_ARG} &

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions